@candesk/contracts 6.25.0 → 6.27.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.
@@ -99,6 +99,7 @@ export interface CreateStaffAccountResponse {
99
99
  export interface SendStaffInviteRequest {
100
100
  id: string;
101
101
  firstName?: string | undefined;
102
+ adminId: string;
102
103
  }
103
104
  export interface SendStaffInviteResponse {
104
105
  ok: boolean;
@@ -116,6 +117,7 @@ export interface ListStaffAccountsResponse {
116
117
  }
117
118
  export interface DeleteStaffAccountRequest {
118
119
  id: string;
120
+ adminId: string;
119
121
  }
120
122
  export interface DeleteStaffAccountResponse {
121
123
  ok: boolean;
@@ -152,6 +154,7 @@ export interface StaffAccount {
152
154
  role: Role;
153
155
  createdAt: string;
154
156
  isActive: boolean;
157
+ lastActiveAt?: string | undefined;
155
158
  }
156
159
  export interface AccountService {
157
160
  getAccount(request: GetAccountRequest): Promise<GetAccountResponse>;
@@ -15,6 +15,12 @@ export interface SaveStaffRequest {
15
15
  export interface SaveStaffResponse {
16
16
  staff: Staff | undefined;
17
17
  }
18
+ export interface DeleteStaffRequest {
19
+ id: string;
20
+ }
21
+ export interface DeleteStaffResponse {
22
+ ok: boolean;
23
+ }
18
24
  export interface Staff {
19
25
  id: string;
20
26
  title?: string | undefined;
@@ -24,4 +30,5 @@ export interface Staff {
24
30
  export interface StaffService {
25
31
  listStaff(request: ListStaffRequest): Promise<ListStaffResponse>;
26
32
  saveStaff(request: SaveStaffRequest): Promise<SaveStaffResponse>;
33
+ deleteStaff(request: DeleteStaffRequest): Promise<DeleteStaffResponse>;
27
34
  }
@@ -100,6 +100,7 @@ export interface CreateStaffAccountResponse {
100
100
  export interface SendStaffInviteRequest {
101
101
  id: string;
102
102
  firstName?: string | undefined;
103
+ adminId: string;
103
104
  }
104
105
  export interface SendStaffInviteResponse {
105
106
  ok: boolean;
@@ -117,6 +118,7 @@ export interface ListStaffAccountsResponse {
117
118
  }
118
119
  export interface DeleteStaffAccountRequest {
119
120
  id: string;
121
+ adminId: string;
120
122
  }
121
123
  export interface DeleteStaffAccountResponse {
122
124
  ok: boolean;
@@ -153,6 +155,7 @@ export interface StaffAccount {
153
155
  role: Role;
154
156
  createdAt: string;
155
157
  isActive: boolean;
158
+ lastActiveAt?: string | undefined;
156
159
  }
157
160
  export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
158
161
  export interface AccountServiceClient {
@@ -16,6 +16,12 @@ export interface SaveStaffRequest {
16
16
  export interface SaveStaffResponse {
17
17
  staff: Staff | undefined;
18
18
  }
19
+ export interface DeleteStaffRequest {
20
+ id: string;
21
+ }
22
+ export interface DeleteStaffResponse {
23
+ ok: boolean;
24
+ }
19
25
  export interface Staff {
20
26
  id: string;
21
27
  title?: string | undefined;
@@ -26,10 +32,12 @@ export declare const STAFF_V1_PACKAGE_NAME = "staff.v1";
26
32
  export interface StaffServiceClient {
27
33
  listStaff(request: ListStaffRequest): Observable<ListStaffResponse>;
28
34
  saveStaff(request: SaveStaffRequest): Observable<SaveStaffResponse>;
35
+ deleteStaff(request: DeleteStaffRequest): Observable<DeleteStaffResponse>;
29
36
  }
30
37
  export interface StaffServiceController {
31
38
  listStaff(request: ListStaffRequest): Promise<ListStaffResponse> | Observable<ListStaffResponse> | ListStaffResponse;
32
39
  saveStaff(request: SaveStaffRequest): Promise<SaveStaffResponse> | Observable<SaveStaffResponse> | SaveStaffResponse;
40
+ deleteStaff(request: DeleteStaffRequest): Promise<DeleteStaffResponse> | Observable<DeleteStaffResponse> | DeleteStaffResponse;
33
41
  }
34
42
  export declare function StaffServiceControllerMethods(): (constructor: Function) => void;
35
43
  export declare const STAFF_SERVICE_NAME = "StaffService";
@@ -14,7 +14,7 @@ exports.protobufFileName = "staff.proto";
14
14
  exports.STAFF_V1_PACKAGE_NAME = "staff.v1";
15
15
  function StaffServiceControllerMethods() {
16
16
  return function (constructor) {
17
- const grpcMethods = ["listStaff", "saveStaff"];
17
+ const grpcMethods = ["listStaff", "saveStaff", "deleteStaff"];
18
18
  for (const method of grpcMethods) {
19
19
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
20
20
  (0, microservices_1.GrpcMethod)("StaffService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "6.25.0",
3
+ "version": "6.27.0",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
@@ -135,6 +135,7 @@ message CreateStaffAccountResponse {
135
135
  message SendStaffInviteRequest {
136
136
  string id = 1;
137
137
  optional string first_name = 2;
138
+ string admin_id = 3;
138
139
  }
139
140
 
140
141
  message SendStaffInviteResponse {
@@ -157,6 +158,7 @@ message ListStaffAccountsResponse {
157
158
 
158
159
  message DeleteStaffAccountRequest {
159
160
  string id = 1;
161
+ string admin_id = 2;
160
162
  }
161
163
 
162
164
  message DeleteStaffAccountResponse {
@@ -201,6 +203,8 @@ message StaffAccount {
201
203
  Role role = 3;
202
204
  string created_at = 4;
203
205
  bool is_active = 5;
206
+ reserved 6;
207
+ optional string last_active_at = 7;
204
208
  }
205
209
 
206
210
  enum Role {
package/proto/staff.proto CHANGED
@@ -5,6 +5,7 @@ package staff.v1;
5
5
  service StaffService {
6
6
  rpc ListStaff (ListStaffRequest) returns (ListStaffResponse);
7
7
  rpc SaveStaff (SaveStaffRequest) returns (SaveStaffResponse);
8
+ rpc DeleteStaff (DeleteStaffRequest) returns (DeleteStaffResponse);
8
9
  }
9
10
 
10
11
  message ListStaffRequest {
@@ -26,6 +27,14 @@ message SaveStaffResponse {
26
27
  Staff staff = 1;
27
28
  }
28
29
 
30
+ message DeleteStaffRequest {
31
+ string id = 1;
32
+ }
33
+
34
+ message DeleteStaffResponse {
35
+ bool ok = 1;
36
+ }
37
+
29
38
  message Staff {
30
39
  string id = 1;
31
40
  optional string title = 2;