@cloudbase/oauth 2.7.3-beta.0 → 2.7.4-beta.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/cjs/auth/apis.d.ts +5 -7
- package/dist/cjs/auth/apis.js +54 -14
- package/dist/cjs/auth/consts.d.ts +19 -18
- package/dist/cjs/auth/consts.js +19 -18
- package/dist/cjs/auth/models.d.ts +48 -15
- package/dist/cjs/auth/models.js +1 -1
- package/dist/esm/auth/apis.d.ts +5 -7
- package/dist/esm/auth/apis.js +30 -8
- package/dist/esm/auth/consts.d.ts +19 -18
- package/dist/esm/auth/consts.js +18 -17
- package/dist/esm/auth/models.d.ts +48 -15
- package/dist/miniprogram/index.js +1 -1
- package/package.json +2 -2
- package/src/auth/apis.ts +44 -20
- package/src/auth/consts.ts +24 -18
- package/src/auth/models.ts +57 -17
package/src/auth/models.ts
CHANGED
|
@@ -72,6 +72,7 @@ export interface GrantProviderTokenResponse {
|
|
|
72
72
|
expires_in: number
|
|
73
73
|
code?: string
|
|
74
74
|
error_code?: string
|
|
75
|
+
provider_profile?: ProviderProfile
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
export interface PatchProviderTokenRequest extends BaseRequest {
|
|
@@ -176,10 +177,6 @@ export interface UnbindProviderRequest extends BaseRequest {
|
|
|
176
177
|
provider_id: string
|
|
177
178
|
}
|
|
178
179
|
|
|
179
|
-
export interface CheckPasswordrRequest extends BaseRequest {
|
|
180
|
-
password: string
|
|
181
|
-
}
|
|
182
|
-
|
|
183
180
|
export interface BindPhoneRequest extends BaseRequest {
|
|
184
181
|
phone_number: string
|
|
185
182
|
sudo_token: string
|
|
@@ -213,11 +210,14 @@ export interface SignUpRequest {
|
|
|
213
210
|
verification_token?: string
|
|
214
211
|
provider_token?: string
|
|
215
212
|
|
|
213
|
+
username?: string
|
|
216
214
|
password?: string
|
|
217
215
|
name?: string
|
|
218
216
|
gender?: string
|
|
219
217
|
picture?: string
|
|
220
218
|
locale?: string
|
|
219
|
+
|
|
220
|
+
anonymous_token?: string
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
export interface GetVerificationRequest {
|
|
@@ -235,6 +235,7 @@ export interface GetVerificationResponse {
|
|
|
235
235
|
|
|
236
236
|
export interface VerifyResponse {
|
|
237
237
|
verification_token?: string
|
|
238
|
+
expires_in: number
|
|
238
239
|
}
|
|
239
240
|
|
|
240
241
|
export interface VerifyRequest {
|
|
@@ -246,6 +247,7 @@ export interface VerifyRequest {
|
|
|
246
247
|
|
|
247
248
|
export interface ProviderBindRequest {
|
|
248
249
|
provider_token: string
|
|
250
|
+
expires_in: number
|
|
249
251
|
}
|
|
250
252
|
|
|
251
253
|
export interface GrantProviderTokenRequest {
|
|
@@ -260,12 +262,6 @@ export interface GrantProviderTokenRequest {
|
|
|
260
262
|
}
|
|
261
263
|
}
|
|
262
264
|
|
|
263
|
-
export interface GrantProviderTokenResponse {
|
|
264
|
-
provider_token: string
|
|
265
|
-
expires_in: number
|
|
266
|
-
code?: string
|
|
267
|
-
}
|
|
268
|
-
|
|
269
265
|
export interface PatchProviderTokenRequest {
|
|
270
266
|
provider_token: string
|
|
271
267
|
provider_id?: string
|
|
@@ -285,8 +281,14 @@ export interface PatchProviderTokenResponse {
|
|
|
285
281
|
|
|
286
282
|
export interface GenProviderRedirectUriRequest {
|
|
287
283
|
provider_id: string
|
|
284
|
+
redirect_uri: string
|
|
285
|
+
/**
|
|
286
|
+
* @deprecated
|
|
287
|
+
*/
|
|
288
288
|
provider_redirect_uri: string
|
|
289
289
|
state: string
|
|
290
|
+
scope?: string
|
|
291
|
+
response_type?: string
|
|
290
292
|
other_params?: {
|
|
291
293
|
[key: string]: string
|
|
292
294
|
}
|
|
@@ -311,13 +313,20 @@ export interface UserProfileProvider {
|
|
|
311
313
|
name?: string
|
|
312
314
|
}
|
|
313
315
|
|
|
316
|
+
interface ProfileGroup {
|
|
317
|
+
id: string
|
|
318
|
+
expires_at?: string
|
|
319
|
+
}
|
|
320
|
+
|
|
314
321
|
export interface UserProfile {
|
|
322
|
+
sub?: string
|
|
315
323
|
name?: string
|
|
316
324
|
picture?: string
|
|
317
325
|
username?: string
|
|
318
326
|
email?: string
|
|
319
327
|
email_verified?: boolean
|
|
320
328
|
phone_number?: string
|
|
329
|
+
groups?: [ProfileGroup]
|
|
321
330
|
providers?: [UserProfileProvider]
|
|
322
331
|
gender?: string
|
|
323
332
|
birthdate?: string
|
|
@@ -326,9 +335,23 @@ export interface UserProfile {
|
|
|
326
335
|
created_from?: string
|
|
327
336
|
}
|
|
328
337
|
|
|
338
|
+
interface UserProvider {
|
|
339
|
+
id: string
|
|
340
|
+
name: string
|
|
341
|
+
provider_user_name?: string
|
|
342
|
+
bind: boolean
|
|
343
|
+
}
|
|
344
|
+
export interface ProvidersResponse {
|
|
345
|
+
total: number
|
|
346
|
+
data: [UserProvider]
|
|
347
|
+
}
|
|
348
|
+
|
|
329
349
|
export interface ProviderProfile {
|
|
330
350
|
provider_id: string
|
|
351
|
+
name?: string
|
|
352
|
+
picture?: string
|
|
331
353
|
phone_number?: string
|
|
354
|
+
email?: string
|
|
332
355
|
}
|
|
333
356
|
|
|
334
357
|
export interface TransByProviderRequest {
|
|
@@ -342,14 +365,18 @@ export interface GrantTokenRequest {
|
|
|
342
365
|
redirect_uri?: string
|
|
343
366
|
nonce?: string
|
|
344
367
|
refresh_token?: string
|
|
368
|
+
username?: string
|
|
369
|
+
password?: string
|
|
345
370
|
scope?: string
|
|
371
|
+
code_verifier?: string
|
|
372
|
+
device_code?: string
|
|
346
373
|
}
|
|
347
374
|
|
|
348
375
|
export interface UnbindProviderRequest {
|
|
349
376
|
provider_id: string
|
|
350
377
|
}
|
|
351
378
|
|
|
352
|
-
export interface
|
|
379
|
+
export interface CheckPasswordRequest extends BaseRequest {
|
|
353
380
|
password: string
|
|
354
381
|
}
|
|
355
382
|
|
|
@@ -428,8 +455,8 @@ export interface QueryUserProfileRequest {
|
|
|
428
455
|
}
|
|
429
456
|
|
|
430
457
|
export interface QueryUserProfileResponse {
|
|
431
|
-
total:
|
|
432
|
-
data
|
|
458
|
+
total: number
|
|
459
|
+
data?: [SimpleUserProfile]
|
|
433
460
|
}
|
|
434
461
|
|
|
435
462
|
export interface ResetPasswordRequest extends BaseRequest {
|
|
@@ -472,7 +499,7 @@ export interface AuthorizeInfoRequest extends BaseRequest {
|
|
|
472
499
|
locale?: string
|
|
473
500
|
}
|
|
474
501
|
|
|
475
|
-
interface Scope {
|
|
502
|
+
export interface Scope {
|
|
476
503
|
id: string
|
|
477
504
|
name: string
|
|
478
505
|
description?: string
|
|
@@ -491,6 +518,19 @@ export interface AuthorizeInfoResponse {
|
|
|
491
518
|
scopes?: Scope[]
|
|
492
519
|
}
|
|
493
520
|
|
|
521
|
+
export interface RevokeDeviceRequest {
|
|
522
|
+
device_id: string
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export interface SignoutRequest {
|
|
526
|
+
redirect_uri?: string
|
|
527
|
+
state?: string
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export interface SignoutReponse {
|
|
531
|
+
redirect_uri?: string
|
|
532
|
+
}
|
|
533
|
+
|
|
494
534
|
export interface AuthorizeDeviceRequest extends BaseRequest {
|
|
495
535
|
user_code: string
|
|
496
536
|
scope?: string
|
|
@@ -499,11 +539,11 @@ export interface AuthorizeDeviceRequest extends BaseRequest {
|
|
|
499
539
|
|
|
500
540
|
export interface DeviceAuthorizeResponse {
|
|
501
541
|
device_code: string
|
|
502
|
-
user_code
|
|
542
|
+
user_code?: string
|
|
503
543
|
expires_in: number
|
|
504
544
|
interval: number
|
|
505
|
-
|
|
506
|
-
verification_uri_complete
|
|
545
|
+
verification_uri?: string
|
|
546
|
+
verification_uri_complete?: string
|
|
507
547
|
}
|
|
508
548
|
|
|
509
549
|
// 简化版用户信息
|