@candesk/contracts 6.6.0 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/telegram.constants.d.ts +1 -0
- package/dist/constants/telegram.constants.js +2 -1
- package/dist/events/auth/auth.events.d.ts +1 -0
- package/dist/events/auth/auth.events.js +1 -0
- package/dist/events/auth/index.d.ts +1 -0
- package/dist/events/auth/index.js +1 -0
- package/dist/events/auth/telegram-unlinked.interface.d.ts +4 -0
- package/dist/events/auth/telegram-unlinked.interface.js +2 -0
- package/dist/events/queues.d.ts +1 -0
- package/dist/events/queues.js +2 -1
- package/dist/gen/account.d.ts +21 -0
- package/dist/gen/account.js +1 -1
- package/dist/gen/auth.d.ts +7 -0
- package/dist/gen/auth.js +1 -1
- package/dist/gen/google/protobuf/empty.js +1 -1
- package/dist/gen/kyc.d.ts +41 -0
- package/dist/gen/kyc.js +24 -0
- package/dist/gen/media.js +1 -1
- package/dist/gen/user.d.ts +9 -0
- package/dist/gen/user.js +1 -1
- package/dist/nest/account.d.ts +24 -0
- package/dist/nest/account.js +4 -1
- package/dist/nest/auth.d.ts +7 -0
- package/dist/nest/auth.js +1 -1
- package/dist/nest/google/protobuf/empty.js +1 -1
- package/dist/nest/kyc.d.ts +50 -0
- package/dist/nest/kyc.js +44 -0
- package/dist/nest/media.js +1 -1
- package/dist/nest/user.d.ts +10 -0
- package/dist/nest/user.js +2 -2
- package/dist/proto/paths.d.ts +1 -0
- package/dist/proto/paths.js +2 -1
- package/package.json +1 -1
- package/proto/account.proto +28 -0
- package/proto/auth.proto +8 -0
- package/proto/kyc.proto +50 -0
- package/proto/user.proto +11 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TELEGRAM_SESSION_TTL_SECONDS = void 0;
|
|
3
|
+
exports.TELEGRAM_LINK_START_PREFIX = exports.TELEGRAM_SESSION_TTL_SECONDS = void 0;
|
|
4
4
|
exports.TELEGRAM_SESSION_TTL_SECONDS = 5 * 60; // 5 minutes
|
|
5
|
+
exports.TELEGRAM_LINK_START_PREFIX = 'link_';
|
|
@@ -3,6 +3,7 @@ export declare const AUTH_EVENTS: {
|
|
|
3
3
|
readonly EMAIL_CHANGE_REQUESTED: 'auth.email-change.requested';
|
|
4
4
|
readonly EMAIL_CHANGED: 'auth.email.changed';
|
|
5
5
|
readonly TELEGRAM_LINKED: 'auth.telegram.linked';
|
|
6
|
+
readonly TELEGRAM_UNLINKED: 'auth.telegram.unlinked';
|
|
6
7
|
readonly ACCOUNT_DELETION_REQUESTED: 'auth.account-deletion.requested';
|
|
7
8
|
readonly ACCOUNT_DELETED: 'auth.account.deleted';
|
|
8
9
|
};
|
|
@@ -6,6 +6,7 @@ exports.AUTH_EVENTS = {
|
|
|
6
6
|
EMAIL_CHANGE_REQUESTED: 'auth.email-change.requested',
|
|
7
7
|
EMAIL_CHANGED: 'auth.email.changed',
|
|
8
8
|
TELEGRAM_LINKED: 'auth.telegram.linked',
|
|
9
|
+
TELEGRAM_UNLINKED: 'auth.telegram.unlinked',
|
|
9
10
|
ACCOUNT_DELETION_REQUESTED: 'auth.account-deletion.requested',
|
|
10
11
|
ACCOUNT_DELETED: 'auth.account.deleted'
|
|
11
12
|
};
|
|
@@ -21,3 +21,4 @@ __exportStar(require("./email-change-requested.interface"), exports);
|
|
|
21
21
|
__exportStar(require("./email-changed.interface"), exports);
|
|
22
22
|
__exportStar(require("./otp-requested.interface"), exports);
|
|
23
23
|
__exportStar(require("./telegram-linked.interface"), exports);
|
|
24
|
+
__exportStar(require("./telegram-unlinked.interface"), exports);
|
package/dist/events/queues.d.ts
CHANGED
package/dist/events/queues.js
CHANGED
package/dist/gen/account.d.ts
CHANGED
|
@@ -35,6 +35,12 @@ export interface ConfirmEmailChangeRequest {
|
|
|
35
35
|
export interface ConfirmEmailChangeResponse {
|
|
36
36
|
ok: boolean;
|
|
37
37
|
}
|
|
38
|
+
export interface InitTelegramLinkRequest {
|
|
39
|
+
userId: string;
|
|
40
|
+
}
|
|
41
|
+
export interface InitTelegramLinkResponse {
|
|
42
|
+
url: string;
|
|
43
|
+
}
|
|
38
44
|
export interface LinkTelegramRequest {
|
|
39
45
|
userId: string;
|
|
40
46
|
query: {
|
|
@@ -49,6 +55,12 @@ export interface LinkTelegramResponse {
|
|
|
49
55
|
linked: boolean;
|
|
50
56
|
url: string;
|
|
51
57
|
}
|
|
58
|
+
export interface PollTelegramLinkRequest {
|
|
59
|
+
userId: string;
|
|
60
|
+
}
|
|
61
|
+
export interface PollTelegramLinkResponse {
|
|
62
|
+
linked: boolean;
|
|
63
|
+
}
|
|
52
64
|
export interface UnlinkTelegramRequest {
|
|
53
65
|
userId: string;
|
|
54
66
|
}
|
|
@@ -68,12 +80,21 @@ export interface ConfirmAccountDeletionRequest {
|
|
|
68
80
|
export interface ConfirmAccountDeletionResponse {
|
|
69
81
|
ok: boolean;
|
|
70
82
|
}
|
|
83
|
+
export interface SetIdentityVerifiedRequest {
|
|
84
|
+
userId: string;
|
|
85
|
+
}
|
|
86
|
+
export interface SetIdentityVerifiedResponse {
|
|
87
|
+
ok: boolean;
|
|
88
|
+
}
|
|
71
89
|
export interface AccountService {
|
|
72
90
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse>;
|
|
73
91
|
initEmailChange(request: InitEmailChangeRequest): Promise<InitEmailChangeResponse>;
|
|
74
92
|
confirmEmailChange(request: ConfirmEmailChangeRequest): Promise<ConfirmEmailChangeResponse>;
|
|
93
|
+
initTelegramLink(request: InitTelegramLinkRequest): Promise<InitTelegramLinkResponse>;
|
|
75
94
|
linkTelegram(request: LinkTelegramRequest): Promise<LinkTelegramResponse>;
|
|
95
|
+
pollTelegramLink(request: PollTelegramLinkRequest): Promise<PollTelegramLinkResponse>;
|
|
76
96
|
unlinkTelegram(request: UnlinkTelegramRequest): Promise<UnlinkTelegramResponse>;
|
|
77
97
|
initAccountDeletion(request: InitAccountDeletionRequest): Promise<InitAccountDeletionResponse>;
|
|
78
98
|
confirmAccountDeletion(request: ConfirmAccountDeletionRequest): Promise<ConfirmAccountDeletionResponse>;
|
|
99
|
+
setIdentityVerified(request: SetIdentityVerifiedRequest): Promise<SetIdentityVerifiedResponse>;
|
|
79
100
|
}
|
package/dist/gen/account.js
CHANGED
package/dist/gen/auth.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export interface TelegramCompleteRequest {
|
|
|
53
53
|
export interface TelegramCompleteResponse {
|
|
54
54
|
sessionId: string;
|
|
55
55
|
linked: boolean;
|
|
56
|
+
account: TelegramAccount | undefined;
|
|
56
57
|
}
|
|
57
58
|
export interface TelegramConsumeRequest {
|
|
58
59
|
sessionId: string;
|
|
@@ -74,6 +75,12 @@ export interface TelegramStatusRequest {
|
|
|
74
75
|
}
|
|
75
76
|
export interface TelegramStatusResponse {
|
|
76
77
|
linked: boolean;
|
|
78
|
+
account: TelegramAccount | undefined;
|
|
79
|
+
}
|
|
80
|
+
export interface TelegramAccount {
|
|
81
|
+
id: string;
|
|
82
|
+
email: string;
|
|
83
|
+
phone: string;
|
|
77
84
|
}
|
|
78
85
|
export interface AuthService {
|
|
79
86
|
sendOtp(request: SendOtpRequest): Promise<SendOtpResponse>;
|
package/dist/gen/auth.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.13.
|
|
4
|
+
// protoc-gen-ts_proto v2.13.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: google/protobuf/empty.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const protobufPackage = "kyc.v1";
|
|
2
|
+
export declare enum VerificationStatus {
|
|
3
|
+
VERIFICATION_STATUS_UNSPECIFIED = 0,
|
|
4
|
+
VERIFICATION_STATUS_NONE = 1,
|
|
5
|
+
VERIFICATION_STATUS_PENDING = 2,
|
|
6
|
+
VERIFICATION_STATUS_PROCESSING = 3,
|
|
7
|
+
VERIFICATION_STATUS_MANUAL_REVIEW = 4,
|
|
8
|
+
VERIFICATION_STATUS_ACTION_REQUIRED = 5,
|
|
9
|
+
VERIFICATION_STATUS_REJECTED = 6,
|
|
10
|
+
VERIFICATION_STATUS_VERIFIED = 7,
|
|
11
|
+
VERIFICATION_STATUS_MISMATCH = 8,
|
|
12
|
+
VERIFICATION_STATUS_DUPLICATE = 9,
|
|
13
|
+
UNRECOGNIZED = -1
|
|
14
|
+
}
|
|
15
|
+
export interface CreateSessionRequest {
|
|
16
|
+
userId: string;
|
|
17
|
+
language: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CreateSessionResponse {
|
|
20
|
+
sessionId: string;
|
|
21
|
+
embedToken: string;
|
|
22
|
+
qrCodeUrl: string;
|
|
23
|
+
}
|
|
24
|
+
export interface GetVerificationRequest {
|
|
25
|
+
userId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface GetVerificationResponse {
|
|
28
|
+
status: VerificationStatus;
|
|
29
|
+
}
|
|
30
|
+
export interface HandleWebhookRequest {
|
|
31
|
+
payload: string;
|
|
32
|
+
signature: string;
|
|
33
|
+
}
|
|
34
|
+
export interface HandleWebhookResponse {
|
|
35
|
+
ok: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface KycService {
|
|
38
|
+
createSession(request: CreateSessionRequest): Promise<CreateSessionResponse>;
|
|
39
|
+
getVerification(request: GetVerificationRequest): Promise<GetVerificationResponse>;
|
|
40
|
+
handleWebhook(request: HandleWebhookRequest): Promise<HandleWebhookResponse>;
|
|
41
|
+
}
|
package/dist/gen/kyc.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.13.1
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: kyc.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.VerificationStatus = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
exports.protobufPackage = "kyc.v1";
|
|
11
|
+
var VerificationStatus;
|
|
12
|
+
(function (VerificationStatus) {
|
|
13
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_UNSPECIFIED"] = 0] = "VERIFICATION_STATUS_UNSPECIFIED";
|
|
14
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_NONE"] = 1] = "VERIFICATION_STATUS_NONE";
|
|
15
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_PENDING"] = 2] = "VERIFICATION_STATUS_PENDING";
|
|
16
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_PROCESSING"] = 3] = "VERIFICATION_STATUS_PROCESSING";
|
|
17
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_MANUAL_REVIEW"] = 4] = "VERIFICATION_STATUS_MANUAL_REVIEW";
|
|
18
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_ACTION_REQUIRED"] = 5] = "VERIFICATION_STATUS_ACTION_REQUIRED";
|
|
19
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_REJECTED"] = 6] = "VERIFICATION_STATUS_REJECTED";
|
|
20
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_VERIFIED"] = 7] = "VERIFICATION_STATUS_VERIFIED";
|
|
21
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_MISMATCH"] = 8] = "VERIFICATION_STATUS_MISMATCH";
|
|
22
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_DUPLICATE"] = 9] = "VERIFICATION_STATUS_DUPLICATE";
|
|
23
|
+
VerificationStatus[VerificationStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
24
|
+
})(VerificationStatus || (exports.VerificationStatus = VerificationStatus = {}));
|
package/dist/gen/media.js
CHANGED
package/dist/gen/user.d.ts
CHANGED
|
@@ -32,6 +32,14 @@ export interface SetAvatarResponse {
|
|
|
32
32
|
user: User | undefined;
|
|
33
33
|
previousAvatarKey?: string | undefined;
|
|
34
34
|
}
|
|
35
|
+
export interface SetVerifiedNameRequest {
|
|
36
|
+
id: string;
|
|
37
|
+
firstName: string;
|
|
38
|
+
lastName: string;
|
|
39
|
+
}
|
|
40
|
+
export interface SetVerifiedNameResponse {
|
|
41
|
+
user: User | undefined;
|
|
42
|
+
}
|
|
35
43
|
export interface User {
|
|
36
44
|
id: string;
|
|
37
45
|
firstName: string;
|
|
@@ -52,4 +60,5 @@ export interface UserService {
|
|
|
52
60
|
createUser(request: CreateUserRequest): Promise<CreateUserResponse>;
|
|
53
61
|
updateUser(request: UpdateUserRequest): Promise<UpdateUserResponse>;
|
|
54
62
|
setAvatar(request: SetAvatarRequest): Promise<SetAvatarResponse>;
|
|
63
|
+
setVerifiedName(request: SetVerifiedNameRequest): Promise<SetVerifiedNameResponse>;
|
|
55
64
|
}
|
package/dist/gen/user.js
CHANGED
package/dist/nest/account.d.ts
CHANGED
|
@@ -36,6 +36,12 @@ export interface ConfirmEmailChangeRequest {
|
|
|
36
36
|
export interface ConfirmEmailChangeResponse {
|
|
37
37
|
ok: boolean;
|
|
38
38
|
}
|
|
39
|
+
export interface InitTelegramLinkRequest {
|
|
40
|
+
userId: string;
|
|
41
|
+
}
|
|
42
|
+
export interface InitTelegramLinkResponse {
|
|
43
|
+
url: string;
|
|
44
|
+
}
|
|
39
45
|
export interface LinkTelegramRequest {
|
|
40
46
|
userId: string;
|
|
41
47
|
query: {
|
|
@@ -50,6 +56,12 @@ export interface LinkTelegramResponse {
|
|
|
50
56
|
linked: boolean;
|
|
51
57
|
url: string;
|
|
52
58
|
}
|
|
59
|
+
export interface PollTelegramLinkRequest {
|
|
60
|
+
userId: string;
|
|
61
|
+
}
|
|
62
|
+
export interface PollTelegramLinkResponse {
|
|
63
|
+
linked: boolean;
|
|
64
|
+
}
|
|
53
65
|
export interface UnlinkTelegramRequest {
|
|
54
66
|
userId: string;
|
|
55
67
|
}
|
|
@@ -69,24 +81,36 @@ export interface ConfirmAccountDeletionRequest {
|
|
|
69
81
|
export interface ConfirmAccountDeletionResponse {
|
|
70
82
|
ok: boolean;
|
|
71
83
|
}
|
|
84
|
+
export interface SetIdentityVerifiedRequest {
|
|
85
|
+
userId: string;
|
|
86
|
+
}
|
|
87
|
+
export interface SetIdentityVerifiedResponse {
|
|
88
|
+
ok: boolean;
|
|
89
|
+
}
|
|
72
90
|
export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
73
91
|
export interface AccountServiceClient {
|
|
74
92
|
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
|
|
75
93
|
initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
|
|
76
94
|
confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
|
|
95
|
+
initTelegramLink(request: InitTelegramLinkRequest): Observable<InitTelegramLinkResponse>;
|
|
77
96
|
linkTelegram(request: LinkTelegramRequest): Observable<LinkTelegramResponse>;
|
|
97
|
+
pollTelegramLink(request: PollTelegramLinkRequest): Observable<PollTelegramLinkResponse>;
|
|
78
98
|
unlinkTelegram(request: UnlinkTelegramRequest): Observable<UnlinkTelegramResponse>;
|
|
79
99
|
initAccountDeletion(request: InitAccountDeletionRequest): Observable<InitAccountDeletionResponse>;
|
|
80
100
|
confirmAccountDeletion(request: ConfirmAccountDeletionRequest): Observable<ConfirmAccountDeletionResponse>;
|
|
101
|
+
setIdentityVerified(request: SetIdentityVerifiedRequest): Observable<SetIdentityVerifiedResponse>;
|
|
81
102
|
}
|
|
82
103
|
export interface AccountServiceController {
|
|
83
104
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
84
105
|
initEmailChange(request: InitEmailChangeRequest): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
|
|
85
106
|
confirmEmailChange(request: ConfirmEmailChangeRequest): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
|
|
107
|
+
initTelegramLink(request: InitTelegramLinkRequest): Promise<InitTelegramLinkResponse> | Observable<InitTelegramLinkResponse> | InitTelegramLinkResponse;
|
|
86
108
|
linkTelegram(request: LinkTelegramRequest): Promise<LinkTelegramResponse> | Observable<LinkTelegramResponse> | LinkTelegramResponse;
|
|
109
|
+
pollTelegramLink(request: PollTelegramLinkRequest): Promise<PollTelegramLinkResponse> | Observable<PollTelegramLinkResponse> | PollTelegramLinkResponse;
|
|
87
110
|
unlinkTelegram(request: UnlinkTelegramRequest): Promise<UnlinkTelegramResponse> | Observable<UnlinkTelegramResponse> | UnlinkTelegramResponse;
|
|
88
111
|
initAccountDeletion(request: InitAccountDeletionRequest): Promise<InitAccountDeletionResponse> | Observable<InitAccountDeletionResponse> | InitAccountDeletionResponse;
|
|
89
112
|
confirmAccountDeletion(request: ConfirmAccountDeletionRequest): Promise<ConfirmAccountDeletionResponse> | Observable<ConfirmAccountDeletionResponse> | ConfirmAccountDeletionResponse;
|
|
113
|
+
setIdentityVerified(request: SetIdentityVerifiedRequest): Promise<SetIdentityVerifiedResponse> | Observable<SetIdentityVerifiedResponse> | SetIdentityVerifiedResponse;
|
|
90
114
|
}
|
|
91
115
|
export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
|
|
92
116
|
export declare const ACCOUNT_SERVICE_NAME = "AccountService";
|
package/dist/nest/account.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.13.
|
|
4
|
+
// protoc-gen-ts_proto v2.13.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: account.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -25,10 +25,13 @@ function AccountServiceControllerMethods() {
|
|
|
25
25
|
"getAccount",
|
|
26
26
|
"initEmailChange",
|
|
27
27
|
"confirmEmailChange",
|
|
28
|
+
"initTelegramLink",
|
|
28
29
|
"linkTelegram",
|
|
30
|
+
"pollTelegramLink",
|
|
29
31
|
"unlinkTelegram",
|
|
30
32
|
"initAccountDeletion",
|
|
31
33
|
"confirmAccountDeletion",
|
|
34
|
+
"setIdentityVerified",
|
|
32
35
|
];
|
|
33
36
|
for (const method of grpcMethods) {
|
|
34
37
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/dist/nest/auth.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export interface TelegramCompleteRequest {
|
|
|
54
54
|
export interface TelegramCompleteResponse {
|
|
55
55
|
sessionId: string;
|
|
56
56
|
linked: boolean;
|
|
57
|
+
account: TelegramAccount | undefined;
|
|
57
58
|
}
|
|
58
59
|
export interface TelegramConsumeRequest {
|
|
59
60
|
sessionId: string;
|
|
@@ -75,6 +76,12 @@ export interface TelegramStatusRequest {
|
|
|
75
76
|
}
|
|
76
77
|
export interface TelegramStatusResponse {
|
|
77
78
|
linked: boolean;
|
|
79
|
+
account: TelegramAccount | undefined;
|
|
80
|
+
}
|
|
81
|
+
export interface TelegramAccount {
|
|
82
|
+
id: string;
|
|
83
|
+
email: string;
|
|
84
|
+
phone: string;
|
|
78
85
|
}
|
|
79
86
|
export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
80
87
|
export interface AuthServiceClient {
|
package/dist/nest/auth.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.13.
|
|
4
|
+
// protoc-gen-ts_proto v2.13.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: google/protobuf/empty.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export declare const protobufPackage = "kyc.v1";
|
|
3
|
+
export declare enum VerificationStatus {
|
|
4
|
+
VERIFICATION_STATUS_UNSPECIFIED = 0,
|
|
5
|
+
VERIFICATION_STATUS_NONE = 1,
|
|
6
|
+
VERIFICATION_STATUS_PENDING = 2,
|
|
7
|
+
VERIFICATION_STATUS_PROCESSING = 3,
|
|
8
|
+
VERIFICATION_STATUS_MANUAL_REVIEW = 4,
|
|
9
|
+
VERIFICATION_STATUS_ACTION_REQUIRED = 5,
|
|
10
|
+
VERIFICATION_STATUS_REJECTED = 6,
|
|
11
|
+
VERIFICATION_STATUS_VERIFIED = 7,
|
|
12
|
+
VERIFICATION_STATUS_MISMATCH = 8,
|
|
13
|
+
VERIFICATION_STATUS_DUPLICATE = 9,
|
|
14
|
+
UNRECOGNIZED = -1
|
|
15
|
+
}
|
|
16
|
+
export interface CreateSessionRequest {
|
|
17
|
+
userId: string;
|
|
18
|
+
language: string;
|
|
19
|
+
}
|
|
20
|
+
export interface CreateSessionResponse {
|
|
21
|
+
sessionId: string;
|
|
22
|
+
embedToken: string;
|
|
23
|
+
qrCodeUrl: string;
|
|
24
|
+
}
|
|
25
|
+
export interface GetVerificationRequest {
|
|
26
|
+
userId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface GetVerificationResponse {
|
|
29
|
+
status: VerificationStatus;
|
|
30
|
+
}
|
|
31
|
+
export interface HandleWebhookRequest {
|
|
32
|
+
payload: string;
|
|
33
|
+
signature: string;
|
|
34
|
+
}
|
|
35
|
+
export interface HandleWebhookResponse {
|
|
36
|
+
ok: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare const KYC_V1_PACKAGE_NAME = "kyc.v1";
|
|
39
|
+
export interface KycServiceClient {
|
|
40
|
+
createSession(request: CreateSessionRequest): Observable<CreateSessionResponse>;
|
|
41
|
+
getVerification(request: GetVerificationRequest): Observable<GetVerificationResponse>;
|
|
42
|
+
handleWebhook(request: HandleWebhookRequest): Observable<HandleWebhookResponse>;
|
|
43
|
+
}
|
|
44
|
+
export interface KycServiceController {
|
|
45
|
+
createSession(request: CreateSessionRequest): Promise<CreateSessionResponse> | Observable<CreateSessionResponse> | CreateSessionResponse;
|
|
46
|
+
getVerification(request: GetVerificationRequest): Promise<GetVerificationResponse> | Observable<GetVerificationResponse> | GetVerificationResponse;
|
|
47
|
+
handleWebhook(request: HandleWebhookRequest): Promise<HandleWebhookResponse> | Observable<HandleWebhookResponse> | HandleWebhookResponse;
|
|
48
|
+
}
|
|
49
|
+
export declare function KycServiceControllerMethods(): (constructor: Function) => void;
|
|
50
|
+
export declare const KYC_SERVICE_NAME = "KycService";
|
package/dist/nest/kyc.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.13.1
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: kyc.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.KYC_SERVICE_NAME = exports.KYC_V1_PACKAGE_NAME = exports.VerificationStatus = exports.protobufPackage = void 0;
|
|
9
|
+
exports.KycServiceControllerMethods = KycServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "kyc.v1";
|
|
13
|
+
var VerificationStatus;
|
|
14
|
+
(function (VerificationStatus) {
|
|
15
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_UNSPECIFIED"] = 0] = "VERIFICATION_STATUS_UNSPECIFIED";
|
|
16
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_NONE"] = 1] = "VERIFICATION_STATUS_NONE";
|
|
17
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_PENDING"] = 2] = "VERIFICATION_STATUS_PENDING";
|
|
18
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_PROCESSING"] = 3] = "VERIFICATION_STATUS_PROCESSING";
|
|
19
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_MANUAL_REVIEW"] = 4] = "VERIFICATION_STATUS_MANUAL_REVIEW";
|
|
20
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_ACTION_REQUIRED"] = 5] = "VERIFICATION_STATUS_ACTION_REQUIRED";
|
|
21
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_REJECTED"] = 6] = "VERIFICATION_STATUS_REJECTED";
|
|
22
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_VERIFIED"] = 7] = "VERIFICATION_STATUS_VERIFIED";
|
|
23
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_MISMATCH"] = 8] = "VERIFICATION_STATUS_MISMATCH";
|
|
24
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_DUPLICATE"] = 9] = "VERIFICATION_STATUS_DUPLICATE";
|
|
25
|
+
VerificationStatus[VerificationStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
26
|
+
})(VerificationStatus || (exports.VerificationStatus = VerificationStatus = {}));
|
|
27
|
+
exports.KYC_V1_PACKAGE_NAME = "kyc.v1";
|
|
28
|
+
function KycServiceControllerMethods() {
|
|
29
|
+
return function (constructor) {
|
|
30
|
+
const grpcMethods = ["createSession", "getVerification", "handleWebhook"];
|
|
31
|
+
for (const method of grpcMethods) {
|
|
32
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
33
|
+
(0, microservices_1.GrpcMethod)("KycService", method)(constructor.prototype[method], method, descriptor);
|
|
34
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
35
|
+
}
|
|
36
|
+
const grpcStreamMethods = [];
|
|
37
|
+
for (const method of grpcStreamMethods) {
|
|
38
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
39
|
+
(0, microservices_1.GrpcStreamMethod)("KycService", method)(constructor.prototype[method], method, descriptor);
|
|
40
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
exports.KYC_SERVICE_NAME = "KycService";
|
package/dist/nest/media.js
CHANGED
package/dist/nest/user.d.ts
CHANGED
|
@@ -33,6 +33,14 @@ export interface SetAvatarResponse {
|
|
|
33
33
|
user: User | undefined;
|
|
34
34
|
previousAvatarKey?: string | undefined;
|
|
35
35
|
}
|
|
36
|
+
export interface SetVerifiedNameRequest {
|
|
37
|
+
id: string;
|
|
38
|
+
firstName: string;
|
|
39
|
+
lastName: string;
|
|
40
|
+
}
|
|
41
|
+
export interface SetVerifiedNameResponse {
|
|
42
|
+
user: User | undefined;
|
|
43
|
+
}
|
|
36
44
|
export interface User {
|
|
37
45
|
id: string;
|
|
38
46
|
firstName: string;
|
|
@@ -54,12 +62,14 @@ export interface UserServiceClient {
|
|
|
54
62
|
createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
|
|
55
63
|
updateUser(request: UpdateUserRequest): Observable<UpdateUserResponse>;
|
|
56
64
|
setAvatar(request: SetAvatarRequest): Observable<SetAvatarResponse>;
|
|
65
|
+
setVerifiedName(request: SetVerifiedNameRequest): Observable<SetVerifiedNameResponse>;
|
|
57
66
|
}
|
|
58
67
|
export interface UserServiceController {
|
|
59
68
|
getUser(request: GetUserRequest): Promise<GetUserResponse> | Observable<GetUserResponse> | GetUserResponse;
|
|
60
69
|
createUser(request: CreateUserRequest): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
|
|
61
70
|
updateUser(request: UpdateUserRequest): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
|
|
62
71
|
setAvatar(request: SetAvatarRequest): Promise<SetAvatarResponse> | Observable<SetAvatarResponse> | SetAvatarResponse;
|
|
72
|
+
setVerifiedName(request: SetVerifiedNameRequest): Promise<SetVerifiedNameResponse> | Observable<SetVerifiedNameResponse> | SetVerifiedNameResponse;
|
|
63
73
|
}
|
|
64
74
|
export declare function UserServiceControllerMethods(): (constructor: Function) => void;
|
|
65
75
|
export declare const USER_SERVICE_NAME = "UserService";
|
package/dist/nest/user.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.13.
|
|
4
|
+
// protoc-gen-ts_proto v2.13.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: user.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -13,7 +13,7 @@ exports.protobufPackage = "user.v1";
|
|
|
13
13
|
exports.USER_V1_PACKAGE_NAME = "user.v1";
|
|
14
14
|
function UserServiceControllerMethods() {
|
|
15
15
|
return function (constructor) {
|
|
16
|
-
const grpcMethods = ["getUser", "createUser", "updateUser", "setAvatar"];
|
|
16
|
+
const grpcMethods = ["getUser", "createUser", "updateUser", "setAvatar", "setVerifiedName"];
|
|
17
17
|
for (const method of grpcMethods) {
|
|
18
18
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
19
|
(0, microservices_1.GrpcMethod)("UserService", method)(constructor.prototype[method], method, descriptor);
|
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
|
@@ -6,5 +6,6 @@ exports.PROTO_PATHS = {
|
|
|
6
6
|
AUTH: (0, path_1.join)(__dirname, '../../proto/auth.proto'),
|
|
7
7
|
ACCOUNT: (0, path_1.join)(__dirname, '../../proto/account.proto'),
|
|
8
8
|
USER: (0, path_1.join)(__dirname, '../../proto/user.proto'),
|
|
9
|
-
MEDIA: (0, path_1.join)(__dirname, '../../proto/media.proto')
|
|
9
|
+
MEDIA: (0, path_1.join)(__dirname, '../../proto/media.proto'),
|
|
10
|
+
KYC: (0, path_1.join)(__dirname, '../../proto/kyc.proto')
|
|
10
11
|
};
|
package/package.json
CHANGED
package/proto/account.proto
CHANGED
|
@@ -8,11 +8,15 @@ service AccountService {
|
|
|
8
8
|
rpc InitEmailChange(InitEmailChangeRequest) returns (InitEmailChangeResponse);
|
|
9
9
|
rpc ConfirmEmailChange(ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
|
|
10
10
|
|
|
11
|
+
rpc InitTelegramLink(InitTelegramLinkRequest) returns (InitTelegramLinkResponse);
|
|
11
12
|
rpc LinkTelegram(LinkTelegramRequest) returns (LinkTelegramResponse);
|
|
13
|
+
rpc PollTelegramLink(PollTelegramLinkRequest) returns (PollTelegramLinkResponse);
|
|
12
14
|
rpc UnlinkTelegram(UnlinkTelegramRequest) returns (UnlinkTelegramResponse);
|
|
13
15
|
|
|
14
16
|
rpc InitAccountDeletion(InitAccountDeletionRequest) returns (InitAccountDeletionResponse);
|
|
15
17
|
rpc ConfirmAccountDeletion(ConfirmAccountDeletionRequest) returns (ConfirmAccountDeletionResponse);
|
|
18
|
+
|
|
19
|
+
rpc SetIdentityVerified(SetIdentityVerifiedRequest) returns (SetIdentityVerifiedResponse);
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
message GetAccountRequest {
|
|
@@ -50,6 +54,14 @@ message ConfirmEmailChangeResponse {
|
|
|
50
54
|
bool ok = 1;
|
|
51
55
|
}
|
|
52
56
|
|
|
57
|
+
message InitTelegramLinkRequest {
|
|
58
|
+
string user_id = 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message InitTelegramLinkResponse {
|
|
62
|
+
string url = 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
53
65
|
message LinkTelegramRequest {
|
|
54
66
|
string user_id = 1;
|
|
55
67
|
map<string, string> query = 2;
|
|
@@ -60,6 +72,14 @@ message LinkTelegramResponse {
|
|
|
60
72
|
string url = 2;
|
|
61
73
|
}
|
|
62
74
|
|
|
75
|
+
message PollTelegramLinkRequest {
|
|
76
|
+
string user_id = 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message PollTelegramLinkResponse {
|
|
80
|
+
bool linked = 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
63
83
|
message UnlinkTelegramRequest {
|
|
64
84
|
string user_id = 1;
|
|
65
85
|
}
|
|
@@ -85,6 +105,14 @@ message ConfirmAccountDeletionResponse {
|
|
|
85
105
|
bool ok = 1;
|
|
86
106
|
}
|
|
87
107
|
|
|
108
|
+
message SetIdentityVerifiedRequest {
|
|
109
|
+
string user_id = 1;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
message SetIdentityVerifiedResponse {
|
|
113
|
+
bool ok = 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
88
116
|
enum Role {
|
|
89
117
|
PATIENT = 0;
|
|
90
118
|
ADMIN = 1;
|
package/proto/auth.proto
CHANGED
|
@@ -77,6 +77,7 @@ message TelegramCompleteRequest {
|
|
|
77
77
|
message TelegramCompleteResponse {
|
|
78
78
|
string session_id = 1;
|
|
79
79
|
bool linked = 2;
|
|
80
|
+
TelegramAccount account = 3;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
message TelegramConsumeRequest {
|
|
@@ -104,4 +105,11 @@ message TelegramStatusRequest {
|
|
|
104
105
|
|
|
105
106
|
message TelegramStatusResponse {
|
|
106
107
|
bool linked = 1;
|
|
108
|
+
TelegramAccount account = 2;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
message TelegramAccount {
|
|
112
|
+
string id = 1;
|
|
113
|
+
string email = 2;
|
|
114
|
+
string phone = 3;
|
|
107
115
|
}
|
package/proto/kyc.proto
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package kyc.v1;
|
|
4
|
+
|
|
5
|
+
service KycService {
|
|
6
|
+
rpc CreateSession (CreateSessionRequest) returns (CreateSessionResponse);
|
|
7
|
+
rpc GetVerification (GetVerificationRequest) returns (GetVerificationResponse);
|
|
8
|
+
rpc HandleWebhook (HandleWebhookRequest) returns (HandleWebhookResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
enum VerificationStatus {
|
|
12
|
+
VERIFICATION_STATUS_UNSPECIFIED = 0;
|
|
13
|
+
VERIFICATION_STATUS_NONE = 1;
|
|
14
|
+
VERIFICATION_STATUS_PENDING = 2;
|
|
15
|
+
VERIFICATION_STATUS_PROCESSING = 3;
|
|
16
|
+
VERIFICATION_STATUS_MANUAL_REVIEW = 4;
|
|
17
|
+
VERIFICATION_STATUS_ACTION_REQUIRED = 5;
|
|
18
|
+
VERIFICATION_STATUS_REJECTED = 6;
|
|
19
|
+
VERIFICATION_STATUS_VERIFIED = 7;
|
|
20
|
+
VERIFICATION_STATUS_MISMATCH = 8;
|
|
21
|
+
VERIFICATION_STATUS_DUPLICATE = 9;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message CreateSessionRequest {
|
|
25
|
+
string user_id = 1;
|
|
26
|
+
string language = 2;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message CreateSessionResponse {
|
|
30
|
+
string session_id = 1;
|
|
31
|
+
string embed_token = 2;
|
|
32
|
+
string qr_code_url = 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message GetVerificationRequest {
|
|
36
|
+
string user_id = 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message GetVerificationResponse {
|
|
40
|
+
VerificationStatus status = 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message HandleWebhookRequest {
|
|
44
|
+
string payload = 1;
|
|
45
|
+
string signature = 2;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message HandleWebhookResponse {
|
|
49
|
+
bool ok = 1;
|
|
50
|
+
}
|
package/proto/user.proto
CHANGED
|
@@ -7,6 +7,7 @@ service UserService {
|
|
|
7
7
|
rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
|
|
8
8
|
rpc UpdateUser (UpdateUserRequest) returns (UpdateUserResponse);
|
|
9
9
|
rpc SetAvatar (SetAvatarRequest) returns (SetAvatarResponse);
|
|
10
|
+
rpc SetVerifiedName (SetVerifiedNameRequest) returns (SetVerifiedNameResponse);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
message GetUserRequest {
|
|
@@ -50,6 +51,16 @@ message SetAvatarResponse {
|
|
|
50
51
|
optional string previous_avatar_key = 2;
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
message SetVerifiedNameRequest {
|
|
55
|
+
string id = 1;
|
|
56
|
+
string first_name = 2;
|
|
57
|
+
string last_name = 3;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message SetVerifiedNameResponse {
|
|
61
|
+
User user = 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
53
64
|
message User {
|
|
54
65
|
string id = 1;
|
|
55
66
|
string first_name = 2;
|