@36node/auth-sdk 1.6.4 → 1.6.5-pr-37-77a8d555a6

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 refreshToken: {
150
+ readonly type: "string";
151
+ readonly description: "session refreshToken";
152
+ };
153
+ };
154
+ readonly required: readonly ["refreshToken"];
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,130 +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 LogoutDtoSchema: {
286
- readonly type: "object";
287
- readonly properties: {
288
- readonly key: {
289
- readonly type: "string";
290
- readonly description: "session key";
291
- };
292
- };
293
- readonly required: readonly ["key"];
294
- };
295
- export declare const RegisterDtoSchema: {
296
- readonly type: "object";
297
- readonly properties: {
298
- readonly username: {
299
- readonly type: "string";
300
- readonly description: "用户名";
301
- };
302
- readonly password: {
303
- readonly type: "string";
304
- readonly description: "密码";
305
- };
306
- readonly ns: {
307
- readonly type: "string";
308
- readonly description: "命名空间";
309
- };
310
- };
311
- readonly required: readonly ["username", "password"];
312
- };
313
331
  export declare const RegisterbyPhoneDtoSchema: {
314
332
  readonly type: "object";
315
333
  readonly properties: {
@@ -361,10 +379,6 @@ export declare const SignTokenDtoSchema: {
361
379
  readonly type: "string";
362
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";
363
381
  };
364
- readonly acl: {
365
- readonly type: "object";
366
- readonly description: "访问控制列表";
367
- };
368
382
  readonly uid: {
369
383
  readonly type: "string";
370
384
  readonly description: "user id";
@@ -390,12 +404,12 @@ export declare const TokenSchema: {
390
404
  export declare const RefreshTokenDtoSchema: {
391
405
  readonly type: "object";
392
406
  readonly properties: {
393
- readonly key: {
407
+ readonly refreshToken: {
394
408
  readonly type: "string";
395
409
  readonly description: "user id";
396
410
  };
397
411
  };
398
- readonly required: readonly ["key"];
412
+ readonly required: readonly ["refreshToken"];
399
413
  };
400
414
  export declare const CreateUserDtoSchema: {
401
415
  readonly type: "object";
@@ -469,10 +483,6 @@ export declare const CreateUserDtoSchema: {
469
483
  readonly type: "string";
470
484
  };
471
485
  };
472
- readonly super: {
473
- readonly type: "boolean";
474
- readonly description: "是否超级管理员";
475
- };
476
486
  readonly username: {
477
487
  readonly type: "string";
478
488
  readonly description: "用户名";
@@ -499,10 +509,6 @@ export declare const CreateUserDtoSchema: {
499
509
  readonly type: "boolean";
500
510
  readonly description: "是否启用";
501
511
  };
502
- readonly inviteCode: {
503
- readonly type: "string";
504
- readonly description: "邀请码";
505
- };
506
512
  readonly status: {
507
513
  readonly type: "string";
508
514
  readonly description: "状态";
@@ -512,7 +518,7 @@ export declare const CreateUserDtoSchema: {
512
518
  readonly type: "string";
513
519
  readonly description: "过期时间";
514
520
  };
515
- readonly types: {
521
+ readonly type: {
516
522
  readonly description: "类型,支持设置多个";
517
523
  readonly type: "array";
518
524
  readonly items: {
@@ -601,10 +607,6 @@ export declare const UpdateUserDtoSchema: {
601
607
  readonly type: "string";
602
608
  };
603
609
  };
604
- readonly super: {
605
- readonly type: "boolean";
606
- readonly description: "是否超级管理员";
607
- };
608
610
  readonly username: {
609
611
  readonly type: "string";
610
612
  readonly description: "用户名";
@@ -636,10 +638,6 @@ export declare const UpdateUserDtoSchema: {
636
638
  readonly type: "boolean";
637
639
  readonly description: "是否启用";
638
640
  };
639
- readonly inviteCode: {
640
- readonly type: "string";
641
- readonly description: "邀请码";
642
- };
643
641
  readonly status: {
644
642
  readonly type: "string";
645
643
  readonly description: "状态";
@@ -649,7 +647,7 @@ export declare const UpdateUserDtoSchema: {
649
647
  readonly type: "string";
650
648
  readonly description: "过期时间";
651
649
  };
652
- readonly types: {
650
+ readonly type: {
653
651
  readonly description: "类型,支持设置多个";
654
652
  readonly type: "array";
655
653
  readonly items: {
@@ -865,52 +863,88 @@ export declare const UpdateNamespaceDtoSchema: {
865
863
  export declare const CreateSessionDtoSchema: {
866
864
  readonly type: "object";
867
865
  readonly properties: {
868
- readonly uid: {
866
+ readonly refreshTokenExpireAt: {
867
+ readonly format: "date-time";
869
868
  readonly type: "string";
870
- readonly description: "用户 ID";
869
+ readonly description: "会话过期时间";
871
870
  };
872
- readonly acl: {
873
- readonly type: "object";
874
- readonly description: "访问控制列表";
871
+ readonly uid: {
872
+ readonly type: "string";
873
+ readonly description: "用户或第三方用户";
875
874
  };
876
- readonly expireAt: {
877
- readonly format: "date-time";
875
+ readonly source: {
878
876
  readonly type: "string";
879
- readonly description: "会话过期时间";
877
+ readonly description: "第三方来源";
878
+ readonly enum: readonly ["GitHub", "WebChat"];
880
879
  };
881
880
  readonly client: {
882
881
  readonly type: "string";
883
882
  readonly description: "客户端/设备";
884
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
+ };
885
902
  };
886
- readonly required: readonly ["uid", "expireAt"];
903
+ readonly required: readonly ["refreshTokenExpireAt", "uid"];
887
904
  };
888
905
  export declare const SessionSchema: {
889
906
  readonly type: "object";
890
907
  readonly properties: {
891
- readonly acl: {
892
- readonly type: "object";
893
- readonly description: "访问控制列表";
894
- };
895
- readonly expireAt: {
908
+ readonly refreshTokenExpireAt: {
896
909
  readonly format: "date-time";
897
910
  readonly type: "string";
898
911
  readonly description: "会话过期时间";
899
912
  };
900
- readonly key: {
913
+ readonly refreshToken: {
914
+ readonly type: "string";
915
+ readonly description: "refresh token";
916
+ };
917
+ readonly uid: {
901
918
  readonly type: "string";
902
- readonly description: "refresh token key";
919
+ readonly description: "用户或第三方用户";
903
920
  };
904
- readonly user: {
905
- readonly description: "用户,实际存储 uid";
906
- readonly allOf: readonly [{
907
- readonly $ref: "#/components/schemas/User";
908
- }];
921
+ readonly source: {
922
+ readonly description: "第三方来源";
923
+ readonly enum: readonly ["GitHub", "WebChat"];
924
+ readonly type: "string";
909
925
  };
910
926
  readonly client: {
911
927
  readonly type: "string";
912
928
  readonly description: "客户端/设备";
913
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
+ };
914
948
  readonly id: {
915
949
  readonly type: "string";
916
950
  readonly description: "Entity id";
@@ -934,27 +968,46 @@ export declare const SessionSchema: {
934
968
  readonly description: "Entity updated by who";
935
969
  };
936
970
  };
937
- readonly required: readonly ["expireAt", "key", "user", "id"];
971
+ readonly required: readonly ["refreshTokenExpireAt", "refreshToken", "uid", "id"];
938
972
  };
939
973
  export declare const UpdateSessionDtoSchema: {
940
974
  readonly type: "object";
941
975
  readonly properties: {
942
- readonly acl: {
943
- readonly type: "object";
944
- readonly description: "访问控制列表";
945
- };
946
- readonly expireAt: {
976
+ readonly refreshTokenExpireAt: {
947
977
  readonly format: "date-time";
948
978
  readonly type: "string";
949
979
  readonly description: "会话过期时间";
950
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
+ };
951
990
  readonly client: {
952
991
  readonly type: "string";
953
992
  readonly description: "客户端/设备";
954
993
  };
955
- readonly uid: {
994
+ readonly permissions: {
995
+ readonly description: "用户动态权限";
996
+ readonly type: "array";
997
+ readonly items: {
998
+ readonly type: "string";
999
+ };
1000
+ };
1001
+ readonly ns: {
956
1002
  readonly type: "string";
957
- 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
+ };
958
1011
  };
959
1012
  };
960
1013
  };
@@ -1144,6 +1197,30 @@ export declare const UpdateCaptchaDtoSchema: {
1144
1197
  };
1145
1198
  };
1146
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
+ };
1147
1224
  export declare const SendEmailDtoSchema: {
1148
1225
  readonly type: "object";
1149
1226
  readonly properties: {
@@ -1412,6 +1489,114 @@ export declare const UpdateSmsRecordDtoSchema: {
1412
1489
  };
1413
1490
  };
1414
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
+ };
1415
1600
  export declare const IndustrySchema: {
1416
1601
  readonly type: "object";
1417
1602
  readonly properties: {