@skyiro/sky-client 0.1.19 → 0.1.21
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/accounts-client.d.ts +0 -1
- package/dist/accounts-client.js +20 -15
- package/dist/accounts-client.js.map +1 -1
- package/dist/types.d.ts +11 -3
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/proto/accounts.proto +5 -0
|
@@ -2,7 +2,6 @@ import { LicenseCheckRequest, LicenseCheckResponse, MfaSessionRequest, MfaSessio
|
|
|
2
2
|
import { ProductKey } from "./enums";
|
|
3
3
|
export declare class AccountClient {
|
|
4
4
|
private readonly client;
|
|
5
|
-
private readonly defaultProductKey;
|
|
6
5
|
constructor(address?: string, defaultProductKey?: ProductKey);
|
|
7
6
|
getUser(id: string): Promise<UserGetResponse>;
|
|
8
7
|
createUser(data: UserCreateRequest): Promise<UserCreateResponse>;
|
package/dist/accounts-client.js
CHANGED
|
@@ -19,12 +19,10 @@ function loadAccountGrpc(rawAddress) {
|
|
|
19
19
|
}
|
|
20
20
|
class AccountClient {
|
|
21
21
|
client;
|
|
22
|
-
defaultProductKey;
|
|
23
22
|
constructor(address, defaultProductKey = enums_1.ProductKey.SkyAccount) {
|
|
24
23
|
const targetAddress = address ||
|
|
25
24
|
process.env.ACCOUNTS_GRPC_URL || 'localhost:50510';
|
|
26
25
|
this.client = loadAccountGrpc(targetAddress);
|
|
27
|
-
this.defaultProductKey = defaultProductKey;
|
|
28
26
|
}
|
|
29
27
|
getUser(id) {
|
|
30
28
|
const grpcReq = { id };
|
|
@@ -39,8 +37,8 @@ class AccountClient {
|
|
|
39
37
|
});
|
|
40
38
|
}
|
|
41
39
|
createUser(data) {
|
|
42
|
-
const productKey =
|
|
43
|
-
const { firstName, organizationId, lastName, middleName, countryCode, email, phone, orgRole, personalEmail } = data;
|
|
40
|
+
const productKey = data.productKey;
|
|
41
|
+
const { firstName, organizationId, lastName, middleName, countryCode, email, phone, orgRole, personalEmail, designation, } = data;
|
|
44
42
|
const grpcReq = {
|
|
45
43
|
firstName,
|
|
46
44
|
productKey,
|
|
@@ -51,7 +49,8 @@ class AccountClient {
|
|
|
51
49
|
email,
|
|
52
50
|
phone,
|
|
53
51
|
orgRole,
|
|
54
|
-
personalEmail
|
|
52
|
+
personalEmail,
|
|
53
|
+
designation,
|
|
55
54
|
};
|
|
56
55
|
return new Promise((resolvePromise, rejectPromise) => {
|
|
57
56
|
this.client.createUser(grpcReq, (error, response) => {
|
|
@@ -64,8 +63,8 @@ class AccountClient {
|
|
|
64
63
|
});
|
|
65
64
|
}
|
|
66
65
|
updateUser(data) {
|
|
67
|
-
const productKey =
|
|
68
|
-
const { id, organizationId, firstName, lastName, middleName, password, orgRole, email, phone, } = data;
|
|
66
|
+
const productKey = data.productKey;
|
|
67
|
+
const { id, organizationId, firstName, lastName, middleName, password, orgRole, email, phone, designation, } = data;
|
|
69
68
|
const grpcReq = {
|
|
70
69
|
id,
|
|
71
70
|
organizationId,
|
|
@@ -77,6 +76,8 @@ class AccountClient {
|
|
|
77
76
|
orgRole,
|
|
78
77
|
email,
|
|
79
78
|
phone,
|
|
79
|
+
designation,
|
|
80
|
+
status: data.status,
|
|
80
81
|
};
|
|
81
82
|
return new Promise((resolvePromise, rejectPromise) => {
|
|
82
83
|
this.client.updateUser(grpcReq, (error, response) => {
|
|
@@ -91,7 +92,7 @@ class AccountClient {
|
|
|
91
92
|
softDeleteUser(data) {
|
|
92
93
|
const grpcReq = {
|
|
93
94
|
id: data.id,
|
|
94
|
-
productKey: data.productKey
|
|
95
|
+
productKey: data.productKey
|
|
95
96
|
};
|
|
96
97
|
return new Promise((resolvePromise, rejectPromise) => {
|
|
97
98
|
this.client.softDeleteUser(grpcReq, (error, response) => {
|
|
@@ -106,7 +107,7 @@ class AccountClient {
|
|
|
106
107
|
hardDeleteUser(data) {
|
|
107
108
|
const grpcReq = {
|
|
108
109
|
id: data.id,
|
|
109
|
-
productKey: data.productKey
|
|
110
|
+
productKey: data.productKey
|
|
110
111
|
};
|
|
111
112
|
return new Promise((resolvePromise, rejectPromise) => {
|
|
112
113
|
this.client.hardDeleteUser(grpcReq, (error, response) => {
|
|
@@ -152,7 +153,7 @@ class AccountClient {
|
|
|
152
153
|
createMfaSession(data) {
|
|
153
154
|
const grpcReq = {
|
|
154
155
|
userId: data.userId,
|
|
155
|
-
productKey: data.productKey
|
|
156
|
+
productKey: data.productKey,
|
|
156
157
|
deviceId: data.deviceId,
|
|
157
158
|
actionScope: data.actionScope,
|
|
158
159
|
};
|
|
@@ -178,8 +179,14 @@ class AccountClient {
|
|
|
178
179
|
});
|
|
179
180
|
}
|
|
180
181
|
issueToken(data) {
|
|
182
|
+
const grpcReq = {
|
|
183
|
+
userId: data.userId,
|
|
184
|
+
organizationId: data.organizationId,
|
|
185
|
+
jti: data.jti,
|
|
186
|
+
productKey: data.productKey,
|
|
187
|
+
};
|
|
181
188
|
return new Promise((resolvePromise, rejectPromise) => {
|
|
182
|
-
this.client.issueToken(
|
|
189
|
+
this.client.issueToken(grpcReq, (error, response) => {
|
|
183
190
|
if (error) {
|
|
184
191
|
rejectPromise(error);
|
|
185
192
|
return;
|
|
@@ -192,7 +199,7 @@ class AccountClient {
|
|
|
192
199
|
const grpcReq = {
|
|
193
200
|
userId: data.userId,
|
|
194
201
|
organizationId: data.organizationId,
|
|
195
|
-
productKey: data.productKey
|
|
202
|
+
productKey: data.productKey,
|
|
196
203
|
isActive: data.isActive,
|
|
197
204
|
};
|
|
198
205
|
return new Promise((resolvePromise, rejectPromise) => {
|
|
@@ -210,9 +217,7 @@ class AccountClient {
|
|
|
210
217
|
emails: data.emails,
|
|
211
218
|
userId: data.userId,
|
|
212
219
|
organizationId: data.organizationId,
|
|
213
|
-
productKey: data.productKey
|
|
214
|
-
enums_1.ProductKey[this.defaultProductKey] ||
|
|
215
|
-
"SkyPeople",
|
|
220
|
+
productKey: data.productKey
|
|
216
221
|
};
|
|
217
222
|
return new Promise((resolvePromise, rejectPromise) => {
|
|
218
223
|
this.client.resendOnboardingMail(grpcReq, (error, response) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts-client.js","sourceRoot":"","sources":["../src/accounts-client.ts"],"names":[],"mappings":";;;AAAA,2CAMuB;AACvB,qDAA8C;AAC9C,+BAA+B;AA0B/B,mCAAqC;
|
|
1
|
+
{"version":3,"file":"accounts-client.js","sourceRoot":"","sources":["../src/accounts-client.ts"],"names":[],"mappings":";;;AAAA,2CAMuB;AACvB,qDAA8C;AAC9C,+BAA+B;AA0B/B,mCAAqC;AAwOrC,SAAS,eAAe,CAAC,UAAkB;IACzC,MAAM,SAAS,GAAG,IAAA,cAAO,EAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC;IAChE,MAAM,iBAAiB,GAAG,IAAA,uBAAQ,EAAC,SAAS,EAAE;QAC5C,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAA,+BAAqB,EAClC,iBAAiB,CACgB,CAAC;IACpC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,mBAAmB,CAC9C,UAAU,EACV,4BAAkB,CAAC,cAAc,EAAE,CACpC,CAAC;AACJ,CAAC;AAED,MAAa,aAAa;IACP,MAAM,CAAuB;IAE9C,YACE,OAAgB,EAChB,oBAAgC,kBAAU,CAAC,UAAU;QAErD,MAAM,aAAa,GACjB,OAAO;YACP,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,iBAAiB,CAAC;QAErD,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC,aAAa,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,CAAC,EAAU;QAChB,MAAM,OAAO,GAAuB,EAAE,EAAE,EAAE,CAAC;QAE3C,OAAO,IAAI,OAAO,CAAC,CAAC,cAAc,EAAE,aA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KAAK,EAAE,CAAC;oBACV,aAAa,CAAC,KAAK,CAAC,CAAC;oBACrB,OAAO;gBACT,CAAC;gBACD,cAAc,CAAC,QAAQ,CAAC,CAAC;YAC3B,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAlRD,sCAkRC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -67,6 +67,8 @@ export type UserGetResponse = {
|
|
|
67
67
|
password?: string;
|
|
68
68
|
email?: string;
|
|
69
69
|
phone?: string;
|
|
70
|
+
avatar?: string;
|
|
71
|
+
designation?: string;
|
|
70
72
|
userOrganizations?: {
|
|
71
73
|
organizationId: string;
|
|
72
74
|
name?: string;
|
|
@@ -76,12 +78,15 @@ export type UserCreateRequest = {
|
|
|
76
78
|
firstName: string;
|
|
77
79
|
organizationId: string;
|
|
78
80
|
orgRole: OrgRole;
|
|
81
|
+
productKey: ProductKey;
|
|
79
82
|
lastName?: string;
|
|
80
83
|
middleName?: string;
|
|
81
84
|
countryCode?: string;
|
|
82
85
|
email?: string;
|
|
83
86
|
phone?: string;
|
|
84
87
|
personalEmail?: string;
|
|
88
|
+
designation?: string;
|
|
89
|
+
status?: string;
|
|
85
90
|
};
|
|
86
91
|
export type UserCreateResponse = {
|
|
87
92
|
id: string;
|
|
@@ -89,6 +94,7 @@ export type UserCreateResponse = {
|
|
|
89
94
|
export type UserUpdateRequest = {
|
|
90
95
|
id: string;
|
|
91
96
|
organizationId: string;
|
|
97
|
+
productKey: ProductKey;
|
|
92
98
|
firstName?: string;
|
|
93
99
|
lastName?: string;
|
|
94
100
|
middleName?: string;
|
|
@@ -96,6 +102,8 @@ export type UserUpdateRequest = {
|
|
|
96
102
|
password?: string;
|
|
97
103
|
email?: string;
|
|
98
104
|
phone?: string;
|
|
105
|
+
designation?: string;
|
|
106
|
+
status?: string;
|
|
99
107
|
};
|
|
100
108
|
export type UserUpdateResponse = {
|
|
101
109
|
id: string;
|
|
@@ -125,7 +133,7 @@ export type LicenseCheckResponse = {
|
|
|
125
133
|
};
|
|
126
134
|
export type MfaSessionRequest = {
|
|
127
135
|
userId: string;
|
|
128
|
-
productKey
|
|
136
|
+
productKey: ProductKey;
|
|
129
137
|
deviceId?: string;
|
|
130
138
|
actionScope?: string;
|
|
131
139
|
};
|
|
@@ -161,8 +169,8 @@ export type IssueTokenRequest = {
|
|
|
161
169
|
userId: string;
|
|
162
170
|
organizationId: string;
|
|
163
171
|
jti: string;
|
|
172
|
+
productKey: string;
|
|
164
173
|
typ?: string;
|
|
165
|
-
productKey?: string;
|
|
166
174
|
};
|
|
167
175
|
export type IssueTokenResponse = {
|
|
168
176
|
token: string;
|
|
@@ -170,7 +178,7 @@ export type IssueTokenResponse = {
|
|
|
170
178
|
export type SetUserProductAccessRequest = {
|
|
171
179
|
userId: string;
|
|
172
180
|
organizationId: string;
|
|
173
|
-
productKey
|
|
181
|
+
productKey: string;
|
|
174
182
|
isActive: boolean;
|
|
175
183
|
};
|
|
176
184
|
export type SetUserProductAccessResponse = {
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAwLA,IAAY,OAKX;AALD,WAAY,OAAO;IACjB,0BAAe,CAAA;IACf,0BAAe,CAAA;IACf,wBAAa,CAAA;IACb,0BAAe,CAAA;AACjB,CAAC,EALW,OAAO,uBAAP,OAAO,QAKlB"}
|
package/package.json
CHANGED
package/proto/accounts.proto
CHANGED
|
@@ -47,6 +47,8 @@ message UserGetResponse {
|
|
|
47
47
|
optional string email = 5;
|
|
48
48
|
optional string phone = 6;
|
|
49
49
|
repeated UserOrganization userOrganizations = 7;
|
|
50
|
+
optional string avatar = 8;
|
|
51
|
+
optional string designation = 9;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
message UserOrganization {
|
|
@@ -65,6 +67,7 @@ message UserCreateRequest {
|
|
|
65
67
|
optional string email = 8;
|
|
66
68
|
optional string phone = 9;
|
|
67
69
|
optional string personalEmail = 10;
|
|
70
|
+
optional string designation = 11;
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
message UserUpdateRequest {
|
|
@@ -78,6 +81,8 @@ message UserUpdateRequest {
|
|
|
78
81
|
optional string password = 8;
|
|
79
82
|
optional string email = 9;
|
|
80
83
|
optional string phone = 10;
|
|
84
|
+
optional string designation = 11;
|
|
85
|
+
optional string status = 12;
|
|
81
86
|
}
|
|
82
87
|
|
|
83
88
|
message UserCreateResponse {
|