@36node/auth-sdk 1.0.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/module.js ADDED
@@ -0,0 +1,457 @@
1
+
2
+ function $parcel$export(e, n, v, s) {
3
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
4
+ }
5
+ // Generated by openapi-ts-gen. DO NOT EDIT
6
+ /* eslint-disable */ var $2bc5d808eb95bbd4$exports = {};
7
+
8
+ $parcel$export($2bc5d808eb95bbd4$exports, "CoreAPIClient", () => $2bc5d808eb95bbd4$export$353cb576ea2f33a4);
9
+ // Generated by openapi-ts-gen. DO NOT EDIT
10
+ /* eslint-disable */ class $2bc5d808eb95bbd4$export$353cb576ea2f33a4 {
11
+ constructor(client){
12
+ this.hello = (req, config = {})=>{
13
+ return this.client.request({
14
+ ...config,
15
+ url: `/auth/v1/hello`,
16
+ method: "get"
17
+ });
18
+ };
19
+ this.createUser = (req, config = {})=>{
20
+ return this.client.request({
21
+ ...config,
22
+ url: `/auth/v1/users`,
23
+ method: "post",
24
+ data: req.body
25
+ });
26
+ };
27
+ this.listUsers = (req, config = {})=>{
28
+ return this.client.request({
29
+ ...config,
30
+ url: `/auth/v1/users`,
31
+ method: "get",
32
+ params: $2bc5d808eb95bbd4$var$pick(req, [
33
+ "ns",
34
+ "ns_scope",
35
+ "_sort",
36
+ "id",
37
+ "name_like",
38
+ "username",
39
+ "username_like",
40
+ "nickname_like",
41
+ "email",
42
+ "phone",
43
+ "registerRegion",
44
+ "roles",
45
+ "dialingPrefix",
46
+ "_limit",
47
+ "_offset"
48
+ ])
49
+ });
50
+ };
51
+ this.getUser = (req, config = {})=>{
52
+ $2bc5d808eb95bbd4$var$checkPathParams("getUser", req, [
53
+ "userId"
54
+ ]);
55
+ return this.client.request({
56
+ ...config,
57
+ url: `/auth/v1/users/${req.userId}`,
58
+ method: "get"
59
+ });
60
+ };
61
+ this.updateUser = (req, config = {})=>{
62
+ $2bc5d808eb95bbd4$var$checkPathParams("updateUser", req, [
63
+ "userId"
64
+ ]);
65
+ return this.client.request({
66
+ ...config,
67
+ url: `/auth/v1/users/${req.userId}`,
68
+ method: "patch",
69
+ data: req.body
70
+ });
71
+ };
72
+ this.deleteUser = (req, config = {})=>{
73
+ $2bc5d808eb95bbd4$var$checkPathParams("deleteUser", req, [
74
+ "userId"
75
+ ]);
76
+ return this.client.request({
77
+ ...config,
78
+ url: `/auth/v1/users/${req.userId}`,
79
+ method: "delete"
80
+ });
81
+ };
82
+ this.createNamespace = (req, config = {})=>{
83
+ return this.client.request({
84
+ ...config,
85
+ url: `/auth/v1/namespaces`,
86
+ method: "post",
87
+ data: req.body
88
+ });
89
+ };
90
+ this.listNamespaces = (req, config = {})=>{
91
+ return this.client.request({
92
+ ...config,
93
+ url: `/auth/v1/namespaces`,
94
+ method: "get",
95
+ params: $2bc5d808eb95bbd4$var$pick(req, [
96
+ "parent",
97
+ "parent_scope",
98
+ "_sort",
99
+ "name_like",
100
+ "labels",
101
+ "_limit",
102
+ "_offset"
103
+ ])
104
+ });
105
+ };
106
+ this.getNamespace = (req, config = {})=>{
107
+ $2bc5d808eb95bbd4$var$checkPathParams("getNamespace", req, [
108
+ "namespaceIdOrNs"
109
+ ]);
110
+ return this.client.request({
111
+ ...config,
112
+ url: `/auth/v1/namespaces/${req.namespaceIdOrNs}`,
113
+ method: "get"
114
+ });
115
+ };
116
+ this.updateNamespace = (req, config = {})=>{
117
+ $2bc5d808eb95bbd4$var$checkPathParams("updateNamespace", req, [
118
+ "namespaceId"
119
+ ]);
120
+ return this.client.request({
121
+ ...config,
122
+ url: `/auth/v1/namespaces/${req.namespaceId}`,
123
+ method: "patch",
124
+ data: req.body
125
+ });
126
+ };
127
+ this.deleteNamespace = (req, config = {})=>{
128
+ $2bc5d808eb95bbd4$var$checkPathParams("deleteNamespace", req, [
129
+ "namespaceId"
130
+ ]);
131
+ return this.client.request({
132
+ ...config,
133
+ url: `/auth/v1/namespaces/${req.namespaceId}`,
134
+ method: "delete"
135
+ });
136
+ };
137
+ this.listScopes = (req, config = {})=>{
138
+ return this.client.request({
139
+ ...config,
140
+ url: `/auth/v1/scopes`,
141
+ method: "get",
142
+ params: $2bc5d808eb95bbd4$var$pick(req, [
143
+ "parent",
144
+ "_sort",
145
+ "labels",
146
+ "_limit",
147
+ "_offset",
148
+ "name_like"
149
+ ])
150
+ });
151
+ };
152
+ this.createCaptchaBySms = (req, config = {})=>{
153
+ return this.client.request({
154
+ ...config,
155
+ url: `/auth/v1/captchas/@createCaptchaBySms`,
156
+ method: "post",
157
+ data: req.body
158
+ });
159
+ };
160
+ this.createCaptchaByEmail = (req, config = {})=>{
161
+ return this.client.request({
162
+ ...config,
163
+ url: `/auth/v1/captchas/@createCaptchaByEmail`,
164
+ method: "post",
165
+ data: req.body
166
+ });
167
+ };
168
+ this.createCaptchaByPhoto = (req, config = {})=>{
169
+ return this.client.request({
170
+ ...config,
171
+ url: `/auth/v1/captchas/@createCaptchaByPhoto`,
172
+ method: "post",
173
+ data: req.body
174
+ });
175
+ };
176
+ this.createSession = (req, config = {})=>{
177
+ return this.client.request({
178
+ ...config,
179
+ url: `/auth/v1/sessions`,
180
+ method: "post",
181
+ data: req.body
182
+ });
183
+ };
184
+ this.listSessions = (req, config = {})=>{
185
+ return this.client.request({
186
+ ...config,
187
+ url: `/auth/v1/sessions`,
188
+ method: "get",
189
+ params: $2bc5d808eb95bbd4$var$pick(req, [
190
+ "_sort",
191
+ "key",
192
+ "client",
193
+ "tokenExpiresIn",
194
+ "uid",
195
+ "_limit",
196
+ "_offset"
197
+ ])
198
+ });
199
+ };
200
+ this.getSession = (req, config = {})=>{
201
+ $2bc5d808eb95bbd4$var$checkPathParams("getSession", req, [
202
+ "sessionId"
203
+ ]);
204
+ return this.client.request({
205
+ ...config,
206
+ url: `/auth/v1/sessions/${req.sessionId}`,
207
+ method: "get"
208
+ });
209
+ };
210
+ this.updateSession = (req, config = {})=>{
211
+ $2bc5d808eb95bbd4$var$checkPathParams("updateSession", req, [
212
+ "sessionId"
213
+ ]);
214
+ return this.client.request({
215
+ ...config,
216
+ url: `/auth/v1/sessions/${req.sessionId}`,
217
+ method: "patch",
218
+ data: req.body
219
+ });
220
+ };
221
+ this.deleteSession = (req, config = {})=>{
222
+ $2bc5d808eb95bbd4$var$checkPathParams("deleteSession", req, [
223
+ "sessionId"
224
+ ]);
225
+ return this.client.request({
226
+ ...config,
227
+ url: `/auth/v1/sessions/${req.sessionId}`,
228
+ method: "delete"
229
+ });
230
+ };
231
+ this.restrictToken = (req, config = {})=>{
232
+ return this.client.request({
233
+ ...config,
234
+ url: `/auth/v1/sessions/@restrictToken`,
235
+ method: "post",
236
+ data: req.body
237
+ });
238
+ };
239
+ this.listRegions = (req, config = {})=>{
240
+ return this.client.request({
241
+ ...config,
242
+ url: `/auth/v1/base-data/regions`,
243
+ method: "get"
244
+ });
245
+ };
246
+ this.init = (req, config = {})=>{
247
+ return this.client.request({
248
+ ...config,
249
+ url: `/auth/v1/init`,
250
+ method: "post"
251
+ });
252
+ };
253
+ this.getMyInfo = (req, config = {})=>{
254
+ return this.client.request({
255
+ ...config,
256
+ url: `/auth/v1/me/info`,
257
+ method: "get"
258
+ });
259
+ };
260
+ this.updateMyInfo = (req, config = {})=>{
261
+ return this.client.request({
262
+ ...config,
263
+ url: `/auth/v1/me/info`,
264
+ method: "patch",
265
+ data: req.body
266
+ });
267
+ };
268
+ this.updateMyPassword = (req, config = {})=>{
269
+ return this.client.request({
270
+ ...config,
271
+ url: `/auth/v1/me/password`,
272
+ method: "patch",
273
+ data: req.body
274
+ });
275
+ };
276
+ this.resetMyPassword = (req, config = {})=>{
277
+ return this.client.request({
278
+ ...config,
279
+ url: `/auth/v1/me/@resetPassword`,
280
+ method: "post",
281
+ data: req.body
282
+ });
283
+ };
284
+ this.registerUserByPhone = (req, config = {})=>{
285
+ return this.client.request({
286
+ ...config,
287
+ url: `/auth/v1/me/@registerByPhone`,
288
+ method: "post",
289
+ data: req.body
290
+ });
291
+ };
292
+ this.registerUserByEmail = (req, config = {})=>{
293
+ return this.client.request({
294
+ ...config,
295
+ url: `/auth/v1/me/@registerByEmail`,
296
+ method: "post",
297
+ data: req.body
298
+ });
299
+ };
300
+ this.register = (req, config = {})=>{
301
+ return this.client.request({
302
+ ...config,
303
+ url: `/auth/v1/me/@register`,
304
+ method: "post",
305
+ data: req.body
306
+ });
307
+ };
308
+ this.login = (req, config = {})=>{
309
+ return this.client.request({
310
+ ...config,
311
+ url: `/auth/v1/me/@login`,
312
+ method: "post",
313
+ data: req.body
314
+ });
315
+ };
316
+ this.loginByPhone = (req, config = {})=>{
317
+ return this.client.request({
318
+ ...config,
319
+ url: `/auth/v1/me/@loginByPhone`,
320
+ method: "post",
321
+ data: req.body
322
+ });
323
+ };
324
+ this.loginByEmail = (req, config = {})=>{
325
+ return this.client.request({
326
+ ...config,
327
+ url: `/auth/v1/me/@loginByEmail`,
328
+ method: "post",
329
+ data: req.body
330
+ });
331
+ };
332
+ this.updateMyEmail = (req, config = {})=>{
333
+ return this.client.request({
334
+ ...config,
335
+ url: `/auth/v1/me/email`,
336
+ method: "patch",
337
+ data: req.body
338
+ });
339
+ };
340
+ this.updateMyPhone = (req, config = {})=>{
341
+ return this.client.request({
342
+ ...config,
343
+ url: `/auth/v1/me/phone`,
344
+ method: "patch",
345
+ data: req.body
346
+ });
347
+ };
348
+ this.logout = (req, config = {})=>{
349
+ return this.client.request({
350
+ ...config,
351
+ url: `/auth/v1/me/@logout`,
352
+ method: "post",
353
+ data: req.body
354
+ });
355
+ };
356
+ this.refreshSession = (req, config = {})=>{
357
+ return this.client.request({
358
+ ...config,
359
+ url: `/auth/v1/me/@refresh`,
360
+ method: "post",
361
+ data: req.body
362
+ });
363
+ };
364
+ this.verifyIdentity = (req, config = {})=>{
365
+ return this.client.request({
366
+ ...config,
367
+ url: `/auth/v1/me/@verifyIdentity`,
368
+ method: "post",
369
+ data: req.body
370
+ });
371
+ };
372
+ if (!client.defaults.baseURL) throw new Error("client's baseURL MUST specified");
373
+ this.client = client;
374
+ }
375
+ }
376
+ function $2bc5d808eb95bbd4$var$checkPathParams(op, req, ks) {
377
+ ks.forEach((p)=>{
378
+ if (!req[p]) throw new Error(`${p} is required for ${op}`);
379
+ });
380
+ }
381
+ function $2bc5d808eb95bbd4$var$pick(o, ks) {
382
+ return ks.reduce((r, p)=>{
383
+ r[p] = o[p];
384
+ return r;
385
+ }, {});
386
+ }
387
+
388
+
389
+ var $9af6386886df3c9e$exports = {};
390
+
391
+ $parcel$export($9af6386886df3c9e$exports, "IdentityType", () => $9af6386886df3c9e$export$c4ce4d96a6d8ab9f);
392
+ $parcel$export($9af6386886df3c9e$exports, "CaptchaPurpose", () => $9af6386886df3c9e$export$c3b86a372452ac9b);
393
+ $parcel$export($9af6386886df3c9e$exports, "ListUsersRequest", () => $9af6386886df3c9e$export$5381d8f52f57bd1);
394
+ $parcel$export($9af6386886df3c9e$exports, "ListNamespacesRequest", () => $9af6386886df3c9e$export$e73f6f358f36a136);
395
+ $parcel$export($9af6386886df3c9e$exports, "ListScopesRequest", () => $9af6386886df3c9e$export$5a22098e85a53e52);
396
+ $parcel$export($9af6386886df3c9e$exports, "ListSessionsRequest", () => $9af6386886df3c9e$export$3be39bb5c5d3e6d1);
397
+ // Generated by openapi-ts-gen. DO NOT EDIT
398
+ /* eslint-disable */ var $9af6386886df3c9e$export$c4ce4d96a6d8ab9f;
399
+ (function(IdentityType) {
400
+ IdentityType["ID"] = "ID";
401
+ })($9af6386886df3c9e$export$c4ce4d96a6d8ab9f || ($9af6386886df3c9e$export$c4ce4d96a6d8ab9f = {}));
402
+ var $9af6386886df3c9e$export$c3b86a372452ac9b;
403
+ (function(CaptchaPurpose) {
404
+ CaptchaPurpose["REGISTER"] = "REGISTER";
405
+ CaptchaPurpose["LOGIN"] = "LOGIN";
406
+ CaptchaPurpose["RESET_PASSWORD"] = "RESET_PASSWORD";
407
+ CaptchaPurpose["UPDATE_PHONE"] = "UPDATE_PHONE";
408
+ CaptchaPurpose["UPDATE_EMAIL"] = "UPDATE_EMAIL";
409
+ })($9af6386886df3c9e$export$c3b86a372452ac9b || ($9af6386886df3c9e$export$c3b86a372452ac9b = {}));
410
+ var $9af6386886df3c9e$export$5381d8f52f57bd1;
411
+ (function(ListUsersRequest) {
412
+ let Sort;
413
+ (function(Sort) {
414
+ Sort["CREATE_AT"] = "createAt";
415
+ Sort["CREATE_AT_DESC"] = "-createAt";
416
+ Sort["UPDATE_AT"] = "updateAt";
417
+ Sort["UPDATE_AT_DESC"] = "-updateAt";
418
+ })(Sort = ListUsersRequest.Sort || (ListUsersRequest.Sort = {}));
419
+ })($9af6386886df3c9e$export$5381d8f52f57bd1 || ($9af6386886df3c9e$export$5381d8f52f57bd1 = {}));
420
+ var $9af6386886df3c9e$export$e73f6f358f36a136;
421
+ (function(ListNamespacesRequest) {
422
+ let Sort;
423
+ (function(Sort) {
424
+ Sort["CREATE_AT"] = "createAt";
425
+ Sort["CREATE_AT_DESC"] = "-createAt";
426
+ Sort["UPDATE_AT"] = "updateAt";
427
+ Sort["UPDATE_AT_DESC"] = "-updateAt";
428
+ })(Sort = ListNamespacesRequest.Sort || (ListNamespacesRequest.Sort = {}));
429
+ })($9af6386886df3c9e$export$e73f6f358f36a136 || ($9af6386886df3c9e$export$e73f6f358f36a136 = {}));
430
+ var $9af6386886df3c9e$export$5a22098e85a53e52;
431
+ (function(ListScopesRequest) {
432
+ let Sort;
433
+ (function(Sort) {
434
+ Sort["CREATE_AT"] = "createAt";
435
+ Sort["CREATE_AT_DESC"] = "-createAt";
436
+ Sort["UPDATE_AT"] = "updateAt";
437
+ Sort["UPDATE_AT_DESC"] = "-updateAt";
438
+ })(Sort = ListScopesRequest.Sort || (ListScopesRequest.Sort = {}));
439
+ })($9af6386886df3c9e$export$5a22098e85a53e52 || ($9af6386886df3c9e$export$5a22098e85a53e52 = {}));
440
+ var $9af6386886df3c9e$export$3be39bb5c5d3e6d1;
441
+ (function(ListSessionsRequest) {
442
+ let Sort;
443
+ (function(Sort) {
444
+ Sort["CREATE_AT"] = "createAt";
445
+ Sort["CREATE_AT_DESC"] = "-createAt";
446
+ Sort["UPDATE_AT"] = "updateAt";
447
+ Sort["UPDATE_AT_DESC"] = "-updateAt";
448
+ Sort["EXPIRE_AT"] = "expireAt";
449
+ Sort["EXPIRE_AT_DESC"] = "-expireAt";
450
+ })(Sort = ListSessionsRequest.Sort || (ListSessionsRequest.Sort = {}));
451
+ })($9af6386886df3c9e$export$3be39bb5c5d3e6d1 || ($9af6386886df3c9e$export$3be39bb5c5d3e6d1 = {}));
452
+
453
+
454
+
455
+
456
+ export {$2bc5d808eb95bbd4$export$353cb576ea2f33a4 as CoreAPIClient, $9af6386886df3c9e$export$c4ce4d96a6d8ab9f as IdentityType, $9af6386886df3c9e$export$c3b86a372452ac9b as CaptchaPurpose, $9af6386886df3c9e$export$5381d8f52f57bd1 as ListUsersRequest, $9af6386886df3c9e$export$e73f6f358f36a136 as ListNamespacesRequest, $9af6386886df3c9e$export$5a22098e85a53e52 as ListScopesRequest, $9af6386886df3c9e$export$3be39bb5c5d3e6d1 as ListSessionsRequest};
457
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;AAAA,2CAA2C;;;;ACA3C,2CAA2C;AAC3C,kBAAkB,GAKX,MAAM;IAEX,YAAY,MAAqB,CAAE;aAMnC,QAAQ,CAAC,KAA2B,SAA6B,CAAC,CAAC;YACjE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;gBACzB,GAAG,MAAM;gBACT,KAAK,CAAC,cAAc,CAAC;gBACrB,QAAQ;YACV;QACF;aACA,aAAa,CAAC,KAAgC,SAA6B,CAAC,CAAC;YAC3E,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;gBACzB,GAAG,MAAM;gBACT,KAAK,CAAC,cAAc,CAAC;gBACrB,QAAQ;gBACR,MAAM,IAAI,IAAI;YAChB;QACF;aACA,YA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BAAoB,CAAC;gBAC3B,QAAQ;gBACR,MAAM,IAAI,IAAI;YAChB;QACF;aACA,iBAAiB,CAAC,KAAoC,SAA6B,CAAC,CAAC;YACnF,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;gBACzB,GAAG,MAAM;gBACT,KAAK,CAAC,2BAA2B,CAAC;gBAClC,QAAQ;gBACR,MAAM,IAAI,IAAI;YAChB;QACF;QAnTE,IAAI,CAAC,OAAO,QAAQ,CAAC,OAAO,EAC1B,MAAM,IAAI,MAAM;QAElB,IAAI,CAAC,MAAM,GAAG;IAChB;AAgTF;AAKA,SAAS,sCAAgB,EAAU,EAAE,GAAS,EAAE,EAAY;IAC1D,GAAG,OAAO,CAAC,CAAC;QACV,IAAI,CAAC,GAAG,CAAC,EAAE,EACT,MAAM,IAAI,MAAM,CAAC,EAAE,EAAE,iBAAiB,EAAE,GAAG,CAAC;IAEhD;AACF;AAEA,SAAS,2BAAK,CAAO,EAAE,EAAY;IACjC,OAAO,GAAG,MAAM,CAAC,CAAC,GAAG;QACnB,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE;QACX,OAAO;IACT,GAAG,CAAC;AACN;;AD9UA,kBAAkB;;;;;;;;;AEDlB,2CAA2C;AAC3C,kBAAkB;UAuBN;;GAAA,8CAAA;;UAyFA;;;;;;GAAA,8CAAA;;UAuPK;;cACH;;;;;OAAA,wBAAA,0BAAA;AAOd,GARiB,6CAAA;;UA+BA;;cACH;;;;;OAAA,6BAAA,+BAAA;AAOd,GARiB,8CAAA;;UA2BA;;cACH;;;;;OAAA,yBAAA,2BAAA;AAOd,GARiB,8CAAA;;UA8BA;;cACH;;;;;;;OAAA,2BAAA,6BAAA;AASd,GAViB,8CAAA;","sources":["src/index.ts","src/client.ts","src/schemas.ts"],"sourcesContent":["// Generated by openapi-ts-gen. DO NOT EDIT\n/* eslint-disable */\nexport * from './client';\nexport * from './schemas';\n","// Generated by openapi-ts-gen. DO NOT EDIT\n/* eslint-disable */\nimport { AxiosInstance, AxiosRequestConfig, AxiosResponse } from \"axios\";\n\nimport * as schemas from \"./schemas\";\n\nexport class CoreAPIClient {\n public client: AxiosInstance;\n constructor(client: AxiosInstance) {\n if (!client.defaults.baseURL) {\n throw new Error(\"client's baseURL MUST specified\");\n }\n this.client = client;\n }\n hello = (req: schemas.HelloRequest, config: AxiosRequestConfig = {}): Response<schemas.HealthCheckResult> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/hello`, \n method: \"get\", \n })\n }\n createUser = (req: schemas.CreateUserRequest, config: AxiosRequestConfig = {}): Response<schemas.User> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/users`, \n method: \"post\", \n data: req.body,\n })\n }\n listUsers = (req: schemas.ListUsersRequest, config: AxiosRequestConfig = {}): Response<schemas.User[]> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/users`, \n method: \"get\", \n params: pick(req, [\"ns\", \"ns_scope\", \"_sort\", \"id\", \"name_like\", \"username\", \"username_like\", \"nickname_like\", \"email\", \"phone\", \"registerRegion\", \"roles\", \"dialingPrefix\", \"_limit\", \"_offset\"]),\n })\n }\n getUser = (req: schemas.GetUserRequest, config: AxiosRequestConfig = {}): Response<schemas.User> => {\n checkPathParams(\"getUser\", req, [\"userId\"])\n return this.client.request({\n ...config,\n url: `/auth/v1/users/${req.userId}`, \n method: \"get\", \n })\n }\n updateUser = (req: schemas.UpdateUserRequest, config: AxiosRequestConfig = {}): Response<schemas.User> => {\n checkPathParams(\"updateUser\", req, [\"userId\"])\n return this.client.request({\n ...config,\n url: `/auth/v1/users/${req.userId}`, \n method: \"patch\", \n data: req.body,\n })\n }\n deleteUser = (req: schemas.DeleteUserRequest, config: AxiosRequestConfig = {}): Response<void> => {\n checkPathParams(\"deleteUser\", req, [\"userId\"])\n return this.client.request({\n ...config,\n url: `/auth/v1/users/${req.userId}`, \n method: \"delete\", \n })\n }\n createNamespace = (req: schemas.CreateNamespaceRequest, config: AxiosRequestConfig = {}): Response<schemas.Namespace> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/namespaces`, \n method: \"post\", \n data: req.body,\n })\n }\n listNamespaces = (req: schemas.ListNamespacesRequest, config: AxiosRequestConfig = {}): Response<schemas.Namespace[]> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/namespaces`, \n method: \"get\", \n params: pick(req, [\"parent\", \"parent_scope\", \"_sort\", \"name_like\", \"labels\", \"_limit\", \"_offset\"]),\n })\n }\n getNamespace = (req: schemas.GetNamespaceRequest, config: AxiosRequestConfig = {}): Response<schemas.Namespace> => {\n checkPathParams(\"getNamespace\", req, [\"namespaceIdOrNs\"])\n return this.client.request({\n ...config,\n url: `/auth/v1/namespaces/${req.namespaceIdOrNs}`, \n method: \"get\", \n })\n }\n updateNamespace = (req: schemas.UpdateNamespaceRequest, config: AxiosRequestConfig = {}): Response<schemas.Namespace> => {\n checkPathParams(\"updateNamespace\", req, [\"namespaceId\"])\n return this.client.request({\n ...config,\n url: `/auth/v1/namespaces/${req.namespaceId}`, \n method: \"patch\", \n data: req.body,\n })\n }\n deleteNamespace = (req: schemas.DeleteNamespaceRequest, config: AxiosRequestConfig = {}): Response<void> => {\n checkPathParams(\"deleteNamespace\", req, [\"namespaceId\"])\n return this.client.request({\n ...config,\n url: `/auth/v1/namespaces/${req.namespaceId}`, \n method: \"delete\", \n })\n }\n listScopes = (req: schemas.ListScopesRequest, config: AxiosRequestConfig = {}): Response<schemas.Namespace[]> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/scopes`, \n method: \"get\", \n params: pick(req, [\"parent\", \"_sort\", \"labels\", \"_limit\", \"_offset\", \"name_like\"]),\n })\n }\n createCaptchaBySms = (req: schemas.CreateCaptchaBySmsRequest, config: AxiosRequestConfig = {}): Response<schemas.CaptchaBySmsResult> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/captchas/@createCaptchaBySms`, \n method: \"post\", \n data: req.body,\n })\n }\n createCaptchaByEmail = (req: schemas.CreateCaptchaByEmailRequest, config: AxiosRequestConfig = {}): Response<schemas.CaptchaByEmailResult> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/captchas/@createCaptchaByEmail`, \n method: \"post\", \n data: req.body,\n })\n }\n createCaptchaByPhoto = (req: schemas.CreateCaptchaByPhotoRequest, config: AxiosRequestConfig = {}): Response<schemas.CaptchaByPhotoResult> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/captchas/@createCaptchaByPhoto`, \n method: \"post\", \n data: req.body,\n })\n }\n createSession = (req: schemas.CreateSessionRequest, config: AxiosRequestConfig = {}): Response<schemas.Session> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/sessions`, \n method: \"post\", \n data: req.body,\n })\n }\n listSessions = (req: schemas.ListSessionsRequest, config: AxiosRequestConfig = {}): Response<schemas.Session[]> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/sessions`, \n method: \"get\", \n params: pick(req, [\"_sort\", \"key\", \"client\", \"tokenExpiresIn\", \"uid\", \"_limit\", \"_offset\"]),\n })\n }\n getSession = (req: schemas.GetSessionRequest, config: AxiosRequestConfig = {}): Response<schemas.Session> => {\n checkPathParams(\"getSession\", req, [\"sessionId\"])\n return this.client.request({\n ...config,\n url: `/auth/v1/sessions/${req.sessionId}`, \n method: \"get\", \n })\n }\n updateSession = (req: schemas.UpdateSessionRequest, config: AxiosRequestConfig = {}): Response<schemas.Session> => {\n checkPathParams(\"updateSession\", req, [\"sessionId\"])\n return this.client.request({\n ...config,\n url: `/auth/v1/sessions/${req.sessionId}`, \n method: \"patch\", \n data: req.body,\n })\n }\n deleteSession = (req: schemas.DeleteSessionRequest, config: AxiosRequestConfig = {}): Response<void> => {\n checkPathParams(\"deleteSession\", req, [\"sessionId\"])\n return this.client.request({\n ...config,\n url: `/auth/v1/sessions/${req.sessionId}`, \n method: \"delete\", \n })\n }\n restrictToken = (req: schemas.RestrictTokenRequest, config: AxiosRequestConfig = {}): Response<schemas.OnlyToken> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/sessions/@restrictToken`, \n method: \"post\", \n data: req.body,\n })\n }\n listRegions = (req: schemas.ListRegionsRequest, config: AxiosRequestConfig = {}): Response<schemas.Region[]> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/base-data/regions`, \n method: \"get\", \n })\n }\n init = (req: schemas.InitRequest, config: AxiosRequestConfig = {}): Response<void> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/init`, \n method: \"post\", \n })\n }\n getMyInfo = (req: schemas.GetMyInfoRequest, config: AxiosRequestConfig = {}): Response<schemas.MyInfo> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/info`, \n method: \"get\", \n })\n }\n updateMyInfo = (req: schemas.UpdateMyInfoRequest, config: AxiosRequestConfig = {}): Response<schemas.MyInfo> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/info`, \n method: \"patch\", \n data: req.body,\n })\n }\n updateMyPassword = (req: schemas.UpdateMyPasswordRequest, config: AxiosRequestConfig = {}): Response<schemas.MyInfo> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/password`, \n method: \"patch\", \n data: req.body,\n })\n }\n resetMyPassword = (req: schemas.ResetMyPasswordRequest, config: AxiosRequestConfig = {}): Response<schemas.MyInfo> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/@resetPassword`, \n method: \"post\", \n data: req.body,\n })\n }\n registerUserByPhone = (req: schemas.RegisterUserByPhoneRequest, config: AxiosRequestConfig = {}): Response<schemas.SessionWithToken> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/@registerByPhone`, \n method: \"post\", \n data: req.body,\n })\n }\n registerUserByEmail = (req: schemas.RegisterUserByEmailRequest, config: AxiosRequestConfig = {}): Response<schemas.SessionWithToken> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/@registerByEmail`, \n method: \"post\", \n data: req.body,\n })\n }\n register = (req: schemas.RegisterRequest, config: AxiosRequestConfig = {}): Response<schemas.SessionWithToken> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/@register`, \n method: \"post\", \n data: req.body,\n })\n }\n login = (req: schemas.LoginRequest, config: AxiosRequestConfig = {}): Response<schemas.SessionWithToken> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/@login`, \n method: \"post\", \n data: req.body,\n })\n }\n loginByPhone = (req: schemas.LoginByPhoneRequest, config: AxiosRequestConfig = {}): Response<schemas.SessionWithToken> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/@loginByPhone`, \n method: \"post\", \n data: req.body,\n })\n }\n loginByEmail = (req: schemas.LoginByEmailRequest, config: AxiosRequestConfig = {}): Response<schemas.SessionWithToken> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/@loginByEmail`, \n method: \"post\", \n data: req.body,\n })\n }\n updateMyEmail = (req: schemas.UpdateMyEmailRequest, config: AxiosRequestConfig = {}): Response<schemas.MyInfo> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/email`, \n method: \"patch\", \n data: req.body,\n })\n }\n updateMyPhone = (req: schemas.UpdateMyPhoneRequest, config: AxiosRequestConfig = {}): Response<schemas.MyInfo> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/phone`, \n method: \"patch\", \n data: req.body,\n })\n }\n logout = (req: schemas.LogoutRequest, config: AxiosRequestConfig = {}): Response<void> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/@logout`, \n method: \"post\", \n data: req.body,\n })\n }\n refreshSession = (req: schemas.RefreshSessionRequest, config: AxiosRequestConfig = {}): Response<schemas.SessionWithToken> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/@refresh`, \n method: \"post\", \n data: req.body,\n })\n }\n verifyIdentity = (req: schemas.VerifyIdentityRequest, config: AxiosRequestConfig = {}): Response<schemas.Identity> => {\n return this.client.request({\n ...config,\n url: `/auth/v1/me/@verifyIdentity`, \n method: \"post\", \n data: req.body,\n })\n }\n}\n\ntype Response<T> = Promise<AxiosResponse<T>>\ntype Dict = Record<string, any>;\n\nfunction checkPathParams(op: string, req: Dict, ks: string[]) {\n ks.forEach((p) => {\n if (!req[p]) {\n throw new Error(`${p} is required for ${op}`)\n }\n })\n}\n\nfunction pick(o: Dict, ks: string[]) {\n return ks.reduce((r, p) => {\n r[p] = o[p];\n return r;\n }, {} as Dict)\n}\n","// Generated by openapi-ts-gen. DO NOT EDIT\n/* eslint-disable */\nexport interface HealthCheckResult {\n message: string\n}\nexport interface CreateUserDto {\n password?: string\n avatar?: string\n intro?: string\n data?: string\n email?: string\n language?: string\n lastSeenAt?: string\n lastLoginIp?: string\n nickname?: string\n ns: string\n phone?: string\n registerIp?: string\n registerRegion?: string\n roles?: string[]\n super?: boolean\n username?: string\n dialingPrefix?: string\n}\nexport enum IdentityType {\n ID = \"ID\",\n}\nexport type IdentityTypeType = typeof IdentityType[keyof typeof IdentityType];\nexport interface Identity {\n type?: IdentityType\n name?: string\n verifyAt?: string\n verified: boolean\n}\nexport interface User {\n password?: string\n avatar?: string\n intro?: string\n data?: string\n email?: string\n language?: string\n lastSeenAt?: string\n lastLoginIp?: string\n nickname?: string\n ns: string\n phone?: string\n registerIp?: string\n registerRegion?: string\n roles?: string[]\n super?: boolean\n username?: string\n dialingPrefix?: string\n identity?: Identity\n id: string\n createAt?: string\n updateAt?: string\n createBy?: string\n updateBy?: string\n}\nexport interface UpdateUserDto {\n password?: string\n avatar?: string\n intro?: string\n data?: string\n email?: string\n language?: string\n lastSeenAt?: string\n lastLoginIp?: string\n nickname?: string\n ns?: string\n phone?: string\n registerIp?: string\n registerRegion?: string\n roles?: string[]\n super?: boolean\n username?: string\n dialingPrefix?: string\n}\nexport interface CreateNamespaceDto {\n data?: string\n desc?: string\n labels?: string[]\n name: string\n key: string\n parent?: string\n registerDefaultRoles?: string[]\n passwordRegExp?: string\n}\nexport interface Namespace {\n data?: string\n desc?: string\n labels?: string[]\n name: string\n key: string\n parent?: string\n isScope: boolean\n ns: string\n registerDefaultRoles?: string[]\n passwordRegExp?: string\n id: string\n createAt?: string\n updateAt?: string\n createBy?: string\n updateBy?: string\n}\nexport interface UpdateNamespaceDto {\n data?: string\n desc?: string\n labels?: string[]\n name?: string\n registerDefaultRoles?: string[]\n passwordRegExp?: string\n}\nexport enum CaptchaPurpose {\n REGISTER = \"REGISTER\",\n LOGIN = \"LOGIN\",\n RESET_PASSWORD = \"RESET_PASSWORD\",\n UPDATE_PHONE = \"UPDATE_PHONE\",\n UPDATE_EMAIL = \"UPDATE_EMAIL\",\n}\nexport type CaptchaPurposeType = typeof CaptchaPurpose[keyof typeof CaptchaPurpose];\nexport interface CreateCaptchaBySmsDto {\n purpose: CaptchaPurpose\n phone: string\n dialingPrefix: string\n scope: string\n}\nexport interface CaptchaBySmsResult {\n purpose: CaptchaPurpose\n phone: string\n scope: string\n dialingPrefix?: string\n expireAt: string\n}\nexport interface CreateCaptchaByEmailDto {\n purpose: CaptchaPurpose\n email: string\n scope: string\n}\nexport interface CaptchaByEmailResult {\n purpose: CaptchaPurpose\n email: string\n scope: string\n expireAt: string\n}\nexport interface CreateCaptchaByPhotoDto {\n purpose: CaptchaPurpose\n key: string\n scope: string\n}\nexport interface CaptchaByPhotoResult {\n purpose: CaptchaPurpose\n capchaGifHex: string\n scope: string\n key: string\n expireAt: string\n}\nexport interface CreateSessionDto {\n uid: string\n acl?: CreateSessionDto.Acl\n expireAt: string\n client?: string\n tokenExpiresIn?: string\n}\nexport namespace CreateSessionDto {\n export interface Acl {\n }\n}\nexport interface Session {\n acl?: Session.Acl\n expireAt: string\n key: string\n user: User\n client?: string\n tokenExpiresIn?: string\n id: string\n createAt?: string\n updateAt?: string\n createBy?: string\n updateBy?: string\n}\nexport namespace Session {\n export interface Acl {\n }\n}\nexport interface UpdateSessionDto {\n acl?: UpdateSessionDto.Acl\n expireAt?: string\n client?: string\n tokenExpiresIn?: string\n uid?: string\n}\nexport namespace UpdateSessionDto {\n export interface Acl {\n }\n}\nexport interface RestrictTokenDto {\n expiresIn: string\n acl?: RestrictTokenDto.Acl\n key: string\n ns?: string\n}\nexport namespace RestrictTokenDto {\n export interface Acl {\n }\n}\nexport interface OnlyToken {\n token: string\n tokenExpireAt: string\n}\nexport interface Region {\n code: string\n nameZh: string\n namePinyin: string\n nameEn: string\n dialingPrefix: string\n}\nexport interface MyInfo {\n password?: string\n avatar?: string\n intro?: string\n data?: string\n email?: string\n language?: string\n lastSeenAt?: string\n lastLoginIp?: string\n nickname?: string\n ns: string\n phone?: string\n registerIp?: string\n registerRegion?: string\n roles?: string[]\n super?: boolean\n username?: string\n dialingPrefix?: string\n identity?: Identity\n id: string\n createAt?: string\n updateAt?: string\n createBy?: string\n updateBy?: string\n hasPassword: boolean\n}\nexport interface UpdateMyInfoDto {\n avatar?: string\n registerRegion?: string\n language?: string\n nickname?: string\n username?: string\n intro?: string\n}\nexport interface UpdateMyPasswordDto {\n oldPassword?: string\n newPassword: string\n}\nexport interface ResetMyPasswordDto {\n scope: string\n code: string\n newPassword: string\n email?: string\n phone?: string\n dialingPrefix?: string\n}\nexport interface RegisterUserByPhoneDto {\n scope: string\n phone: string\n dialingPrefix: string\n code: string\n password?: string\n}\nexport interface SessionWithToken {\n user: MyInfo\n acl?: SessionWithToken.Acl\n expireAt: string\n key: string\n client?: string\n tokenExpiresIn?: string\n id: string\n createAt?: string\n updateAt?: string\n createBy?: string\n updateBy?: string\n token: string\n tokenExpireAt: string\n}\nexport namespace SessionWithToken {\n export interface Acl {\n }\n}\nexport interface RegisterUserByEmailDto {\n scope: string\n email: string\n code: string\n password?: string\n}\nexport interface RegisterUserByUsernameDto {\n scope: string\n username: string\n password: string\n}\nexport interface LoginSessionDto {\n scope: string\n login: string\n password: string\n}\nexport interface LoginSessionByPhoneDto {\n phone: string\n code: string\n dialingPrefix: string\n scope: string\n}\nexport interface LoginSessionByEmailDto {\n email: string\n code: string\n scope: string\n}\nexport interface UpdateMyEmailDto {\n email: string\n code: string\n scope: string\n}\nexport interface UpdateMyPhoneDto {\n phone: string\n code: string\n scope: string\n dialingPrefix: string\n}\nexport interface LogoutSessionDto {\n key: string\n}\nexport interface RefreshSessionDto {\n key: string\n}\nexport interface VerifyIdentityDto {\n type: IdentityType\n name: string\n identity: string\n}\nexport interface HelloRequest {\n}\nexport interface CreateUserRequest {\n body: CreateUserDto\n}\nexport interface ListUsersRequest {\n ns?: string[]\n ns_scope?: string[]\n _sort?: ListUsersRequest.Sort\n id?: string[]\n name_like?: string\n username?: string\n username_like?: string\n nickname_like?: string\n email?: string\n phone?: string\n registerRegion?: string\n roles?: string[]\n dialingPrefix?: string\n _limit?: number\n _offset?: number\n}\nexport namespace ListUsersRequest {\n export enum Sort {\n CREATE_AT = \"createAt\",\n CREATE_AT_DESC = \"-createAt\",\n UPDATE_AT = \"updateAt\",\n UPDATE_AT_DESC = \"-updateAt\",\n }\n export type SortType = typeof Sort[keyof typeof Sort];\n}\nexport interface GetUserRequest {\n userId: string\n}\nexport interface UpdateUserRequest {\n userId: string\n body: UpdateUserDto\n}\nexport interface DeleteUserRequest {\n userId: string\n}\nexport interface CreateNamespaceRequest {\n body: CreateNamespaceDto\n}\nexport interface ListNamespacesRequest {\n parent?: string[]\n parent_scope?: string[]\n _sort?: ListNamespacesRequest.Sort\n name_like?: string\n labels?: string[]\n _limit?: number\n _offset?: number\n}\nexport namespace ListNamespacesRequest {\n export enum Sort {\n CREATE_AT = \"createAt\",\n CREATE_AT_DESC = \"-createAt\",\n UPDATE_AT = \"updateAt\",\n UPDATE_AT_DESC = \"-updateAt\",\n }\n export type SortType = typeof Sort[keyof typeof Sort];\n}\nexport interface GetNamespaceRequest {\n namespaceIdOrNs: string\n}\nexport interface UpdateNamespaceRequest {\n namespaceId: string\n body: UpdateNamespaceDto\n}\nexport interface DeleteNamespaceRequest {\n namespaceId: string\n}\nexport interface ListScopesRequest {\n parent?: string[]\n _sort?: ListScopesRequest.Sort\n labels?: string[]\n _limit?: number\n _offset?: number\n name_like?: string\n}\nexport namespace ListScopesRequest {\n export enum Sort {\n CREATE_AT = \"createAt\",\n CREATE_AT_DESC = \"-createAt\",\n UPDATE_AT = \"updateAt\",\n UPDATE_AT_DESC = \"-updateAt\",\n }\n export type SortType = typeof Sort[keyof typeof Sort];\n}\nexport interface CreateCaptchaBySmsRequest {\n body: CreateCaptchaBySmsDto\n}\nexport interface CreateCaptchaByEmailRequest {\n body: CreateCaptchaByEmailDto\n}\nexport interface CreateCaptchaByPhotoRequest {\n body: CreateCaptchaByPhotoDto\n}\nexport interface CreateSessionRequest {\n body: CreateSessionDto\n}\nexport interface ListSessionsRequest {\n _sort?: ListSessionsRequest.Sort\n key?: string\n client?: string\n tokenExpiresIn?: string\n uid?: string\n _limit?: number\n _offset?: number\n}\nexport namespace ListSessionsRequest {\n export enum Sort {\n CREATE_AT = \"createAt\",\n CREATE_AT_DESC = \"-createAt\",\n UPDATE_AT = \"updateAt\",\n UPDATE_AT_DESC = \"-updateAt\",\n EXPIRE_AT = \"expireAt\",\n EXPIRE_AT_DESC = \"-expireAt\",\n }\n export type SortType = typeof Sort[keyof typeof Sort];\n}\nexport interface GetSessionRequest {\n sessionId: string\n}\nexport interface UpdateSessionRequest {\n sessionId: string\n body: UpdateSessionDto\n}\nexport interface DeleteSessionRequest {\n sessionId: string\n}\nexport interface RestrictTokenRequest {\n body: RestrictTokenDto\n}\nexport interface ListRegionsRequest {\n}\nexport interface InitRequest {\n}\nexport interface GetMyInfoRequest {\n}\nexport interface UpdateMyInfoRequest {\n body: UpdateMyInfoDto\n}\nexport interface UpdateMyPasswordRequest {\n body: UpdateMyPasswordDto\n}\nexport interface ResetMyPasswordRequest {\n body: ResetMyPasswordDto\n}\nexport interface RegisterUserByPhoneRequest {\n body: RegisterUserByPhoneDto\n}\nexport interface RegisterUserByEmailRequest {\n body: RegisterUserByEmailDto\n}\nexport interface RegisterRequest {\n body: RegisterUserByUsernameDto\n}\nexport interface LoginRequest {\n body: LoginSessionDto\n}\nexport interface LoginByPhoneRequest {\n body: LoginSessionByPhoneDto\n}\nexport interface LoginByEmailRequest {\n body: LoginSessionByEmailDto\n}\nexport interface UpdateMyEmailRequest {\n body: UpdateMyEmailDto\n}\nexport interface UpdateMyPhoneRequest {\n body: UpdateMyPhoneDto\n}\nexport interface LogoutRequest {\n body: LogoutSessionDto\n}\nexport interface RefreshSessionRequest {\n body: RefreshSessionDto\n}\nexport interface VerifyIdentityRequest {\n body: VerifyIdentityDto\n}"],"names":[],"version":3,"file":"module.js.map"}