@candesk/contracts 6.7.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/events/queues.d.ts +1 -0
- package/dist/events/queues.js +2 -1
- package/dist/gen/account.d.ts +7 -0
- package/dist/gen/account.js +1 -1
- 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 +8 -0
- package/dist/nest/account.js +2 -1
- 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 +10 -0
- package/proto/kyc.proto +50 -0
- package/proto/user.proto +11 -0
package/dist/events/queues.d.ts
CHANGED
package/dist/events/queues.js
CHANGED
package/dist/gen/account.d.ts
CHANGED
|
@@ -80,6 +80,12 @@ export interface ConfirmAccountDeletionRequest {
|
|
|
80
80
|
export interface ConfirmAccountDeletionResponse {
|
|
81
81
|
ok: boolean;
|
|
82
82
|
}
|
|
83
|
+
export interface SetIdentityVerifiedRequest {
|
|
84
|
+
userId: string;
|
|
85
|
+
}
|
|
86
|
+
export interface SetIdentityVerifiedResponse {
|
|
87
|
+
ok: boolean;
|
|
88
|
+
}
|
|
83
89
|
export interface AccountService {
|
|
84
90
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse>;
|
|
85
91
|
initEmailChange(request: InitEmailChangeRequest): Promise<InitEmailChangeResponse>;
|
|
@@ -90,4 +96,5 @@ export interface AccountService {
|
|
|
90
96
|
unlinkTelegram(request: UnlinkTelegramRequest): Promise<UnlinkTelegramResponse>;
|
|
91
97
|
initAccountDeletion(request: InitAccountDeletionRequest): Promise<InitAccountDeletionResponse>;
|
|
92
98
|
confirmAccountDeletion(request: ConfirmAccountDeletionRequest): Promise<ConfirmAccountDeletionResponse>;
|
|
99
|
+
setIdentityVerified(request: SetIdentityVerifiedRequest): Promise<SetIdentityVerifiedResponse>;
|
|
93
100
|
}
|
package/dist/gen/account.js
CHANGED
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
|
@@ -81,6 +81,12 @@ export interface ConfirmAccountDeletionRequest {
|
|
|
81
81
|
export interface ConfirmAccountDeletionResponse {
|
|
82
82
|
ok: boolean;
|
|
83
83
|
}
|
|
84
|
+
export interface SetIdentityVerifiedRequest {
|
|
85
|
+
userId: string;
|
|
86
|
+
}
|
|
87
|
+
export interface SetIdentityVerifiedResponse {
|
|
88
|
+
ok: boolean;
|
|
89
|
+
}
|
|
84
90
|
export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
85
91
|
export interface AccountServiceClient {
|
|
86
92
|
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
|
|
@@ -92,6 +98,7 @@ export interface AccountServiceClient {
|
|
|
92
98
|
unlinkTelegram(request: UnlinkTelegramRequest): Observable<UnlinkTelegramResponse>;
|
|
93
99
|
initAccountDeletion(request: InitAccountDeletionRequest): Observable<InitAccountDeletionResponse>;
|
|
94
100
|
confirmAccountDeletion(request: ConfirmAccountDeletionRequest): Observable<ConfirmAccountDeletionResponse>;
|
|
101
|
+
setIdentityVerified(request: SetIdentityVerifiedRequest): Observable<SetIdentityVerifiedResponse>;
|
|
95
102
|
}
|
|
96
103
|
export interface AccountServiceController {
|
|
97
104
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
@@ -103,6 +110,7 @@ export interface AccountServiceController {
|
|
|
103
110
|
unlinkTelegram(request: UnlinkTelegramRequest): Promise<UnlinkTelegramResponse> | Observable<UnlinkTelegramResponse> | UnlinkTelegramResponse;
|
|
104
111
|
initAccountDeletion(request: InitAccountDeletionRequest): Promise<InitAccountDeletionResponse> | Observable<InitAccountDeletionResponse> | InitAccountDeletionResponse;
|
|
105
112
|
confirmAccountDeletion(request: ConfirmAccountDeletionRequest): Promise<ConfirmAccountDeletionResponse> | Observable<ConfirmAccountDeletionResponse> | ConfirmAccountDeletionResponse;
|
|
113
|
+
setIdentityVerified(request: SetIdentityVerifiedRequest): Promise<SetIdentityVerifiedResponse> | Observable<SetIdentityVerifiedResponse> | SetIdentityVerifiedResponse;
|
|
106
114
|
}
|
|
107
115
|
export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
|
|
108
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 });
|
|
@@ -31,6 +31,7 @@ function AccountServiceControllerMethods() {
|
|
|
31
31
|
"unlinkTelegram",
|
|
32
32
|
"initAccountDeletion",
|
|
33
33
|
"confirmAccountDeletion",
|
|
34
|
+
"setIdentityVerified",
|
|
34
35
|
];
|
|
35
36
|
for (const method of grpcMethods) {
|
|
36
37
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
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
|
@@ -15,6 +15,8 @@ service AccountService {
|
|
|
15
15
|
|
|
16
16
|
rpc InitAccountDeletion(InitAccountDeletionRequest) returns (InitAccountDeletionResponse);
|
|
17
17
|
rpc ConfirmAccountDeletion(ConfirmAccountDeletionRequest) returns (ConfirmAccountDeletionResponse);
|
|
18
|
+
|
|
19
|
+
rpc SetIdentityVerified(SetIdentityVerifiedRequest) returns (SetIdentityVerifiedResponse);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
message GetAccountRequest {
|
|
@@ -103,6 +105,14 @@ message ConfirmAccountDeletionResponse {
|
|
|
103
105
|
bool ok = 1;
|
|
104
106
|
}
|
|
105
107
|
|
|
108
|
+
message SetIdentityVerifiedRequest {
|
|
109
|
+
string user_id = 1;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
message SetIdentityVerifiedResponse {
|
|
113
|
+
bool ok = 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
106
116
|
enum Role {
|
|
107
117
|
PATIENT = 0;
|
|
108
118
|
ADMIN = 1;
|
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;
|