@candesk/contracts 6.20.0 → 6.22.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 +11 -2
- package/dist/gen/account.js +1 -0
- package/dist/nest/account.d.ts +12 -2
- package/dist/nest/account.js +2 -0
- package/package.json +1 -1
- package/proto/account.proto +13 -2
package/dist/gen/account.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare enum Role {
|
|
|
5
5
|
ADMIN = 1,
|
|
6
6
|
DOCTOR = 2,
|
|
7
7
|
SUPPORT = 3,
|
|
8
|
+
SUPER_ADMIN = 4,
|
|
8
9
|
UNRECOGNIZED = -1
|
|
9
10
|
}
|
|
10
11
|
export interface GetAccountRequest {
|
|
@@ -19,7 +20,6 @@ export interface GetAccountResponse {
|
|
|
19
20
|
role: Role;
|
|
20
21
|
isTelegramLinked: boolean;
|
|
21
22
|
isIdentityVerified: boolean;
|
|
22
|
-
isOwner: boolean;
|
|
23
23
|
}
|
|
24
24
|
export interface InitEmailChangeRequest {
|
|
25
25
|
email: string;
|
|
@@ -91,6 +91,7 @@ export interface SetIdentityVerifiedResponse {
|
|
|
91
91
|
export interface CreateStaffAccountRequest {
|
|
92
92
|
email: string;
|
|
93
93
|
role: Role;
|
|
94
|
+
adminId: string;
|
|
94
95
|
}
|
|
95
96
|
export interface CreateStaffAccountResponse {
|
|
96
97
|
account: StaffAccount | undefined;
|
|
@@ -128,13 +129,20 @@ export interface SetStaffActiveRequest {
|
|
|
128
129
|
export interface SetStaffActiveResponse {
|
|
129
130
|
account: StaffAccount | undefined;
|
|
130
131
|
}
|
|
132
|
+
export interface ChangeStaffEmailRequest {
|
|
133
|
+
id: string;
|
|
134
|
+
email: string;
|
|
135
|
+
adminId: string;
|
|
136
|
+
}
|
|
137
|
+
export interface ChangeStaffEmailResponse {
|
|
138
|
+
account: StaffAccount | undefined;
|
|
139
|
+
}
|
|
131
140
|
export interface StaffAccount {
|
|
132
141
|
id: string;
|
|
133
142
|
email: string;
|
|
134
143
|
role: Role;
|
|
135
144
|
createdAt: string;
|
|
136
145
|
isActive: boolean;
|
|
137
|
-
isOwner: boolean;
|
|
138
146
|
}
|
|
139
147
|
export interface AccountService {
|
|
140
148
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse>;
|
|
@@ -153,4 +161,5 @@ export interface AccountService {
|
|
|
153
161
|
deleteStaffAccount(request: DeleteStaffAccountRequest): Promise<DeleteStaffAccountResponse>;
|
|
154
162
|
changeStaffRole(request: ChangeStaffRoleRequest): Promise<ChangeStaffRoleResponse>;
|
|
155
163
|
setStaffActive(request: SetStaffActiveRequest): Promise<SetStaffActiveResponse>;
|
|
164
|
+
changeStaffEmail(request: ChangeStaffEmailRequest): Promise<ChangeStaffEmailResponse>;
|
|
156
165
|
}
|
package/dist/gen/account.js
CHANGED
|
@@ -15,5 +15,6 @@ var Role;
|
|
|
15
15
|
Role[Role["ADMIN"] = 1] = "ADMIN";
|
|
16
16
|
Role[Role["DOCTOR"] = 2] = "DOCTOR";
|
|
17
17
|
Role[Role["SUPPORT"] = 3] = "SUPPORT";
|
|
18
|
+
Role[Role["SUPER_ADMIN"] = 4] = "SUPER_ADMIN";
|
|
18
19
|
Role[Role["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
19
20
|
})(Role || (exports.Role = Role = {}));
|
package/dist/nest/account.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare enum Role {
|
|
|
6
6
|
ADMIN = 1,
|
|
7
7
|
DOCTOR = 2,
|
|
8
8
|
SUPPORT = 3,
|
|
9
|
+
SUPER_ADMIN = 4,
|
|
9
10
|
UNRECOGNIZED = -1
|
|
10
11
|
}
|
|
11
12
|
export interface GetAccountRequest {
|
|
@@ -20,7 +21,6 @@ export interface GetAccountResponse {
|
|
|
20
21
|
role: Role;
|
|
21
22
|
isTelegramLinked: boolean;
|
|
22
23
|
isIdentityVerified: boolean;
|
|
23
|
-
isOwner: boolean;
|
|
24
24
|
}
|
|
25
25
|
export interface InitEmailChangeRequest {
|
|
26
26
|
email: string;
|
|
@@ -92,6 +92,7 @@ export interface SetIdentityVerifiedResponse {
|
|
|
92
92
|
export interface CreateStaffAccountRequest {
|
|
93
93
|
email: string;
|
|
94
94
|
role: Role;
|
|
95
|
+
adminId: string;
|
|
95
96
|
}
|
|
96
97
|
export interface CreateStaffAccountResponse {
|
|
97
98
|
account: StaffAccount | undefined;
|
|
@@ -129,13 +130,20 @@ export interface SetStaffActiveRequest {
|
|
|
129
130
|
export interface SetStaffActiveResponse {
|
|
130
131
|
account: StaffAccount | undefined;
|
|
131
132
|
}
|
|
133
|
+
export interface ChangeStaffEmailRequest {
|
|
134
|
+
id: string;
|
|
135
|
+
email: string;
|
|
136
|
+
adminId: string;
|
|
137
|
+
}
|
|
138
|
+
export interface ChangeStaffEmailResponse {
|
|
139
|
+
account: StaffAccount | undefined;
|
|
140
|
+
}
|
|
132
141
|
export interface StaffAccount {
|
|
133
142
|
id: string;
|
|
134
143
|
email: string;
|
|
135
144
|
role: Role;
|
|
136
145
|
createdAt: string;
|
|
137
146
|
isActive: boolean;
|
|
138
|
-
isOwner: boolean;
|
|
139
147
|
}
|
|
140
148
|
export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
141
149
|
export interface AccountServiceClient {
|
|
@@ -155,6 +163,7 @@ export interface AccountServiceClient {
|
|
|
155
163
|
deleteStaffAccount(request: DeleteStaffAccountRequest): Observable<DeleteStaffAccountResponse>;
|
|
156
164
|
changeStaffRole(request: ChangeStaffRoleRequest): Observable<ChangeStaffRoleResponse>;
|
|
157
165
|
setStaffActive(request: SetStaffActiveRequest): Observable<SetStaffActiveResponse>;
|
|
166
|
+
changeStaffEmail(request: ChangeStaffEmailRequest): Observable<ChangeStaffEmailResponse>;
|
|
158
167
|
}
|
|
159
168
|
export interface AccountServiceController {
|
|
160
169
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
@@ -173,6 +182,7 @@ export interface AccountServiceController {
|
|
|
173
182
|
deleteStaffAccount(request: DeleteStaffAccountRequest): Promise<DeleteStaffAccountResponse> | Observable<DeleteStaffAccountResponse> | DeleteStaffAccountResponse;
|
|
174
183
|
changeStaffRole(request: ChangeStaffRoleRequest): Promise<ChangeStaffRoleResponse> | Observable<ChangeStaffRoleResponse> | ChangeStaffRoleResponse;
|
|
175
184
|
setStaffActive(request: SetStaffActiveRequest): Promise<SetStaffActiveResponse> | Observable<SetStaffActiveResponse> | SetStaffActiveResponse;
|
|
185
|
+
changeStaffEmail(request: ChangeStaffEmailRequest): Promise<ChangeStaffEmailResponse> | Observable<ChangeStaffEmailResponse> | ChangeStaffEmailResponse;
|
|
176
186
|
}
|
|
177
187
|
export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
|
|
178
188
|
export declare const ACCOUNT_SERVICE_NAME = "AccountService";
|
package/dist/nest/account.js
CHANGED
|
@@ -17,6 +17,7 @@ var Role;
|
|
|
17
17
|
Role[Role["ADMIN"] = 1] = "ADMIN";
|
|
18
18
|
Role[Role["DOCTOR"] = 2] = "DOCTOR";
|
|
19
19
|
Role[Role["SUPPORT"] = 3] = "SUPPORT";
|
|
20
|
+
Role[Role["SUPER_ADMIN"] = 4] = "SUPER_ADMIN";
|
|
20
21
|
Role[Role["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
21
22
|
})(Role || (exports.Role = Role = {}));
|
|
22
23
|
exports.ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
@@ -39,6 +40,7 @@ function AccountServiceControllerMethods() {
|
|
|
39
40
|
"deleteStaffAccount",
|
|
40
41
|
"changeStaffRole",
|
|
41
42
|
"setStaffActive",
|
|
43
|
+
"changeStaffEmail",
|
|
42
44
|
];
|
|
43
45
|
for (const method of grpcMethods) {
|
|
44
46
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
package/proto/account.proto
CHANGED
|
@@ -24,6 +24,7 @@ service AccountService {
|
|
|
24
24
|
rpc DeleteStaffAccount(DeleteStaffAccountRequest) returns (DeleteStaffAccountResponse);
|
|
25
25
|
rpc ChangeStaffRole(ChangeStaffRoleRequest) returns (ChangeStaffRoleResponse);
|
|
26
26
|
rpc SetStaffActive(SetStaffActiveRequest) returns (SetStaffActiveResponse);
|
|
27
|
+
rpc ChangeStaffEmail(ChangeStaffEmailRequest) returns (ChangeStaffEmailResponse);
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
message GetAccountRequest {
|
|
@@ -39,7 +40,6 @@ message GetAccountResponse {
|
|
|
39
40
|
Role role = 6;
|
|
40
41
|
bool is_telegram_linked = 7;
|
|
41
42
|
bool is_identity_verified = 8;
|
|
42
|
-
bool is_owner = 9;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
message InitEmailChangeRequest {
|
|
@@ -124,6 +124,7 @@ message SetIdentityVerifiedResponse {
|
|
|
124
124
|
message CreateStaffAccountRequest {
|
|
125
125
|
string email = 1;
|
|
126
126
|
Role role = 2;
|
|
127
|
+
string admin_id = 3;
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
message CreateStaffAccountResponse {
|
|
@@ -172,13 +173,22 @@ message SetStaffActiveResponse {
|
|
|
172
173
|
StaffAccount account = 1;
|
|
173
174
|
}
|
|
174
175
|
|
|
176
|
+
message ChangeStaffEmailRequest {
|
|
177
|
+
string id = 1;
|
|
178
|
+
string email = 2;
|
|
179
|
+
string admin_id = 3;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
message ChangeStaffEmailResponse {
|
|
183
|
+
StaffAccount account = 1;
|
|
184
|
+
}
|
|
185
|
+
|
|
175
186
|
message StaffAccount {
|
|
176
187
|
string id = 1;
|
|
177
188
|
string email = 2;
|
|
178
189
|
Role role = 3;
|
|
179
190
|
string created_at = 4;
|
|
180
191
|
bool is_active = 5;
|
|
181
|
-
bool is_owner = 6;
|
|
182
192
|
}
|
|
183
193
|
|
|
184
194
|
enum Role {
|
|
@@ -186,4 +196,5 @@ enum Role {
|
|
|
186
196
|
ADMIN = 1;
|
|
187
197
|
DOCTOR = 2;
|
|
188
198
|
SUPPORT = 3;
|
|
199
|
+
SUPER_ADMIN = 4;
|
|
189
200
|
}
|