@candesk/contracts 6.39.0 → 6.41.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.
Files changed (45) hide show
  1. package/dist/events/auth/account-deleted.interface.d.ts +2 -0
  2. package/dist/events/auth/account-inactive.interface.d.ts +5 -0
  3. package/dist/events/auth/account-inactive.interface.js +2 -0
  4. package/dist/events/auth/auth.events.d.ts +1 -0
  5. package/dist/events/auth/auth.events.js +1 -0
  6. package/dist/events/auth/email-changed.interface.d.ts +2 -0
  7. package/dist/events/auth/index.d.ts +1 -0
  8. package/dist/events/auth/index.js +1 -0
  9. package/dist/events/auth/telegram-linked.interface.d.ts +2 -0
  10. package/dist/events/auth/telegram-unlinked.interface.d.ts +2 -0
  11. package/dist/events/auth/totp-disabled.interface.d.ts +2 -0
  12. package/dist/events/auth/totp-enabled.interface.d.ts +2 -0
  13. package/dist/events/kyc/verification-completed.interface.d.ts +2 -0
  14. package/dist/events/treatment/treatment-request-paid.interface.d.ts +2 -0
  15. package/dist/gen/account.d.ts +1 -0
  16. package/dist/gen/account.js +1 -1
  17. package/dist/gen/audit.js +1 -1
  18. package/dist/gen/auth.js +1 -1
  19. package/dist/gen/google/protobuf/empty.js +1 -1
  20. package/dist/gen/kyc.js +1 -1
  21. package/dist/gen/media.js +1 -1
  22. package/dist/gen/notification.d.ts +55 -0
  23. package/dist/gen/notification.js +26 -0
  24. package/dist/gen/payment.js +1 -1
  25. package/dist/gen/staff.js +1 -1
  26. package/dist/gen/treatment.js +1 -1
  27. package/dist/gen/user.js +1 -1
  28. package/dist/nest/account.d.ts +1 -0
  29. package/dist/nest/account.js +1 -1
  30. package/dist/nest/audit.js +1 -1
  31. package/dist/nest/auth.js +1 -1
  32. package/dist/nest/google/protobuf/empty.js +1 -1
  33. package/dist/nest/kyc.js +1 -1
  34. package/dist/nest/media.js +1 -1
  35. package/dist/nest/notification.d.ts +64 -0
  36. package/dist/nest/notification.js +46 -0
  37. package/dist/nest/payment.js +1 -1
  38. package/dist/nest/staff.js +1 -1
  39. package/dist/nest/treatment.js +1 -1
  40. package/dist/nest/user.js +1 -1
  41. package/dist/proto/paths.d.ts +1 -0
  42. package/dist/proto/paths.js +2 -1
  43. package/package.json +3 -2
  44. package/proto/account.proto +1 -0
  45. package/proto/notification.proto +56 -0
@@ -1,5 +1,7 @@
1
+ export type AccountDeletionReason = 'REQUESTED' | 'INACTIVE';
1
2
  export interface AccountDeletedEvent {
2
3
  accountId: string;
3
4
  email: string | null;
4
5
  telegramId: string | null;
6
+ reason: AccountDeletionReason;
5
7
  }
@@ -0,0 +1,5 @@
1
+ export interface AccountInactiveEvent {
2
+ email: string | null;
3
+ telegramId: string | null;
4
+ deletesAt: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,7 @@ export declare const AUTH_EVENTS: {
7
7
  readonly TELEGRAM_UNLINKED: 'auth.telegram.unlinked';
8
8
  readonly ACCOUNT_DELETION_REQUESTED: 'auth.account-deletion.requested';
9
9
  readonly ACCOUNT_DELETED: 'auth.account.deleted';
10
+ readonly ACCOUNT_INACTIVE: 'auth.account.inactive';
10
11
  readonly STAFF_INVITED: 'auth.staff.invited';
11
12
  readonly STAFF_EMAIL_CHANGED: 'auth.staff-email.changed';
12
13
  readonly STAFF_EMAIL_ASSIGNED: 'auth.staff-email.assigned';
@@ -10,6 +10,7 @@ exports.AUTH_EVENTS = {
10
10
  TELEGRAM_UNLINKED: 'auth.telegram.unlinked',
11
11
  ACCOUNT_DELETION_REQUESTED: 'auth.account-deletion.requested',
12
12
  ACCOUNT_DELETED: 'auth.account.deleted',
13
+ ACCOUNT_INACTIVE: 'auth.account.inactive',
13
14
  STAFF_INVITED: 'auth.staff.invited',
14
15
  STAFF_EMAIL_CHANGED: 'auth.staff-email.changed',
15
16
  STAFF_EMAIL_ASSIGNED: 'auth.staff-email.assigned',
@@ -1,3 +1,5 @@
1
1
  export interface EmailChangedEvent {
2
+ eventId: string;
3
+ accountId: string;
2
4
  previousEmail: string;
3
5
  }
@@ -1,5 +1,6 @@
1
1
  export * from './account-deleted.interface';
2
2
  export * from './account-deletion-requested.interface';
3
+ export * from './account-inactive.interface';
3
4
  export * from './auth.events';
4
5
  export * from './email-assigned.interface';
5
6
  export * from './email-change-requested.interface';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./account-deleted.interface"), exports);
18
18
  __exportStar(require("./account-deletion-requested.interface"), exports);
19
+ __exportStar(require("./account-inactive.interface"), exports);
19
20
  __exportStar(require("./auth.events"), exports);
20
21
  __exportStar(require("./email-assigned.interface"), exports);
21
22
  __exportStar(require("./email-change-requested.interface"), exports);
@@ -1,3 +1,5 @@
1
1
  export interface TelegramLinkedEvent {
2
+ eventId: string;
3
+ accountId: string;
2
4
  email: string;
3
5
  }
@@ -1,4 +1,6 @@
1
1
  export interface TelegramUnlinkedEvent {
2
+ eventId: string;
3
+ accountId: string;
2
4
  email: string;
3
5
  telegramId: string;
4
6
  }
@@ -1,3 +1,5 @@
1
1
  export interface TotpDisabledEvent {
2
+ eventId: string;
3
+ accountId: string;
2
4
  email: string;
3
5
  }
@@ -1,3 +1,5 @@
1
1
  export interface TotpEnabledEvent {
2
+ eventId: string;
3
+ accountId: string;
2
4
  email: string;
3
5
  }
@@ -1,5 +1,7 @@
1
1
  export type VerificationResult = 'VERIFIED' | 'REJECTED' | 'MISMATCH' | 'DUPLICATE';
2
2
  export interface VerificationCompletedEvent {
3
+ eventId: string;
4
+ accountId: string;
3
5
  email: string;
4
6
  result: VerificationResult;
5
7
  }
@@ -1,4 +1,6 @@
1
1
  export interface TreatmentRequestPaidEvent {
2
+ eventId: string;
3
+ accountId: string;
2
4
  email: string;
3
5
  number: string;
4
6
  }
@@ -241,6 +241,7 @@ export interface PatientAccount {
241
241
  isIdentityVerified: boolean;
242
242
  blockedAt?: string | undefined;
243
243
  blockReason?: string | undefined;
244
+ deletesAt?: string | undefined;
244
245
  }
245
246
  export interface AccountService {
246
247
  getAccount(request: GetAccountRequest): Promise<GetAccountResponse>;
@@ -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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: account.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
package/dist/gen/audit.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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: audit.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: auth.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.1
4
+ // protoc-gen-ts_proto v2.18.3
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.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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: kyc.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
package/dist/gen/media.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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: media.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,55 @@
1
+ export declare const protobufPackage = "notification.v1";
2
+ export declare const protobufFileName = "notification.proto";
3
+ export declare enum NotificationType {
4
+ NOTIFICATION_TYPE_UNSPECIFIED = 0,
5
+ NOTIFICATION_TYPE_IDENTITY_VERIFIED = 1,
6
+ NOTIFICATION_TYPE_IDENTITY_REJECTED = 2,
7
+ NOTIFICATION_TYPE_IDENTITY_MISMATCH = 3,
8
+ NOTIFICATION_TYPE_IDENTITY_DUPLICATE = 4,
9
+ NOTIFICATION_TYPE_TREATMENT_REQUEST_PAID = 5,
10
+ NOTIFICATION_TYPE_EMAIL_CHANGED = 6,
11
+ NOTIFICATION_TYPE_TELEGRAM_LINKED = 7,
12
+ NOTIFICATION_TYPE_TELEGRAM_UNLINKED = 8,
13
+ NOTIFICATION_TYPE_TOTP_ENABLED = 9,
14
+ NOTIFICATION_TYPE_TOTP_DISABLED = 10,
15
+ UNRECOGNIZED = -1
16
+ }
17
+ export interface Notification {
18
+ id: string;
19
+ type: NotificationType;
20
+ params: {
21
+ [key: string]: string;
22
+ };
23
+ readAt?: string | undefined;
24
+ createdAt: string;
25
+ }
26
+ export interface Notification_ParamsEntry {
27
+ key: string;
28
+ value: string;
29
+ }
30
+ export interface ListNotificationsRequest {
31
+ userId: string;
32
+ cursor?: string | undefined;
33
+ limit: number;
34
+ }
35
+ export interface ListNotificationsResponse {
36
+ notifications: Notification[];
37
+ nextCursor?: string | undefined;
38
+ }
39
+ export interface MarkNotificationsReadRequest {
40
+ userId: string;
41
+ until: string;
42
+ }
43
+ export interface MarkNotificationsReadResponse {
44
+ }
45
+ export interface DeleteNotificationsRequest {
46
+ userId: string;
47
+ until: string;
48
+ }
49
+ export interface DeleteNotificationsResponse {
50
+ }
51
+ export interface NotificationService {
52
+ listNotifications(request: ListNotificationsRequest): Promise<ListNotificationsResponse>;
53
+ markNotificationsRead(request: MarkNotificationsReadRequest): Promise<MarkNotificationsReadResponse>;
54
+ deleteNotifications(request: DeleteNotificationsRequest): Promise<DeleteNotificationsResponse>;
55
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.18.3
5
+ // protoc v3.21.12
6
+ // source: notification.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.NotificationType = exports.protobufFileName = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ exports.protobufPackage = "notification.v1";
11
+ exports.protobufFileName = "notification.proto";
12
+ var NotificationType;
13
+ (function (NotificationType) {
14
+ NotificationType[NotificationType["NOTIFICATION_TYPE_UNSPECIFIED"] = 0] = "NOTIFICATION_TYPE_UNSPECIFIED";
15
+ NotificationType[NotificationType["NOTIFICATION_TYPE_IDENTITY_VERIFIED"] = 1] = "NOTIFICATION_TYPE_IDENTITY_VERIFIED";
16
+ NotificationType[NotificationType["NOTIFICATION_TYPE_IDENTITY_REJECTED"] = 2] = "NOTIFICATION_TYPE_IDENTITY_REJECTED";
17
+ NotificationType[NotificationType["NOTIFICATION_TYPE_IDENTITY_MISMATCH"] = 3] = "NOTIFICATION_TYPE_IDENTITY_MISMATCH";
18
+ NotificationType[NotificationType["NOTIFICATION_TYPE_IDENTITY_DUPLICATE"] = 4] = "NOTIFICATION_TYPE_IDENTITY_DUPLICATE";
19
+ NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_PAID"] = 5] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_PAID";
20
+ NotificationType[NotificationType["NOTIFICATION_TYPE_EMAIL_CHANGED"] = 6] = "NOTIFICATION_TYPE_EMAIL_CHANGED";
21
+ NotificationType[NotificationType["NOTIFICATION_TYPE_TELEGRAM_LINKED"] = 7] = "NOTIFICATION_TYPE_TELEGRAM_LINKED";
22
+ NotificationType[NotificationType["NOTIFICATION_TYPE_TELEGRAM_UNLINKED"] = 8] = "NOTIFICATION_TYPE_TELEGRAM_UNLINKED";
23
+ NotificationType[NotificationType["NOTIFICATION_TYPE_TOTP_ENABLED"] = 9] = "NOTIFICATION_TYPE_TOTP_ENABLED";
24
+ NotificationType[NotificationType["NOTIFICATION_TYPE_TOTP_DISABLED"] = 10] = "NOTIFICATION_TYPE_TOTP_DISABLED";
25
+ NotificationType[NotificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
26
+ })(NotificationType || (exports.NotificationType = NotificationType = {}));
@@ -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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: payment.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
package/dist/gen/staff.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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: staff.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: treatment.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
package/dist/gen/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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: user.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -242,6 +242,7 @@ export interface PatientAccount {
242
242
  isIdentityVerified: boolean;
243
243
  blockedAt?: string | undefined;
244
244
  blockReason?: string | undefined;
245
+ deletesAt?: string | undefined;
245
246
  }
246
247
  export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
247
248
  export interface AccountServiceClient {
@@ -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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: account.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: audit.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: auth.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.1
4
+ // protoc-gen-ts_proto v2.18.3
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.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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: kyc.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: media.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,64 @@
1
+ import { Observable } from "rxjs";
2
+ export declare const protobufPackage = "notification.v1";
3
+ export declare const protobufFileName = "notification.proto";
4
+ export declare enum NotificationType {
5
+ NOTIFICATION_TYPE_UNSPECIFIED = 0,
6
+ NOTIFICATION_TYPE_IDENTITY_VERIFIED = 1,
7
+ NOTIFICATION_TYPE_IDENTITY_REJECTED = 2,
8
+ NOTIFICATION_TYPE_IDENTITY_MISMATCH = 3,
9
+ NOTIFICATION_TYPE_IDENTITY_DUPLICATE = 4,
10
+ NOTIFICATION_TYPE_TREATMENT_REQUEST_PAID = 5,
11
+ NOTIFICATION_TYPE_EMAIL_CHANGED = 6,
12
+ NOTIFICATION_TYPE_TELEGRAM_LINKED = 7,
13
+ NOTIFICATION_TYPE_TELEGRAM_UNLINKED = 8,
14
+ NOTIFICATION_TYPE_TOTP_ENABLED = 9,
15
+ NOTIFICATION_TYPE_TOTP_DISABLED = 10,
16
+ UNRECOGNIZED = -1
17
+ }
18
+ export interface Notification {
19
+ id: string;
20
+ type: NotificationType;
21
+ params: {
22
+ [key: string]: string;
23
+ };
24
+ readAt?: string | undefined;
25
+ createdAt: string;
26
+ }
27
+ export interface Notification_ParamsEntry {
28
+ key: string;
29
+ value: string;
30
+ }
31
+ export interface ListNotificationsRequest {
32
+ userId: string;
33
+ cursor?: string | undefined;
34
+ limit: number;
35
+ }
36
+ export interface ListNotificationsResponse {
37
+ notifications: Notification[];
38
+ nextCursor?: string | undefined;
39
+ }
40
+ export interface MarkNotificationsReadRequest {
41
+ userId: string;
42
+ until: string;
43
+ }
44
+ export interface MarkNotificationsReadResponse {
45
+ }
46
+ export interface DeleteNotificationsRequest {
47
+ userId: string;
48
+ until: string;
49
+ }
50
+ export interface DeleteNotificationsResponse {
51
+ }
52
+ export declare const NOTIFICATION_V1_PACKAGE_NAME = "notification.v1";
53
+ export interface NotificationServiceClient {
54
+ listNotifications(request: ListNotificationsRequest): Observable<ListNotificationsResponse>;
55
+ markNotificationsRead(request: MarkNotificationsReadRequest): Observable<MarkNotificationsReadResponse>;
56
+ deleteNotifications(request: DeleteNotificationsRequest): Observable<DeleteNotificationsResponse>;
57
+ }
58
+ export interface NotificationServiceController {
59
+ listNotifications(request: ListNotificationsRequest): Promise<ListNotificationsResponse> | Observable<ListNotificationsResponse> | ListNotificationsResponse;
60
+ markNotificationsRead(request: MarkNotificationsReadRequest): Promise<MarkNotificationsReadResponse> | Observable<MarkNotificationsReadResponse> | MarkNotificationsReadResponse;
61
+ deleteNotifications(request: DeleteNotificationsRequest): Promise<DeleteNotificationsResponse> | Observable<DeleteNotificationsResponse> | DeleteNotificationsResponse;
62
+ }
63
+ export declare function NotificationServiceControllerMethods(): (constructor: Function) => void;
64
+ export declare const NOTIFICATION_SERVICE_NAME = "NotificationService";
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.18.3
5
+ // protoc v3.21.12
6
+ // source: notification.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.NOTIFICATION_SERVICE_NAME = exports.NOTIFICATION_V1_PACKAGE_NAME = exports.NotificationType = exports.protobufFileName = exports.protobufPackage = void 0;
9
+ exports.NotificationServiceControllerMethods = NotificationServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "notification.v1";
13
+ exports.protobufFileName = "notification.proto";
14
+ var NotificationType;
15
+ (function (NotificationType) {
16
+ NotificationType[NotificationType["NOTIFICATION_TYPE_UNSPECIFIED"] = 0] = "NOTIFICATION_TYPE_UNSPECIFIED";
17
+ NotificationType[NotificationType["NOTIFICATION_TYPE_IDENTITY_VERIFIED"] = 1] = "NOTIFICATION_TYPE_IDENTITY_VERIFIED";
18
+ NotificationType[NotificationType["NOTIFICATION_TYPE_IDENTITY_REJECTED"] = 2] = "NOTIFICATION_TYPE_IDENTITY_REJECTED";
19
+ NotificationType[NotificationType["NOTIFICATION_TYPE_IDENTITY_MISMATCH"] = 3] = "NOTIFICATION_TYPE_IDENTITY_MISMATCH";
20
+ NotificationType[NotificationType["NOTIFICATION_TYPE_IDENTITY_DUPLICATE"] = 4] = "NOTIFICATION_TYPE_IDENTITY_DUPLICATE";
21
+ NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_PAID"] = 5] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_PAID";
22
+ NotificationType[NotificationType["NOTIFICATION_TYPE_EMAIL_CHANGED"] = 6] = "NOTIFICATION_TYPE_EMAIL_CHANGED";
23
+ NotificationType[NotificationType["NOTIFICATION_TYPE_TELEGRAM_LINKED"] = 7] = "NOTIFICATION_TYPE_TELEGRAM_LINKED";
24
+ NotificationType[NotificationType["NOTIFICATION_TYPE_TELEGRAM_UNLINKED"] = 8] = "NOTIFICATION_TYPE_TELEGRAM_UNLINKED";
25
+ NotificationType[NotificationType["NOTIFICATION_TYPE_TOTP_ENABLED"] = 9] = "NOTIFICATION_TYPE_TOTP_ENABLED";
26
+ NotificationType[NotificationType["NOTIFICATION_TYPE_TOTP_DISABLED"] = 10] = "NOTIFICATION_TYPE_TOTP_DISABLED";
27
+ NotificationType[NotificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
28
+ })(NotificationType || (exports.NotificationType = NotificationType = {}));
29
+ exports.NOTIFICATION_V1_PACKAGE_NAME = "notification.v1";
30
+ function NotificationServiceControllerMethods() {
31
+ return function (constructor) {
32
+ const grpcMethods = ["listNotifications", "markNotificationsRead", "deleteNotifications"];
33
+ for (const method of grpcMethods) {
34
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
35
+ (0, microservices_1.GrpcMethod)("NotificationService", method)(constructor.prototype[method], method, descriptor);
36
+ Object.defineProperty(constructor.prototype, method, descriptor);
37
+ }
38
+ const grpcStreamMethods = [];
39
+ for (const method of grpcStreamMethods) {
40
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
41
+ (0, microservices_1.GrpcStreamMethod)("NotificationService", method)(constructor.prototype[method], method, descriptor);
42
+ Object.defineProperty(constructor.prototype, method, descriptor);
43
+ }
44
+ };
45
+ }
46
+ exports.NOTIFICATION_SERVICE_NAME = "NotificationService";
@@ -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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: payment.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: staff.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: treatment.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
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.1
4
+ // protoc-gen-ts_proto v2.18.3
5
5
  // protoc v3.21.12
6
6
  // source: user.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,4 +8,5 @@ export declare const PROTO_PATHS: {
8
8
  readonly TREATMENT: string;
9
9
  readonly PAYMENT: string;
10
10
  readonly AUDIT: string;
11
+ readonly NOTIFICATION: string;
11
12
  };
@@ -11,5 +11,6 @@ exports.PROTO_PATHS = {
11
11
  KYC: (0, path_1.join)(__dirname, '../../proto/kyc.proto'),
12
12
  TREATMENT: (0, path_1.join)(__dirname, '../../proto/treatment.proto'),
13
13
  PAYMENT: (0, path_1.join)(__dirname, '../../proto/payment.proto'),
14
- AUDIT: (0, path_1.join)(__dirname, '../../proto/audit.proto')
14
+ AUDIT: (0, path_1.join)(__dirname, '../../proto/audit.proto'),
15
+ NOTIFICATION: (0, path_1.join)(__dirname, '../../proto/notification.proto')
15
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "6.39.0",
3
+ "version": "6.41.0",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
@@ -39,7 +39,8 @@
39
39
  "generate": "yarn generate:types && yarn generate:nest",
40
40
  "generate:types": "node -e \"require('fs').mkdirSync('src/gen',{recursive:true})\" && protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/gen --ts_proto_opt=onlyTypes=true,package=omit,lowerCaseServiceMethods=true,forceLong=string",
41
41
  "generate:nest": "node -e \"require('fs').mkdirSync('src/nest',{recursive:true})\" && protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/nest --ts_proto_opt=nestJs=true,package=omit,forceLong=string",
42
- "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\""
42
+ "format": "prettier --write \"src/**/*.ts\"",
43
+ "format:check": "prettier --check \"src/**/*.ts\""
43
44
  },
44
45
  "devDependencies": {
45
46
  "@candesk/core": "^1.1.2",
@@ -315,6 +315,7 @@ message PatientAccount {
315
315
  bool is_identity_verified = 10;
316
316
  optional string blocked_at = 11;
317
317
  optional string block_reason = 12;
318
+ optional string deletes_at = 13;
318
319
  }
319
320
 
320
321
  enum Role {
@@ -0,0 +1,56 @@
1
+ syntax = "proto3";
2
+
3
+ package notification.v1;
4
+
5
+ service NotificationService {
6
+ rpc ListNotifications (ListNotificationsRequest) returns (ListNotificationsResponse);
7
+ rpc MarkNotificationsRead (MarkNotificationsReadRequest) returns (MarkNotificationsReadResponse);
8
+ rpc DeleteNotifications (DeleteNotificationsRequest) returns (DeleteNotificationsResponse);
9
+ }
10
+
11
+ enum NotificationType {
12
+ NOTIFICATION_TYPE_UNSPECIFIED = 0;
13
+ NOTIFICATION_TYPE_IDENTITY_VERIFIED = 1;
14
+ NOTIFICATION_TYPE_IDENTITY_REJECTED = 2;
15
+ NOTIFICATION_TYPE_IDENTITY_MISMATCH = 3;
16
+ NOTIFICATION_TYPE_IDENTITY_DUPLICATE = 4;
17
+ NOTIFICATION_TYPE_TREATMENT_REQUEST_PAID = 5;
18
+ NOTIFICATION_TYPE_EMAIL_CHANGED = 6;
19
+ NOTIFICATION_TYPE_TELEGRAM_LINKED = 7;
20
+ NOTIFICATION_TYPE_TELEGRAM_UNLINKED = 8;
21
+ NOTIFICATION_TYPE_TOTP_ENABLED = 9;
22
+ NOTIFICATION_TYPE_TOTP_DISABLED = 10;
23
+ }
24
+
25
+ message Notification {
26
+ string id = 1;
27
+ NotificationType type = 2;
28
+ map<string, string> params = 3;
29
+ optional string read_at = 4;
30
+ string created_at = 5;
31
+ }
32
+
33
+ message ListNotificationsRequest {
34
+ string user_id = 1;
35
+ optional string cursor = 2;
36
+ int32 limit = 3;
37
+ }
38
+
39
+ message ListNotificationsResponse {
40
+ repeated Notification notifications = 1;
41
+ optional string next_cursor = 2;
42
+ }
43
+
44
+ message MarkNotificationsReadRequest {
45
+ string user_id = 1;
46
+ string until = 2;
47
+ }
48
+
49
+ message MarkNotificationsReadResponse {}
50
+
51
+ message DeleteNotificationsRequest {
52
+ string user_id = 1;
53
+ string until = 2;
54
+ }
55
+
56
+ message DeleteNotificationsResponse {}