@tachybase/module-auth 0.23.8

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.
Files changed (95) hide show
  1. package/.turbo/turbo-build.log +14 -0
  2. package/README.md +117 -0
  3. package/client.d.ts +2 -0
  4. package/client.js +65 -0
  5. package/dist/client/AuthProvider.d.ts +2 -0
  6. package/dist/client/authenticator.d.ts +12 -0
  7. package/dist/client/basic/Options.d.ts +2 -0
  8. package/dist/client/basic/SignInForm.d.ts +9 -0
  9. package/dist/client/basic/SignUpForm.d.ts +13 -0
  10. package/dist/client/basic/index.d.ts +3 -0
  11. package/dist/client/bind/AuthenticatorBind.d.ts +2 -0
  12. package/dist/client/bind/BindForm.d.ts +5 -0
  13. package/dist/client/bind/schemas/authenticators.d.ts +2 -0
  14. package/dist/client/index.d.ts +30 -0
  15. package/dist/client/index.js +22 -0
  16. package/dist/client/locale/index.d.ts +2 -0
  17. package/dist/client/pages/AuthLayout.d.ts +2 -0
  18. package/dist/client/pages/SignInPage.d.ts +13 -0
  19. package/dist/client/pages/SignUpPage.d.ts +20 -0
  20. package/dist/client/pages/index.d.ts +3 -0
  21. package/dist/client/settings/Authenticator.d.ts +2 -0
  22. package/dist/client/settings/Options.d.ts +4 -0
  23. package/dist/client/settings/authType.d.ts +15 -0
  24. package/dist/client/settings/schemas/authenticators.d.ts +3 -0
  25. package/dist/externalVersion.js +16 -0
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.js +40 -0
  28. package/dist/locale/en-US.json +31 -0
  29. package/dist/locale/ko_KR.json +26 -0
  30. package/dist/locale/zh-CN.json +31 -0
  31. package/dist/node_modules/cron/LICENSE +8 -0
  32. package/dist/node_modules/cron/dist/constants.d.ts +74 -0
  33. package/dist/node_modules/cron/dist/constants.js +78 -0
  34. package/dist/node_modules/cron/dist/errors.d.ts +5 -0
  35. package/dist/node_modules/cron/dist/errors.js +13 -0
  36. package/dist/node_modules/cron/dist/index.d.ts +6 -0
  37. package/dist/node_modules/cron/dist/index.js +1 -0
  38. package/dist/node_modules/cron/dist/job.d.ts +30 -0
  39. package/dist/node_modules/cron/dist/job.js +222 -0
  40. package/dist/node_modules/cron/dist/time.d.ts +33 -0
  41. package/dist/node_modules/cron/dist/time.js +444 -0
  42. package/dist/node_modules/cron/dist/types/cron.types.d.ts +50 -0
  43. package/dist/node_modules/cron/dist/types/cron.types.js +3 -0
  44. package/dist/node_modules/cron/dist/types/utils.d.ts +3 -0
  45. package/dist/node_modules/cron/dist/types/utils.js +3 -0
  46. package/dist/node_modules/cron/dist/utils.d.ts +2 -0
  47. package/dist/node_modules/cron/dist/utils.js +8 -0
  48. package/dist/node_modules/cron/package.json +1 -0
  49. package/dist/preset.d.ts +3 -0
  50. package/dist/preset.js +34 -0
  51. package/dist/server/actions/auth.d.ts +8 -0
  52. package/dist/server/actions/auth.js +40 -0
  53. package/dist/server/actions/authenticators.d.ts +10 -0
  54. package/dist/server/actions/authenticators.js +153 -0
  55. package/dist/server/basic-auth.d.ts +10 -0
  56. package/dist/server/basic-auth.js +176 -0
  57. package/dist/server/collections/authenticators.d.ts +5 -0
  58. package/dist/server/collections/authenticators.js +117 -0
  59. package/dist/server/collections/token-blacklist.d.ts +2 -0
  60. package/dist/server/collections/token-blacklist.js +42 -0
  61. package/dist/server/collections/users-authenticators.d.ts +6 -0
  62. package/dist/server/collections/users-authenticators.js +85 -0
  63. package/dist/server/index.d.ts +3 -0
  64. package/dist/server/index.js +42 -0
  65. package/dist/server/locale/en-US.d.ts +9 -0
  66. package/dist/server/locale/en-US.js +30 -0
  67. package/dist/server/locale/fr-FR.d.ts +9 -0
  68. package/dist/server/locale/fr-FR.js +30 -0
  69. package/dist/server/locale/index.d.ts +3 -0
  70. package/dist/server/locale/index.js +43 -0
  71. package/dist/server/locale/ja-JP.d.ts +5 -0
  72. package/dist/server/locale/ja-JP.js +26 -0
  73. package/dist/server/locale/pt-BR.d.ts +9 -0
  74. package/dist/server/locale/pt-BR.js +30 -0
  75. package/dist/server/locale/zh-CN.d.ts +11 -0
  76. package/dist/server/locale/zh-CN.js +32 -0
  77. package/dist/server/migrations/20230506152253-basic-authenticator.d.ts +6 -0
  78. package/dist/server/migrations/20230506152253-basic-authenticator.js +44 -0
  79. package/dist/server/migrations/20230607174500-update-basic.d.ts +6 -0
  80. package/dist/server/migrations/20230607174500-update-basic.js +47 -0
  81. package/dist/server/migrations/20231218132032-fix-allow-signup.d.ts +6 -0
  82. package/dist/server/migrations/20231218132032-fix-allow-signup.js +55 -0
  83. package/dist/server/model/authenticator.d.ts +10 -0
  84. package/dist/server/model/authenticator.js +81 -0
  85. package/dist/server/plugin.d.ts +11 -0
  86. package/dist/server/plugin.js +132 -0
  87. package/dist/server/storer.d.ts +16 -0
  88. package/dist/server/storer.js +69 -0
  89. package/dist/server/token-blacklist.d.ts +17 -0
  90. package/dist/server/token-blacklist.js +86 -0
  91. package/dist/swagger/index.d.ts +754 -0
  92. package/dist/swagger/index.js +787 -0
  93. package/package.json +34 -0
  94. package/server.d.ts +2 -0
  95. package/server.js +65 -0
@@ -0,0 +1,754 @@
1
+ declare const _default: {
2
+ info: {
3
+ title: string;
4
+ };
5
+ paths: {
6
+ '/auth:check': {
7
+ get: {
8
+ description: string;
9
+ tags: string[];
10
+ parameters: {
11
+ name: string;
12
+ description: string;
13
+ in: string;
14
+ schema: {
15
+ type: string;
16
+ default: string;
17
+ };
18
+ }[];
19
+ security: any[];
20
+ responses: {
21
+ 200: {
22
+ description: string;
23
+ content: {
24
+ 'application/json': {
25
+ schema: {
26
+ allOf: ({
27
+ $ref: string;
28
+ type?: undefined;
29
+ properties?: undefined;
30
+ } | {
31
+ type: string;
32
+ properties: {
33
+ roles: {
34
+ $ref: string;
35
+ };
36
+ };
37
+ $ref?: undefined;
38
+ })[];
39
+ };
40
+ };
41
+ };
42
+ };
43
+ };
44
+ };
45
+ };
46
+ '/auth:signIn': {
47
+ post: {
48
+ description: string;
49
+ tags: string[];
50
+ security: any[];
51
+ parameters: {
52
+ name: string;
53
+ description: string;
54
+ in: string;
55
+ schema: {
56
+ type: string;
57
+ default: string;
58
+ };
59
+ }[];
60
+ requestBody: {
61
+ content: {
62
+ 'application/json': {
63
+ schema: {
64
+ type: string;
65
+ properties: {
66
+ email: {
67
+ type: string;
68
+ description: string;
69
+ };
70
+ password: {
71
+ type: string;
72
+ description: string;
73
+ };
74
+ };
75
+ };
76
+ };
77
+ };
78
+ };
79
+ responses: {
80
+ 200: {
81
+ description: string;
82
+ content: {
83
+ 'application/json': {
84
+ schema: {
85
+ type: string;
86
+ properties: {
87
+ token: {
88
+ type: string;
89
+ };
90
+ user: {
91
+ $ref: string;
92
+ };
93
+ };
94
+ };
95
+ };
96
+ };
97
+ };
98
+ 401: {
99
+ description: string;
100
+ content: {
101
+ 'application/json': {
102
+ schema: {
103
+ $ref: string;
104
+ };
105
+ };
106
+ };
107
+ };
108
+ };
109
+ };
110
+ };
111
+ '/auth:signUp': {
112
+ post: {
113
+ description: string;
114
+ tags: string[];
115
+ security: any[];
116
+ requestBody: {
117
+ content: {
118
+ 'application/json': {
119
+ schema: {
120
+ type: string;
121
+ properties: {
122
+ email: {
123
+ type: string;
124
+ description: string;
125
+ };
126
+ password: {
127
+ type: string;
128
+ description: string;
129
+ };
130
+ confirm_password: {
131
+ type: string;
132
+ description: string;
133
+ };
134
+ };
135
+ };
136
+ };
137
+ };
138
+ };
139
+ responses: {
140
+ 200: {
141
+ description: string;
142
+ };
143
+ };
144
+ };
145
+ };
146
+ '/auth:signOut': {
147
+ post: {
148
+ description: string;
149
+ tags: string[];
150
+ security: any[];
151
+ responses: {
152
+ 200: {
153
+ description: string;
154
+ };
155
+ };
156
+ };
157
+ };
158
+ '/auth:lostPassword': {
159
+ post: {
160
+ description: string;
161
+ tags: string[];
162
+ security: any[];
163
+ requestBody: {
164
+ content: {
165
+ 'application/json': {
166
+ schema: {
167
+ type: string;
168
+ properties: {
169
+ email: {
170
+ type: string;
171
+ description: string;
172
+ };
173
+ };
174
+ };
175
+ };
176
+ };
177
+ };
178
+ responses: {
179
+ 200: {
180
+ description: string;
181
+ content: {
182
+ 'application/json': {
183
+ schema: {
184
+ allOf: ({
185
+ $ref: string;
186
+ type?: undefined;
187
+ properties?: undefined;
188
+ } | {
189
+ type: string;
190
+ properties: {
191
+ resetToken: {
192
+ type: string;
193
+ description: string;
194
+ };
195
+ };
196
+ $ref?: undefined;
197
+ })[];
198
+ };
199
+ };
200
+ };
201
+ };
202
+ 400: {
203
+ description: string;
204
+ content: {
205
+ 'application/json': {
206
+ schema: {
207
+ $ref: string;
208
+ };
209
+ };
210
+ };
211
+ };
212
+ 401: {
213
+ description: string;
214
+ content: {
215
+ 'application/json': {
216
+ schema: {
217
+ $ref: string;
218
+ };
219
+ };
220
+ };
221
+ };
222
+ };
223
+ };
224
+ };
225
+ '/auth:resetPassword': {
226
+ post: {
227
+ description: string;
228
+ tags: string[];
229
+ security: any[];
230
+ requestBody: {
231
+ content: {
232
+ 'application/json': {
233
+ schema: {
234
+ type: string;
235
+ properties: {
236
+ email: {
237
+ type: string;
238
+ description: string;
239
+ };
240
+ password: {
241
+ type: string;
242
+ description: string;
243
+ };
244
+ resetToken: {
245
+ type: string;
246
+ description: string;
247
+ };
248
+ };
249
+ };
250
+ };
251
+ };
252
+ };
253
+ responses: {
254
+ 200: {
255
+ description: string;
256
+ content: {
257
+ 'application/json': {
258
+ schema: {
259
+ $ref: string;
260
+ };
261
+ };
262
+ };
263
+ };
264
+ 404: {
265
+ description: string;
266
+ content: {
267
+ 'application/json': {
268
+ schema: {
269
+ $ref: string;
270
+ };
271
+ };
272
+ };
273
+ };
274
+ };
275
+ };
276
+ };
277
+ '/auth:getUserByResetToken': {
278
+ get: {
279
+ description: string;
280
+ tags: string[];
281
+ security: any[];
282
+ parameters: {
283
+ name: string;
284
+ in: string;
285
+ description: string;
286
+ required: boolean;
287
+ schema: {
288
+ type: string;
289
+ };
290
+ }[];
291
+ responses: {
292
+ 200: {
293
+ description: string;
294
+ content: {
295
+ 'application/json': {
296
+ schema: {
297
+ $ref: string;
298
+ };
299
+ };
300
+ };
301
+ };
302
+ 401: {
303
+ description: string;
304
+ content: {
305
+ 'application/json': {
306
+ schema: {
307
+ $ref: string;
308
+ };
309
+ };
310
+ };
311
+ };
312
+ };
313
+ };
314
+ };
315
+ '/auth:changePassword': {
316
+ post: {
317
+ description: string;
318
+ tags: string[];
319
+ security: any[];
320
+ requestBody: {
321
+ content: {
322
+ 'application/json': {
323
+ schema: {
324
+ type: string;
325
+ properties: {
326
+ oldPassword: {
327
+ type: string;
328
+ description: string;
329
+ };
330
+ newPassword: {
331
+ type: string;
332
+ description: string;
333
+ };
334
+ confirmPassword: {
335
+ type: string;
336
+ description: string;
337
+ };
338
+ };
339
+ };
340
+ };
341
+ };
342
+ };
343
+ responses: {
344
+ 200: {
345
+ description: string;
346
+ content: {
347
+ 'application/json': {
348
+ schema: {
349
+ $ref: string;
350
+ };
351
+ };
352
+ };
353
+ };
354
+ 401: {
355
+ description: string;
356
+ content: {
357
+ 'application/json': {
358
+ schema: {
359
+ $ref: string;
360
+ };
361
+ };
362
+ };
363
+ };
364
+ };
365
+ };
366
+ };
367
+ 'authenticators:listTypes': {
368
+ get: {
369
+ description: string;
370
+ tags: string[];
371
+ responses: {
372
+ 200: {
373
+ description: string;
374
+ content: {
375
+ 'application/json': {
376
+ schema: {
377
+ type: string;
378
+ items: {
379
+ type: string;
380
+ };
381
+ };
382
+ };
383
+ };
384
+ };
385
+ };
386
+ };
387
+ };
388
+ 'authenticators:publicList': {
389
+ get: {
390
+ description: string;
391
+ tags: string[];
392
+ security: any[];
393
+ responses: {
394
+ 200: {
395
+ description: string;
396
+ content: {
397
+ 'application/json': {
398
+ schema: {
399
+ type: string;
400
+ items: {
401
+ type: string;
402
+ properties: {
403
+ name: {
404
+ type: string;
405
+ description: string;
406
+ };
407
+ title: {
408
+ type: string;
409
+ description: string;
410
+ };
411
+ authType: {
412
+ type: string;
413
+ description: string;
414
+ };
415
+ options: {
416
+ type: string;
417
+ description: string;
418
+ };
419
+ };
420
+ };
421
+ };
422
+ };
423
+ };
424
+ };
425
+ };
426
+ };
427
+ };
428
+ 'authenticators:create': {
429
+ post: {
430
+ description: string;
431
+ tags: string[];
432
+ requestBody: {
433
+ content: {
434
+ 'application/json': {
435
+ schema: {
436
+ type: string;
437
+ properties: {
438
+ name: {
439
+ type: string;
440
+ description: string;
441
+ };
442
+ authType: {
443
+ type: string;
444
+ description: string;
445
+ };
446
+ options: {
447
+ type: string;
448
+ description: string;
449
+ };
450
+ };
451
+ };
452
+ };
453
+ };
454
+ };
455
+ responses: {
456
+ 200: {
457
+ description: string;
458
+ content: {
459
+ 'application/json': {
460
+ schema: {
461
+ $ref: string;
462
+ };
463
+ };
464
+ };
465
+ };
466
+ };
467
+ };
468
+ };
469
+ 'authenticators:list': {
470
+ get: {
471
+ description: string;
472
+ tags: string[];
473
+ responses: {
474
+ 200: {
475
+ description: string;
476
+ content: {
477
+ 'application/json': {
478
+ schema: {
479
+ type: string;
480
+ items: {
481
+ $ref: string;
482
+ };
483
+ };
484
+ };
485
+ };
486
+ };
487
+ };
488
+ };
489
+ };
490
+ 'authenticators:get': {
491
+ get: {
492
+ description: string;
493
+ tags: string[];
494
+ parameters: {
495
+ name: string;
496
+ in: string;
497
+ description: string;
498
+ required: boolean;
499
+ schema: {
500
+ type: string;
501
+ };
502
+ }[];
503
+ responses: {
504
+ 200: {
505
+ description: string;
506
+ content: {
507
+ 'application/json': {
508
+ schema: {
509
+ $ref: string;
510
+ };
511
+ };
512
+ };
513
+ };
514
+ };
515
+ };
516
+ };
517
+ 'authenticators:update': {
518
+ post: {
519
+ description: string;
520
+ tags: string[];
521
+ parameters: {
522
+ name: string;
523
+ in: string;
524
+ description: string;
525
+ required: boolean;
526
+ schema: {
527
+ type: string;
528
+ };
529
+ }[];
530
+ requestBody: {
531
+ content: {
532
+ 'application/json': {
533
+ schema: {
534
+ $ref: string;
535
+ };
536
+ };
537
+ };
538
+ };
539
+ responses: {
540
+ 200: {
541
+ description: string;
542
+ content: {
543
+ 'application/json': {
544
+ schema: {
545
+ $ref: string;
546
+ };
547
+ };
548
+ };
549
+ };
550
+ };
551
+ };
552
+ };
553
+ 'authenticators:destroy': {
554
+ post: {
555
+ description: string;
556
+ tags: string[];
557
+ parameters: {
558
+ name: string;
559
+ in: string;
560
+ description: string;
561
+ required: boolean;
562
+ schema: {
563
+ type: string;
564
+ };
565
+ }[];
566
+ responses: {
567
+ 200: {
568
+ description: string;
569
+ };
570
+ };
571
+ };
572
+ };
573
+ };
574
+ components: {
575
+ schemas: {
576
+ user: {
577
+ type: string;
578
+ description: string;
579
+ properties: {
580
+ id: {
581
+ type: string;
582
+ description: string;
583
+ };
584
+ nickname: {
585
+ type: string;
586
+ description: string;
587
+ };
588
+ email: {
589
+ type: string;
590
+ description: string;
591
+ };
592
+ phone: {
593
+ type: string;
594
+ description: string;
595
+ };
596
+ appLang: {
597
+ type: string;
598
+ description: string;
599
+ };
600
+ systemSettings: {
601
+ type: string;
602
+ description: string;
603
+ properties: {
604
+ theme: {
605
+ type: string;
606
+ description: string;
607
+ };
608
+ };
609
+ };
610
+ createdAt: {
611
+ type: string;
612
+ format: string;
613
+ description: string;
614
+ };
615
+ updatedAt: {
616
+ type: string;
617
+ format: string;
618
+ description: string;
619
+ };
620
+ createdById: {
621
+ type: string;
622
+ description: string;
623
+ };
624
+ updatedById: {
625
+ type: string;
626
+ description: string;
627
+ };
628
+ };
629
+ };
630
+ roles: {
631
+ type: string;
632
+ description: string;
633
+ items: {
634
+ type: string;
635
+ properties: {
636
+ title: {
637
+ type: string;
638
+ description: string;
639
+ };
640
+ name: {
641
+ type: string;
642
+ description: string;
643
+ };
644
+ description: {
645
+ type: string;
646
+ description: string;
647
+ };
648
+ hidden: {
649
+ type: string;
650
+ description: string;
651
+ };
652
+ default: {
653
+ type: string;
654
+ description: string;
655
+ };
656
+ allowConfigure: {
657
+ type: string;
658
+ description: string;
659
+ };
660
+ allowNewMenu: {
661
+ type: string;
662
+ description: string;
663
+ };
664
+ snippets: {
665
+ type: string;
666
+ items: {
667
+ type: string;
668
+ };
669
+ description: string;
670
+ };
671
+ strategy: {
672
+ type: string;
673
+ description: string;
674
+ items: {
675
+ type: string;
676
+ properties: {
677
+ actions: {
678
+ type: string;
679
+ items: {
680
+ type: string;
681
+ };
682
+ description: string;
683
+ };
684
+ };
685
+ };
686
+ };
687
+ createdAt: {
688
+ type: string;
689
+ format: string;
690
+ description: string;
691
+ };
692
+ updatedAt: {
693
+ type: string;
694
+ format: string;
695
+ description: string;
696
+ };
697
+ };
698
+ };
699
+ };
700
+ authenticator: {
701
+ type: string;
702
+ properties: {
703
+ id: {
704
+ type: string;
705
+ description: string;
706
+ };
707
+ authType: {
708
+ type: string;
709
+ description: string;
710
+ };
711
+ name: {
712
+ type: string;
713
+ description: string;
714
+ };
715
+ title: {
716
+ type: string;
717
+ description: string;
718
+ };
719
+ options: {
720
+ type: string;
721
+ description: string;
722
+ };
723
+ description: {
724
+ type: string;
725
+ description: string;
726
+ };
727
+ enabled: {
728
+ type: string;
729
+ description: string;
730
+ };
731
+ createdAt: {
732
+ type: string;
733
+ format: string;
734
+ description: string;
735
+ };
736
+ updatedAt: {
737
+ type: string;
738
+ format: string;
739
+ description: string;
740
+ };
741
+ createdById: {
742
+ type: string;
743
+ description: string;
744
+ };
745
+ updatedById: {
746
+ type: string;
747
+ description: string;
748
+ };
749
+ };
750
+ };
751
+ };
752
+ };
753
+ };
754
+ export default _default;