@candesk/contracts 6.36.0 → 6.38.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/auth/auth.events.d.ts +3 -0
- package/dist/events/auth/auth.events.js +3 -0
- package/dist/events/auth/email-assigned.interface.d.ts +3 -0
- package/dist/events/auth/email-assigned.interface.js +2 -0
- package/dist/events/auth/index.d.ts +3 -0
- package/dist/events/auth/index.js +3 -0
- package/dist/events/auth/patient-blocked.interface.d.ts +4 -0
- package/dist/events/auth/patient-blocked.interface.js +2 -0
- package/dist/events/auth/patient-unblocked.interface.d.ts +4 -0
- package/dist/events/auth/patient-unblocked.interface.js +2 -0
- package/dist/gen/account.d.ts +28 -0
- package/dist/gen/account.js +1 -0
- package/dist/nest/account.d.ts +31 -0
- package/dist/nest/account.js +4 -0
- package/package.json +1 -1
- package/proto/account.proto +34 -0
|
@@ -2,6 +2,7 @@ export declare const AUTH_EVENTS: {
|
|
|
2
2
|
readonly OTP_REQUESTED: 'auth.otp.requested';
|
|
3
3
|
readonly EMAIL_CHANGE_REQUESTED: 'auth.email-change.requested';
|
|
4
4
|
readonly EMAIL_CHANGED: 'auth.email.changed';
|
|
5
|
+
readonly EMAIL_ASSIGNED: 'auth.email.assigned';
|
|
5
6
|
readonly TELEGRAM_LINKED: 'auth.telegram.linked';
|
|
6
7
|
readonly TELEGRAM_UNLINKED: 'auth.telegram.unlinked';
|
|
7
8
|
readonly ACCOUNT_DELETION_REQUESTED: 'auth.account-deletion.requested';
|
|
@@ -11,6 +12,8 @@ export declare const AUTH_EVENTS: {
|
|
|
11
12
|
readonly STAFF_EMAIL_ASSIGNED: 'auth.staff-email.assigned';
|
|
12
13
|
readonly STAFF_DEACTIVATED: 'auth.staff.deactivated';
|
|
13
14
|
readonly STAFF_ACTIVATED: 'auth.staff.activated';
|
|
15
|
+
readonly PATIENT_BLOCKED: 'auth.patient.blocked';
|
|
16
|
+
readonly PATIENT_UNBLOCKED: 'auth.patient.unblocked';
|
|
14
17
|
readonly TOTP_ENABLED: 'auth.totp.enabled';
|
|
15
18
|
readonly TOTP_DISABLED: 'auth.totp.disabled';
|
|
16
19
|
};
|
|
@@ -5,6 +5,7 @@ exports.AUTH_EVENTS = {
|
|
|
5
5
|
OTP_REQUESTED: 'auth.otp.requested',
|
|
6
6
|
EMAIL_CHANGE_REQUESTED: 'auth.email-change.requested',
|
|
7
7
|
EMAIL_CHANGED: 'auth.email.changed',
|
|
8
|
+
EMAIL_ASSIGNED: 'auth.email.assigned',
|
|
8
9
|
TELEGRAM_LINKED: 'auth.telegram.linked',
|
|
9
10
|
TELEGRAM_UNLINKED: 'auth.telegram.unlinked',
|
|
10
11
|
ACCOUNT_DELETION_REQUESTED: 'auth.account-deletion.requested',
|
|
@@ -14,6 +15,8 @@ exports.AUTH_EVENTS = {
|
|
|
14
15
|
STAFF_EMAIL_ASSIGNED: 'auth.staff-email.assigned',
|
|
15
16
|
STAFF_DEACTIVATED: 'auth.staff.deactivated',
|
|
16
17
|
STAFF_ACTIVATED: 'auth.staff.activated',
|
|
18
|
+
PATIENT_BLOCKED: 'auth.patient.blocked',
|
|
19
|
+
PATIENT_UNBLOCKED: 'auth.patient.unblocked',
|
|
17
20
|
TOTP_ENABLED: 'auth.totp.enabled',
|
|
18
21
|
TOTP_DISABLED: 'auth.totp.disabled'
|
|
19
22
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export * from './account-deleted.interface';
|
|
2
2
|
export * from './account-deletion-requested.interface';
|
|
3
3
|
export * from './auth.events';
|
|
4
|
+
export * from './email-assigned.interface';
|
|
4
5
|
export * from './email-change-requested.interface';
|
|
5
6
|
export * from './email-changed.interface';
|
|
6
7
|
export * from './otp-requested.interface';
|
|
8
|
+
export * from './patient-blocked.interface';
|
|
9
|
+
export * from './patient-unblocked.interface';
|
|
7
10
|
export * from './staff-activated.interface';
|
|
8
11
|
export * from './staff-deactivated.interface';
|
|
9
12
|
export * from './staff-email-assigned.interface';
|
|
@@ -17,9 +17,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./account-deleted.interface"), exports);
|
|
18
18
|
__exportStar(require("./account-deletion-requested.interface"), exports);
|
|
19
19
|
__exportStar(require("./auth.events"), exports);
|
|
20
|
+
__exportStar(require("./email-assigned.interface"), exports);
|
|
20
21
|
__exportStar(require("./email-change-requested.interface"), exports);
|
|
21
22
|
__exportStar(require("./email-changed.interface"), exports);
|
|
22
23
|
__exportStar(require("./otp-requested.interface"), exports);
|
|
24
|
+
__exportStar(require("./patient-blocked.interface"), exports);
|
|
25
|
+
__exportStar(require("./patient-unblocked.interface"), exports);
|
|
23
26
|
__exportStar(require("./staff-activated.interface"), exports);
|
|
24
27
|
__exportStar(require("./staff-deactivated.interface"), exports);
|
|
25
28
|
__exportStar(require("./staff-email-assigned.interface"), exports);
|
package/dist/gen/account.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare enum Role {
|
|
|
11
11
|
export declare enum PatientStatus {
|
|
12
12
|
UNVERIFIED = 0,
|
|
13
13
|
VERIFIED = 1,
|
|
14
|
+
BLOCKED = 2,
|
|
14
15
|
UNRECOGNIZED = -1
|
|
15
16
|
}
|
|
16
17
|
export interface GetAccountRequest {
|
|
@@ -198,6 +199,26 @@ export interface GetPatientAccountRequest {
|
|
|
198
199
|
export interface GetPatientAccountResponse {
|
|
199
200
|
account: PatientAccount | undefined;
|
|
200
201
|
}
|
|
202
|
+
export interface ChangePatientEmailRequest {
|
|
203
|
+
id: string;
|
|
204
|
+
email: string;
|
|
205
|
+
}
|
|
206
|
+
export interface ChangePatientEmailResponse {
|
|
207
|
+
account: PatientAccount | undefined;
|
|
208
|
+
}
|
|
209
|
+
export interface BlockPatientRequest {
|
|
210
|
+
id: string;
|
|
211
|
+
reason: string;
|
|
212
|
+
}
|
|
213
|
+
export interface BlockPatientResponse {
|
|
214
|
+
account: PatientAccount | undefined;
|
|
215
|
+
}
|
|
216
|
+
export interface UnblockPatientRequest {
|
|
217
|
+
id: string;
|
|
218
|
+
}
|
|
219
|
+
export interface UnblockPatientResponse {
|
|
220
|
+
account: PatientAccount | undefined;
|
|
221
|
+
}
|
|
201
222
|
export interface StaffAccount {
|
|
202
223
|
id: string;
|
|
203
224
|
email: string;
|
|
@@ -216,6 +237,10 @@ export interface PatientAccount {
|
|
|
216
237
|
isTotpEnabled: boolean;
|
|
217
238
|
createdAt: string;
|
|
218
239
|
lastActiveAt?: string | undefined;
|
|
240
|
+
isEmailVerified: boolean;
|
|
241
|
+
isIdentityVerified: boolean;
|
|
242
|
+
blockedAt?: string | undefined;
|
|
243
|
+
blockReason?: string | undefined;
|
|
219
244
|
}
|
|
220
245
|
export interface AccountService {
|
|
221
246
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse>;
|
|
@@ -242,4 +267,7 @@ export interface AccountService {
|
|
|
242
267
|
resetStaffTotp(request: ResetStaffTotpRequest): Promise<ResetStaffTotpResponse>;
|
|
243
268
|
listPatientAccounts(request: ListPatientAccountsRequest): Promise<ListPatientAccountsResponse>;
|
|
244
269
|
getPatientAccount(request: GetPatientAccountRequest): Promise<GetPatientAccountResponse>;
|
|
270
|
+
changePatientEmail(request: ChangePatientEmailRequest): Promise<ChangePatientEmailResponse>;
|
|
271
|
+
blockPatient(request: BlockPatientRequest): Promise<BlockPatientResponse>;
|
|
272
|
+
unblockPatient(request: UnblockPatientRequest): Promise<UnblockPatientResponse>;
|
|
245
273
|
}
|
package/dist/gen/account.js
CHANGED
|
@@ -22,5 +22,6 @@ var PatientStatus;
|
|
|
22
22
|
(function (PatientStatus) {
|
|
23
23
|
PatientStatus[PatientStatus["UNVERIFIED"] = 0] = "UNVERIFIED";
|
|
24
24
|
PatientStatus[PatientStatus["VERIFIED"] = 1] = "VERIFIED";
|
|
25
|
+
PatientStatus[PatientStatus["BLOCKED"] = 2] = "BLOCKED";
|
|
25
26
|
PatientStatus[PatientStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
26
27
|
})(PatientStatus || (exports.PatientStatus = PatientStatus = {}));
|
package/dist/nest/account.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare enum Role {
|
|
|
12
12
|
export declare enum PatientStatus {
|
|
13
13
|
UNVERIFIED = 0,
|
|
14
14
|
VERIFIED = 1,
|
|
15
|
+
BLOCKED = 2,
|
|
15
16
|
UNRECOGNIZED = -1
|
|
16
17
|
}
|
|
17
18
|
export interface GetAccountRequest {
|
|
@@ -199,6 +200,26 @@ export interface GetPatientAccountRequest {
|
|
|
199
200
|
export interface GetPatientAccountResponse {
|
|
200
201
|
account: PatientAccount | undefined;
|
|
201
202
|
}
|
|
203
|
+
export interface ChangePatientEmailRequest {
|
|
204
|
+
id: string;
|
|
205
|
+
email: string;
|
|
206
|
+
}
|
|
207
|
+
export interface ChangePatientEmailResponse {
|
|
208
|
+
account: PatientAccount | undefined;
|
|
209
|
+
}
|
|
210
|
+
export interface BlockPatientRequest {
|
|
211
|
+
id: string;
|
|
212
|
+
reason: string;
|
|
213
|
+
}
|
|
214
|
+
export interface BlockPatientResponse {
|
|
215
|
+
account: PatientAccount | undefined;
|
|
216
|
+
}
|
|
217
|
+
export interface UnblockPatientRequest {
|
|
218
|
+
id: string;
|
|
219
|
+
}
|
|
220
|
+
export interface UnblockPatientResponse {
|
|
221
|
+
account: PatientAccount | undefined;
|
|
222
|
+
}
|
|
202
223
|
export interface StaffAccount {
|
|
203
224
|
id: string;
|
|
204
225
|
email: string;
|
|
@@ -217,6 +238,10 @@ export interface PatientAccount {
|
|
|
217
238
|
isTotpEnabled: boolean;
|
|
218
239
|
createdAt: string;
|
|
219
240
|
lastActiveAt?: string | undefined;
|
|
241
|
+
isEmailVerified: boolean;
|
|
242
|
+
isIdentityVerified: boolean;
|
|
243
|
+
blockedAt?: string | undefined;
|
|
244
|
+
blockReason?: string | undefined;
|
|
220
245
|
}
|
|
221
246
|
export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
222
247
|
export interface AccountServiceClient {
|
|
@@ -244,6 +269,9 @@ export interface AccountServiceClient {
|
|
|
244
269
|
resetStaffTotp(request: ResetStaffTotpRequest): Observable<ResetStaffTotpResponse>;
|
|
245
270
|
listPatientAccounts(request: ListPatientAccountsRequest): Observable<ListPatientAccountsResponse>;
|
|
246
271
|
getPatientAccount(request: GetPatientAccountRequest): Observable<GetPatientAccountResponse>;
|
|
272
|
+
changePatientEmail(request: ChangePatientEmailRequest): Observable<ChangePatientEmailResponse>;
|
|
273
|
+
blockPatient(request: BlockPatientRequest): Observable<BlockPatientResponse>;
|
|
274
|
+
unblockPatient(request: UnblockPatientRequest): Observable<UnblockPatientResponse>;
|
|
247
275
|
}
|
|
248
276
|
export interface AccountServiceController {
|
|
249
277
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
@@ -270,6 +298,9 @@ export interface AccountServiceController {
|
|
|
270
298
|
resetStaffTotp(request: ResetStaffTotpRequest): Promise<ResetStaffTotpResponse> | Observable<ResetStaffTotpResponse> | ResetStaffTotpResponse;
|
|
271
299
|
listPatientAccounts(request: ListPatientAccountsRequest): Promise<ListPatientAccountsResponse> | Observable<ListPatientAccountsResponse> | ListPatientAccountsResponse;
|
|
272
300
|
getPatientAccount(request: GetPatientAccountRequest): Promise<GetPatientAccountResponse> | Observable<GetPatientAccountResponse> | GetPatientAccountResponse;
|
|
301
|
+
changePatientEmail(request: ChangePatientEmailRequest): Promise<ChangePatientEmailResponse> | Observable<ChangePatientEmailResponse> | ChangePatientEmailResponse;
|
|
302
|
+
blockPatient(request: BlockPatientRequest): Promise<BlockPatientResponse> | Observable<BlockPatientResponse> | BlockPatientResponse;
|
|
303
|
+
unblockPatient(request: UnblockPatientRequest): Promise<UnblockPatientResponse> | Observable<UnblockPatientResponse> | UnblockPatientResponse;
|
|
273
304
|
}
|
|
274
305
|
export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
|
|
275
306
|
export declare const ACCOUNT_SERVICE_NAME = "AccountService";
|
package/dist/nest/account.js
CHANGED
|
@@ -24,6 +24,7 @@ var PatientStatus;
|
|
|
24
24
|
(function (PatientStatus) {
|
|
25
25
|
PatientStatus[PatientStatus["UNVERIFIED"] = 0] = "UNVERIFIED";
|
|
26
26
|
PatientStatus[PatientStatus["VERIFIED"] = 1] = "VERIFIED";
|
|
27
|
+
PatientStatus[PatientStatus["BLOCKED"] = 2] = "BLOCKED";
|
|
27
28
|
PatientStatus[PatientStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
28
29
|
})(PatientStatus || (exports.PatientStatus = PatientStatus = {}));
|
|
29
30
|
exports.ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
@@ -54,6 +55,9 @@ function AccountServiceControllerMethods() {
|
|
|
54
55
|
"resetStaffTotp",
|
|
55
56
|
"listPatientAccounts",
|
|
56
57
|
"getPatientAccount",
|
|
58
|
+
"changePatientEmail",
|
|
59
|
+
"blockPatient",
|
|
60
|
+
"unblockPatient",
|
|
57
61
|
];
|
|
58
62
|
for (const method of grpcMethods) {
|
|
59
63
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
package/proto/account.proto
CHANGED
|
@@ -34,6 +34,9 @@ service AccountService {
|
|
|
34
34
|
|
|
35
35
|
rpc ListPatientAccounts(ListPatientAccountsRequest) returns (ListPatientAccountsResponse);
|
|
36
36
|
rpc GetPatientAccount(GetPatientAccountRequest) returns (GetPatientAccountResponse);
|
|
37
|
+
rpc ChangePatientEmail(ChangePatientEmailRequest) returns (ChangePatientEmailResponse);
|
|
38
|
+
rpc BlockPatient(BlockPatientRequest) returns (BlockPatientResponse);
|
|
39
|
+
rpc UnblockPatient(UnblockPatientRequest) returns (UnblockPatientResponse);
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
message GetAccountRequest {
|
|
@@ -262,6 +265,32 @@ message GetPatientAccountResponse {
|
|
|
262
265
|
PatientAccount account = 1;
|
|
263
266
|
}
|
|
264
267
|
|
|
268
|
+
message ChangePatientEmailRequest {
|
|
269
|
+
string id = 1;
|
|
270
|
+
string email = 2;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
message ChangePatientEmailResponse {
|
|
274
|
+
PatientAccount account = 1;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
message BlockPatientRequest {
|
|
278
|
+
string id = 1;
|
|
279
|
+
string reason = 2;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
message BlockPatientResponse {
|
|
283
|
+
PatientAccount account = 1;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
message UnblockPatientRequest {
|
|
287
|
+
string id = 1;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
message UnblockPatientResponse {
|
|
291
|
+
PatientAccount account = 1;
|
|
292
|
+
}
|
|
293
|
+
|
|
265
294
|
message StaffAccount {
|
|
266
295
|
string id = 1;
|
|
267
296
|
string email = 2;
|
|
@@ -282,6 +311,10 @@ message PatientAccount {
|
|
|
282
311
|
bool is_totp_enabled = 6;
|
|
283
312
|
string created_at = 7;
|
|
284
313
|
optional string last_active_at = 8;
|
|
314
|
+
bool is_email_verified = 9;
|
|
315
|
+
bool is_identity_verified = 10;
|
|
316
|
+
optional string blocked_at = 11;
|
|
317
|
+
optional string block_reason = 12;
|
|
285
318
|
}
|
|
286
319
|
|
|
287
320
|
enum Role {
|
|
@@ -295,4 +328,5 @@ enum Role {
|
|
|
295
328
|
enum PatientStatus {
|
|
296
329
|
UNVERIFIED = 0;
|
|
297
330
|
VERIFIED = 1;
|
|
331
|
+
BLOCKED = 2;
|
|
298
332
|
}
|