@candesk/contracts 6.22.0 → 6.24.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.
@@ -6,4 +6,7 @@ export declare const AUTH_EVENTS: {
6
6
  readonly TELEGRAM_UNLINKED: 'auth.telegram.unlinked';
7
7
  readonly ACCOUNT_DELETION_REQUESTED: 'auth.account-deletion.requested';
8
8
  readonly ACCOUNT_DELETED: 'auth.account.deleted';
9
+ readonly STAFF_INVITED: 'auth.staff.invited';
10
+ readonly STAFF_EMAIL_CHANGED: 'auth.staff-email.changed';
11
+ readonly STAFF_EMAIL_ASSIGNED: 'auth.staff-email.assigned';
9
12
  };
@@ -8,5 +8,8 @@ exports.AUTH_EVENTS = {
8
8
  TELEGRAM_LINKED: 'auth.telegram.linked',
9
9
  TELEGRAM_UNLINKED: 'auth.telegram.unlinked',
10
10
  ACCOUNT_DELETION_REQUESTED: 'auth.account-deletion.requested',
11
- ACCOUNT_DELETED: 'auth.account.deleted'
11
+ ACCOUNT_DELETED: 'auth.account.deleted',
12
+ STAFF_INVITED: 'auth.staff.invited',
13
+ STAFF_EMAIL_CHANGED: 'auth.staff-email.changed',
14
+ STAFF_EMAIL_ASSIGNED: 'auth.staff-email.assigned'
12
15
  };
@@ -4,5 +4,8 @@ export * from './auth.events';
4
4
  export * from './email-change-requested.interface';
5
5
  export * from './email-changed.interface';
6
6
  export * from './otp-requested.interface';
7
+ export * from './staff-email-assigned.interface';
8
+ export * from './staff-email-changed.interface';
9
+ export * from './staff-invited.interface';
7
10
  export * from './telegram-linked.interface';
8
11
  export * from './telegram-unlinked.interface';
@@ -20,5 +20,8 @@ __exportStar(require("./auth.events"), exports);
20
20
  __exportStar(require("./email-change-requested.interface"), exports);
21
21
  __exportStar(require("./email-changed.interface"), exports);
22
22
  __exportStar(require("./otp-requested.interface"), exports);
23
+ __exportStar(require("./staff-email-assigned.interface"), exports);
24
+ __exportStar(require("./staff-email-changed.interface"), exports);
25
+ __exportStar(require("./staff-invited.interface"), exports);
23
26
  __exportStar(require("./telegram-linked.interface"), exports);
24
27
  __exportStar(require("./telegram-unlinked.interface"), exports);
@@ -0,0 +1,4 @@
1
+ export interface StaffEmailAssignedEvent {
2
+ email: string;
3
+ firstName: string | null;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface StaffEmailChangedEvent {
2
+ previousEmail: string;
3
+ firstName: string | null;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface StaffInvitedEvent {
2
+ email: string;
3
+ firstName: string | null;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -96,6 +96,13 @@ export interface CreateStaffAccountRequest {
96
96
  export interface CreateStaffAccountResponse {
97
97
  account: StaffAccount | undefined;
98
98
  }
99
+ export interface SendStaffInviteRequest {
100
+ id: string;
101
+ firstName?: string | undefined;
102
+ }
103
+ export interface SendStaffInviteResponse {
104
+ ok: boolean;
105
+ }
99
106
  export interface GetStaffAccountRequest {
100
107
  id: string;
101
108
  }
@@ -133,6 +140,7 @@ export interface ChangeStaffEmailRequest {
133
140
  id: string;
134
141
  email: string;
135
142
  adminId: string;
143
+ firstName?: string | undefined;
136
144
  }
137
145
  export interface ChangeStaffEmailResponse {
138
146
  account: StaffAccount | undefined;
@@ -156,6 +164,7 @@ export interface AccountService {
156
164
  confirmAccountDeletion(request: ConfirmAccountDeletionRequest): Promise<ConfirmAccountDeletionResponse>;
157
165
  setIdentityVerified(request: SetIdentityVerifiedRequest): Promise<SetIdentityVerifiedResponse>;
158
166
  createStaffAccount(request: CreateStaffAccountRequest): Promise<CreateStaffAccountResponse>;
167
+ sendStaffInvite(request: SendStaffInviteRequest): Promise<SendStaffInviteResponse>;
159
168
  getStaffAccount(request: GetStaffAccountRequest): Promise<GetStaffAccountResponse>;
160
169
  listStaffAccounts(request: ListStaffAccountsRequest): Promise<ListStaffAccountsResponse>;
161
170
  deleteStaffAccount(request: DeleteStaffAccountRequest): Promise<DeleteStaffAccountResponse>;
@@ -97,6 +97,13 @@ export interface CreateStaffAccountRequest {
97
97
  export interface CreateStaffAccountResponse {
98
98
  account: StaffAccount | undefined;
99
99
  }
100
+ export interface SendStaffInviteRequest {
101
+ id: string;
102
+ firstName?: string | undefined;
103
+ }
104
+ export interface SendStaffInviteResponse {
105
+ ok: boolean;
106
+ }
100
107
  export interface GetStaffAccountRequest {
101
108
  id: string;
102
109
  }
@@ -134,6 +141,7 @@ export interface ChangeStaffEmailRequest {
134
141
  id: string;
135
142
  email: string;
136
143
  adminId: string;
144
+ firstName?: string | undefined;
137
145
  }
138
146
  export interface ChangeStaffEmailResponse {
139
147
  account: StaffAccount | undefined;
@@ -158,6 +166,7 @@ export interface AccountServiceClient {
158
166
  confirmAccountDeletion(request: ConfirmAccountDeletionRequest): Observable<ConfirmAccountDeletionResponse>;
159
167
  setIdentityVerified(request: SetIdentityVerifiedRequest): Observable<SetIdentityVerifiedResponse>;
160
168
  createStaffAccount(request: CreateStaffAccountRequest): Observable<CreateStaffAccountResponse>;
169
+ sendStaffInvite(request: SendStaffInviteRequest): Observable<SendStaffInviteResponse>;
161
170
  getStaffAccount(request: GetStaffAccountRequest): Observable<GetStaffAccountResponse>;
162
171
  listStaffAccounts(request: ListStaffAccountsRequest): Observable<ListStaffAccountsResponse>;
163
172
  deleteStaffAccount(request: DeleteStaffAccountRequest): Observable<DeleteStaffAccountResponse>;
@@ -177,6 +186,7 @@ export interface AccountServiceController {
177
186
  confirmAccountDeletion(request: ConfirmAccountDeletionRequest): Promise<ConfirmAccountDeletionResponse> | Observable<ConfirmAccountDeletionResponse> | ConfirmAccountDeletionResponse;
178
187
  setIdentityVerified(request: SetIdentityVerifiedRequest): Promise<SetIdentityVerifiedResponse> | Observable<SetIdentityVerifiedResponse> | SetIdentityVerifiedResponse;
179
188
  createStaffAccount(request: CreateStaffAccountRequest): Promise<CreateStaffAccountResponse> | Observable<CreateStaffAccountResponse> | CreateStaffAccountResponse;
189
+ sendStaffInvite(request: SendStaffInviteRequest): Promise<SendStaffInviteResponse> | Observable<SendStaffInviteResponse> | SendStaffInviteResponse;
180
190
  getStaffAccount(request: GetStaffAccountRequest): Promise<GetStaffAccountResponse> | Observable<GetStaffAccountResponse> | GetStaffAccountResponse;
181
191
  listStaffAccounts(request: ListStaffAccountsRequest): Promise<ListStaffAccountsResponse> | Observable<ListStaffAccountsResponse> | ListStaffAccountsResponse;
182
192
  deleteStaffAccount(request: DeleteStaffAccountRequest): Promise<DeleteStaffAccountResponse> | Observable<DeleteStaffAccountResponse> | DeleteStaffAccountResponse;
@@ -35,6 +35,7 @@ function AccountServiceControllerMethods() {
35
35
  "confirmAccountDeletion",
36
36
  "setIdentityVerified",
37
37
  "createStaffAccount",
38
+ "sendStaffInvite",
38
39
  "getStaffAccount",
39
40
  "listStaffAccounts",
40
41
  "deleteStaffAccount",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "6.22.0",
3
+ "version": "6.24.0",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
@@ -19,6 +19,7 @@ service AccountService {
19
19
  rpc SetIdentityVerified(SetIdentityVerifiedRequest) returns (SetIdentityVerifiedResponse);
20
20
 
21
21
  rpc CreateStaffAccount(CreateStaffAccountRequest) returns (CreateStaffAccountResponse);
22
+ rpc SendStaffInvite(SendStaffInviteRequest) returns (SendStaffInviteResponse);
22
23
  rpc GetStaffAccount(GetStaffAccountRequest) returns (GetStaffAccountResponse);
23
24
  rpc ListStaffAccounts(ListStaffAccountsRequest) returns (ListStaffAccountsResponse);
24
25
  rpc DeleteStaffAccount(DeleteStaffAccountRequest) returns (DeleteStaffAccountResponse);
@@ -131,6 +132,15 @@ message CreateStaffAccountResponse {
131
132
  StaffAccount account = 1;
132
133
  }
133
134
 
135
+ message SendStaffInviteRequest {
136
+ string id = 1;
137
+ optional string first_name = 2;
138
+ }
139
+
140
+ message SendStaffInviteResponse {
141
+ bool ok = 1;
142
+ }
143
+
134
144
  message GetStaffAccountRequest {
135
145
  string id = 1;
136
146
  }
@@ -177,6 +187,7 @@ message ChangeStaffEmailRequest {
177
187
  string id = 1;
178
188
  string email = 2;
179
189
  string admin_id = 3;
190
+ optional string first_name = 4;
180
191
  }
181
192
 
182
193
  message ChangeStaffEmailResponse {