@36node/auth-sdk 1.6.5 → 2.0.1

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