@36node/auth-sdk 1.6.0 → 1.6.2

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.
@@ -0,0 +1,1557 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateRoleDtoSchema = exports.RoleSchema = exports.CreateRoleDtoSchema = exports.RegionSchema = exports.IndustrySchema = exports.UpdateSmsRecordDtoSchema = exports.SmsRecordSchema = exports.CreateSmsRecordDtoSchema = exports.SmsStatusSchema = exports.SendSmsDtoSchema = exports.UpdateEmailRecordDtoSchema = exports.EmailRecordSchema = exports.CreateEmailRecordDtoSchema = exports.EmailStatusSchema = exports.SendEmailDtoSchema = exports.UpdateCaptchaDtoSchema = exports.CaptchaSchema = exports.CreateCaptchaDtoSchema = exports.UpdateGroupDtoSchema = exports.GroupSchema = exports.CreateGroupDtoSchema = exports.UpdateSessionDtoSchema = exports.SessionSchema = exports.CreateSessionDtoSchema = exports.UpdateNamespaceDtoSchema = exports.NamespaceSchema = exports.CreateNamespaceDtoSchema = exports.UpdatePasswordDtoSchema = exports.ResetPasswordDtoSchema = exports.UpdateUserDtoSchema = exports.CreateUserDtoSchema = exports.RefreshTokenDtoSchema = exports.TokenSchema = exports.SignTokenDtoSchema = exports.RegisterByEmailDtoSchema = exports.RegisterbyPhoneDtoSchema = exports.RegisterDtoSchema = exports.LoginByPhoneDtoSchema = exports.LoginByEmailDtoSchema = exports.SessionWithTokenSchema = exports.UserSchema = exports.LoginDtoSchema = exports.HealthCheckResultSchema = void 0;
4
+ exports.HealthCheckResultSchema = {
5
+ type: 'object',
6
+ properties: {
7
+ message: {
8
+ type: 'string',
9
+ },
10
+ },
11
+ required: ['message'],
12
+ };
13
+ exports.LoginDtoSchema = {
14
+ type: 'object',
15
+ properties: {
16
+ login: {
17
+ type: 'string',
18
+ description: '可以是 username/phone/Email',
19
+ },
20
+ password: {
21
+ type: 'string',
22
+ description: '密码',
23
+ },
24
+ },
25
+ required: ['login', 'password'],
26
+ };
27
+ exports.UserSchema = {
28
+ type: 'object',
29
+ properties: {
30
+ password: {
31
+ type: 'string',
32
+ description: '密码',
33
+ writeOnly: true,
34
+ },
35
+ hasPassword: {
36
+ type: 'boolean',
37
+ description: '是否有密码',
38
+ readOnly: true,
39
+ },
40
+ avatar: {
41
+ type: 'string',
42
+ description: '头像',
43
+ },
44
+ data: {
45
+ type: 'string',
46
+ description: '额外数据',
47
+ },
48
+ email: {
49
+ type: 'string',
50
+ description: '邮箱',
51
+ },
52
+ name: {
53
+ type: 'string',
54
+ description: '姓名',
55
+ },
56
+ identity: {
57
+ type: 'string',
58
+ },
59
+ identityVerifiedAt: {
60
+ format: 'date-time',
61
+ type: 'string',
62
+ description: '实名认证时间',
63
+ },
64
+ identityVerified: {
65
+ type: 'boolean',
66
+ description: '实名认证是否通过',
67
+ },
68
+ intro: {
69
+ type: 'string',
70
+ description: '简介',
71
+ },
72
+ language: {
73
+ type: 'string',
74
+ description: '使用语言',
75
+ },
76
+ lastLoginIp: {
77
+ type: 'string',
78
+ description: '最后登录 IP',
79
+ },
80
+ lastSeenAt: {
81
+ format: 'date-time',
82
+ type: 'string',
83
+ description: '最后活跃时间',
84
+ },
85
+ nickname: {
86
+ type: 'string',
87
+ description: '昵称',
88
+ },
89
+ ns: {
90
+ type: 'string',
91
+ description: '所属命名空间',
92
+ },
93
+ phone: {
94
+ type: 'string',
95
+ description: '手机号',
96
+ },
97
+ registerIp: {
98
+ type: 'string',
99
+ description: '注册 IP',
100
+ },
101
+ registerRegion: {
102
+ type: 'string',
103
+ description: '注册地区,存地区编号',
104
+ },
105
+ roles: {
106
+ description: '角色',
107
+ type: 'array',
108
+ items: {
109
+ type: 'string',
110
+ },
111
+ },
112
+ super: {
113
+ type: 'boolean',
114
+ description: '是否超级管理员',
115
+ },
116
+ username: {
117
+ type: 'string',
118
+ description: '用户名',
119
+ },
120
+ employeeId: {
121
+ type: 'string',
122
+ description: '员工编号',
123
+ },
124
+ permissions: {
125
+ description: '权限',
126
+ type: 'array',
127
+ items: {
128
+ type: 'string',
129
+ },
130
+ },
131
+ groups: {
132
+ description: '团队',
133
+ type: 'array',
134
+ items: {
135
+ type: 'string',
136
+ },
137
+ },
138
+ lastLoginAt: {
139
+ format: 'date-time',
140
+ type: 'string',
141
+ description: '最后登录时间',
142
+ },
143
+ active: {
144
+ type: 'boolean',
145
+ description: '是否启用',
146
+ },
147
+ inviteCode: {
148
+ type: 'string',
149
+ description: '邀请码',
150
+ },
151
+ status: {
152
+ type: 'string',
153
+ description: '状态',
154
+ },
155
+ expireAt: {
156
+ format: 'date-time',
157
+ type: 'string',
158
+ description: '过期时间',
159
+ },
160
+ types: {
161
+ description: '类型,支持设置多个',
162
+ type: 'array',
163
+ items: {
164
+ type: 'string',
165
+ },
166
+ },
167
+ id: {
168
+ type: 'string',
169
+ description: 'Entity id',
170
+ },
171
+ createdAt: {
172
+ format: 'date-time',
173
+ type: 'string',
174
+ description: 'Entity created at when',
175
+ },
176
+ updatedAt: {
177
+ format: 'date-time',
178
+ type: 'string',
179
+ description: 'Entity updated at when',
180
+ },
181
+ createdBy: {
182
+ type: 'string',
183
+ description: 'Entity created by who',
184
+ },
185
+ updatedBy: {
186
+ type: 'string',
187
+ description: 'Entity updated by who',
188
+ },
189
+ },
190
+ required: ['id'],
191
+ };
192
+ exports.SessionWithTokenSchema = {
193
+ type: 'object',
194
+ properties: {
195
+ acl: {
196
+ type: 'object',
197
+ description: '访问控制列表',
198
+ },
199
+ expireAt: {
200
+ format: 'date-time',
201
+ type: 'string',
202
+ description: '会话过期时间',
203
+ },
204
+ key: {
205
+ type: 'string',
206
+ description: 'refresh token key',
207
+ },
208
+ user: {
209
+ description: '用户,实际存储 uid',
210
+ allOf: [
211
+ {
212
+ $ref: '#/components/schemas/User',
213
+ },
214
+ ],
215
+ },
216
+ client: {
217
+ type: 'string',
218
+ description: '客户端/设备',
219
+ },
220
+ id: {
221
+ type: 'string',
222
+ description: 'Entity id',
223
+ },
224
+ createdAt: {
225
+ format: 'date-time',
226
+ type: 'string',
227
+ description: 'Entity created at when',
228
+ },
229
+ updatedAt: {
230
+ format: 'date-time',
231
+ type: 'string',
232
+ description: 'Entity updated at when',
233
+ },
234
+ createdBy: {
235
+ type: 'string',
236
+ description: 'Entity created by who',
237
+ },
238
+ updatedBy: {
239
+ type: 'string',
240
+ description: 'Entity updated by who',
241
+ },
242
+ token: {
243
+ type: 'string',
244
+ description: 'token',
245
+ },
246
+ tokenExpireAt: {
247
+ format: 'date-time',
248
+ type: 'string',
249
+ description: 'token 过期时间',
250
+ },
251
+ },
252
+ required: ['expireAt', 'key', 'user', 'id', 'token', 'tokenExpireAt'],
253
+ };
254
+ exports.LoginByEmailDtoSchema = {
255
+ type: 'object',
256
+ properties: {
257
+ email: {
258
+ type: 'string',
259
+ description: '邮箱',
260
+ },
261
+ key: {
262
+ type: 'string',
263
+ description: '验证码 key',
264
+ },
265
+ code: {
266
+ type: 'string',
267
+ description: '验证码 code',
268
+ },
269
+ },
270
+ required: ['email', 'key', 'code'],
271
+ };
272
+ exports.LoginByPhoneDtoSchema = {
273
+ type: 'object',
274
+ properties: {
275
+ phone: {
276
+ type: 'string',
277
+ description: '手机号',
278
+ },
279
+ key: {
280
+ type: 'string',
281
+ description: '验证码 key',
282
+ },
283
+ code: {
284
+ type: 'string',
285
+ description: '验证码 code',
286
+ },
287
+ },
288
+ required: ['phone', 'key', 'code'],
289
+ };
290
+ exports.RegisterDtoSchema = {
291
+ type: 'object',
292
+ properties: {
293
+ username: {
294
+ type: 'string',
295
+ description: '用户名',
296
+ },
297
+ password: {
298
+ type: 'string',
299
+ description: '密码',
300
+ },
301
+ ns: {
302
+ type: 'string',
303
+ description: '命名空间',
304
+ },
305
+ },
306
+ required: ['username', 'password'],
307
+ };
308
+ exports.RegisterbyPhoneDtoSchema = {
309
+ type: 'object',
310
+ properties: {
311
+ phone: {
312
+ type: 'string',
313
+ description: '手机号',
314
+ },
315
+ key: {
316
+ type: 'string',
317
+ description: '验证码 key',
318
+ },
319
+ code: {
320
+ type: 'string',
321
+ description: '验证码 code',
322
+ },
323
+ ns: {
324
+ type: 'string',
325
+ description: '命名空间',
326
+ },
327
+ },
328
+ required: ['phone', 'key', 'code'],
329
+ };
330
+ exports.RegisterByEmailDtoSchema = {
331
+ type: 'object',
332
+ properties: {
333
+ email: {
334
+ type: 'string',
335
+ description: '邮箱',
336
+ },
337
+ key: {
338
+ type: 'string',
339
+ description: '验证码 key',
340
+ },
341
+ code: {
342
+ type: 'string',
343
+ description: '验证码 code',
344
+ },
345
+ ns: {
346
+ type: 'string',
347
+ description: '命名空间',
348
+ },
349
+ },
350
+ required: ['email', 'key', 'code'],
351
+ };
352
+ exports.SignTokenDtoSchema = {
353
+ type: 'object',
354
+ properties: {
355
+ expiresIn: {
356
+ type: 'string',
357
+ description: `short time span string
358
+
359
+ refs: https://github.com/vercel/ms
360
+
361
+ eg: "2 days", "10h", "7d", "120s", "2.5 hrs", "2h", "1m", "5s", "1y", "100", "1y1m1d"
362
+
363
+ m => minute
364
+ h => hour
365
+ d => day
366
+ w => week
367
+ M => month
368
+ y => year
369
+ s => second
370
+ ms => millisecond
371
+ 无单位 => millisecond`,
372
+ },
373
+ acl: {
374
+ type: 'object',
375
+ description: '访问控制列表',
376
+ },
377
+ uid: {
378
+ type: 'string',
379
+ description: 'user id',
380
+ },
381
+ },
382
+ required: ['expiresIn', 'uid'],
383
+ };
384
+ exports.TokenSchema = {
385
+ type: 'object',
386
+ properties: {
387
+ token: {
388
+ type: 'string',
389
+ description: 'token',
390
+ },
391
+ tokenExpireAt: {
392
+ format: 'date-time',
393
+ type: 'string',
394
+ description: 'token 过期时间',
395
+ },
396
+ },
397
+ required: ['token', 'tokenExpireAt'],
398
+ };
399
+ exports.RefreshTokenDtoSchema = {
400
+ type: 'object',
401
+ properties: {
402
+ key: {
403
+ type: 'string',
404
+ description: 'user id',
405
+ },
406
+ },
407
+ required: ['key'],
408
+ };
409
+ exports.CreateUserDtoSchema = {
410
+ type: 'object',
411
+ properties: {
412
+ password: {
413
+ type: 'string',
414
+ description: '密码',
415
+ writeOnly: true,
416
+ },
417
+ hasPassword: {
418
+ type: 'boolean',
419
+ description: '是否有密码',
420
+ readOnly: true,
421
+ },
422
+ avatar: {
423
+ type: 'string',
424
+ description: '头像',
425
+ },
426
+ data: {
427
+ type: 'string',
428
+ description: '额外数据',
429
+ },
430
+ email: {
431
+ type: 'string',
432
+ description: '邮箱',
433
+ },
434
+ name: {
435
+ type: 'string',
436
+ description: '姓名',
437
+ },
438
+ identity: {
439
+ type: 'string',
440
+ },
441
+ identityVerifiedAt: {
442
+ format: 'date-time',
443
+ type: 'string',
444
+ description: '实名认证时间',
445
+ },
446
+ identityVerified: {
447
+ type: 'boolean',
448
+ description: '实名认证是否通过',
449
+ },
450
+ intro: {
451
+ type: 'string',
452
+ description: '简介',
453
+ },
454
+ language: {
455
+ type: 'string',
456
+ description: '使用语言',
457
+ },
458
+ nickname: {
459
+ type: 'string',
460
+ description: '昵称',
461
+ },
462
+ ns: {
463
+ type: 'string',
464
+ description: '所属命名空间',
465
+ },
466
+ phone: {
467
+ type: 'string',
468
+ description: '手机号',
469
+ },
470
+ registerRegion: {
471
+ type: 'string',
472
+ description: '注册地区,存地区编号',
473
+ },
474
+ roles: {
475
+ description: '角色',
476
+ type: 'array',
477
+ items: {
478
+ type: 'string',
479
+ },
480
+ },
481
+ super: {
482
+ type: 'boolean',
483
+ description: '是否超级管理员',
484
+ },
485
+ username: {
486
+ type: 'string',
487
+ description: '用户名',
488
+ },
489
+ employeeId: {
490
+ type: 'string',
491
+ description: '员工编号',
492
+ },
493
+ permissions: {
494
+ description: '权限',
495
+ type: 'array',
496
+ items: {
497
+ type: 'string',
498
+ },
499
+ },
500
+ groups: {
501
+ description: '团队',
502
+ type: 'array',
503
+ items: {
504
+ type: 'string',
505
+ },
506
+ },
507
+ active: {
508
+ type: 'boolean',
509
+ description: '是否启用',
510
+ },
511
+ inviteCode: {
512
+ type: 'string',
513
+ description: '邀请码',
514
+ },
515
+ status: {
516
+ type: 'string',
517
+ description: '状态',
518
+ },
519
+ expireAt: {
520
+ format: 'date-time',
521
+ type: 'string',
522
+ description: '过期时间',
523
+ },
524
+ types: {
525
+ description: '类型,支持设置多个',
526
+ type: 'array',
527
+ items: {
528
+ type: 'string',
529
+ },
530
+ },
531
+ },
532
+ };
533
+ exports.UpdateUserDtoSchema = {
534
+ type: 'object',
535
+ properties: {
536
+ hasPassword: {
537
+ type: 'boolean',
538
+ description: '是否有密码',
539
+ readOnly: true,
540
+ },
541
+ avatar: {
542
+ type: 'string',
543
+ description: '头像',
544
+ },
545
+ data: {
546
+ type: 'string',
547
+ description: '额外数据',
548
+ },
549
+ email: {
550
+ type: 'string',
551
+ description: '邮箱',
552
+ },
553
+ name: {
554
+ type: 'string',
555
+ description: '姓名',
556
+ },
557
+ identity: {
558
+ type: 'string',
559
+ },
560
+ identityVerifiedAt: {
561
+ format: 'date-time',
562
+ type: 'string',
563
+ description: '实名认证时间',
564
+ },
565
+ identityVerified: {
566
+ type: 'boolean',
567
+ description: '实名认证是否通过',
568
+ },
569
+ intro: {
570
+ type: 'string',
571
+ description: '简介',
572
+ },
573
+ language: {
574
+ type: 'string',
575
+ description: '使用语言',
576
+ },
577
+ lastLoginIp: {
578
+ type: 'string',
579
+ description: '最后登录 IP',
580
+ },
581
+ lastSeenAt: {
582
+ format: 'date-time',
583
+ type: 'string',
584
+ description: '最后活跃时间',
585
+ },
586
+ nickname: {
587
+ type: 'string',
588
+ description: '昵称',
589
+ },
590
+ ns: {
591
+ type: 'string',
592
+ description: '所属命名空间',
593
+ },
594
+ phone: {
595
+ type: 'string',
596
+ description: '手机号',
597
+ },
598
+ registerIp: {
599
+ type: 'string',
600
+ description: '注册 IP',
601
+ },
602
+ registerRegion: {
603
+ type: 'string',
604
+ description: '注册地区,存地区编号',
605
+ },
606
+ roles: {
607
+ description: '角色',
608
+ type: 'array',
609
+ items: {
610
+ type: 'string',
611
+ },
612
+ },
613
+ super: {
614
+ type: 'boolean',
615
+ description: '是否超级管理员',
616
+ },
617
+ username: {
618
+ type: 'string',
619
+ description: '用户名',
620
+ },
621
+ employeeId: {
622
+ type: 'string',
623
+ description: '员工编号',
624
+ },
625
+ permissions: {
626
+ description: '权限',
627
+ type: 'array',
628
+ items: {
629
+ type: 'string',
630
+ },
631
+ },
632
+ groups: {
633
+ description: '团队',
634
+ type: 'array',
635
+ items: {
636
+ type: 'string',
637
+ },
638
+ },
639
+ lastLoginAt: {
640
+ format: 'date-time',
641
+ type: 'string',
642
+ description: '最后登录时间',
643
+ },
644
+ active: {
645
+ type: 'boolean',
646
+ description: '是否启用',
647
+ },
648
+ inviteCode: {
649
+ type: 'string',
650
+ description: '邀请码',
651
+ },
652
+ status: {
653
+ type: 'string',
654
+ description: '状态',
655
+ },
656
+ expireAt: {
657
+ format: 'date-time',
658
+ type: 'string',
659
+ description: '过期时间',
660
+ },
661
+ types: {
662
+ description: '类型,支持设置多个',
663
+ type: 'array',
664
+ items: {
665
+ type: 'string',
666
+ },
667
+ },
668
+ },
669
+ };
670
+ exports.ResetPasswordDtoSchema = {
671
+ type: 'object',
672
+ properties: {
673
+ password: {
674
+ type: 'string',
675
+ description: '密码',
676
+ },
677
+ },
678
+ };
679
+ exports.UpdatePasswordDtoSchema = {
680
+ type: 'object',
681
+ properties: {
682
+ oldPassword: {
683
+ type: 'string',
684
+ description: '旧密码',
685
+ },
686
+ newPassword: {
687
+ type: 'string',
688
+ description: '新密码',
689
+ },
690
+ },
691
+ required: ['newPassword'],
692
+ };
693
+ exports.CreateNamespaceDtoSchema = {
694
+ type: 'object',
695
+ properties: {
696
+ data: {
697
+ type: 'string',
698
+ description: '额外数据',
699
+ },
700
+ desc: {
701
+ type: 'string',
702
+ description: '描述',
703
+ },
704
+ labels: {
705
+ description: '标签',
706
+ type: 'array',
707
+ items: {
708
+ type: 'string',
709
+ },
710
+ },
711
+ name: {
712
+ type: 'string',
713
+ description: '名称',
714
+ },
715
+ key: {
716
+ type: 'string',
717
+ description: `命名空间的 key
718
+
719
+ 允许的字符 ^[a-zA-Z][a-zA-Z0-9._/-]{0,30}$`,
720
+ },
721
+ ns: {
722
+ type: 'string',
723
+ description: '所属的 namespace',
724
+ },
725
+ permissions: {
726
+ description: '权限',
727
+ type: 'array',
728
+ items: {
729
+ type: 'string',
730
+ },
731
+ },
732
+ active: {
733
+ type: 'boolean',
734
+ description: '是否启用',
735
+ },
736
+ defaultPassword: {
737
+ type: 'string',
738
+ description: '默认密码',
739
+ },
740
+ exportable: {
741
+ type: 'boolean',
742
+ description: '是否可导出',
743
+ },
744
+ userCount: {
745
+ type: 'number',
746
+ description: '人数',
747
+ },
748
+ },
749
+ required: ['name', 'key'],
750
+ };
751
+ exports.NamespaceSchema = {
752
+ type: 'object',
753
+ properties: {
754
+ data: {
755
+ type: 'string',
756
+ description: '额外数据',
757
+ },
758
+ desc: {
759
+ type: 'string',
760
+ description: '描述',
761
+ },
762
+ labels: {
763
+ description: '标签',
764
+ type: 'array',
765
+ items: {
766
+ type: 'string',
767
+ },
768
+ },
769
+ name: {
770
+ type: 'string',
771
+ description: '名称',
772
+ },
773
+ key: {
774
+ type: 'string',
775
+ description: `命名空间的 key
776
+
777
+ 允许的字符 ^[a-zA-Z][a-zA-Z0-9._/-]{0,30}$`,
778
+ },
779
+ ns: {
780
+ type: 'string',
781
+ description: '所属的 namespace',
782
+ },
783
+ permissions: {
784
+ description: '权限',
785
+ type: 'array',
786
+ items: {
787
+ type: 'string',
788
+ },
789
+ },
790
+ active: {
791
+ type: 'boolean',
792
+ description: '是否启用',
793
+ },
794
+ defaultPassword: {
795
+ type: 'string',
796
+ description: '默认密码',
797
+ },
798
+ exportable: {
799
+ type: 'boolean',
800
+ description: '是否可导出',
801
+ },
802
+ userCount: {
803
+ type: 'number',
804
+ description: '人数',
805
+ },
806
+ id: {
807
+ type: 'string',
808
+ description: 'Entity id',
809
+ },
810
+ createdAt: {
811
+ format: 'date-time',
812
+ type: 'string',
813
+ description: 'Entity created at when',
814
+ },
815
+ updatedAt: {
816
+ format: 'date-time',
817
+ type: 'string',
818
+ description: 'Entity updated at when',
819
+ },
820
+ createdBy: {
821
+ type: 'string',
822
+ description: 'Entity created by who',
823
+ },
824
+ updatedBy: {
825
+ type: 'string',
826
+ description: 'Entity updated by who',
827
+ },
828
+ },
829
+ required: ['name', 'key', 'id'],
830
+ };
831
+ exports.UpdateNamespaceDtoSchema = {
832
+ type: 'object',
833
+ properties: {
834
+ data: {
835
+ type: 'string',
836
+ description: '额外数据',
837
+ },
838
+ desc: {
839
+ type: 'string',
840
+ description: '描述',
841
+ },
842
+ labels: {
843
+ description: '标签',
844
+ type: 'array',
845
+ items: {
846
+ type: 'string',
847
+ },
848
+ },
849
+ name: {
850
+ type: 'string',
851
+ description: '名称',
852
+ },
853
+ permissions: {
854
+ description: '权限',
855
+ type: 'array',
856
+ items: {
857
+ type: 'string',
858
+ },
859
+ },
860
+ active: {
861
+ type: 'boolean',
862
+ description: '是否启用',
863
+ },
864
+ defaultPassword: {
865
+ type: 'string',
866
+ description: '默认密码',
867
+ },
868
+ exportable: {
869
+ type: 'boolean',
870
+ description: '是否可导出',
871
+ },
872
+ userCount: {
873
+ type: 'number',
874
+ description: '人数',
875
+ },
876
+ },
877
+ };
878
+ exports.CreateSessionDtoSchema = {
879
+ type: 'object',
880
+ properties: {
881
+ uid: {
882
+ type: 'string',
883
+ description: '用户 ID',
884
+ },
885
+ acl: {
886
+ type: 'object',
887
+ description: '访问控制列表',
888
+ },
889
+ expireAt: {
890
+ format: 'date-time',
891
+ type: 'string',
892
+ description: '会话过期时间',
893
+ },
894
+ client: {
895
+ type: 'string',
896
+ description: '客户端/设备',
897
+ },
898
+ },
899
+ required: ['uid', 'expireAt'],
900
+ };
901
+ exports.SessionSchema = {
902
+ type: 'object',
903
+ properties: {
904
+ acl: {
905
+ type: 'object',
906
+ description: '访问控制列表',
907
+ },
908
+ expireAt: {
909
+ format: 'date-time',
910
+ type: 'string',
911
+ description: '会话过期时间',
912
+ },
913
+ key: {
914
+ type: 'string',
915
+ description: 'refresh token key',
916
+ },
917
+ user: {
918
+ description: '用户,实际存储 uid',
919
+ allOf: [
920
+ {
921
+ $ref: '#/components/schemas/User',
922
+ },
923
+ ],
924
+ },
925
+ client: {
926
+ type: 'string',
927
+ description: '客户端/设备',
928
+ },
929
+ id: {
930
+ type: 'string',
931
+ description: 'Entity id',
932
+ },
933
+ createdAt: {
934
+ format: 'date-time',
935
+ type: 'string',
936
+ description: 'Entity created at when',
937
+ },
938
+ updatedAt: {
939
+ format: 'date-time',
940
+ type: 'string',
941
+ description: 'Entity updated at when',
942
+ },
943
+ createdBy: {
944
+ type: 'string',
945
+ description: 'Entity created by who',
946
+ },
947
+ updatedBy: {
948
+ type: 'string',
949
+ description: 'Entity updated by who',
950
+ },
951
+ },
952
+ required: ['expireAt', 'key', 'user', 'id'],
953
+ };
954
+ exports.UpdateSessionDtoSchema = {
955
+ type: 'object',
956
+ properties: {
957
+ acl: {
958
+ type: 'object',
959
+ description: '访问控制列表',
960
+ },
961
+ expireAt: {
962
+ format: 'date-time',
963
+ type: 'string',
964
+ description: '会话过期时间',
965
+ },
966
+ client: {
967
+ type: 'string',
968
+ description: '客户端/设备',
969
+ },
970
+ uid: {
971
+ type: 'string',
972
+ description: '用户 ID',
973
+ },
974
+ },
975
+ };
976
+ exports.CreateGroupDtoSchema = {
977
+ type: 'object',
978
+ properties: {
979
+ data: {
980
+ type: 'string',
981
+ description: '额外数据',
982
+ },
983
+ name: {
984
+ type: 'string',
985
+ description: '名称',
986
+ },
987
+ permissions: {
988
+ description: '权限',
989
+ type: 'array',
990
+ items: {
991
+ type: 'string',
992
+ },
993
+ },
994
+ active: {
995
+ type: 'boolean',
996
+ description: '是否启用',
997
+ },
998
+ userCount: {
999
+ type: 'number',
1000
+ description: '人数',
1001
+ },
1002
+ },
1003
+ required: ['name'],
1004
+ };
1005
+ exports.GroupSchema = {
1006
+ type: 'object',
1007
+ properties: {
1008
+ data: {
1009
+ type: 'string',
1010
+ description: '额外数据',
1011
+ },
1012
+ name: {
1013
+ type: 'string',
1014
+ description: '名称',
1015
+ },
1016
+ permissions: {
1017
+ description: '权限',
1018
+ type: 'array',
1019
+ items: {
1020
+ type: 'string',
1021
+ },
1022
+ },
1023
+ active: {
1024
+ type: 'boolean',
1025
+ description: '是否启用',
1026
+ },
1027
+ userCount: {
1028
+ type: 'number',
1029
+ description: '人数',
1030
+ },
1031
+ id: {
1032
+ type: 'string',
1033
+ description: 'Entity id',
1034
+ },
1035
+ createdAt: {
1036
+ format: 'date-time',
1037
+ type: 'string',
1038
+ description: 'Entity created at when',
1039
+ },
1040
+ updatedAt: {
1041
+ format: 'date-time',
1042
+ type: 'string',
1043
+ description: 'Entity updated at when',
1044
+ },
1045
+ createdBy: {
1046
+ type: 'string',
1047
+ description: 'Entity created by who',
1048
+ },
1049
+ updatedBy: {
1050
+ type: 'string',
1051
+ description: 'Entity updated by who',
1052
+ },
1053
+ },
1054
+ required: ['name', 'id'],
1055
+ };
1056
+ exports.UpdateGroupDtoSchema = {
1057
+ type: 'object',
1058
+ properties: {
1059
+ data: {
1060
+ type: 'string',
1061
+ description: '额外数据',
1062
+ },
1063
+ name: {
1064
+ type: 'string',
1065
+ description: '名称',
1066
+ },
1067
+ permissions: {
1068
+ description: '权限',
1069
+ type: 'array',
1070
+ items: {
1071
+ type: 'string',
1072
+ },
1073
+ },
1074
+ active: {
1075
+ type: 'boolean',
1076
+ description: '是否启用',
1077
+ },
1078
+ userCount: {
1079
+ type: 'number',
1080
+ description: '人数',
1081
+ },
1082
+ },
1083
+ };
1084
+ exports.CreateCaptchaDtoSchema = {
1085
+ type: 'object',
1086
+ properties: {
1087
+ code: {
1088
+ type: 'string',
1089
+ description: '验证码',
1090
+ },
1091
+ expireAt: {
1092
+ format: 'date-time',
1093
+ type: 'string',
1094
+ description: '过期时间',
1095
+ },
1096
+ key: {
1097
+ type: 'string',
1098
+ description: 'key',
1099
+ },
1100
+ },
1101
+ required: ['key'],
1102
+ };
1103
+ exports.CaptchaSchema = {
1104
+ type: 'object',
1105
+ properties: {
1106
+ code: {
1107
+ type: 'string',
1108
+ description: '验证码',
1109
+ },
1110
+ expireAt: {
1111
+ format: 'date-time',
1112
+ type: 'string',
1113
+ description: '过期时间',
1114
+ },
1115
+ key: {
1116
+ type: 'string',
1117
+ description: 'key',
1118
+ },
1119
+ id: {
1120
+ type: 'string',
1121
+ description: 'Entity id',
1122
+ },
1123
+ createdAt: {
1124
+ format: 'date-time',
1125
+ type: 'string',
1126
+ description: 'Entity created at when',
1127
+ },
1128
+ updatedAt: {
1129
+ format: 'date-time',
1130
+ type: 'string',
1131
+ description: 'Entity updated at when',
1132
+ },
1133
+ createdBy: {
1134
+ type: 'string',
1135
+ description: 'Entity created by who',
1136
+ },
1137
+ updatedBy: {
1138
+ type: 'string',
1139
+ description: 'Entity updated by who',
1140
+ },
1141
+ },
1142
+ required: ['code', 'expireAt', 'key', 'id'],
1143
+ };
1144
+ exports.UpdateCaptchaDtoSchema = {
1145
+ type: 'object',
1146
+ properties: {
1147
+ code: {
1148
+ type: 'string',
1149
+ description: '验证码',
1150
+ },
1151
+ expireAt: {
1152
+ format: 'date-time',
1153
+ type: 'string',
1154
+ description: '过期时间',
1155
+ },
1156
+ key: {
1157
+ type: 'string',
1158
+ description: 'key',
1159
+ },
1160
+ },
1161
+ };
1162
+ exports.SendEmailDtoSchema = {
1163
+ type: 'object',
1164
+ properties: {
1165
+ from: {
1166
+ type: 'string',
1167
+ },
1168
+ to: {
1169
+ type: 'string',
1170
+ },
1171
+ subject: {
1172
+ type: 'string',
1173
+ },
1174
+ content: {
1175
+ type: 'string',
1176
+ },
1177
+ },
1178
+ required: ['from', 'to', 'subject', 'content'],
1179
+ };
1180
+ exports.EmailStatusSchema = {
1181
+ type: 'string',
1182
+ description: '发送状态',
1183
+ enum: ['pending', 'sent'],
1184
+ };
1185
+ exports.CreateEmailRecordDtoSchema = {
1186
+ type: 'object',
1187
+ properties: {
1188
+ status: {
1189
+ $ref: '#/components/schemas/EmailStatus',
1190
+ },
1191
+ from: {
1192
+ type: 'string',
1193
+ description: '发件者',
1194
+ },
1195
+ to: {
1196
+ type: 'string',
1197
+ description: '收件者',
1198
+ },
1199
+ subject: {
1200
+ type: 'string',
1201
+ description: '主题',
1202
+ },
1203
+ content: {
1204
+ type: 'string',
1205
+ description: '内容',
1206
+ },
1207
+ sentAt: {
1208
+ format: 'date-time',
1209
+ type: 'string',
1210
+ description: '发送时间',
1211
+ },
1212
+ },
1213
+ required: ['status', 'from', 'to', 'subject', 'content'],
1214
+ };
1215
+ exports.EmailRecordSchema = {
1216
+ type: 'object',
1217
+ properties: {
1218
+ status: {
1219
+ $ref: '#/components/schemas/EmailStatus',
1220
+ },
1221
+ from: {
1222
+ type: 'string',
1223
+ description: '发件者',
1224
+ },
1225
+ to: {
1226
+ type: 'string',
1227
+ description: '收件者',
1228
+ },
1229
+ subject: {
1230
+ type: 'string',
1231
+ description: '主题',
1232
+ },
1233
+ content: {
1234
+ type: 'string',
1235
+ description: '内容',
1236
+ },
1237
+ sentAt: {
1238
+ format: 'date-time',
1239
+ type: 'string',
1240
+ description: '发送时间',
1241
+ },
1242
+ id: {
1243
+ type: 'string',
1244
+ description: 'Entity id',
1245
+ },
1246
+ createdAt: {
1247
+ format: 'date-time',
1248
+ type: 'string',
1249
+ description: 'Entity created at when',
1250
+ },
1251
+ updatedAt: {
1252
+ format: 'date-time',
1253
+ type: 'string',
1254
+ description: 'Entity updated at when',
1255
+ },
1256
+ createdBy: {
1257
+ type: 'string',
1258
+ description: 'Entity created by who',
1259
+ },
1260
+ updatedBy: {
1261
+ type: 'string',
1262
+ description: 'Entity updated by who',
1263
+ },
1264
+ },
1265
+ required: ['status', 'from', 'to', 'subject', 'content', 'id'],
1266
+ };
1267
+ exports.UpdateEmailRecordDtoSchema = {
1268
+ type: 'object',
1269
+ properties: {
1270
+ status: {
1271
+ $ref: '#/components/schemas/EmailStatus',
1272
+ },
1273
+ from: {
1274
+ type: 'string',
1275
+ description: '发件者',
1276
+ },
1277
+ to: {
1278
+ type: 'string',
1279
+ description: '收件者',
1280
+ },
1281
+ subject: {
1282
+ type: 'string',
1283
+ description: '主题',
1284
+ },
1285
+ content: {
1286
+ type: 'string',
1287
+ description: '内容',
1288
+ },
1289
+ sentAt: {
1290
+ format: 'date-time',
1291
+ type: 'string',
1292
+ description: '发送时间',
1293
+ },
1294
+ },
1295
+ };
1296
+ exports.SendSmsDtoSchema = {
1297
+ type: 'object',
1298
+ properties: {
1299
+ phone: {
1300
+ type: 'string',
1301
+ },
1302
+ sign: {
1303
+ type: 'string',
1304
+ },
1305
+ template: {
1306
+ type: 'string',
1307
+ },
1308
+ params: {
1309
+ type: 'object',
1310
+ },
1311
+ },
1312
+ required: ['phone', 'sign', 'template'],
1313
+ };
1314
+ exports.SmsStatusSchema = {
1315
+ type: 'string',
1316
+ description: '发送状态',
1317
+ enum: ['pending', 'sent'],
1318
+ };
1319
+ exports.CreateSmsRecordDtoSchema = {
1320
+ type: 'object',
1321
+ properties: {
1322
+ status: {
1323
+ $ref: '#/components/schemas/SmsStatus',
1324
+ },
1325
+ phone: {
1326
+ type: 'string',
1327
+ description: '手机号',
1328
+ },
1329
+ sign: {
1330
+ type: 'string',
1331
+ description: '签名',
1332
+ },
1333
+ template: {
1334
+ type: 'string',
1335
+ description: '模板',
1336
+ },
1337
+ params: {
1338
+ type: 'string',
1339
+ description: '参数',
1340
+ },
1341
+ sentAt: {
1342
+ format: 'date-time',
1343
+ type: 'string',
1344
+ description: '发送时间',
1345
+ },
1346
+ },
1347
+ required: ['status', 'phone', 'sign', 'template'],
1348
+ };
1349
+ exports.SmsRecordSchema = {
1350
+ type: 'object',
1351
+ properties: {
1352
+ status: {
1353
+ $ref: '#/components/schemas/SmsStatus',
1354
+ },
1355
+ phone: {
1356
+ type: 'string',
1357
+ description: '手机号',
1358
+ },
1359
+ sign: {
1360
+ type: 'string',
1361
+ description: '签名',
1362
+ },
1363
+ template: {
1364
+ type: 'string',
1365
+ description: '模板',
1366
+ },
1367
+ params: {
1368
+ type: 'string',
1369
+ description: '参数',
1370
+ },
1371
+ sentAt: {
1372
+ format: 'date-time',
1373
+ type: 'string',
1374
+ description: '发送时间',
1375
+ },
1376
+ id: {
1377
+ type: 'string',
1378
+ description: 'Entity id',
1379
+ },
1380
+ createdAt: {
1381
+ format: 'date-time',
1382
+ type: 'string',
1383
+ description: 'Entity created at when',
1384
+ },
1385
+ updatedAt: {
1386
+ format: 'date-time',
1387
+ type: 'string',
1388
+ description: 'Entity updated at when',
1389
+ },
1390
+ createdBy: {
1391
+ type: 'string',
1392
+ description: 'Entity created by who',
1393
+ },
1394
+ updatedBy: {
1395
+ type: 'string',
1396
+ description: 'Entity updated by who',
1397
+ },
1398
+ },
1399
+ required: ['status', 'phone', 'sign', 'template', 'id'],
1400
+ };
1401
+ exports.UpdateSmsRecordDtoSchema = {
1402
+ type: 'object',
1403
+ properties: {
1404
+ status: {
1405
+ $ref: '#/components/schemas/SmsStatus',
1406
+ },
1407
+ phone: {
1408
+ type: 'string',
1409
+ description: '手机号',
1410
+ },
1411
+ sign: {
1412
+ type: 'string',
1413
+ description: '签名',
1414
+ },
1415
+ template: {
1416
+ type: 'string',
1417
+ description: '模板',
1418
+ },
1419
+ params: {
1420
+ type: 'string',
1421
+ description: '参数',
1422
+ },
1423
+ sentAt: {
1424
+ format: 'date-time',
1425
+ type: 'string',
1426
+ description: '发送时间',
1427
+ },
1428
+ },
1429
+ };
1430
+ exports.IndustrySchema = {
1431
+ type: 'object',
1432
+ properties: {
1433
+ code: {
1434
+ type: 'string',
1435
+ description: '编码',
1436
+ },
1437
+ name: {
1438
+ type: 'string',
1439
+ description: '名称',
1440
+ },
1441
+ children: {
1442
+ description: '子集',
1443
+ type: 'array',
1444
+ items: {
1445
+ $ref: '#/components/schemas/Industry',
1446
+ },
1447
+ },
1448
+ },
1449
+ required: ['code', 'name', 'children'],
1450
+ };
1451
+ exports.RegionSchema = {
1452
+ type: 'object',
1453
+ properties: {
1454
+ code: {
1455
+ type: 'string',
1456
+ description: '缩写',
1457
+ },
1458
+ nameZh: {
1459
+ type: 'string',
1460
+ description: '中文名称',
1461
+ },
1462
+ namePinyin: {
1463
+ type: 'string',
1464
+ description: '中文拼音',
1465
+ },
1466
+ nameEn: {
1467
+ type: 'string',
1468
+ description: '英文名称',
1469
+ },
1470
+ dialingPrefix: {
1471
+ type: 'string',
1472
+ description: '电话前缀',
1473
+ },
1474
+ },
1475
+ required: ['code', 'nameZh', 'namePinyin', 'nameEn', 'dialingPrefix'],
1476
+ };
1477
+ exports.CreateRoleDtoSchema = {
1478
+ type: 'object',
1479
+ properties: {
1480
+ permissions: {
1481
+ description: '权限',
1482
+ type: 'array',
1483
+ items: {
1484
+ type: 'string',
1485
+ },
1486
+ },
1487
+ key: {
1488
+ type: 'string',
1489
+ description: 'role key',
1490
+ },
1491
+ name: {
1492
+ type: 'string',
1493
+ description: '名称',
1494
+ },
1495
+ },
1496
+ required: ['key', 'name'],
1497
+ };
1498
+ exports.RoleSchema = {
1499
+ type: 'object',
1500
+ properties: {
1501
+ key: {
1502
+ type: 'string',
1503
+ description: 'role key',
1504
+ },
1505
+ name: {
1506
+ type: 'string',
1507
+ description: '名称',
1508
+ },
1509
+ permissions: {
1510
+ description: '权限',
1511
+ type: 'array',
1512
+ items: {
1513
+ type: 'string',
1514
+ },
1515
+ },
1516
+ id: {
1517
+ type: 'string',
1518
+ description: 'Entity id',
1519
+ },
1520
+ createdAt: {
1521
+ format: 'date-time',
1522
+ type: 'string',
1523
+ description: 'Entity created at when',
1524
+ },
1525
+ updatedAt: {
1526
+ format: 'date-time',
1527
+ type: 'string',
1528
+ description: 'Entity updated at when',
1529
+ },
1530
+ createdBy: {
1531
+ type: 'string',
1532
+ description: 'Entity created by who',
1533
+ },
1534
+ updatedBy: {
1535
+ type: 'string',
1536
+ description: 'Entity updated by who',
1537
+ },
1538
+ },
1539
+ required: ['key', 'name', 'permissions', 'id'],
1540
+ };
1541
+ exports.UpdateRoleDtoSchema = {
1542
+ type: 'object',
1543
+ properties: {
1544
+ name: {
1545
+ type: 'string',
1546
+ description: '名称',
1547
+ },
1548
+ permissions: {
1549
+ description: '权限',
1550
+ type: 'array',
1551
+ items: {
1552
+ type: 'string',
1553
+ },
1554
+ },
1555
+ },
1556
+ };
1557
+ //# sourceMappingURL=schemas.gen.js.map