@candesk/contracts 6.36.0 → 6.37.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.
@@ -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';
@@ -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',
@@ -0,0 +1,3 @@
1
+ export interface EmailAssignedEvent {
2
+ email: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,7 @@
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';
@@ -17,6 +17,7 @@ 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);
@@ -198,6 +198,13 @@ export interface GetPatientAccountRequest {
198
198
  export interface GetPatientAccountResponse {
199
199
  account: PatientAccount | undefined;
200
200
  }
201
+ export interface ChangePatientEmailRequest {
202
+ id: string;
203
+ email: string;
204
+ }
205
+ export interface ChangePatientEmailResponse {
206
+ account: PatientAccount | undefined;
207
+ }
201
208
  export interface StaffAccount {
202
209
  id: string;
203
210
  email: string;
@@ -216,6 +223,7 @@ export interface PatientAccount {
216
223
  isTotpEnabled: boolean;
217
224
  createdAt: string;
218
225
  lastActiveAt?: string | undefined;
226
+ isEmailVerified: boolean;
219
227
  }
220
228
  export interface AccountService {
221
229
  getAccount(request: GetAccountRequest): Promise<GetAccountResponse>;
@@ -242,4 +250,5 @@ export interface AccountService {
242
250
  resetStaffTotp(request: ResetStaffTotpRequest): Promise<ResetStaffTotpResponse>;
243
251
  listPatientAccounts(request: ListPatientAccountsRequest): Promise<ListPatientAccountsResponse>;
244
252
  getPatientAccount(request: GetPatientAccountRequest): Promise<GetPatientAccountResponse>;
253
+ changePatientEmail(request: ChangePatientEmailRequest): Promise<ChangePatientEmailResponse>;
245
254
  }
@@ -199,6 +199,13 @@ export interface GetPatientAccountRequest {
199
199
  export interface GetPatientAccountResponse {
200
200
  account: PatientAccount | undefined;
201
201
  }
202
+ export interface ChangePatientEmailRequest {
203
+ id: string;
204
+ email: string;
205
+ }
206
+ export interface ChangePatientEmailResponse {
207
+ account: PatientAccount | undefined;
208
+ }
202
209
  export interface StaffAccount {
203
210
  id: string;
204
211
  email: string;
@@ -217,6 +224,7 @@ export interface PatientAccount {
217
224
  isTotpEnabled: boolean;
218
225
  createdAt: string;
219
226
  lastActiveAt?: string | undefined;
227
+ isEmailVerified: boolean;
220
228
  }
221
229
  export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
222
230
  export interface AccountServiceClient {
@@ -244,6 +252,7 @@ export interface AccountServiceClient {
244
252
  resetStaffTotp(request: ResetStaffTotpRequest): Observable<ResetStaffTotpResponse>;
245
253
  listPatientAccounts(request: ListPatientAccountsRequest): Observable<ListPatientAccountsResponse>;
246
254
  getPatientAccount(request: GetPatientAccountRequest): Observable<GetPatientAccountResponse>;
255
+ changePatientEmail(request: ChangePatientEmailRequest): Observable<ChangePatientEmailResponse>;
247
256
  }
248
257
  export interface AccountServiceController {
249
258
  getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
@@ -270,6 +279,7 @@ export interface AccountServiceController {
270
279
  resetStaffTotp(request: ResetStaffTotpRequest): Promise<ResetStaffTotpResponse> | Observable<ResetStaffTotpResponse> | ResetStaffTotpResponse;
271
280
  listPatientAccounts(request: ListPatientAccountsRequest): Promise<ListPatientAccountsResponse> | Observable<ListPatientAccountsResponse> | ListPatientAccountsResponse;
272
281
  getPatientAccount(request: GetPatientAccountRequest): Promise<GetPatientAccountResponse> | Observable<GetPatientAccountResponse> | GetPatientAccountResponse;
282
+ changePatientEmail(request: ChangePatientEmailRequest): Promise<ChangePatientEmailResponse> | Observable<ChangePatientEmailResponse> | ChangePatientEmailResponse;
273
283
  }
274
284
  export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
275
285
  export declare const ACCOUNT_SERVICE_NAME = "AccountService";
@@ -54,6 +54,7 @@ function AccountServiceControllerMethods() {
54
54
  "resetStaffTotp",
55
55
  "listPatientAccounts",
56
56
  "getPatientAccount",
57
+ "changePatientEmail",
57
58
  ];
58
59
  for (const method of grpcMethods) {
59
60
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "6.36.0",
3
+ "version": "6.37.0",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
@@ -34,6 +34,7 @@ service AccountService {
34
34
 
35
35
  rpc ListPatientAccounts(ListPatientAccountsRequest) returns (ListPatientAccountsResponse);
36
36
  rpc GetPatientAccount(GetPatientAccountRequest) returns (GetPatientAccountResponse);
37
+ rpc ChangePatientEmail(ChangePatientEmailRequest) returns (ChangePatientEmailResponse);
37
38
  }
38
39
 
39
40
  message GetAccountRequest {
@@ -262,6 +263,15 @@ message GetPatientAccountResponse {
262
263
  PatientAccount account = 1;
263
264
  }
264
265
 
266
+ message ChangePatientEmailRequest {
267
+ string id = 1;
268
+ string email = 2;
269
+ }
270
+
271
+ message ChangePatientEmailResponse {
272
+ PatientAccount account = 1;
273
+ }
274
+
265
275
  message StaffAccount {
266
276
  string id = 1;
267
277
  string email = 2;
@@ -282,6 +292,7 @@ message PatientAccount {
282
292
  bool is_totp_enabled = 6;
283
293
  string created_at = 7;
284
294
  optional string last_active_at = 8;
295
+ bool is_email_verified = 9;
285
296
  }
286
297
 
287
298
  enum Role {