@candesk/contracts 6.40.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.
@@ -1,3 +1,5 @@
1
1
  export interface EmailChangedEvent {
2
+ eventId: string;
3
+ accountId: string;
2
4
  previousEmail: string;
3
5
  }
@@ -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
  }
@@ -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 });
@@ -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.40.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",
@@ -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 {}