@36node/auth-sdk 1.6.3 → 1.6.5-pr-37-9e6d250fc5

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.
@@ -21,6 +21,156 @@ export declare const LoginDtoSchema: {
21
21
  };
22
22
  readonly required: readonly ["login", "password"];
23
23
  };
24
+ export declare const SessionWithTokenSchema: {
25
+ readonly type: "object";
26
+ readonly properties: {
27
+ readonly refreshTokenExpireAt: {
28
+ readonly format: "date-time";
29
+ readonly type: "string";
30
+ readonly description: "会话过期时间";
31
+ };
32
+ readonly refreshToken: {
33
+ readonly type: "string";
34
+ readonly description: "refresh token";
35
+ };
36
+ readonly uid: {
37
+ readonly type: "string";
38
+ readonly description: "用户或第三方用户";
39
+ };
40
+ readonly source: {
41
+ readonly description: "第三方来源";
42
+ readonly enum: readonly ["GitHub", "WebChat"];
43
+ readonly type: "string";
44
+ };
45
+ readonly client: {
46
+ readonly type: "string";
47
+ readonly description: "客户端/设备";
48
+ };
49
+ readonly permissions: {
50
+ readonly description: "用户动态权限";
51
+ readonly type: "array";
52
+ readonly items: {
53
+ readonly type: "string";
54
+ };
55
+ };
56
+ readonly ns: {
57
+ readonly type: "string";
58
+ readonly description: "user ns";
59
+ };
60
+ readonly type: {
61
+ readonly description: "类型,支持设置多个";
62
+ readonly type: "array";
63
+ readonly items: {
64
+ readonly type: "string";
65
+ };
66
+ };
67
+ readonly id: {
68
+ readonly type: "string";
69
+ readonly description: "Entity id";
70
+ };
71
+ readonly createdAt: {
72
+ readonly format: "date-time";
73
+ readonly type: "string";
74
+ readonly description: "Entity created at when";
75
+ };
76
+ readonly updatedAt: {
77
+ readonly format: "date-time";
78
+ readonly type: "string";
79
+ readonly description: "Entity updated at when";
80
+ };
81
+ readonly createdBy: {
82
+ readonly type: "string";
83
+ readonly description: "Entity created by who";
84
+ };
85
+ readonly updatedBy: {
86
+ readonly type: "string";
87
+ readonly description: "Entity updated by who";
88
+ };
89
+ readonly token: {
90
+ readonly type: "string";
91
+ readonly description: "token";
92
+ };
93
+ readonly tokenExpireAt: {
94
+ readonly format: "date-time";
95
+ readonly type: "string";
96
+ readonly description: "token 过期时间";
97
+ };
98
+ };
99
+ readonly required: readonly ["refreshTokenExpireAt", "refreshToken", "uid", "id", "token", "tokenExpireAt"];
100
+ };
101
+ export declare const GithubDtoSchema: {
102
+ readonly type: "object";
103
+ readonly properties: {
104
+ readonly code: {
105
+ readonly type: "string";
106
+ };
107
+ };
108
+ readonly required: readonly ["code"];
109
+ };
110
+ export declare const LoginByEmailDtoSchema: {
111
+ readonly type: "object";
112
+ readonly properties: {
113
+ readonly email: {
114
+ readonly type: "string";
115
+ readonly description: "邮箱";
116
+ };
117
+ readonly key: {
118
+ readonly type: "string";
119
+ readonly description: "验证码 key";
120
+ };
121
+ readonly code: {
122
+ readonly type: "string";
123
+ readonly description: "验证码 code";
124
+ };
125
+ };
126
+ readonly required: readonly ["email", "key", "code"];
127
+ };
128
+ export declare const LoginByPhoneDtoSchema: {
129
+ readonly type: "object";
130
+ readonly properties: {
131
+ readonly phone: {
132
+ readonly type: "string";
133
+ readonly description: "手机号";
134
+ };
135
+ readonly key: {
136
+ readonly type: "string";
137
+ readonly description: "验证码 key";
138
+ };
139
+ readonly code: {
140
+ readonly type: "string";
141
+ readonly description: "验证码 code";
142
+ };
143
+ };
144
+ readonly required: readonly ["phone", "key", "code"];
145
+ };
146
+ export declare const LogoutDtoSchema: {
147
+ readonly type: "object";
148
+ readonly properties: {
149
+ readonly key: {
150
+ readonly type: "string";
151
+ readonly description: "session key";
152
+ };
153
+ };
154
+ readonly required: readonly ["key"];
155
+ };
156
+ export declare const RegisterDtoSchema: {
157
+ readonly type: "object";
158
+ readonly properties: {
159
+ readonly username: {
160
+ readonly type: "string";
161
+ readonly description: "用户名";
162
+ };
163
+ readonly password: {
164
+ readonly type: "string";
165
+ readonly description: "密码";
166
+ };
167
+ readonly ns: {
168
+ readonly type: "string";
169
+ readonly description: "命名空间";
170
+ };
171
+ };
172
+ readonly required: readonly ["username", "password"];
173
+ };
24
174
  export declare const UserSchema: {
25
175
  readonly type: "object";
26
176
  readonly properties: {
@@ -106,10 +256,6 @@ export declare const UserSchema: {
106
256
  readonly type: "string";
107
257
  };
108
258
  };
109
- readonly super: {
110
- readonly type: "boolean";
111
- readonly description: "是否超级管理员";
112
- };
113
259
  readonly username: {
114
260
  readonly type: "string";
115
261
  readonly description: "用户名";
@@ -141,10 +287,6 @@ export declare const UserSchema: {
141
287
  readonly type: "boolean";
142
288
  readonly description: "是否启用";
143
289
  };
144
- readonly inviteCode: {
145
- readonly type: "string";
146
- readonly description: "邀请码";
147
- };
148
290
  readonly status: {
149
291
  readonly type: "string";
150
292
  readonly description: "状态";
@@ -154,7 +296,7 @@ export declare const UserSchema: {
154
296
  readonly type: "string";
155
297
  readonly description: "过期时间";
156
298
  };
157
- readonly types: {
299
+ readonly type: {
158
300
  readonly description: "类型,支持设置多个";
159
301
  readonly type: "array";
160
302
  readonly items: {
@@ -186,120 +328,6 @@ export declare const UserSchema: {
186
328
  };
187
329
  readonly required: readonly ["id"];
188
330
  };
189
- export declare const SessionWithTokenSchema: {
190
- readonly type: "object";
191
- readonly properties: {
192
- readonly acl: {
193
- readonly type: "object";
194
- readonly description: "访问控制列表";
195
- };
196
- readonly expireAt: {
197
- readonly format: "date-time";
198
- readonly type: "string";
199
- readonly description: "会话过期时间";
200
- };
201
- readonly key: {
202
- readonly type: "string";
203
- readonly description: "refresh token key";
204
- };
205
- readonly user: {
206
- readonly description: "用户,实际存储 uid";
207
- readonly allOf: readonly [{
208
- readonly $ref: "#/components/schemas/User";
209
- }];
210
- };
211
- readonly client: {
212
- readonly type: "string";
213
- readonly description: "客户端/设备";
214
- };
215
- readonly id: {
216
- readonly type: "string";
217
- readonly description: "Entity id";
218
- };
219
- readonly createdAt: {
220
- readonly format: "date-time";
221
- readonly type: "string";
222
- readonly description: "Entity created at when";
223
- };
224
- readonly updatedAt: {
225
- readonly format: "date-time";
226
- readonly type: "string";
227
- readonly description: "Entity updated at when";
228
- };
229
- readonly createdBy: {
230
- readonly type: "string";
231
- readonly description: "Entity created by who";
232
- };
233
- readonly updatedBy: {
234
- readonly type: "string";
235
- readonly description: "Entity updated by who";
236
- };
237
- readonly token: {
238
- readonly type: "string";
239
- readonly description: "token";
240
- };
241
- readonly tokenExpireAt: {
242
- readonly format: "date-time";
243
- readonly type: "string";
244
- readonly description: "token 过期时间";
245
- };
246
- };
247
- readonly required: readonly ["expireAt", "key", "user", "id", "token", "tokenExpireAt"];
248
- };
249
- export declare const LoginByEmailDtoSchema: {
250
- readonly type: "object";
251
- readonly properties: {
252
- readonly email: {
253
- readonly type: "string";
254
- readonly description: "邮箱";
255
- };
256
- readonly key: {
257
- readonly type: "string";
258
- readonly description: "验证码 key";
259
- };
260
- readonly code: {
261
- readonly type: "string";
262
- readonly description: "验证码 code";
263
- };
264
- };
265
- readonly required: readonly ["email", "key", "code"];
266
- };
267
- export declare const LoginByPhoneDtoSchema: {
268
- readonly type: "object";
269
- readonly properties: {
270
- readonly phone: {
271
- readonly type: "string";
272
- readonly description: "手机号";
273
- };
274
- readonly key: {
275
- readonly type: "string";
276
- readonly description: "验证码 key";
277
- };
278
- readonly code: {
279
- readonly type: "string";
280
- readonly description: "验证码 code";
281
- };
282
- };
283
- readonly required: readonly ["phone", "key", "code"];
284
- };
285
- export declare const RegisterDtoSchema: {
286
- readonly type: "object";
287
- readonly properties: {
288
- readonly username: {
289
- readonly type: "string";
290
- readonly description: "用户名";
291
- };
292
- readonly password: {
293
- readonly type: "string";
294
- readonly description: "密码";
295
- };
296
- readonly ns: {
297
- readonly type: "string";
298
- readonly description: "命名空间";
299
- };
300
- };
301
- readonly required: readonly ["username", "password"];
302
- };
303
331
  export declare const RegisterbyPhoneDtoSchema: {
304
332
  readonly type: "object";
305
333
  readonly properties: {
@@ -351,10 +379,6 @@ export declare const SignTokenDtoSchema: {
351
379
  readonly type: "string";
352
380
  readonly description: "short time span string\n\nrefs: https://github.com/vercel/ms\n\neg: \"2 days\", \"10h\", \"7d\", \"120s\", \"2.5 hrs\", \"2h\", \"1m\", \"5s\", \"1y\", \"100\", \"1y1m1d\"\n\nm => minute\nh => hour\nd => day\nw => week\nM => month\ny => year\ns => second\nms => millisecond\n无单位 => millisecond";
353
381
  };
354
- readonly acl: {
355
- readonly type: "object";
356
- readonly description: "访问控制列表";
357
- };
358
382
  readonly uid: {
359
383
  readonly type: "string";
360
384
  readonly description: "user id";
@@ -380,12 +404,12 @@ export declare const TokenSchema: {
380
404
  export declare const RefreshTokenDtoSchema: {
381
405
  readonly type: "object";
382
406
  readonly properties: {
383
- readonly key: {
407
+ readonly refreshToken: {
384
408
  readonly type: "string";
385
409
  readonly description: "user id";
386
410
  };
387
411
  };
388
- readonly required: readonly ["key"];
412
+ readonly required: readonly ["refreshToken"];
389
413
  };
390
414
  export declare const CreateUserDtoSchema: {
391
415
  readonly type: "object";
@@ -459,10 +483,6 @@ export declare const CreateUserDtoSchema: {
459
483
  readonly type: "string";
460
484
  };
461
485
  };
462
- readonly super: {
463
- readonly type: "boolean";
464
- readonly description: "是否超级管理员";
465
- };
466
486
  readonly username: {
467
487
  readonly type: "string";
468
488
  readonly description: "用户名";
@@ -489,10 +509,6 @@ export declare const CreateUserDtoSchema: {
489
509
  readonly type: "boolean";
490
510
  readonly description: "是否启用";
491
511
  };
492
- readonly inviteCode: {
493
- readonly type: "string";
494
- readonly description: "邀请码";
495
- };
496
512
  readonly status: {
497
513
  readonly type: "string";
498
514
  readonly description: "状态";
@@ -502,7 +518,7 @@ export declare const CreateUserDtoSchema: {
502
518
  readonly type: "string";
503
519
  readonly description: "过期时间";
504
520
  };
505
- readonly types: {
521
+ readonly type: {
506
522
  readonly description: "类型,支持设置多个";
507
523
  readonly type: "array";
508
524
  readonly items: {
@@ -591,10 +607,6 @@ export declare const UpdateUserDtoSchema: {
591
607
  readonly type: "string";
592
608
  };
593
609
  };
594
- readonly super: {
595
- readonly type: "boolean";
596
- readonly description: "是否超级管理员";
597
- };
598
610
  readonly username: {
599
611
  readonly type: "string";
600
612
  readonly description: "用户名";
@@ -626,10 +638,6 @@ export declare const UpdateUserDtoSchema: {
626
638
  readonly type: "boolean";
627
639
  readonly description: "是否启用";
628
640
  };
629
- readonly inviteCode: {
630
- readonly type: "string";
631
- readonly description: "邀请码";
632
- };
633
641
  readonly status: {
634
642
  readonly type: "string";
635
643
  readonly description: "状态";
@@ -639,7 +647,7 @@ export declare const UpdateUserDtoSchema: {
639
647
  readonly type: "string";
640
648
  readonly description: "过期时间";
641
649
  };
642
- readonly types: {
650
+ readonly type: {
643
651
  readonly description: "类型,支持设置多个";
644
652
  readonly type: "array";
645
653
  readonly items: {
@@ -855,52 +863,88 @@ export declare const UpdateNamespaceDtoSchema: {
855
863
  export declare const CreateSessionDtoSchema: {
856
864
  readonly type: "object";
857
865
  readonly properties: {
858
- readonly uid: {
866
+ readonly refreshTokenExpireAt: {
867
+ readonly format: "date-time";
859
868
  readonly type: "string";
860
- readonly description: "用户 ID";
869
+ readonly description: "会话过期时间";
861
870
  };
862
- readonly acl: {
863
- readonly type: "object";
864
- readonly description: "访问控制列表";
871
+ readonly uid: {
872
+ readonly type: "string";
873
+ readonly description: "用户或第三方用户";
865
874
  };
866
- readonly expireAt: {
867
- readonly format: "date-time";
875
+ readonly source: {
868
876
  readonly type: "string";
869
- readonly description: "会话过期时间";
877
+ readonly description: "第三方来源";
878
+ readonly enum: readonly ["GitHub", "WebChat"];
870
879
  };
871
880
  readonly client: {
872
881
  readonly type: "string";
873
882
  readonly description: "客户端/设备";
874
883
  };
884
+ readonly permissions: {
885
+ readonly description: "用户动态权限";
886
+ readonly type: "array";
887
+ readonly items: {
888
+ readonly type: "string";
889
+ };
890
+ };
891
+ readonly ns: {
892
+ readonly type: "string";
893
+ readonly description: "user ns";
894
+ };
895
+ readonly type: {
896
+ readonly description: "类型,支持设置多个";
897
+ readonly type: "array";
898
+ readonly items: {
899
+ readonly type: "string";
900
+ };
901
+ };
875
902
  };
876
- readonly required: readonly ["uid", "expireAt"];
903
+ readonly required: readonly ["refreshTokenExpireAt", "uid"];
877
904
  };
878
905
  export declare const SessionSchema: {
879
906
  readonly type: "object";
880
907
  readonly properties: {
881
- readonly acl: {
882
- readonly type: "object";
883
- readonly description: "访问控制列表";
884
- };
885
- readonly expireAt: {
908
+ readonly refreshTokenExpireAt: {
886
909
  readonly format: "date-time";
887
910
  readonly type: "string";
888
911
  readonly description: "会话过期时间";
889
912
  };
890
- readonly key: {
913
+ readonly refreshToken: {
891
914
  readonly type: "string";
892
- readonly description: "refresh token key";
915
+ readonly description: "refresh token";
893
916
  };
894
- readonly user: {
895
- readonly description: "用户,实际存储 uid";
896
- readonly allOf: readonly [{
897
- readonly $ref: "#/components/schemas/User";
898
- }];
917
+ readonly uid: {
918
+ readonly type: "string";
919
+ readonly description: "用户或第三方用户";
920
+ };
921
+ readonly source: {
922
+ readonly description: "第三方来源";
923
+ readonly enum: readonly ["GitHub", "WebChat"];
924
+ readonly type: "string";
899
925
  };
900
926
  readonly client: {
901
927
  readonly type: "string";
902
928
  readonly description: "客户端/设备";
903
929
  };
930
+ readonly permissions: {
931
+ readonly description: "用户动态权限";
932
+ readonly type: "array";
933
+ readonly items: {
934
+ readonly type: "string";
935
+ };
936
+ };
937
+ readonly ns: {
938
+ readonly type: "string";
939
+ readonly description: "user ns";
940
+ };
941
+ readonly type: {
942
+ readonly description: "类型,支持设置多个";
943
+ readonly type: "array";
944
+ readonly items: {
945
+ readonly type: "string";
946
+ };
947
+ };
904
948
  readonly id: {
905
949
  readonly type: "string";
906
950
  readonly description: "Entity id";
@@ -924,27 +968,46 @@ export declare const SessionSchema: {
924
968
  readonly description: "Entity updated by who";
925
969
  };
926
970
  };
927
- readonly required: readonly ["expireAt", "key", "user", "id"];
971
+ readonly required: readonly ["refreshTokenExpireAt", "refreshToken", "uid", "id"];
928
972
  };
929
973
  export declare const UpdateSessionDtoSchema: {
930
974
  readonly type: "object";
931
975
  readonly properties: {
932
- readonly acl: {
933
- readonly type: "object";
934
- readonly description: "访问控制列表";
935
- };
936
- readonly expireAt: {
976
+ readonly refreshTokenExpireAt: {
937
977
  readonly format: "date-time";
938
978
  readonly type: "string";
939
979
  readonly description: "会话过期时间";
940
980
  };
981
+ readonly uid: {
982
+ readonly type: "string";
983
+ readonly description: "用户或第三方用户";
984
+ };
985
+ readonly source: {
986
+ readonly type: "string";
987
+ readonly description: "第三方来源";
988
+ readonly enum: readonly ["GitHub", "WebChat"];
989
+ };
941
990
  readonly client: {
942
991
  readonly type: "string";
943
992
  readonly description: "客户端/设备";
944
993
  };
945
- readonly uid: {
994
+ readonly permissions: {
995
+ readonly description: "用户动态权限";
996
+ readonly type: "array";
997
+ readonly items: {
998
+ readonly type: "string";
999
+ };
1000
+ };
1001
+ readonly ns: {
946
1002
  readonly type: "string";
947
- readonly description: "用户 ID";
1003
+ readonly description: "user ns";
1004
+ };
1005
+ readonly type: {
1006
+ readonly description: "类型,支持设置多个";
1007
+ readonly type: "array";
1008
+ readonly items: {
1009
+ readonly type: "string";
1010
+ };
948
1011
  };
949
1012
  };
950
1013
  };
@@ -1134,6 +1197,30 @@ export declare const UpdateCaptchaDtoSchema: {
1134
1197
  };
1135
1198
  };
1136
1199
  };
1200
+ export declare const VerifyCaptchaDtoSchema: {
1201
+ readonly type: "object";
1202
+ readonly properties: {
1203
+ readonly code: {
1204
+ readonly type: "string";
1205
+ readonly description: "验证码";
1206
+ };
1207
+ readonly key: {
1208
+ readonly type: "string";
1209
+ readonly description: "验证码 key";
1210
+ };
1211
+ };
1212
+ readonly required: readonly ["code", "key"];
1213
+ };
1214
+ export declare const VerifyCaptchaResultDtoSchema: {
1215
+ readonly type: "object";
1216
+ readonly properties: {
1217
+ readonly success: {
1218
+ readonly type: "boolean";
1219
+ readonly description: "是否验证成功";
1220
+ };
1221
+ };
1222
+ readonly required: readonly ["success"];
1223
+ };
1137
1224
  export declare const SendEmailDtoSchema: {
1138
1225
  readonly type: "object";
1139
1226
  readonly properties: {
@@ -1402,6 +1489,114 @@ export declare const UpdateSmsRecordDtoSchema: {
1402
1489
  };
1403
1490
  };
1404
1491
  };
1492
+ export declare const ThirdPartySourceSchema: {
1493
+ readonly type: "string";
1494
+ readonly description: "第三方登录来源";
1495
+ readonly enum: readonly ["GitHub", "WebChat"];
1496
+ };
1497
+ export declare const createThirdPartyDtoSchema: {
1498
+ readonly type: "object";
1499
+ readonly properties: {
1500
+ readonly source: {
1501
+ readonly $ref: "#/components/schemas/ThirdPartySource";
1502
+ };
1503
+ readonly login: {
1504
+ readonly type: "string";
1505
+ readonly description: "第三方登录 id";
1506
+ };
1507
+ readonly accessToken: {
1508
+ readonly type: "string";
1509
+ readonly description: "第三方登录 accessToken";
1510
+ };
1511
+ readonly uid: {
1512
+ readonly type: "string";
1513
+ readonly description: "关联uid";
1514
+ };
1515
+ };
1516
+ readonly required: readonly ["source", "login", "accessToken"];
1517
+ };
1518
+ export declare const ThirdPartySchema: {
1519
+ readonly type: "object";
1520
+ readonly properties: {
1521
+ readonly source: {
1522
+ readonly $ref: "#/components/schemas/ThirdPartySource";
1523
+ };
1524
+ readonly login: {
1525
+ readonly type: "string";
1526
+ readonly description: "第三方登录 id";
1527
+ };
1528
+ readonly accessToken: {
1529
+ readonly type: "string";
1530
+ readonly description: "第三方登录 accessToken";
1531
+ };
1532
+ readonly uid: {
1533
+ readonly type: "string";
1534
+ readonly description: "关联uid";
1535
+ };
1536
+ readonly id: {
1537
+ readonly type: "string";
1538
+ readonly description: "Entity id";
1539
+ };
1540
+ readonly createdAt: {
1541
+ readonly format: "date-time";
1542
+ readonly type: "string";
1543
+ readonly description: "Entity created at when";
1544
+ };
1545
+ readonly updatedAt: {
1546
+ readonly format: "date-time";
1547
+ readonly type: "string";
1548
+ readonly description: "Entity updated at when";
1549
+ };
1550
+ readonly createdBy: {
1551
+ readonly type: "string";
1552
+ readonly description: "Entity created by who";
1553
+ };
1554
+ readonly updatedBy: {
1555
+ readonly type: "string";
1556
+ readonly description: "Entity updated by who";
1557
+ };
1558
+ };
1559
+ readonly required: readonly ["source", "login", "accessToken", "id"];
1560
+ };
1561
+ export declare const UpdateThirdPartyDtoSchema: {
1562
+ readonly type: "object";
1563
+ readonly properties: {
1564
+ readonly source: {
1565
+ readonly $ref: "#/components/schemas/ThirdPartySource";
1566
+ };
1567
+ readonly login: {
1568
+ readonly type: "string";
1569
+ readonly description: "第三方登录 id";
1570
+ };
1571
+ readonly accessToken: {
1572
+ readonly type: "string";
1573
+ readonly description: "第三方登录 accessToken";
1574
+ };
1575
+ readonly uid: {
1576
+ readonly type: "string";
1577
+ readonly description: "关联uid";
1578
+ };
1579
+ };
1580
+ };
1581
+ export declare const bindThirdPartyDtoSchema: {
1582
+ readonly type: "object";
1583
+ readonly properties: {
1584
+ readonly username: {
1585
+ readonly type: "string";
1586
+ };
1587
+ readonly password: {
1588
+ readonly type: "string";
1589
+ };
1590
+ readonly source: {
1591
+ readonly type: "string";
1592
+ readonly enum: readonly ["GitHub", "WebChat"];
1593
+ };
1594
+ readonly login: {
1595
+ readonly type: "string";
1596
+ };
1597
+ };
1598
+ readonly required: readonly ["username", "password", "source", "login"];
1599
+ };
1405
1600
  export declare const IndustrySchema: {
1406
1601
  readonly type: "object";
1407
1602
  readonly properties: {