@candesk/contracts 6.18.0 → 6.19.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.
- package/dist/gen/account.d.ts +19 -0
- package/dist/nest/account.d.ts +21 -0
- package/dist/nest/account.js +2 -0
- package/package.json +1 -1
- package/proto/account.proto +23 -0
package/dist/gen/account.d.ts
CHANGED
|
@@ -111,11 +111,28 @@ export interface DeleteStaffAccountRequest {
|
|
|
111
111
|
export interface DeleteStaffAccountResponse {
|
|
112
112
|
ok: boolean;
|
|
113
113
|
}
|
|
114
|
+
export interface ChangeStaffRoleRequest {
|
|
115
|
+
id: string;
|
|
116
|
+
role: Role;
|
|
117
|
+
adminId: string;
|
|
118
|
+
}
|
|
119
|
+
export interface ChangeStaffRoleResponse {
|
|
120
|
+
account: StaffAccount | undefined;
|
|
121
|
+
}
|
|
122
|
+
export interface SetStaffActiveRequest {
|
|
123
|
+
id: string;
|
|
124
|
+
active: boolean;
|
|
125
|
+
adminId: string;
|
|
126
|
+
}
|
|
127
|
+
export interface SetStaffActiveResponse {
|
|
128
|
+
account: StaffAccount | undefined;
|
|
129
|
+
}
|
|
114
130
|
export interface StaffAccount {
|
|
115
131
|
id: string;
|
|
116
132
|
email: string;
|
|
117
133
|
role: Role;
|
|
118
134
|
createdAt: string;
|
|
135
|
+
isActive: boolean;
|
|
119
136
|
}
|
|
120
137
|
export interface AccountService {
|
|
121
138
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse>;
|
|
@@ -132,4 +149,6 @@ export interface AccountService {
|
|
|
132
149
|
getStaffAccount(request: GetStaffAccountRequest): Promise<GetStaffAccountResponse>;
|
|
133
150
|
listStaffAccounts(request: ListStaffAccountsRequest): Promise<ListStaffAccountsResponse>;
|
|
134
151
|
deleteStaffAccount(request: DeleteStaffAccountRequest): Promise<DeleteStaffAccountResponse>;
|
|
152
|
+
changeStaffRole(request: ChangeStaffRoleRequest): Promise<ChangeStaffRoleResponse>;
|
|
153
|
+
setStaffActive(request: SetStaffActiveRequest): Promise<SetStaffActiveResponse>;
|
|
135
154
|
}
|
package/dist/nest/account.d.ts
CHANGED
|
@@ -112,11 +112,28 @@ export interface DeleteStaffAccountRequest {
|
|
|
112
112
|
export interface DeleteStaffAccountResponse {
|
|
113
113
|
ok: boolean;
|
|
114
114
|
}
|
|
115
|
+
export interface ChangeStaffRoleRequest {
|
|
116
|
+
id: string;
|
|
117
|
+
role: Role;
|
|
118
|
+
adminId: string;
|
|
119
|
+
}
|
|
120
|
+
export interface ChangeStaffRoleResponse {
|
|
121
|
+
account: StaffAccount | undefined;
|
|
122
|
+
}
|
|
123
|
+
export interface SetStaffActiveRequest {
|
|
124
|
+
id: string;
|
|
125
|
+
active: boolean;
|
|
126
|
+
adminId: string;
|
|
127
|
+
}
|
|
128
|
+
export interface SetStaffActiveResponse {
|
|
129
|
+
account: StaffAccount | undefined;
|
|
130
|
+
}
|
|
115
131
|
export interface StaffAccount {
|
|
116
132
|
id: string;
|
|
117
133
|
email: string;
|
|
118
134
|
role: Role;
|
|
119
135
|
createdAt: string;
|
|
136
|
+
isActive: boolean;
|
|
120
137
|
}
|
|
121
138
|
export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
122
139
|
export interface AccountServiceClient {
|
|
@@ -134,6 +151,8 @@ export interface AccountServiceClient {
|
|
|
134
151
|
getStaffAccount(request: GetStaffAccountRequest): Observable<GetStaffAccountResponse>;
|
|
135
152
|
listStaffAccounts(request: ListStaffAccountsRequest): Observable<ListStaffAccountsResponse>;
|
|
136
153
|
deleteStaffAccount(request: DeleteStaffAccountRequest): Observable<DeleteStaffAccountResponse>;
|
|
154
|
+
changeStaffRole(request: ChangeStaffRoleRequest): Observable<ChangeStaffRoleResponse>;
|
|
155
|
+
setStaffActive(request: SetStaffActiveRequest): Observable<SetStaffActiveResponse>;
|
|
137
156
|
}
|
|
138
157
|
export interface AccountServiceController {
|
|
139
158
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
@@ -150,6 +169,8 @@ export interface AccountServiceController {
|
|
|
150
169
|
getStaffAccount(request: GetStaffAccountRequest): Promise<GetStaffAccountResponse> | Observable<GetStaffAccountResponse> | GetStaffAccountResponse;
|
|
151
170
|
listStaffAccounts(request: ListStaffAccountsRequest): Promise<ListStaffAccountsResponse> | Observable<ListStaffAccountsResponse> | ListStaffAccountsResponse;
|
|
152
171
|
deleteStaffAccount(request: DeleteStaffAccountRequest): Promise<DeleteStaffAccountResponse> | Observable<DeleteStaffAccountResponse> | DeleteStaffAccountResponse;
|
|
172
|
+
changeStaffRole(request: ChangeStaffRoleRequest): Promise<ChangeStaffRoleResponse> | Observable<ChangeStaffRoleResponse> | ChangeStaffRoleResponse;
|
|
173
|
+
setStaffActive(request: SetStaffActiveRequest): Promise<SetStaffActiveResponse> | Observable<SetStaffActiveResponse> | SetStaffActiveResponse;
|
|
153
174
|
}
|
|
154
175
|
export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
|
|
155
176
|
export declare const ACCOUNT_SERVICE_NAME = "AccountService";
|
package/dist/nest/account.js
CHANGED
|
@@ -37,6 +37,8 @@ function AccountServiceControllerMethods() {
|
|
|
37
37
|
"getStaffAccount",
|
|
38
38
|
"listStaffAccounts",
|
|
39
39
|
"deleteStaffAccount",
|
|
40
|
+
"changeStaffRole",
|
|
41
|
+
"setStaffActive",
|
|
40
42
|
];
|
|
41
43
|
for (const method of grpcMethods) {
|
|
42
44
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
package/proto/account.proto
CHANGED
|
@@ -22,6 +22,8 @@ service AccountService {
|
|
|
22
22
|
rpc GetStaffAccount(GetStaffAccountRequest) returns (GetStaffAccountResponse);
|
|
23
23
|
rpc ListStaffAccounts(ListStaffAccountsRequest) returns (ListStaffAccountsResponse);
|
|
24
24
|
rpc DeleteStaffAccount(DeleteStaffAccountRequest) returns (DeleteStaffAccountResponse);
|
|
25
|
+
rpc ChangeStaffRole(ChangeStaffRoleRequest) returns (ChangeStaffRoleResponse);
|
|
26
|
+
rpc SetStaffActive(SetStaffActiveRequest) returns (SetStaffActiveResponse);
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
message GetAccountRequest {
|
|
@@ -149,11 +151,32 @@ message DeleteStaffAccountResponse {
|
|
|
149
151
|
bool ok = 1;
|
|
150
152
|
}
|
|
151
153
|
|
|
154
|
+
message ChangeStaffRoleRequest {
|
|
155
|
+
string id = 1;
|
|
156
|
+
Role role = 2;
|
|
157
|
+
string admin_id = 3;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
message ChangeStaffRoleResponse {
|
|
161
|
+
StaffAccount account = 1;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
message SetStaffActiveRequest {
|
|
165
|
+
string id = 1;
|
|
166
|
+
bool active = 2;
|
|
167
|
+
string admin_id = 3;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
message SetStaffActiveResponse {
|
|
171
|
+
StaffAccount account = 1;
|
|
172
|
+
}
|
|
173
|
+
|
|
152
174
|
message StaffAccount {
|
|
153
175
|
string id = 1;
|
|
154
176
|
string email = 2;
|
|
155
177
|
Role role = 3;
|
|
156
178
|
string created_at = 4;
|
|
179
|
+
bool is_active = 5;
|
|
157
180
|
}
|
|
158
181
|
|
|
159
182
|
enum Role {
|