-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathsaas-use-cases.interface.ts
More file actions
96 lines (78 loc) · 4.34 KB
/
saas-use-cases.interface.ts
File metadata and controls
96 lines (78 loc) · 4.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import { CompanyInfoEntity } from '../../../entities/company-info/company-info.entity.js';
import { CreatedConnectionDTO } from '../../../entities/connection/application/dto/created-connection.dto.js';
import { SaaSRegisterDemoUserAccountDS } from '../../../entities/user/application/data-structures/demo-user-account-register.ds.js';
import { SaasUsualUserRegisterDS } from '../../../entities/user/application/data-structures/usual-register-user.ds.js';
import { FoundUserDto } from '../../../entities/user/dto/found-user.dto.js';
import { UserEntity } from '../../../entities/user/user.entity.js';
import { InTransactionEnum } from '../../../enums/in-transaction.enum.js';
import { CreatedConnectionResponse, SuccessResponse } from '../data-structures/common-responce.ds.js';
import { CreateConnectionForHostedDbDto } from '../data-structures/create-connecttion-for-selfhosted-db.dto.js';
import { DeleteConnectionForHostedDbDto } from '../data-structures/delete-connection-for-hosted-db.dto.js';
import { FoundConnectionInfoRO } from '../data-structures/found-connection-info.ro.js';
import { FreezeConnectionsInCompanyDS } from '../data-structures/freeze-connections-in-company.ds.js';
import { GetConnectionsInfoByIdsDS } from '../data-structures/get-connections-info-by-ids.ds.js';
import { GetHostedConnectionCredentialsDto } from '../data-structures/get-hosted-connection-credentials.dto.js';
import { HostedConnectionCredentialsRO } from '../data-structures/hosted-connection-credentials.ro.js';
import { GetUserInfoByIdDS } from '../data-structures/get-user-info.ds.js';
import { GetUsersInfosByEmailDS } from '../data-structures/get-users-infos-by-email.ds.js';
import { RegisterCompanyWebhookDS } from '../data-structures/register-company.ds.js';
import { RegisteredCompanyDS } from '../data-structures/registered-company.ds.js';
import { SaasRegisterUserWithGithub } from '../data-structures/saas-register-user-with-github.js';
import { SaasSAMLUserRegisterDS } from '../data-structures/saas-saml-user-register.ds.js';
import { SaasRegisterUserWithGoogleDS } from '../data-structures/sass-register-user-with-google.js';
import { SuspendUsersDS } from '../data-structures/suspend-users.ds.js';
import { UpdateHostedConnectionPasswordDto } from '../data-structures/update-hosted-connection-password.dto.js';
export interface ICompanyRegistration {
execute(inputData: RegisterCompanyWebhookDS): Promise<RegisteredCompanyDS>;
}
export interface IGetUserInfo {
execute(userData: GetUserInfoByIdDS): Promise<UserEntity>;
}
export interface ISaasGetUsersInfosByEmail {
execute(userData: GetUsersInfosByEmailDS): Promise<UserEntity[]>;
}
export interface ISaasRegisterUser {
execute(userData: SaasUsualUserRegisterDS): Promise<FoundUserDto>;
}
export interface ISaasDemoRegisterUser {
execute(userData: SaaSRegisterDemoUserAccountDS): Promise<FoundUserDto>;
}
export interface ILoginUserWithGoogle {
execute(inputData: SaasRegisterUserWithGoogleDS, inTransaction: InTransactionEnum): Promise<UserEntity>;
}
export interface ILoginUserWithGitHub {
execute(userData: SaasRegisterUserWithGithub): Promise<UserEntity>;
}
export interface ISuspendUsers {
execute(usersData: SuspendUsersDS): Promise<void>;
}
export interface ISuspendUsersOverLimit {
execute(companyId: string): Promise<void>;
}
export interface ISaaSGetCompanyInfoByUserId {
execute(userId: string): Promise<CompanyInfoEntity>;
}
export interface ISaaSGetUsersCountInCompany {
execute(companyId: string): Promise<number>;
}
export interface IFreezeConnectionsInCompany {
execute(inputData: FreezeConnectionsInCompanyDS): Promise<SuccessResponse>;
}
export interface ISaasSAMLRegisterUser {
execute(userData: SaasSAMLUserRegisterDS): Promise<UserEntity>;
}
export interface ICreateConnectionForHostedDb {
execute(inputData: CreateConnectionForHostedDbDto): Promise<CreatedConnectionResponse>;
}
export interface IDeleteConnectionForHostedDb {
execute(inputData: DeleteConnectionForHostedDbDto): Promise<CreatedConnectionDTO>;
}
export interface IUpdateHostedConnectionPassword {
execute(inputData: UpdateHostedConnectionPasswordDto): Promise<SuccessResponse>;
}
export interface IGetConnectionsInfoByIds {
execute(inputData: GetConnectionsInfoByIdsDS): Promise<Array<FoundConnectionInfoRO>>;
}
export interface IGetHostedConnectionCredentials {
execute(inputData: GetHostedConnectionCredentialsDto): Promise<HostedConnectionCredentialsRO>;
}