@candesk/contracts 6.38.0 → 6.40.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,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,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);
@@ -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>;
@@ -127,13 +127,12 @@ export interface GetTreatmentRequestResponse {
127
127
  }
128
128
  export interface ListTreatmentRequestsRequest {
129
129
  userId: string;
130
- page: number;
130
+ cursor?: string | undefined;
131
+ limit: number;
131
132
  }
132
133
  export interface ListTreatmentRequestsResponse {
133
134
  requests: TreatmentRequest[];
134
- page: number;
135
- pageSize: number;
136
- total: number;
135
+ nextCursor?: string | undefined;
137
136
  }
138
137
  export interface UpdateTreatmentRequestRequest {
139
138
  userId: string;
@@ -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 {
@@ -128,13 +128,12 @@ export interface GetTreatmentRequestResponse {
128
128
  }
129
129
  export interface ListTreatmentRequestsRequest {
130
130
  userId: string;
131
- page: number;
131
+ cursor?: string | undefined;
132
+ limit: number;
132
133
  }
133
134
  export interface ListTreatmentRequestsResponse {
134
135
  requests: TreatmentRequest[];
135
- page: number;
136
- pageSize: number;
137
- total: number;
136
+ nextCursor?: string | undefined;
138
137
  }
139
138
  export interface UpdateTreatmentRequestRequest {
140
139
  userId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "6.38.0",
3
+ "version": "6.40.0",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
@@ -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 {
@@ -154,14 +154,15 @@ message GetTreatmentRequestResponse {
154
154
 
155
155
  message ListTreatmentRequestsRequest {
156
156
  string user_id = 1;
157
- int32 page = 2;
157
+ reserved 2;
158
+ optional string cursor = 3;
159
+ int32 limit = 4;
158
160
  }
159
161
 
160
162
  message ListTreatmentRequestsResponse {
161
163
  repeated TreatmentRequest requests = 1;
162
- int32 page = 2;
163
- int32 page_size = 3;
164
- int32 total = 4;
164
+ reserved 2, 3, 4;
165
+ optional string next_cursor = 5;
165
166
  }
166
167
 
167
168
  message UpdateTreatmentRequestRequest {