@candesk/contracts 6.35.0 → 6.36.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/gen/account.d.ts +33 -0
- package/dist/gen/account.js +8 -2
- package/dist/gen/audit.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 +13 -0
- package/dist/gen/kyc.js +2 -1
- package/dist/gen/media.js +1 -1
- package/dist/gen/payment.js +1 -1
- package/dist/gen/staff.js +1 -1
- package/dist/gen/treatment.js +1 -1
- package/dist/gen/user.d.ts +7 -0
- package/dist/gen/user.js +1 -1
- package/dist/nest/account.d.ts +35 -0
- package/dist/nest/account.js +10 -2
- package/dist/nest/audit.js +1 -1
- package/dist/nest/auth.js +1 -1
- package/dist/nest/google/protobuf/empty.js +1 -1
- package/dist/nest/kyc.d.ts +14 -0
- package/dist/nest/kyc.js +3 -2
- package/dist/nest/media.js +1 -1
- package/dist/nest/payment.js +1 -1
- package/dist/nest/staff.js +1 -1
- package/dist/nest/treatment.js +1 -1
- package/dist/nest/user.d.ts +8 -0
- package/dist/nest/user.js +2 -2
- package/package.json +1 -1
- package/proto/account.proto +39 -0
- package/proto/kyc.proto +16 -0
- package/proto/user.proto +9 -0
package/dist/gen/account.d.ts
CHANGED
|
@@ -8,6 +8,11 @@ export declare enum Role {
|
|
|
8
8
|
SUPER_ADMIN = 4,
|
|
9
9
|
UNRECOGNIZED = -1
|
|
10
10
|
}
|
|
11
|
+
export declare enum PatientStatus {
|
|
12
|
+
UNVERIFIED = 0,
|
|
13
|
+
VERIFIED = 1,
|
|
14
|
+
UNRECOGNIZED = -1
|
|
15
|
+
}
|
|
11
16
|
export interface GetAccountRequest {
|
|
12
17
|
id: string;
|
|
13
18
|
}
|
|
@@ -177,6 +182,22 @@ export interface ResetStaffTotpRequest {
|
|
|
177
182
|
export interface ResetStaffTotpResponse {
|
|
178
183
|
account: StaffAccount | undefined;
|
|
179
184
|
}
|
|
185
|
+
export interface ListPatientAccountsRequest {
|
|
186
|
+
id?: string | undefined;
|
|
187
|
+
status?: PatientStatus | undefined;
|
|
188
|
+
cursor?: string | undefined;
|
|
189
|
+
limit: number;
|
|
190
|
+
}
|
|
191
|
+
export interface ListPatientAccountsResponse {
|
|
192
|
+
accounts: PatientAccount[];
|
|
193
|
+
nextCursor?: string | undefined;
|
|
194
|
+
}
|
|
195
|
+
export interface GetPatientAccountRequest {
|
|
196
|
+
id: string;
|
|
197
|
+
}
|
|
198
|
+
export interface GetPatientAccountResponse {
|
|
199
|
+
account: PatientAccount | undefined;
|
|
200
|
+
}
|
|
180
201
|
export interface StaffAccount {
|
|
181
202
|
id: string;
|
|
182
203
|
email: string;
|
|
@@ -186,6 +207,16 @@ export interface StaffAccount {
|
|
|
186
207
|
lastActiveAt?: string | undefined;
|
|
187
208
|
isTotpEnabled: boolean;
|
|
188
209
|
}
|
|
210
|
+
export interface PatientAccount {
|
|
211
|
+
id: string;
|
|
212
|
+
email?: string | undefined;
|
|
213
|
+
phone?: string | undefined;
|
|
214
|
+
isTelegramLinked: boolean;
|
|
215
|
+
status: PatientStatus;
|
|
216
|
+
isTotpEnabled: boolean;
|
|
217
|
+
createdAt: string;
|
|
218
|
+
lastActiveAt?: string | undefined;
|
|
219
|
+
}
|
|
189
220
|
export interface AccountService {
|
|
190
221
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse>;
|
|
191
222
|
initEmailChange(request: InitEmailChangeRequest): Promise<InitEmailChangeResponse>;
|
|
@@ -209,4 +240,6 @@ export interface AccountService {
|
|
|
209
240
|
setStaffActive(request: SetStaffActiveRequest): Promise<SetStaffActiveResponse>;
|
|
210
241
|
changeStaffEmail(request: ChangeStaffEmailRequest): Promise<ChangeStaffEmailResponse>;
|
|
211
242
|
resetStaffTotp(request: ResetStaffTotpRequest): Promise<ResetStaffTotpResponse>;
|
|
243
|
+
listPatientAccounts(request: ListPatientAccountsRequest): Promise<ListPatientAccountsResponse>;
|
|
244
|
+
getPatientAccount(request: GetPatientAccountRequest): Promise<GetPatientAccountResponse>;
|
|
212
245
|
}
|
package/dist/gen/account.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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.18.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: account.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Role = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
8
|
+
exports.PatientStatus = exports.Role = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
exports.protobufPackage = "account.v1";
|
|
11
11
|
exports.protobufFileName = "account.proto";
|
|
@@ -18,3 +18,9 @@ var Role;
|
|
|
18
18
|
Role[Role["SUPER_ADMIN"] = 4] = "SUPER_ADMIN";
|
|
19
19
|
Role[Role["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
20
|
})(Role || (exports.Role = Role = {}));
|
|
21
|
+
var PatientStatus;
|
|
22
|
+
(function (PatientStatus) {
|
|
23
|
+
PatientStatus[PatientStatus["UNVERIFIED"] = 0] = "UNVERIFIED";
|
|
24
|
+
PatientStatus[PatientStatus["VERIFIED"] = 1] = "VERIFIED";
|
|
25
|
+
PatientStatus[PatientStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
26
|
+
})(PatientStatus || (exports.PatientStatus = PatientStatus = {}));
|
package/dist/gen/audit.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.18.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: google/protobuf/empty.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/gen/kyc.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare enum VerificationStatus {
|
|
|
11
11
|
VERIFICATION_STATUS_VERIFIED = 7,
|
|
12
12
|
VERIFICATION_STATUS_MISMATCH = 8,
|
|
13
13
|
VERIFICATION_STATUS_DUPLICATE = 9,
|
|
14
|
+
VERIFICATION_STATUS_EXPIRED = 10,
|
|
14
15
|
UNRECOGNIZED = -1
|
|
15
16
|
}
|
|
16
17
|
export interface CreateSessionRequest {
|
|
@@ -28,6 +29,17 @@ export interface GetVerificationRequest {
|
|
|
28
29
|
export interface GetVerificationResponse {
|
|
29
30
|
status: VerificationStatus;
|
|
30
31
|
}
|
|
32
|
+
export interface ListVerificationsRequest {
|
|
33
|
+
userId: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ListVerificationsResponse {
|
|
36
|
+
verifications: Verification[];
|
|
37
|
+
}
|
|
38
|
+
export interface Verification {
|
|
39
|
+
status: VerificationStatus;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
checkedAt?: string | undefined;
|
|
42
|
+
}
|
|
31
43
|
export interface HandleWebhookRequest {
|
|
32
44
|
payload: string;
|
|
33
45
|
signature: string;
|
|
@@ -38,5 +50,6 @@ export interface HandleWebhookResponse {
|
|
|
38
50
|
export interface KycService {
|
|
39
51
|
createSession(request: CreateSessionRequest): Promise<CreateSessionResponse>;
|
|
40
52
|
getVerification(request: GetVerificationRequest): Promise<GetVerificationResponse>;
|
|
53
|
+
listVerifications(request: ListVerificationsRequest): Promise<ListVerificationsResponse>;
|
|
41
54
|
handleWebhook(request: HandleWebhookRequest): Promise<HandleWebhookResponse>;
|
|
42
55
|
}
|
package/dist/gen/kyc.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.18.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: kyc.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -21,5 +21,6 @@ var VerificationStatus;
|
|
|
21
21
|
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_VERIFIED"] = 7] = "VERIFICATION_STATUS_VERIFIED";
|
|
22
22
|
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_MISMATCH"] = 8] = "VERIFICATION_STATUS_MISMATCH";
|
|
23
23
|
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_DUPLICATE"] = 9] = "VERIFICATION_STATUS_DUPLICATE";
|
|
24
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_EXPIRED"] = 10] = "VERIFICATION_STATUS_EXPIRED";
|
|
24
25
|
VerificationStatus[VerificationStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
25
26
|
})(VerificationStatus || (exports.VerificationStatus = VerificationStatus = {}));
|
package/dist/gen/media.js
CHANGED
package/dist/gen/payment.js
CHANGED
package/dist/gen/staff.js
CHANGED
package/dist/gen/treatment.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.18.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: treatment.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/gen/user.d.ts
CHANGED
|
@@ -6,6 +6,12 @@ export interface GetUserRequest {
|
|
|
6
6
|
export interface GetUserResponse {
|
|
7
7
|
user: User | undefined;
|
|
8
8
|
}
|
|
9
|
+
export interface ListUsersRequest {
|
|
10
|
+
ids: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface ListUsersResponse {
|
|
13
|
+
users: User[];
|
|
14
|
+
}
|
|
9
15
|
export interface CreateUserRequest {
|
|
10
16
|
id: string;
|
|
11
17
|
firstName: string;
|
|
@@ -61,6 +67,7 @@ export interface Address {
|
|
|
61
67
|
}
|
|
62
68
|
export interface UserService {
|
|
63
69
|
getUser(request: GetUserRequest): Promise<GetUserResponse>;
|
|
70
|
+
listUsers(request: ListUsersRequest): Promise<ListUsersResponse>;
|
|
64
71
|
createUser(request: CreateUserRequest): Promise<CreateUserResponse>;
|
|
65
72
|
updateUser(request: UpdateUserRequest): Promise<UpdateUserResponse>;
|
|
66
73
|
setAvatar(request: SetAvatarRequest): Promise<SetAvatarResponse>;
|
package/dist/gen/user.js
CHANGED
package/dist/nest/account.d.ts
CHANGED
|
@@ -9,6 +9,11 @@ export declare enum Role {
|
|
|
9
9
|
SUPER_ADMIN = 4,
|
|
10
10
|
UNRECOGNIZED = -1
|
|
11
11
|
}
|
|
12
|
+
export declare enum PatientStatus {
|
|
13
|
+
UNVERIFIED = 0,
|
|
14
|
+
VERIFIED = 1,
|
|
15
|
+
UNRECOGNIZED = -1
|
|
16
|
+
}
|
|
12
17
|
export interface GetAccountRequest {
|
|
13
18
|
id: string;
|
|
14
19
|
}
|
|
@@ -178,6 +183,22 @@ export interface ResetStaffTotpRequest {
|
|
|
178
183
|
export interface ResetStaffTotpResponse {
|
|
179
184
|
account: StaffAccount | undefined;
|
|
180
185
|
}
|
|
186
|
+
export interface ListPatientAccountsRequest {
|
|
187
|
+
id?: string | undefined;
|
|
188
|
+
status?: PatientStatus | undefined;
|
|
189
|
+
cursor?: string | undefined;
|
|
190
|
+
limit: number;
|
|
191
|
+
}
|
|
192
|
+
export interface ListPatientAccountsResponse {
|
|
193
|
+
accounts: PatientAccount[];
|
|
194
|
+
nextCursor?: string | undefined;
|
|
195
|
+
}
|
|
196
|
+
export interface GetPatientAccountRequest {
|
|
197
|
+
id: string;
|
|
198
|
+
}
|
|
199
|
+
export interface GetPatientAccountResponse {
|
|
200
|
+
account: PatientAccount | undefined;
|
|
201
|
+
}
|
|
181
202
|
export interface StaffAccount {
|
|
182
203
|
id: string;
|
|
183
204
|
email: string;
|
|
@@ -187,6 +208,16 @@ export interface StaffAccount {
|
|
|
187
208
|
lastActiveAt?: string | undefined;
|
|
188
209
|
isTotpEnabled: boolean;
|
|
189
210
|
}
|
|
211
|
+
export interface PatientAccount {
|
|
212
|
+
id: string;
|
|
213
|
+
email?: string | undefined;
|
|
214
|
+
phone?: string | undefined;
|
|
215
|
+
isTelegramLinked: boolean;
|
|
216
|
+
status: PatientStatus;
|
|
217
|
+
isTotpEnabled: boolean;
|
|
218
|
+
createdAt: string;
|
|
219
|
+
lastActiveAt?: string | undefined;
|
|
220
|
+
}
|
|
190
221
|
export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
191
222
|
export interface AccountServiceClient {
|
|
192
223
|
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
|
|
@@ -211,6 +242,8 @@ export interface AccountServiceClient {
|
|
|
211
242
|
setStaffActive(request: SetStaffActiveRequest): Observable<SetStaffActiveResponse>;
|
|
212
243
|
changeStaffEmail(request: ChangeStaffEmailRequest): Observable<ChangeStaffEmailResponse>;
|
|
213
244
|
resetStaffTotp(request: ResetStaffTotpRequest): Observable<ResetStaffTotpResponse>;
|
|
245
|
+
listPatientAccounts(request: ListPatientAccountsRequest): Observable<ListPatientAccountsResponse>;
|
|
246
|
+
getPatientAccount(request: GetPatientAccountRequest): Observable<GetPatientAccountResponse>;
|
|
214
247
|
}
|
|
215
248
|
export interface AccountServiceController {
|
|
216
249
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
@@ -235,6 +268,8 @@ export interface AccountServiceController {
|
|
|
235
268
|
setStaffActive(request: SetStaffActiveRequest): Promise<SetStaffActiveResponse> | Observable<SetStaffActiveResponse> | SetStaffActiveResponse;
|
|
236
269
|
changeStaffEmail(request: ChangeStaffEmailRequest): Promise<ChangeStaffEmailResponse> | Observable<ChangeStaffEmailResponse> | ChangeStaffEmailResponse;
|
|
237
270
|
resetStaffTotp(request: ResetStaffTotpRequest): Promise<ResetStaffTotpResponse> | Observable<ResetStaffTotpResponse> | ResetStaffTotpResponse;
|
|
271
|
+
listPatientAccounts(request: ListPatientAccountsRequest): Promise<ListPatientAccountsResponse> | Observable<ListPatientAccountsResponse> | ListPatientAccountsResponse;
|
|
272
|
+
getPatientAccount(request: GetPatientAccountRequest): Promise<GetPatientAccountResponse> | Observable<GetPatientAccountResponse> | GetPatientAccountResponse;
|
|
238
273
|
}
|
|
239
274
|
export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
|
|
240
275
|
export declare const ACCOUNT_SERVICE_NAME = "AccountService";
|
package/dist/nest/account.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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.18.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: account.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ACCOUNT_SERVICE_NAME = exports.ACCOUNT_V1_PACKAGE_NAME = exports.Role = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
8
|
+
exports.ACCOUNT_SERVICE_NAME = exports.ACCOUNT_V1_PACKAGE_NAME = exports.PatientStatus = exports.Role = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
9
|
exports.AccountServiceControllerMethods = AccountServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
@@ -20,6 +20,12 @@ var Role;
|
|
|
20
20
|
Role[Role["SUPER_ADMIN"] = 4] = "SUPER_ADMIN";
|
|
21
21
|
Role[Role["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
22
22
|
})(Role || (exports.Role = Role = {}));
|
|
23
|
+
var PatientStatus;
|
|
24
|
+
(function (PatientStatus) {
|
|
25
|
+
PatientStatus[PatientStatus["UNVERIFIED"] = 0] = "UNVERIFIED";
|
|
26
|
+
PatientStatus[PatientStatus["VERIFIED"] = 1] = "VERIFIED";
|
|
27
|
+
PatientStatus[PatientStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
28
|
+
})(PatientStatus || (exports.PatientStatus = PatientStatus = {}));
|
|
23
29
|
exports.ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
24
30
|
function AccountServiceControllerMethods() {
|
|
25
31
|
return function (constructor) {
|
|
@@ -46,6 +52,8 @@ function AccountServiceControllerMethods() {
|
|
|
46
52
|
"setStaffActive",
|
|
47
53
|
"changeStaffEmail",
|
|
48
54
|
"resetStaffTotp",
|
|
55
|
+
"listPatientAccounts",
|
|
56
|
+
"getPatientAccount",
|
|
49
57
|
];
|
|
50
58
|
for (const method of grpcMethods) {
|
|
51
59
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/dist/nest/audit.js
CHANGED
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.18.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: google/protobuf/empty.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/nest/kyc.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare enum VerificationStatus {
|
|
|
12
12
|
VERIFICATION_STATUS_VERIFIED = 7,
|
|
13
13
|
VERIFICATION_STATUS_MISMATCH = 8,
|
|
14
14
|
VERIFICATION_STATUS_DUPLICATE = 9,
|
|
15
|
+
VERIFICATION_STATUS_EXPIRED = 10,
|
|
15
16
|
UNRECOGNIZED = -1
|
|
16
17
|
}
|
|
17
18
|
export interface CreateSessionRequest {
|
|
@@ -29,6 +30,17 @@ export interface GetVerificationRequest {
|
|
|
29
30
|
export interface GetVerificationResponse {
|
|
30
31
|
status: VerificationStatus;
|
|
31
32
|
}
|
|
33
|
+
export interface ListVerificationsRequest {
|
|
34
|
+
userId: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ListVerificationsResponse {
|
|
37
|
+
verifications: Verification[];
|
|
38
|
+
}
|
|
39
|
+
export interface Verification {
|
|
40
|
+
status: VerificationStatus;
|
|
41
|
+
createdAt: string;
|
|
42
|
+
checkedAt?: string | undefined;
|
|
43
|
+
}
|
|
32
44
|
export interface HandleWebhookRequest {
|
|
33
45
|
payload: string;
|
|
34
46
|
signature: string;
|
|
@@ -40,11 +52,13 @@ export declare const KYC_V1_PACKAGE_NAME = "kyc.v1";
|
|
|
40
52
|
export interface KycServiceClient {
|
|
41
53
|
createSession(request: CreateSessionRequest): Observable<CreateSessionResponse>;
|
|
42
54
|
getVerification(request: GetVerificationRequest): Observable<GetVerificationResponse>;
|
|
55
|
+
listVerifications(request: ListVerificationsRequest): Observable<ListVerificationsResponse>;
|
|
43
56
|
handleWebhook(request: HandleWebhookRequest): Observable<HandleWebhookResponse>;
|
|
44
57
|
}
|
|
45
58
|
export interface KycServiceController {
|
|
46
59
|
createSession(request: CreateSessionRequest): Promise<CreateSessionResponse> | Observable<CreateSessionResponse> | CreateSessionResponse;
|
|
47
60
|
getVerification(request: GetVerificationRequest): Promise<GetVerificationResponse> | Observable<GetVerificationResponse> | GetVerificationResponse;
|
|
61
|
+
listVerifications(request: ListVerificationsRequest): Promise<ListVerificationsResponse> | Observable<ListVerificationsResponse> | ListVerificationsResponse;
|
|
48
62
|
handleWebhook(request: HandleWebhookRequest): Promise<HandleWebhookResponse> | Observable<HandleWebhookResponse> | HandleWebhookResponse;
|
|
49
63
|
}
|
|
50
64
|
export declare function KycServiceControllerMethods(): (constructor: Function) => void;
|
package/dist/nest/kyc.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.18.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: kyc.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -23,12 +23,13 @@ var VerificationStatus;
|
|
|
23
23
|
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_VERIFIED"] = 7] = "VERIFICATION_STATUS_VERIFIED";
|
|
24
24
|
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_MISMATCH"] = 8] = "VERIFICATION_STATUS_MISMATCH";
|
|
25
25
|
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_DUPLICATE"] = 9] = "VERIFICATION_STATUS_DUPLICATE";
|
|
26
|
+
VerificationStatus[VerificationStatus["VERIFICATION_STATUS_EXPIRED"] = 10] = "VERIFICATION_STATUS_EXPIRED";
|
|
26
27
|
VerificationStatus[VerificationStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
27
28
|
})(VerificationStatus || (exports.VerificationStatus = VerificationStatus = {}));
|
|
28
29
|
exports.KYC_V1_PACKAGE_NAME = "kyc.v1";
|
|
29
30
|
function KycServiceControllerMethods() {
|
|
30
31
|
return function (constructor) {
|
|
31
|
-
const grpcMethods = ["createSession", "getVerification", "handleWebhook"];
|
|
32
|
+
const grpcMethods = ["createSession", "getVerification", "listVerifications", "handleWebhook"];
|
|
32
33
|
for (const method of grpcMethods) {
|
|
33
34
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
34
35
|
(0, microservices_1.GrpcMethod)("KycService", method)(constructor.prototype[method], method, descriptor);
|
package/dist/nest/media.js
CHANGED
package/dist/nest/payment.js
CHANGED
package/dist/nest/staff.js
CHANGED
package/dist/nest/treatment.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.18.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: treatment.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/nest/user.d.ts
CHANGED
|
@@ -7,6 +7,12 @@ export interface GetUserRequest {
|
|
|
7
7
|
export interface GetUserResponse {
|
|
8
8
|
user: User | undefined;
|
|
9
9
|
}
|
|
10
|
+
export interface ListUsersRequest {
|
|
11
|
+
ids: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface ListUsersResponse {
|
|
14
|
+
users: User[];
|
|
15
|
+
}
|
|
10
16
|
export interface CreateUserRequest {
|
|
11
17
|
id: string;
|
|
12
18
|
firstName: string;
|
|
@@ -63,6 +69,7 @@ export interface Address {
|
|
|
63
69
|
export declare const USER_V1_PACKAGE_NAME = "user.v1";
|
|
64
70
|
export interface UserServiceClient {
|
|
65
71
|
getUser(request: GetUserRequest): Observable<GetUserResponse>;
|
|
72
|
+
listUsers(request: ListUsersRequest): Observable<ListUsersResponse>;
|
|
66
73
|
createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
|
|
67
74
|
updateUser(request: UpdateUserRequest): Observable<UpdateUserResponse>;
|
|
68
75
|
setAvatar(request: SetAvatarRequest): Observable<SetAvatarResponse>;
|
|
@@ -70,6 +77,7 @@ export interface UserServiceClient {
|
|
|
70
77
|
}
|
|
71
78
|
export interface UserServiceController {
|
|
72
79
|
getUser(request: GetUserRequest): Promise<GetUserResponse> | Observable<GetUserResponse> | GetUserResponse;
|
|
80
|
+
listUsers(request: ListUsersRequest): Promise<ListUsersResponse> | Observable<ListUsersResponse> | ListUsersResponse;
|
|
73
81
|
createUser(request: CreateUserRequest): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
|
|
74
82
|
updateUser(request: UpdateUserRequest): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
|
|
75
83
|
setAvatar(request: SetAvatarRequest): Promise<SetAvatarResponse> | Observable<SetAvatarResponse> | SetAvatarResponse;
|
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.18.
|
|
4
|
+
// protoc-gen-ts_proto v2.18.1
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: user.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -14,7 +14,7 @@ exports.protobufFileName = "user.proto";
|
|
|
14
14
|
exports.USER_V1_PACKAGE_NAME = "user.v1";
|
|
15
15
|
function UserServiceControllerMethods() {
|
|
16
16
|
return function (constructor) {
|
|
17
|
-
const grpcMethods = ["getUser", "createUser", "updateUser", "setAvatar", "setVerifiedName"];
|
|
17
|
+
const grpcMethods = ["getUser", "listUsers", "createUser", "updateUser", "setAvatar", "setVerifiedName"];
|
|
18
18
|
for (const method of grpcMethods) {
|
|
19
19
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
20
20
|
(0, microservices_1.GrpcMethod)("UserService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/account.proto
CHANGED
|
@@ -31,6 +31,9 @@ service AccountService {
|
|
|
31
31
|
rpc SetStaffActive(SetStaffActiveRequest) returns (SetStaffActiveResponse);
|
|
32
32
|
rpc ChangeStaffEmail(ChangeStaffEmailRequest) returns (ChangeStaffEmailResponse);
|
|
33
33
|
rpc ResetStaffTotp(ResetStaffTotpRequest) returns (ResetStaffTotpResponse);
|
|
34
|
+
|
|
35
|
+
rpc ListPatientAccounts(ListPatientAccountsRequest) returns (ListPatientAccountsResponse);
|
|
36
|
+
rpc GetPatientAccount(GetPatientAccountRequest) returns (GetPatientAccountResponse);
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
message GetAccountRequest {
|
|
@@ -239,6 +242,26 @@ message ResetStaffTotpResponse {
|
|
|
239
242
|
StaffAccount account = 1;
|
|
240
243
|
}
|
|
241
244
|
|
|
245
|
+
message ListPatientAccountsRequest {
|
|
246
|
+
optional string id = 1;
|
|
247
|
+
optional PatientStatus status = 2;
|
|
248
|
+
optional string cursor = 3;
|
|
249
|
+
int32 limit = 4;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
message ListPatientAccountsResponse {
|
|
253
|
+
repeated PatientAccount accounts = 1;
|
|
254
|
+
optional string next_cursor = 2;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
message GetPatientAccountRequest {
|
|
258
|
+
string id = 1;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
message GetPatientAccountResponse {
|
|
262
|
+
PatientAccount account = 1;
|
|
263
|
+
}
|
|
264
|
+
|
|
242
265
|
message StaffAccount {
|
|
243
266
|
string id = 1;
|
|
244
267
|
string email = 2;
|
|
@@ -250,10 +273,26 @@ message StaffAccount {
|
|
|
250
273
|
bool is_totp_enabled = 8;
|
|
251
274
|
}
|
|
252
275
|
|
|
276
|
+
message PatientAccount {
|
|
277
|
+
string id = 1;
|
|
278
|
+
optional string email = 2;
|
|
279
|
+
optional string phone = 3;
|
|
280
|
+
bool is_telegram_linked = 4;
|
|
281
|
+
PatientStatus status = 5;
|
|
282
|
+
bool is_totp_enabled = 6;
|
|
283
|
+
string created_at = 7;
|
|
284
|
+
optional string last_active_at = 8;
|
|
285
|
+
}
|
|
286
|
+
|
|
253
287
|
enum Role {
|
|
254
288
|
PATIENT = 0;
|
|
255
289
|
ADMIN = 1;
|
|
256
290
|
DOCTOR = 2;
|
|
257
291
|
SUPPORT = 3;
|
|
258
292
|
SUPER_ADMIN = 4;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
enum PatientStatus {
|
|
296
|
+
UNVERIFIED = 0;
|
|
297
|
+
VERIFIED = 1;
|
|
259
298
|
}
|
package/proto/kyc.proto
CHANGED
|
@@ -5,6 +5,7 @@ package kyc.v1;
|
|
|
5
5
|
service KycService {
|
|
6
6
|
rpc CreateSession (CreateSessionRequest) returns (CreateSessionResponse);
|
|
7
7
|
rpc GetVerification (GetVerificationRequest) returns (GetVerificationResponse);
|
|
8
|
+
rpc ListVerifications (ListVerificationsRequest) returns (ListVerificationsResponse);
|
|
8
9
|
rpc HandleWebhook (HandleWebhookRequest) returns (HandleWebhookResponse);
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -19,6 +20,7 @@ enum VerificationStatus {
|
|
|
19
20
|
VERIFICATION_STATUS_VERIFIED = 7;
|
|
20
21
|
VERIFICATION_STATUS_MISMATCH = 8;
|
|
21
22
|
VERIFICATION_STATUS_DUPLICATE = 9;
|
|
23
|
+
VERIFICATION_STATUS_EXPIRED = 10;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
message CreateSessionRequest {
|
|
@@ -40,6 +42,20 @@ message GetVerificationResponse {
|
|
|
40
42
|
VerificationStatus status = 1;
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
message ListVerificationsRequest {
|
|
46
|
+
string user_id = 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message ListVerificationsResponse {
|
|
50
|
+
repeated Verification verifications = 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message Verification {
|
|
54
|
+
VerificationStatus status = 1;
|
|
55
|
+
string created_at = 2;
|
|
56
|
+
optional string checked_at = 3;
|
|
57
|
+
}
|
|
58
|
+
|
|
43
59
|
message HandleWebhookRequest {
|
|
44
60
|
string payload = 1;
|
|
45
61
|
string signature = 2;
|
package/proto/user.proto
CHANGED
|
@@ -4,6 +4,7 @@ package user.v1;
|
|
|
4
4
|
|
|
5
5
|
service UserService {
|
|
6
6
|
rpc GetUser (GetUserRequest) returns (GetUserResponse);
|
|
7
|
+
rpc ListUsers (ListUsersRequest) returns (ListUsersResponse);
|
|
7
8
|
rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
|
|
8
9
|
rpc UpdateUser (UpdateUserRequest) returns (UpdateUserResponse);
|
|
9
10
|
rpc SetAvatar (SetAvatarRequest) returns (SetAvatarResponse);
|
|
@@ -18,6 +19,14 @@ message GetUserResponse {
|
|
|
18
19
|
User user = 1;
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
message ListUsersRequest {
|
|
23
|
+
repeated string ids = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message ListUsersResponse {
|
|
27
|
+
repeated User users = 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
21
30
|
message CreateUserRequest {
|
|
22
31
|
string id = 1;
|
|
23
32
|
string first_name = 2;
|