@36node/auth-sdk 1.0.0 → 1.1.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/main.js +303 -159
- package/dist/main.js.map +1 -1
- package/dist/module.js +304 -160
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +381 -311
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -2,69 +2,132 @@ import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
|
|
|
2
2
|
export interface HealthCheckResult {
|
|
3
3
|
message: string;
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface LoginDto {
|
|
6
|
+
login: string;
|
|
7
|
+
password: string;
|
|
8
|
+
}
|
|
9
|
+
export interface User {
|
|
6
10
|
password?: string;
|
|
11
|
+
hasPassword?: boolean;
|
|
7
12
|
avatar?: string;
|
|
8
|
-
intro?: string;
|
|
9
13
|
data?: string;
|
|
10
14
|
email?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
identity?: string;
|
|
17
|
+
identityVerifiedAt?: string;
|
|
18
|
+
identityVerified?: boolean;
|
|
19
|
+
intro?: string;
|
|
11
20
|
language?: string;
|
|
12
|
-
lastSeenAt?: string;
|
|
13
21
|
lastLoginIp?: string;
|
|
22
|
+
lastSeenAt?: string;
|
|
14
23
|
nickname?: string;
|
|
15
|
-
ns
|
|
24
|
+
ns?: string;
|
|
16
25
|
phone?: string;
|
|
17
26
|
registerIp?: string;
|
|
18
27
|
registerRegion?: string;
|
|
19
28
|
roles?: string[];
|
|
20
29
|
super?: boolean;
|
|
21
30
|
username?: string;
|
|
22
|
-
|
|
31
|
+
id: string;
|
|
32
|
+
createdAt?: string;
|
|
33
|
+
updatedAt?: string;
|
|
34
|
+
createdBy?: string;
|
|
35
|
+
updatedBy?: string;
|
|
23
36
|
}
|
|
24
|
-
export
|
|
25
|
-
|
|
37
|
+
export interface SessionWithToken {
|
|
38
|
+
acl?: SessionWithToken.Acl;
|
|
39
|
+
expireAt: string;
|
|
40
|
+
key: string;
|
|
41
|
+
user: User;
|
|
42
|
+
client?: string;
|
|
43
|
+
id: string;
|
|
44
|
+
createdAt?: string;
|
|
45
|
+
updatedAt?: string;
|
|
46
|
+
createdBy?: string;
|
|
47
|
+
updatedBy?: string;
|
|
48
|
+
token: string;
|
|
49
|
+
tokenExpireAt: string;
|
|
26
50
|
}
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
name?: string;
|
|
31
|
-
verifyAt?: string;
|
|
32
|
-
verified: boolean;
|
|
51
|
+
export declare namespace SessionWithToken {
|
|
52
|
+
interface Acl {
|
|
53
|
+
}
|
|
33
54
|
}
|
|
34
|
-
export interface
|
|
55
|
+
export interface LoginByEmailDto {
|
|
56
|
+
email: string;
|
|
57
|
+
key: string;
|
|
58
|
+
code: string;
|
|
59
|
+
}
|
|
60
|
+
export interface LoginByPhoneDto {
|
|
61
|
+
phone: string;
|
|
62
|
+
key: string;
|
|
63
|
+
code: string;
|
|
64
|
+
}
|
|
65
|
+
export interface RegisterDto {
|
|
66
|
+
username: string;
|
|
67
|
+
password: string;
|
|
68
|
+
ns?: string;
|
|
69
|
+
}
|
|
70
|
+
export interface RegisterbyPhoneDto {
|
|
71
|
+
phone: string;
|
|
72
|
+
key: string;
|
|
73
|
+
code: string;
|
|
74
|
+
ns?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface RegisterByEmailDto {
|
|
77
|
+
email: string;
|
|
78
|
+
key: string;
|
|
79
|
+
code: string;
|
|
80
|
+
ns?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface SignTokenDto {
|
|
83
|
+
expiresIn: string;
|
|
84
|
+
acl?: SignTokenDto.Acl;
|
|
85
|
+
uid: string;
|
|
86
|
+
}
|
|
87
|
+
export declare namespace SignTokenDto {
|
|
88
|
+
interface Acl {
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export interface Token {
|
|
92
|
+
token: string;
|
|
93
|
+
tokenExpireAt: string;
|
|
94
|
+
}
|
|
95
|
+
export interface RefreshTokenDto {
|
|
96
|
+
key: string;
|
|
97
|
+
}
|
|
98
|
+
export interface CreateUserDto {
|
|
35
99
|
password?: string;
|
|
100
|
+
hasPassword?: boolean;
|
|
36
101
|
avatar?: string;
|
|
37
|
-
intro?: string;
|
|
38
102
|
data?: string;
|
|
39
103
|
email?: string;
|
|
104
|
+
name?: string;
|
|
105
|
+
identity?: string;
|
|
106
|
+
identityVerifiedAt?: string;
|
|
107
|
+
identityVerified?: boolean;
|
|
108
|
+
intro?: string;
|
|
40
109
|
language?: string;
|
|
41
|
-
lastSeenAt?: string;
|
|
42
|
-
lastLoginIp?: string;
|
|
43
110
|
nickname?: string;
|
|
44
|
-
ns
|
|
111
|
+
ns?: string;
|
|
45
112
|
phone?: string;
|
|
46
|
-
registerIp?: string;
|
|
47
113
|
registerRegion?: string;
|
|
48
114
|
roles?: string[];
|
|
49
115
|
super?: boolean;
|
|
50
116
|
username?: string;
|
|
51
|
-
dialingPrefix?: string;
|
|
52
|
-
identity?: Identity;
|
|
53
|
-
id: string;
|
|
54
|
-
createAt?: string;
|
|
55
|
-
updateAt?: string;
|
|
56
|
-
createBy?: string;
|
|
57
|
-
updateBy?: string;
|
|
58
117
|
}
|
|
59
118
|
export interface UpdateUserDto {
|
|
60
|
-
|
|
119
|
+
hasPassword?: boolean;
|
|
61
120
|
avatar?: string;
|
|
62
|
-
intro?: string;
|
|
63
121
|
data?: string;
|
|
64
122
|
email?: string;
|
|
123
|
+
name?: string;
|
|
124
|
+
identity?: string;
|
|
125
|
+
identityVerifiedAt?: string;
|
|
126
|
+
identityVerified?: boolean;
|
|
127
|
+
intro?: string;
|
|
65
128
|
language?: string;
|
|
66
|
-
lastSeenAt?: string;
|
|
67
129
|
lastLoginIp?: string;
|
|
130
|
+
lastSeenAt?: string;
|
|
68
131
|
nickname?: string;
|
|
69
132
|
ns?: string;
|
|
70
133
|
phone?: string;
|
|
@@ -73,7 +136,13 @@ export interface UpdateUserDto {
|
|
|
73
136
|
roles?: string[];
|
|
74
137
|
super?: boolean;
|
|
75
138
|
username?: string;
|
|
76
|
-
|
|
139
|
+
}
|
|
140
|
+
export interface ResetPasswordDto {
|
|
141
|
+
password?: string;
|
|
142
|
+
}
|
|
143
|
+
export interface UpdatePasswordDto {
|
|
144
|
+
oldPassword?: string;
|
|
145
|
+
newPassword: string;
|
|
77
146
|
}
|
|
78
147
|
export interface CreateNamespaceDto {
|
|
79
148
|
data?: string;
|
|
@@ -81,9 +150,7 @@ export interface CreateNamespaceDto {
|
|
|
81
150
|
labels?: string[];
|
|
82
151
|
name: string;
|
|
83
152
|
key: string;
|
|
84
|
-
|
|
85
|
-
registerDefaultRoles?: string[];
|
|
86
|
-
passwordRegExp?: string;
|
|
153
|
+
ns?: string;
|
|
87
154
|
}
|
|
88
155
|
export interface Namespace {
|
|
89
156
|
data?: string;
|
|
@@ -91,75 +158,24 @@ export interface Namespace {
|
|
|
91
158
|
labels?: string[];
|
|
92
159
|
name: string;
|
|
93
160
|
key: string;
|
|
94
|
-
|
|
95
|
-
isScope: boolean;
|
|
96
|
-
ns: string;
|
|
97
|
-
registerDefaultRoles?: string[];
|
|
98
|
-
passwordRegExp?: string;
|
|
161
|
+
ns?: string;
|
|
99
162
|
id: string;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
163
|
+
createdAt?: string;
|
|
164
|
+
updatedAt?: string;
|
|
165
|
+
createdBy?: string;
|
|
166
|
+
updatedBy?: string;
|
|
104
167
|
}
|
|
105
168
|
export interface UpdateNamespaceDto {
|
|
106
169
|
data?: string;
|
|
107
170
|
desc?: string;
|
|
108
171
|
labels?: string[];
|
|
109
172
|
name?: string;
|
|
110
|
-
registerDefaultRoles?: string[];
|
|
111
|
-
passwordRegExp?: string;
|
|
112
|
-
}
|
|
113
|
-
export enum CaptchaPurpose {
|
|
114
|
-
REGISTER = "REGISTER",
|
|
115
|
-
LOGIN = "LOGIN",
|
|
116
|
-
RESET_PASSWORD = "RESET_PASSWORD",
|
|
117
|
-
UPDATE_PHONE = "UPDATE_PHONE",
|
|
118
|
-
UPDATE_EMAIL = "UPDATE_EMAIL"
|
|
119
|
-
}
|
|
120
|
-
export type CaptchaPurposeType = (typeof CaptchaPurpose)[keyof typeof CaptchaPurpose];
|
|
121
|
-
export interface CreateCaptchaBySmsDto {
|
|
122
|
-
purpose: CaptchaPurpose;
|
|
123
|
-
phone: string;
|
|
124
|
-
dialingPrefix: string;
|
|
125
|
-
scope: string;
|
|
126
|
-
}
|
|
127
|
-
export interface CaptchaBySmsResult {
|
|
128
|
-
purpose: CaptchaPurpose;
|
|
129
|
-
phone: string;
|
|
130
|
-
scope: string;
|
|
131
|
-
dialingPrefix?: string;
|
|
132
|
-
expireAt: string;
|
|
133
|
-
}
|
|
134
|
-
export interface CreateCaptchaByEmailDto {
|
|
135
|
-
purpose: CaptchaPurpose;
|
|
136
|
-
email: string;
|
|
137
|
-
scope: string;
|
|
138
|
-
}
|
|
139
|
-
export interface CaptchaByEmailResult {
|
|
140
|
-
purpose: CaptchaPurpose;
|
|
141
|
-
email: string;
|
|
142
|
-
scope: string;
|
|
143
|
-
expireAt: string;
|
|
144
|
-
}
|
|
145
|
-
export interface CreateCaptchaByPhotoDto {
|
|
146
|
-
purpose: CaptchaPurpose;
|
|
147
|
-
key: string;
|
|
148
|
-
scope: string;
|
|
149
|
-
}
|
|
150
|
-
export interface CaptchaByPhotoResult {
|
|
151
|
-
purpose: CaptchaPurpose;
|
|
152
|
-
capchaGifHex: string;
|
|
153
|
-
scope: string;
|
|
154
|
-
key: string;
|
|
155
|
-
expireAt: string;
|
|
156
173
|
}
|
|
157
174
|
export interface CreateSessionDto {
|
|
158
175
|
uid: string;
|
|
159
176
|
acl?: CreateSessionDto.Acl;
|
|
160
177
|
expireAt: string;
|
|
161
178
|
client?: string;
|
|
162
|
-
tokenExpiresIn?: string;
|
|
163
179
|
}
|
|
164
180
|
export declare namespace CreateSessionDto {
|
|
165
181
|
interface Acl {
|
|
@@ -171,12 +187,11 @@ export interface Session {
|
|
|
171
187
|
key: string;
|
|
172
188
|
user: User;
|
|
173
189
|
client?: string;
|
|
174
|
-
tokenExpiresIn?: string;
|
|
175
190
|
id: string;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
191
|
+
createdAt?: string;
|
|
192
|
+
updatedAt?: string;
|
|
193
|
+
createdBy?: string;
|
|
194
|
+
updatedBy?: string;
|
|
180
195
|
}
|
|
181
196
|
export declare namespace Session {
|
|
182
197
|
interface Acl {
|
|
@@ -186,26 +201,76 @@ export interface UpdateSessionDto {
|
|
|
186
201
|
acl?: UpdateSessionDto.Acl;
|
|
187
202
|
expireAt?: string;
|
|
188
203
|
client?: string;
|
|
189
|
-
tokenExpiresIn?: string;
|
|
190
204
|
uid?: string;
|
|
191
205
|
}
|
|
192
206
|
export declare namespace UpdateSessionDto {
|
|
193
207
|
interface Acl {
|
|
194
208
|
}
|
|
195
209
|
}
|
|
196
|
-
export interface
|
|
197
|
-
|
|
198
|
-
|
|
210
|
+
export interface CreateCaptchaDto {
|
|
211
|
+
code?: string;
|
|
212
|
+
expireAt?: string;
|
|
199
213
|
key: string;
|
|
200
|
-
ns?: string;
|
|
201
214
|
}
|
|
202
|
-
export
|
|
203
|
-
|
|
204
|
-
|
|
215
|
+
export interface Captcha {
|
|
216
|
+
code: string;
|
|
217
|
+
expireAt: string;
|
|
218
|
+
key: string;
|
|
219
|
+
id: string;
|
|
220
|
+
createdAt?: string;
|
|
221
|
+
updatedAt?: string;
|
|
222
|
+
createdBy?: string;
|
|
223
|
+
updatedBy?: string;
|
|
205
224
|
}
|
|
206
|
-
export interface
|
|
207
|
-
|
|
208
|
-
|
|
225
|
+
export interface UpdateCaptchaDto {
|
|
226
|
+
code?: string;
|
|
227
|
+
expireAt?: string;
|
|
228
|
+
key?: string;
|
|
229
|
+
}
|
|
230
|
+
export interface SendEmailDto {
|
|
231
|
+
from: string;
|
|
232
|
+
to: string;
|
|
233
|
+
subject: string;
|
|
234
|
+
content: string;
|
|
235
|
+
}
|
|
236
|
+
export enum EmailStatus {
|
|
237
|
+
PENDING = "pending",
|
|
238
|
+
SENT = "sent"
|
|
239
|
+
}
|
|
240
|
+
export type EmailStatusType = (typeof EmailStatus)[keyof typeof EmailStatus];
|
|
241
|
+
export interface CreateEmailRecordDto {
|
|
242
|
+
status: EmailStatus;
|
|
243
|
+
from: string;
|
|
244
|
+
to: string;
|
|
245
|
+
subject: string;
|
|
246
|
+
content: string;
|
|
247
|
+
sentAt?: string;
|
|
248
|
+
}
|
|
249
|
+
export interface EmailRecord {
|
|
250
|
+
status: EmailStatus;
|
|
251
|
+
from: string;
|
|
252
|
+
to: string;
|
|
253
|
+
subject: string;
|
|
254
|
+
content: string;
|
|
255
|
+
sentAt?: string;
|
|
256
|
+
id: string;
|
|
257
|
+
createdAt?: string;
|
|
258
|
+
updatedAt?: string;
|
|
259
|
+
createdBy?: string;
|
|
260
|
+
updatedBy?: string;
|
|
261
|
+
}
|
|
262
|
+
export interface UpdateEmailRecordDto {
|
|
263
|
+
status?: EmailStatus;
|
|
264
|
+
from?: string;
|
|
265
|
+
to?: string;
|
|
266
|
+
subject?: string;
|
|
267
|
+
content?: string;
|
|
268
|
+
sentAt?: string;
|
|
269
|
+
}
|
|
270
|
+
export interface Industry {
|
|
271
|
+
code: string;
|
|
272
|
+
name: string;
|
|
273
|
+
children: Industry[];
|
|
209
274
|
}
|
|
210
275
|
export interface Region {
|
|
211
276
|
code: string;
|
|
@@ -214,155 +279,101 @@ export interface Region {
|
|
|
214
279
|
nameEn: string;
|
|
215
280
|
dialingPrefix: string;
|
|
216
281
|
}
|
|
217
|
-
export interface
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
email?: string;
|
|
223
|
-
language?: string;
|
|
224
|
-
lastSeenAt?: string;
|
|
225
|
-
lastLoginIp?: string;
|
|
226
|
-
nickname?: string;
|
|
227
|
-
ns: string;
|
|
228
|
-
phone?: string;
|
|
229
|
-
registerIp?: string;
|
|
230
|
-
registerRegion?: string;
|
|
231
|
-
roles?: string[];
|
|
232
|
-
super?: boolean;
|
|
233
|
-
username?: string;
|
|
234
|
-
dialingPrefix?: string;
|
|
235
|
-
identity?: Identity;
|
|
236
|
-
id: string;
|
|
237
|
-
createAt?: string;
|
|
238
|
-
updateAt?: string;
|
|
239
|
-
createBy?: string;
|
|
240
|
-
updateBy?: string;
|
|
241
|
-
hasPassword: boolean;
|
|
242
|
-
}
|
|
243
|
-
export interface UpdateMyInfoDto {
|
|
244
|
-
avatar?: string;
|
|
245
|
-
registerRegion?: string;
|
|
246
|
-
language?: string;
|
|
247
|
-
nickname?: string;
|
|
248
|
-
username?: string;
|
|
249
|
-
intro?: string;
|
|
282
|
+
export interface SendSmsDto {
|
|
283
|
+
phone: string;
|
|
284
|
+
sign: string;
|
|
285
|
+
template: string;
|
|
286
|
+
params?: SendSmsDto.Params;
|
|
250
287
|
}
|
|
251
|
-
export
|
|
252
|
-
|
|
253
|
-
|
|
288
|
+
export declare namespace SendSmsDto {
|
|
289
|
+
interface Params {
|
|
290
|
+
}
|
|
254
291
|
}
|
|
255
|
-
export
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
newPassword: string;
|
|
259
|
-
email?: string;
|
|
260
|
-
phone?: string;
|
|
261
|
-
dialingPrefix?: string;
|
|
292
|
+
export enum SmsStatus {
|
|
293
|
+
PENDING = "pending",
|
|
294
|
+
SENT = "sent"
|
|
262
295
|
}
|
|
263
|
-
export
|
|
264
|
-
|
|
296
|
+
export type SmsStatusType = (typeof SmsStatus)[keyof typeof SmsStatus];
|
|
297
|
+
export interface CreateSmsRecordDto {
|
|
298
|
+
status: SmsStatus;
|
|
265
299
|
phone: string;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
300
|
+
sign: string;
|
|
301
|
+
template: string;
|
|
302
|
+
params?: string;
|
|
303
|
+
sentAt?: string;
|
|
269
304
|
}
|
|
270
|
-
export interface
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
305
|
+
export interface SmsRecord {
|
|
306
|
+
status: SmsStatus;
|
|
307
|
+
phone: string;
|
|
308
|
+
sign: string;
|
|
309
|
+
template: string;
|
|
310
|
+
params?: string;
|
|
311
|
+
sentAt?: string;
|
|
277
312
|
id: string;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
token: string;
|
|
283
|
-
tokenExpireAt: string;
|
|
313
|
+
createdAt?: string;
|
|
314
|
+
updatedAt?: string;
|
|
315
|
+
createdBy?: string;
|
|
316
|
+
updatedBy?: string;
|
|
284
317
|
}
|
|
285
|
-
export
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
code: string;
|
|
293
|
-
password?: string;
|
|
294
|
-
}
|
|
295
|
-
export interface RegisterUserByUsernameDto {
|
|
296
|
-
scope: string;
|
|
297
|
-
username: string;
|
|
298
|
-
password: string;
|
|
318
|
+
export interface UpdateSmsRecordDto {
|
|
319
|
+
status?: SmsStatus;
|
|
320
|
+
phone?: string;
|
|
321
|
+
sign?: string;
|
|
322
|
+
template?: string;
|
|
323
|
+
params?: string;
|
|
324
|
+
sentAt?: string;
|
|
299
325
|
}
|
|
300
|
-
export interface
|
|
301
|
-
scope: string;
|
|
302
|
-
login: string;
|
|
303
|
-
password: string;
|
|
326
|
+
export interface HelloRequest {
|
|
304
327
|
}
|
|
305
|
-
export interface
|
|
306
|
-
|
|
307
|
-
code: string;
|
|
308
|
-
dialingPrefix: string;
|
|
309
|
-
scope: string;
|
|
328
|
+
export interface LoginRequest {
|
|
329
|
+
body: LoginDto;
|
|
310
330
|
}
|
|
311
|
-
export interface
|
|
312
|
-
|
|
313
|
-
code: string;
|
|
314
|
-
scope: string;
|
|
331
|
+
export interface LoginByEmailRequest {
|
|
332
|
+
body: LoginByEmailDto;
|
|
315
333
|
}
|
|
316
|
-
export interface
|
|
317
|
-
|
|
318
|
-
code: string;
|
|
319
|
-
scope: string;
|
|
334
|
+
export interface LoginByPhoneRequest {
|
|
335
|
+
body: LoginByPhoneDto;
|
|
320
336
|
}
|
|
321
|
-
export interface
|
|
322
|
-
|
|
323
|
-
code: string;
|
|
324
|
-
scope: string;
|
|
325
|
-
dialingPrefix: string;
|
|
337
|
+
export interface RegisterRequest {
|
|
338
|
+
body: RegisterDto;
|
|
326
339
|
}
|
|
327
|
-
export interface
|
|
328
|
-
|
|
340
|
+
export interface RegisterByPhoneRequest {
|
|
341
|
+
body: RegisterbyPhoneDto;
|
|
329
342
|
}
|
|
330
|
-
export interface
|
|
331
|
-
|
|
343
|
+
export interface RegisterByEmailRequest {
|
|
344
|
+
body: RegisterByEmailDto;
|
|
332
345
|
}
|
|
333
|
-
export interface
|
|
334
|
-
|
|
335
|
-
name: string;
|
|
336
|
-
identity: string;
|
|
346
|
+
export interface SignTokenRequest {
|
|
347
|
+
body: SignTokenDto;
|
|
337
348
|
}
|
|
338
|
-
export interface
|
|
349
|
+
export interface RefreshRequest {
|
|
350
|
+
body: RefreshTokenDto;
|
|
339
351
|
}
|
|
340
352
|
export interface CreateUserRequest {
|
|
341
353
|
body: CreateUserDto;
|
|
342
354
|
}
|
|
343
355
|
export interface ListUsersRequest {
|
|
344
|
-
ns?: string[];
|
|
345
|
-
ns_scope?: string[];
|
|
346
356
|
_sort?: ListUsersRequest.Sort;
|
|
347
357
|
id?: string[];
|
|
348
358
|
name_like?: string;
|
|
349
|
-
username?: string;
|
|
350
359
|
username_like?: string;
|
|
351
360
|
nickname_like?: string;
|
|
361
|
+
ns?: string[];
|
|
362
|
+
ns_start?: string[];
|
|
363
|
+
username?: string;
|
|
352
364
|
email?: string;
|
|
353
365
|
phone?: string;
|
|
354
366
|
registerRegion?: string;
|
|
355
367
|
roles?: string[];
|
|
356
|
-
dialingPrefix?: string;
|
|
357
368
|
_limit?: number;
|
|
358
369
|
_offset?: number;
|
|
359
370
|
}
|
|
360
371
|
export declare namespace ListUsersRequest {
|
|
361
372
|
enum Sort {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
373
|
+
CREATED_AT = "createdAt",
|
|
374
|
+
CREATED_AT_DESC = "-createdAt",
|
|
375
|
+
UPDATED_AT = "updatedAt",
|
|
376
|
+
UPDATED_AT_DESC = "-updatedAt"
|
|
366
377
|
}
|
|
367
378
|
type SortType = typeof Sort[keyof typeof Sort];
|
|
368
379
|
}
|
|
@@ -376,29 +387,45 @@ export interface UpdateUserRequest {
|
|
|
376
387
|
export interface DeleteUserRequest {
|
|
377
388
|
userId: string;
|
|
378
389
|
}
|
|
390
|
+
export interface VerifyIdentityRequest {
|
|
391
|
+
userId: string;
|
|
392
|
+
}
|
|
393
|
+
export interface ResetPasswordRequest {
|
|
394
|
+
userId: string;
|
|
395
|
+
body: ResetPasswordDto;
|
|
396
|
+
}
|
|
397
|
+
export interface UpdatePasswordRequest {
|
|
398
|
+
userId: string;
|
|
399
|
+
body: UpdatePasswordDto;
|
|
400
|
+
}
|
|
379
401
|
export interface CreateNamespaceRequest {
|
|
380
402
|
body: CreateNamespaceDto;
|
|
381
403
|
}
|
|
382
404
|
export interface ListNamespacesRequest {
|
|
383
|
-
|
|
384
|
-
|
|
405
|
+
ns?: string[];
|
|
406
|
+
ns_start?: string[];
|
|
385
407
|
_sort?: ListNamespacesRequest.Sort;
|
|
386
408
|
name_like?: string;
|
|
387
409
|
labels?: string[];
|
|
410
|
+
key?: string;
|
|
388
411
|
_limit?: number;
|
|
389
412
|
_offset?: number;
|
|
390
413
|
}
|
|
391
414
|
export declare namespace ListNamespacesRequest {
|
|
392
415
|
enum Sort {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
416
|
+
CREATED_AT = "createdAt",
|
|
417
|
+
CREATED_AT_DESC = "-createdAt",
|
|
418
|
+
UPDATED_AT = "updatedAt",
|
|
419
|
+
UPDATED_AT_DESC = "-updatedAt",
|
|
420
|
+
KEY = "key",
|
|
421
|
+
KEY_DESC = "-key",
|
|
422
|
+
NAME = "name",
|
|
423
|
+
NAME_DESC = "-name"
|
|
397
424
|
}
|
|
398
425
|
type SortType = typeof Sort[keyof typeof Sort];
|
|
399
426
|
}
|
|
400
427
|
export interface GetNamespaceRequest {
|
|
401
|
-
|
|
428
|
+
namespaceIdOrKey: string;
|
|
402
429
|
}
|
|
403
430
|
export interface UpdateNamespaceRequest {
|
|
404
431
|
namespaceId: string;
|
|
@@ -407,32 +434,6 @@ export interface UpdateNamespaceRequest {
|
|
|
407
434
|
export interface DeleteNamespaceRequest {
|
|
408
435
|
namespaceId: string;
|
|
409
436
|
}
|
|
410
|
-
export interface ListScopesRequest {
|
|
411
|
-
parent?: string[];
|
|
412
|
-
_sort?: ListScopesRequest.Sort;
|
|
413
|
-
labels?: string[];
|
|
414
|
-
_limit?: number;
|
|
415
|
-
_offset?: number;
|
|
416
|
-
name_like?: string;
|
|
417
|
-
}
|
|
418
|
-
export declare namespace ListScopesRequest {
|
|
419
|
-
enum Sort {
|
|
420
|
-
CREATE_AT = "createAt",
|
|
421
|
-
CREATE_AT_DESC = "-createAt",
|
|
422
|
-
UPDATE_AT = "updateAt",
|
|
423
|
-
UPDATE_AT_DESC = "-updateAt"
|
|
424
|
-
}
|
|
425
|
-
type SortType = typeof Sort[keyof typeof Sort];
|
|
426
|
-
}
|
|
427
|
-
export interface CreateCaptchaBySmsRequest {
|
|
428
|
-
body: CreateCaptchaBySmsDto;
|
|
429
|
-
}
|
|
430
|
-
export interface CreateCaptchaByEmailRequest {
|
|
431
|
-
body: CreateCaptchaByEmailDto;
|
|
432
|
-
}
|
|
433
|
-
export interface CreateCaptchaByPhotoRequest {
|
|
434
|
-
body: CreateCaptchaByPhotoDto;
|
|
435
|
-
}
|
|
436
437
|
export interface CreateSessionRequest {
|
|
437
438
|
body: CreateSessionDto;
|
|
438
439
|
}
|
|
@@ -440,17 +441,16 @@ export interface ListSessionsRequest {
|
|
|
440
441
|
_sort?: ListSessionsRequest.Sort;
|
|
441
442
|
key?: string;
|
|
442
443
|
client?: string;
|
|
443
|
-
tokenExpiresIn?: string;
|
|
444
444
|
uid?: string;
|
|
445
445
|
_limit?: number;
|
|
446
446
|
_offset?: number;
|
|
447
447
|
}
|
|
448
448
|
export declare namespace ListSessionsRequest {
|
|
449
449
|
enum Sort {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
450
|
+
CREATED_AT = "createdAt",
|
|
451
|
+
CREATED_AT_DESC = "-createdAt",
|
|
452
|
+
UPDATED_AT = "updatedAt",
|
|
453
|
+
UPDATED_AT_DESC = "-updatedAt",
|
|
454
454
|
EXPIRE_AT = "expireAt",
|
|
455
455
|
EXPIRE_AT_DESC = "-expireAt"
|
|
456
456
|
}
|
|
@@ -466,98 +466,168 @@ export interface UpdateSessionRequest {
|
|
|
466
466
|
export interface DeleteSessionRequest {
|
|
467
467
|
sessionId: string;
|
|
468
468
|
}
|
|
469
|
-
export interface
|
|
470
|
-
body:
|
|
469
|
+
export interface CreateCaptchaRequest {
|
|
470
|
+
body: CreateCaptchaDto;
|
|
471
471
|
}
|
|
472
|
-
export interface
|
|
472
|
+
export interface ListCaptchasRequest {
|
|
473
|
+
_sort?: ListCaptchasRequest.Sort;
|
|
474
|
+
code?: string;
|
|
475
|
+
key?: string;
|
|
476
|
+
_limit?: number;
|
|
477
|
+
_offset?: number;
|
|
478
|
+
}
|
|
479
|
+
export declare namespace ListCaptchasRequest {
|
|
480
|
+
enum Sort {
|
|
481
|
+
CREATED_AT = "createdAt",
|
|
482
|
+
CREATED_AT_DESC = "-createdAt",
|
|
483
|
+
UPDATED_AT = "updatedAt",
|
|
484
|
+
UPDATED_AT_DESC = "-updatedAt",
|
|
485
|
+
EXPIRE_AT = "expireAt",
|
|
486
|
+
EXPIRE_AT_DESC = "-expireAt"
|
|
487
|
+
}
|
|
488
|
+
type SortType = typeof Sort[keyof typeof Sort];
|
|
473
489
|
}
|
|
474
|
-
export interface
|
|
490
|
+
export interface GetCaptchaRequest {
|
|
491
|
+
captchaId: string;
|
|
475
492
|
}
|
|
476
|
-
export interface
|
|
493
|
+
export interface UpdateCaptchaRequest {
|
|
494
|
+
captchaId: string;
|
|
495
|
+
body: UpdateCaptchaDto;
|
|
477
496
|
}
|
|
478
|
-
export interface
|
|
479
|
-
|
|
497
|
+
export interface DeleteCaptchaRequest {
|
|
498
|
+
captchaId: string;
|
|
480
499
|
}
|
|
481
|
-
export interface
|
|
482
|
-
body:
|
|
500
|
+
export interface SendEmailRequest {
|
|
501
|
+
body: SendEmailDto;
|
|
483
502
|
}
|
|
484
|
-
export interface
|
|
485
|
-
body:
|
|
503
|
+
export interface CreateEmailRecordRequest {
|
|
504
|
+
body: CreateEmailRecordDto;
|
|
486
505
|
}
|
|
487
|
-
export interface
|
|
488
|
-
|
|
506
|
+
export interface ListEmailRecordsRequest {
|
|
507
|
+
status?: EmailStatus;
|
|
508
|
+
_sort?: ListEmailRecordsRequest.Sort;
|
|
509
|
+
createdAt_gt?: string;
|
|
510
|
+
createdAt_lt?: string;
|
|
511
|
+
sentAt_gt?: string;
|
|
512
|
+
sentAt_lt?: string;
|
|
513
|
+
from?: string;
|
|
514
|
+
to?: string;
|
|
515
|
+
_limit?: number;
|
|
516
|
+
_offset?: number;
|
|
489
517
|
}
|
|
490
|
-
export
|
|
491
|
-
|
|
518
|
+
export declare namespace ListEmailRecordsRequest {
|
|
519
|
+
enum Sort {
|
|
520
|
+
CREATED_AT = "createdAt",
|
|
521
|
+
CREATED_AT_DESC = "-createdAt",
|
|
522
|
+
UPDATED_AT = "updatedAt",
|
|
523
|
+
UPDATED_AT_DESC = "-updatedAt",
|
|
524
|
+
SENT_AT = "sentAt",
|
|
525
|
+
SENT_AT_DESC = "-sentAt"
|
|
526
|
+
}
|
|
527
|
+
type SortType = typeof Sort[keyof typeof Sort];
|
|
492
528
|
}
|
|
493
|
-
export interface
|
|
494
|
-
|
|
529
|
+
export interface GetEmailRecordRequest {
|
|
530
|
+
emailRecordId: string;
|
|
495
531
|
}
|
|
496
|
-
export interface
|
|
497
|
-
|
|
532
|
+
export interface UpdateEmailRecordRequest {
|
|
533
|
+
emailRecordId: string;
|
|
534
|
+
body: UpdateEmailRecordDto;
|
|
498
535
|
}
|
|
499
|
-
export interface
|
|
500
|
-
|
|
536
|
+
export interface DeleteEmailRecordRequest {
|
|
537
|
+
emailRecordId: string;
|
|
501
538
|
}
|
|
502
|
-
export interface
|
|
503
|
-
body: LoginSessionByEmailDto;
|
|
539
|
+
export interface ListIndustriesRequest {
|
|
504
540
|
}
|
|
505
|
-
export interface
|
|
506
|
-
body: UpdateMyEmailDto;
|
|
541
|
+
export interface ListRegionsRequest {
|
|
507
542
|
}
|
|
508
|
-
export interface
|
|
509
|
-
body:
|
|
543
|
+
export interface SendSmsRequest {
|
|
544
|
+
body: SendSmsDto;
|
|
510
545
|
}
|
|
511
|
-
export interface
|
|
512
|
-
body:
|
|
546
|
+
export interface CreateSmsRecordRequest {
|
|
547
|
+
body: CreateSmsRecordDto;
|
|
513
548
|
}
|
|
514
|
-
export interface
|
|
515
|
-
|
|
549
|
+
export interface ListSmsRecordsRequest {
|
|
550
|
+
status?: SmsStatus;
|
|
551
|
+
_sort?: ListSmsRecordsRequest.Sort;
|
|
552
|
+
createdAt_gt?: string;
|
|
553
|
+
createdAt_lt?: string;
|
|
554
|
+
sentAt_gt?: string;
|
|
555
|
+
sentAt_lt?: string;
|
|
556
|
+
phone?: string;
|
|
557
|
+
sign?: string;
|
|
558
|
+
_limit?: number;
|
|
559
|
+
_offset?: number;
|
|
516
560
|
}
|
|
517
|
-
export
|
|
518
|
-
|
|
561
|
+
export declare namespace ListSmsRecordsRequest {
|
|
562
|
+
enum Sort {
|
|
563
|
+
CREATED_AT = "createdAt",
|
|
564
|
+
CREATED_AT_DESC = "-createdAt",
|
|
565
|
+
UPDATED_AT = "updatedAt",
|
|
566
|
+
UPDATED_AT_DESC = "-updatedAt",
|
|
567
|
+
SENT_AT = "sentAt",
|
|
568
|
+
SENT_AT_DESC = "-sentAt"
|
|
569
|
+
}
|
|
570
|
+
type SortType = typeof Sort[keyof typeof Sort];
|
|
571
|
+
}
|
|
572
|
+
export interface GetSmsRecordRequest {
|
|
573
|
+
smsRecordId: string;
|
|
574
|
+
}
|
|
575
|
+
export interface UpdateSmsRecordRequest {
|
|
576
|
+
smsRecordId: string;
|
|
577
|
+
body: UpdateSmsRecordDto;
|
|
578
|
+
}
|
|
579
|
+
export interface DeleteSmsRecordRequest {
|
|
580
|
+
smsRecordId: string;
|
|
519
581
|
}
|
|
520
582
|
export class CoreAPIClient {
|
|
521
583
|
client: AxiosInstance;
|
|
522
584
|
constructor(client: AxiosInstance);
|
|
523
585
|
hello: (req: HelloRequest, config?: AxiosRequestConfig) => Response<HealthCheckResult>;
|
|
586
|
+
login: (req: LoginRequest, config?: AxiosRequestConfig) => Response<SessionWithToken>;
|
|
587
|
+
loginByEmail: (req: LoginByEmailRequest, config?: AxiosRequestConfig) => Response<SessionWithToken>;
|
|
588
|
+
loginByPhone: (req: LoginByPhoneRequest, config?: AxiosRequestConfig) => Response<SessionWithToken>;
|
|
589
|
+
register: (req: RegisterRequest, config?: AxiosRequestConfig) => Response<User>;
|
|
590
|
+
registerByPhone: (req: RegisterByPhoneRequest, config?: AxiosRequestConfig) => Response<User>;
|
|
591
|
+
registerByEmail: (req: RegisterByEmailRequest, config?: AxiosRequestConfig) => Response<User>;
|
|
592
|
+
signToken: (req: SignTokenRequest, config?: AxiosRequestConfig) => Response<Token>;
|
|
593
|
+
refresh: (req: RefreshRequest, config?: AxiosRequestConfig) => Response<SessionWithToken>;
|
|
524
594
|
createUser: (req: CreateUserRequest, config?: AxiosRequestConfig) => Response<User>;
|
|
525
595
|
listUsers: (req: ListUsersRequest, config?: AxiosRequestConfig) => Response<User[]>;
|
|
526
596
|
getUser: (req: GetUserRequest, config?: AxiosRequestConfig) => Response<User>;
|
|
527
597
|
updateUser: (req: UpdateUserRequest, config?: AxiosRequestConfig) => Response<User>;
|
|
528
598
|
deleteUser: (req: DeleteUserRequest, config?: AxiosRequestConfig) => Response<void>;
|
|
599
|
+
verifyIdentity: (req: VerifyIdentityRequest, config?: AxiosRequestConfig) => Response<User>;
|
|
600
|
+
resetPassword: (req: ResetPasswordRequest, config?: AxiosRequestConfig) => Response<void>;
|
|
601
|
+
updatePassword: (req: UpdatePasswordRequest, config?: AxiosRequestConfig) => Response<void>;
|
|
529
602
|
createNamespace: (req: CreateNamespaceRequest, config?: AxiosRequestConfig) => Response<Namespace>;
|
|
530
603
|
listNamespaces: (req: ListNamespacesRequest, config?: AxiosRequestConfig) => Response<Namespace[]>;
|
|
531
604
|
getNamespace: (req: GetNamespaceRequest, config?: AxiosRequestConfig) => Response<Namespace>;
|
|
532
605
|
updateNamespace: (req: UpdateNamespaceRequest, config?: AxiosRequestConfig) => Response<Namespace>;
|
|
533
606
|
deleteNamespace: (req: DeleteNamespaceRequest, config?: AxiosRequestConfig) => Response<void>;
|
|
534
|
-
listScopes: (req: ListScopesRequest, config?: AxiosRequestConfig) => Response<Namespace[]>;
|
|
535
|
-
createCaptchaBySms: (req: CreateCaptchaBySmsRequest, config?: AxiosRequestConfig) => Response<CaptchaBySmsResult>;
|
|
536
|
-
createCaptchaByEmail: (req: CreateCaptchaByEmailRequest, config?: AxiosRequestConfig) => Response<CaptchaByEmailResult>;
|
|
537
|
-
createCaptchaByPhoto: (req: CreateCaptchaByPhotoRequest, config?: AxiosRequestConfig) => Response<CaptchaByPhotoResult>;
|
|
538
607
|
createSession: (req: CreateSessionRequest, config?: AxiosRequestConfig) => Response<Session>;
|
|
539
608
|
listSessions: (req: ListSessionsRequest, config?: AxiosRequestConfig) => Response<Session[]>;
|
|
540
609
|
getSession: (req: GetSessionRequest, config?: AxiosRequestConfig) => Response<Session>;
|
|
541
610
|
updateSession: (req: UpdateSessionRequest, config?: AxiosRequestConfig) => Response<Session>;
|
|
542
611
|
deleteSession: (req: DeleteSessionRequest, config?: AxiosRequestConfig) => Response<void>;
|
|
543
|
-
|
|
612
|
+
createCaptcha: (req: CreateCaptchaRequest, config?: AxiosRequestConfig) => Response<Captcha>;
|
|
613
|
+
listCaptchas: (req: ListCaptchasRequest, config?: AxiosRequestConfig) => Response<Captcha[]>;
|
|
614
|
+
getCaptcha: (req: GetCaptchaRequest, config?: AxiosRequestConfig) => Response<Captcha>;
|
|
615
|
+
updateCaptcha: (req: UpdateCaptchaRequest, config?: AxiosRequestConfig) => Response<Captcha>;
|
|
616
|
+
deleteCaptcha: (req: DeleteCaptchaRequest, config?: AxiosRequestConfig) => Response<void>;
|
|
617
|
+
sendEmail: (req: SendEmailRequest, config?: AxiosRequestConfig) => Response<void>;
|
|
618
|
+
createEmailRecord: (req: CreateEmailRecordRequest, config?: AxiosRequestConfig) => Response<EmailRecord>;
|
|
619
|
+
listEmailRecords: (req: ListEmailRecordsRequest, config?: AxiosRequestConfig) => Response<EmailRecord[]>;
|
|
620
|
+
getEmailRecord: (req: GetEmailRecordRequest, config?: AxiosRequestConfig) => Response<EmailRecord>;
|
|
621
|
+
updateEmailRecord: (req: UpdateEmailRecordRequest, config?: AxiosRequestConfig) => Response<EmailRecord>;
|
|
622
|
+
deleteEmailRecord: (req: DeleteEmailRecordRequest, config?: AxiosRequestConfig) => Response<void>;
|
|
623
|
+
listIndustries: (req: ListIndustriesRequest, config?: AxiosRequestConfig) => Response<Industry[]>;
|
|
544
624
|
listRegions: (req: ListRegionsRequest, config?: AxiosRequestConfig) => Response<Region[]>;
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
registerUserByEmail: (req: RegisterUserByEmailRequest, config?: AxiosRequestConfig) => Response<SessionWithToken>;
|
|
552
|
-
register: (req: RegisterRequest, config?: AxiosRequestConfig) => Response<SessionWithToken>;
|
|
553
|
-
login: (req: LoginRequest, config?: AxiosRequestConfig) => Response<SessionWithToken>;
|
|
554
|
-
loginByPhone: (req: LoginByPhoneRequest, config?: AxiosRequestConfig) => Response<SessionWithToken>;
|
|
555
|
-
loginByEmail: (req: LoginByEmailRequest, config?: AxiosRequestConfig) => Response<SessionWithToken>;
|
|
556
|
-
updateMyEmail: (req: UpdateMyEmailRequest, config?: AxiosRequestConfig) => Response<MyInfo>;
|
|
557
|
-
updateMyPhone: (req: UpdateMyPhoneRequest, config?: AxiosRequestConfig) => Response<MyInfo>;
|
|
558
|
-
logout: (req: LogoutRequest, config?: AxiosRequestConfig) => Response<void>;
|
|
559
|
-
refreshSession: (req: RefreshSessionRequest, config?: AxiosRequestConfig) => Response<SessionWithToken>;
|
|
560
|
-
verifyIdentity: (req: VerifyIdentityRequest, config?: AxiosRequestConfig) => Response<Identity>;
|
|
625
|
+
sendSms: (req: SendSmsRequest, config?: AxiosRequestConfig) => Response<void>;
|
|
626
|
+
createSmsRecord: (req: CreateSmsRecordRequest, config?: AxiosRequestConfig) => Response<SmsRecord>;
|
|
627
|
+
listSmsRecords: (req: ListSmsRecordsRequest, config?: AxiosRequestConfig) => Response<SmsRecord[]>;
|
|
628
|
+
getSmsRecord: (req: GetSmsRecordRequest, config?: AxiosRequestConfig) => Response<SmsRecord>;
|
|
629
|
+
updateSmsRecord: (req: UpdateSmsRecordRequest, config?: AxiosRequestConfig) => Response<SmsRecord>;
|
|
630
|
+
deleteSmsRecord: (req: DeleteSmsRecordRequest, config?: AxiosRequestConfig) => Response<void>;
|
|
561
631
|
}
|
|
562
632
|
type Response<T> = Promise<AxiosResponse<T>>;
|
|
563
633
|
|