@vestcards/server-types 1.0.1 → 1.1.0
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.
- package/dist/apps/server/src/app.d.ts +403 -22
- package/dist/apps/server/src/config/env.d.ts +3 -2
- package/dist/apps/server/src/modules/auth/index.d.ts +35 -4
- package/dist/apps/server/src/modules/auth/lib.d.ts +18 -7
- package/dist/apps/server/src/modules/auth/permissions/completed-profile.d.ts +1 -0
- package/dist/apps/server/src/modules/auth/permissions/entitlements.d.ts +1 -1
- package/dist/apps/server/src/modules/auth/permissions/permissions.d.ts +2 -65
- package/dist/apps/server/src/modules/card/index.d.ts +71 -5
- package/dist/apps/server/src/modules/card/model.d.ts +4 -0
- package/dist/apps/server/src/modules/card/service.d.ts +2 -0
- package/dist/apps/server/src/modules/deck/index.d.ts +42 -9
- package/dist/apps/server/src/modules/deck/model.d.ts +9 -4
- package/dist/apps/server/src/modules/deck/service.d.ts +4 -3
- package/dist/apps/server/src/modules/library/index.d.ts +55 -5
- package/dist/apps/server/src/modules/library/service.d.ts +4 -0
- package/dist/apps/server/src/modules/study/index.d.ts +87 -8
- package/dist/apps/server/src/modules/study/lib/fsrs.d.ts +1 -1
- package/dist/apps/server/src/modules/study/model.d.ts +7 -1
- package/dist/apps/server/src/modules/study/service.d.ts +22 -1
- package/dist/apps/server/src/modules/topic/index.d.ts +38 -7
- package/dist/apps/server/src/modules/user/index.d.ts +108 -5
- package/dist/apps/server/src/modules/user/model.d.ts +8 -0
- package/dist/apps/server/src/modules/user/service.d.ts +15 -0
- package/dist/apps/server/src/tests/helpers/auth-helpers.d.ts +1 -1
- package/dist/apps/server/src/tests/helpers/fixtures.d.ts +44 -2
- package/dist/apps/server/src/utils/select.d.ts +1 -1
- package/dist/packages/db-core/src/db.d.ts +4 -0
- package/dist/packages/db-core/src/index.d.ts +4 -0
- package/dist/{apps/server/src/db → packages/db-core/src}/schema/auth.d.ts +26 -9
- package/dist/packages/db-core/src/schema/blog.d.ts +219 -0
- package/dist/{apps/server/src/db → packages/db-core/src}/schema/entity.d.ts +2 -2
- package/dist/{apps/server/src/db → packages/db-core/src}/schema/index.d.ts +3 -0
- package/dist/packages/db-core/src/schema/organization.d.ts +158 -0
- package/dist/{apps/server/src/db → packages/db-core/src}/schema/payment.d.ts +18 -1
- package/dist/packages/db-core/src/schema/studyPlan.d.ts +511 -0
- package/dist/{apps/server/src/db → packages/db-core/src}/utils.d.ts +1 -0
- package/dist/packages/db-core/src/views/deck.d.ts +79 -0
- package/dist/packages/shared/src/date/format.d.ts +1 -0
- package/dist/packages/shared/src/eden.d.ts +43 -0
- package/dist/packages/shared/src/index.d.ts +1 -0
- package/dist/packages/shared/src/theme/data-colors.d.ts +2 -0
- package/dist/packages/shared/src/theme/index.d.ts +3 -0
- package/dist/packages/shared/src/theme/tokens/border.d.ts +11 -0
- package/dist/packages/shared/src/theme/tokens/colors.d.ts +356 -0
- package/dist/packages/shared/src/theme/utils.d.ts +7 -0
- package/dist/packages/shared/src/types/blog.d.ts +8 -0
- package/dist/packages/shared/src/types/deck.d.ts +2 -1
- package/dist/packages/shared/src/types/fsrs.d.ts +9 -8
- package/dist/packages/shared/src/types/index.d.ts +3 -0
- package/dist/packages/shared/src/types/permissions.d.ts +108 -0
- package/dist/packages/shared/src/types/studyPlan.d.ts +5 -0
- package/dist/packages/shared/src/types/subject.d.ts +19 -2
- package/package.json +1 -1
- package/dist/apps/server/src/db/index.d.ts +0 -6
- package/dist/apps/server/src/db/migrate.d.ts +0 -1
- package/dist/apps/server/src/db/types.d.ts +0 -2
- package/dist/apps/server/src/utils/uuid.d.ts +0 -1
- /package/dist/{apps/server/src/db → packages/db-core/src}/schema/data.d.ts +0 -0
- /package/dist/{apps/server/src/db → packages/db-core/src}/schema/deck.d.ts +0 -0
- /package/dist/{apps/server/src/db → packages/db-core/src}/schema/marketing.d.ts +0 -0
|
@@ -43,7 +43,7 @@ declare const app: Elysia<"", {
|
|
|
43
43
|
macro: Partial<{
|
|
44
44
|
readonly auth: boolean;
|
|
45
45
|
}> & Partial<{
|
|
46
|
-
readonly permission: import("
|
|
46
|
+
readonly permission: import("@vestcards/shared").Permission | undefined;
|
|
47
47
|
}>;
|
|
48
48
|
macroFn: {
|
|
49
49
|
readonly auth: {
|
|
@@ -65,7 +65,7 @@ declare const app: Elysia<"", {
|
|
|
65
65
|
route: string;
|
|
66
66
|
request: Request;
|
|
67
67
|
store: {};
|
|
68
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends
|
|
68
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
|
|
69
69
|
readonly 100: "Continue";
|
|
70
70
|
readonly 101: "Switching Protocols";
|
|
71
71
|
readonly 102: "Processing";
|
|
@@ -192,6 +192,7 @@ declare const app: Elysia<"", {
|
|
|
192
192
|
}[Code] : Code>;
|
|
193
193
|
}) => Promise<{
|
|
194
194
|
entitlements: import("@vestcards/shared").Entitlement[];
|
|
195
|
+
completedProfile: boolean;
|
|
195
196
|
user: {
|
|
196
197
|
id: string;
|
|
197
198
|
createdAt: Date;
|
|
@@ -206,6 +207,7 @@ declare const app: Elysia<"", {
|
|
|
206
207
|
};
|
|
207
208
|
session: {
|
|
208
209
|
entitlements: import("@vestcards/shared").Entitlement[];
|
|
210
|
+
completedProfile: boolean;
|
|
209
211
|
id: string;
|
|
210
212
|
createdAt: Date;
|
|
211
213
|
updatedAt: Date;
|
|
@@ -218,7 +220,7 @@ declare const app: Elysia<"", {
|
|
|
218
220
|
}>;
|
|
219
221
|
};
|
|
220
222
|
} & {
|
|
221
|
-
readonly permission: (permission?: import("
|
|
223
|
+
readonly permission: (permission?: import("@vestcards/shared").Permission) => {
|
|
222
224
|
readonly resolve: ({ request: { headers } }: {
|
|
223
225
|
body: unknown;
|
|
224
226
|
query: Record<string, string>;
|
|
@@ -237,7 +239,7 @@ declare const app: Elysia<"", {
|
|
|
237
239
|
route: string;
|
|
238
240
|
request: Request;
|
|
239
241
|
store: {};
|
|
240
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends
|
|
242
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
|
|
241
243
|
readonly 100: "Continue";
|
|
242
244
|
readonly 101: "Switching Protocols";
|
|
243
245
|
readonly 102: "Processing";
|
|
@@ -375,7 +377,100 @@ declare const app: Elysia<"", {
|
|
|
375
377
|
parser: {};
|
|
376
378
|
}, {
|
|
377
379
|
v1: {
|
|
378
|
-
|
|
380
|
+
auth: {
|
|
381
|
+
"validate-reset-token": {
|
|
382
|
+
get: {
|
|
383
|
+
body: unknown;
|
|
384
|
+
params: {};
|
|
385
|
+
query: {
|
|
386
|
+
token: string;
|
|
387
|
+
};
|
|
388
|
+
headers: unknown;
|
|
389
|
+
response: {
|
|
390
|
+
200: {
|
|
391
|
+
valid: boolean;
|
|
392
|
+
};
|
|
393
|
+
422: {
|
|
394
|
+
type: "validation";
|
|
395
|
+
on: string;
|
|
396
|
+
summary?: string;
|
|
397
|
+
message?: string;
|
|
398
|
+
found?: unknown;
|
|
399
|
+
property?: string;
|
|
400
|
+
expected?: string;
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
} & {
|
|
408
|
+
v1: {
|
|
409
|
+
card: {
|
|
410
|
+
v1: {
|
|
411
|
+
auth: {
|
|
412
|
+
"validate-reset-token": {
|
|
413
|
+
get: {
|
|
414
|
+
body: unknown;
|
|
415
|
+
params: {};
|
|
416
|
+
query: {
|
|
417
|
+
token: string;
|
|
418
|
+
};
|
|
419
|
+
headers: unknown;
|
|
420
|
+
response: {
|
|
421
|
+
200: {
|
|
422
|
+
valid: boolean;
|
|
423
|
+
};
|
|
424
|
+
422: {
|
|
425
|
+
type: "validation";
|
|
426
|
+
on: string;
|
|
427
|
+
summary?: string;
|
|
428
|
+
message?: string;
|
|
429
|
+
found?: unknown;
|
|
430
|
+
property?: string;
|
|
431
|
+
expected?: string;
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
} & {
|
|
441
|
+
v1: {
|
|
442
|
+
card: {
|
|
443
|
+
report: {
|
|
444
|
+
get: {
|
|
445
|
+
body: {};
|
|
446
|
+
params: {};
|
|
447
|
+
query: {
|
|
448
|
+
cardId: string;
|
|
449
|
+
};
|
|
450
|
+
headers: {};
|
|
451
|
+
response: {
|
|
452
|
+
200: {
|
|
453
|
+
type: string;
|
|
454
|
+
createdAt: Date;
|
|
455
|
+
updatedAt: Date;
|
|
456
|
+
userId: string;
|
|
457
|
+
status: "not-reviewed" | "card-updated" | "demand-rejected" | "card-removed";
|
|
458
|
+
cardId: string;
|
|
459
|
+
content: string;
|
|
460
|
+
} | null;
|
|
461
|
+
422: {
|
|
462
|
+
type: "validation";
|
|
463
|
+
on: string;
|
|
464
|
+
summary?: string;
|
|
465
|
+
message?: string;
|
|
466
|
+
found?: unknown;
|
|
467
|
+
property?: string;
|
|
468
|
+
expected?: string;
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
};
|
|
379
474
|
};
|
|
380
475
|
} & {
|
|
381
476
|
v1: {
|
|
@@ -410,25 +505,56 @@ declare const app: Elysia<"", {
|
|
|
410
505
|
};
|
|
411
506
|
} & {
|
|
412
507
|
v1: {
|
|
413
|
-
decks: {
|
|
508
|
+
decks: {
|
|
509
|
+
v1: {
|
|
510
|
+
auth: {
|
|
511
|
+
"validate-reset-token": {
|
|
512
|
+
get: {
|
|
513
|
+
body: unknown;
|
|
514
|
+
params: {};
|
|
515
|
+
query: {
|
|
516
|
+
token: string;
|
|
517
|
+
};
|
|
518
|
+
headers: unknown;
|
|
519
|
+
response: {
|
|
520
|
+
200: {
|
|
521
|
+
valid: boolean;
|
|
522
|
+
};
|
|
523
|
+
422: {
|
|
524
|
+
type: "validation";
|
|
525
|
+
on: string;
|
|
526
|
+
summary?: string;
|
|
527
|
+
message?: string;
|
|
528
|
+
found?: unknown;
|
|
529
|
+
property?: string;
|
|
530
|
+
expected?: string;
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
};
|
|
414
538
|
};
|
|
415
539
|
} & {
|
|
416
540
|
v1: {
|
|
417
541
|
decks: {
|
|
418
542
|
get: {
|
|
419
|
-
body:
|
|
543
|
+
body: {};
|
|
420
544
|
params: {};
|
|
421
545
|
query: {
|
|
422
546
|
sort?: string | undefined;
|
|
423
547
|
free?: boolean | undefined;
|
|
548
|
+
ownerId?: string | undefined;
|
|
424
549
|
order?: "asc" | "desc" | undefined;
|
|
425
550
|
q?: string | undefined;
|
|
426
|
-
|
|
427
|
-
|
|
551
|
+
ids?: string[] | undefined;
|
|
552
|
+
topicIds?: string[] | undefined;
|
|
553
|
+
subjects?: ("matemática" | "geografia" | "física" | "biologia" | "história" | "literatura" | "gramática" | "sociologia" | "química" | "filosofia" | "redação" | "artes" | "inglês")[] | undefined;
|
|
428
554
|
size: number;
|
|
429
555
|
page: number;
|
|
430
556
|
};
|
|
431
|
-
headers:
|
|
557
|
+
headers: {};
|
|
432
558
|
response: {
|
|
433
559
|
200: {
|
|
434
560
|
data: import("@vestcards/shared").IDeck[];
|
|
@@ -477,13 +603,42 @@ declare const app: Elysia<"", {
|
|
|
477
603
|
};
|
|
478
604
|
} & {
|
|
479
605
|
v1: {
|
|
480
|
-
topics: {
|
|
606
|
+
topics: {
|
|
607
|
+
v1: {
|
|
608
|
+
auth: {
|
|
609
|
+
"validate-reset-token": {
|
|
610
|
+
get: {
|
|
611
|
+
body: unknown;
|
|
612
|
+
params: {};
|
|
613
|
+
query: {
|
|
614
|
+
token: string;
|
|
615
|
+
};
|
|
616
|
+
headers: unknown;
|
|
617
|
+
response: {
|
|
618
|
+
200: {
|
|
619
|
+
valid: boolean;
|
|
620
|
+
};
|
|
621
|
+
422: {
|
|
622
|
+
type: "validation";
|
|
623
|
+
on: string;
|
|
624
|
+
summary?: string;
|
|
625
|
+
message?: string;
|
|
626
|
+
found?: unknown;
|
|
627
|
+
property?: string;
|
|
628
|
+
expected?: string;
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
};
|
|
481
636
|
};
|
|
482
637
|
} & {
|
|
483
638
|
v1: {
|
|
484
639
|
topics: {
|
|
485
640
|
get: {
|
|
486
|
-
body:
|
|
641
|
+
body: {};
|
|
487
642
|
params: {};
|
|
488
643
|
query: {
|
|
489
644
|
sort?: string | undefined;
|
|
@@ -493,7 +648,7 @@ declare const app: Elysia<"", {
|
|
|
493
648
|
size: number;
|
|
494
649
|
page: number;
|
|
495
650
|
};
|
|
496
|
-
headers:
|
|
651
|
+
headers: {};
|
|
497
652
|
response: {
|
|
498
653
|
200: {
|
|
499
654
|
data: import("@vestcards/shared").Topic[];
|
|
@@ -515,7 +670,36 @@ declare const app: Elysia<"", {
|
|
|
515
670
|
};
|
|
516
671
|
} & {
|
|
517
672
|
v1: {
|
|
518
|
-
study: {
|
|
673
|
+
study: {
|
|
674
|
+
v1: {
|
|
675
|
+
auth: {
|
|
676
|
+
"validate-reset-token": {
|
|
677
|
+
get: {
|
|
678
|
+
body: unknown;
|
|
679
|
+
params: {};
|
|
680
|
+
query: {
|
|
681
|
+
token: string;
|
|
682
|
+
};
|
|
683
|
+
headers: unknown;
|
|
684
|
+
response: {
|
|
685
|
+
200: {
|
|
686
|
+
valid: boolean;
|
|
687
|
+
};
|
|
688
|
+
422: {
|
|
689
|
+
type: "validation";
|
|
690
|
+
on: string;
|
|
691
|
+
summary?: string;
|
|
692
|
+
message?: string;
|
|
693
|
+
found?: unknown;
|
|
694
|
+
property?: string;
|
|
695
|
+
expected?: string;
|
|
696
|
+
};
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
};
|
|
701
|
+
};
|
|
702
|
+
};
|
|
519
703
|
};
|
|
520
704
|
} & {
|
|
521
705
|
v1: {
|
|
@@ -526,7 +710,7 @@ declare const app: Elysia<"", {
|
|
|
526
710
|
params: {};
|
|
527
711
|
query: {
|
|
528
712
|
id?: string | undefined;
|
|
529
|
-
type: "
|
|
713
|
+
type: "DECK" | "ALL" | "TOPIC" | "SUBJECT";
|
|
530
714
|
};
|
|
531
715
|
headers: {};
|
|
532
716
|
response: {
|
|
@@ -554,7 +738,7 @@ declare const app: Elysia<"", {
|
|
|
554
738
|
params: {};
|
|
555
739
|
query: {
|
|
556
740
|
id?: string | undefined;
|
|
557
|
-
type: "
|
|
741
|
+
type: "DECK" | "ALL" | "TOPIC" | "SUBJECT";
|
|
558
742
|
};
|
|
559
743
|
headers: {};
|
|
560
744
|
response: {
|
|
@@ -579,6 +763,54 @@ declare const app: Elysia<"", {
|
|
|
579
763
|
};
|
|
580
764
|
};
|
|
581
765
|
};
|
|
766
|
+
} & {
|
|
767
|
+
v1: {
|
|
768
|
+
study: {
|
|
769
|
+
context: {
|
|
770
|
+
get: {
|
|
771
|
+
body: {};
|
|
772
|
+
params: {};
|
|
773
|
+
query: {
|
|
774
|
+
id?: string | undefined;
|
|
775
|
+
type: "DECK" | "ALL" | "TOPIC" | "SUBJECT";
|
|
776
|
+
};
|
|
777
|
+
headers: {};
|
|
778
|
+
response: {
|
|
779
|
+
200: {
|
|
780
|
+
type: "ALL";
|
|
781
|
+
title: string;
|
|
782
|
+
subtitle: string;
|
|
783
|
+
icon: string;
|
|
784
|
+
} | {
|
|
785
|
+
type: "DECK";
|
|
786
|
+
title: string;
|
|
787
|
+
subtitle: string;
|
|
788
|
+
icon: string;
|
|
789
|
+
} | {
|
|
790
|
+
type: "TOPIC";
|
|
791
|
+
title: string;
|
|
792
|
+
subtitle: string;
|
|
793
|
+
icon: string;
|
|
794
|
+
} | {
|
|
795
|
+
type: "SUBJECT";
|
|
796
|
+
title: string;
|
|
797
|
+
subtitle: string;
|
|
798
|
+
icon: string;
|
|
799
|
+
};
|
|
800
|
+
422: {
|
|
801
|
+
type: "validation";
|
|
802
|
+
on: string;
|
|
803
|
+
summary?: string;
|
|
804
|
+
message?: string;
|
|
805
|
+
found?: unknown;
|
|
806
|
+
property?: string;
|
|
807
|
+
expected?: string;
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
};
|
|
582
814
|
} & {
|
|
583
815
|
v1: {
|
|
584
816
|
study: {
|
|
@@ -587,7 +819,7 @@ declare const app: Elysia<"", {
|
|
|
587
819
|
body: {
|
|
588
820
|
cardId: string;
|
|
589
821
|
userDeckStudyId: string;
|
|
590
|
-
grade: "Again" | "Hard" | "Good" | "Easy";
|
|
822
|
+
grade: "Manual" | "Again" | "Hard" | "Good" | "Easy";
|
|
591
823
|
reviewDurationInSeconds: number;
|
|
592
824
|
};
|
|
593
825
|
params: {};
|
|
@@ -613,7 +845,36 @@ declare const app: Elysia<"", {
|
|
|
613
845
|
};
|
|
614
846
|
} & {
|
|
615
847
|
v1: {
|
|
616
|
-
library: {
|
|
848
|
+
library: {
|
|
849
|
+
v1: {
|
|
850
|
+
auth: {
|
|
851
|
+
"validate-reset-token": {
|
|
852
|
+
get: {
|
|
853
|
+
body: unknown;
|
|
854
|
+
params: {};
|
|
855
|
+
query: {
|
|
856
|
+
token: string;
|
|
857
|
+
};
|
|
858
|
+
headers: unknown;
|
|
859
|
+
response: {
|
|
860
|
+
200: {
|
|
861
|
+
valid: boolean;
|
|
862
|
+
};
|
|
863
|
+
422: {
|
|
864
|
+
type: "validation";
|
|
865
|
+
on: string;
|
|
866
|
+
summary?: string;
|
|
867
|
+
message?: string;
|
|
868
|
+
found?: unknown;
|
|
869
|
+
property?: string;
|
|
870
|
+
expected?: string;
|
|
871
|
+
};
|
|
872
|
+
};
|
|
873
|
+
};
|
|
874
|
+
};
|
|
875
|
+
};
|
|
876
|
+
};
|
|
877
|
+
};
|
|
617
878
|
};
|
|
618
879
|
} & {
|
|
619
880
|
v1: {
|
|
@@ -629,6 +890,25 @@ declare const app: Elysia<"", {
|
|
|
629
890
|
};
|
|
630
891
|
};
|
|
631
892
|
};
|
|
893
|
+
} & {
|
|
894
|
+
v1: {
|
|
895
|
+
library: {
|
|
896
|
+
summary: {
|
|
897
|
+
get: {
|
|
898
|
+
body: {};
|
|
899
|
+
params: {};
|
|
900
|
+
query: {};
|
|
901
|
+
headers: {};
|
|
902
|
+
response: {
|
|
903
|
+
200: {
|
|
904
|
+
deckId: string;
|
|
905
|
+
inLibrary: boolean;
|
|
906
|
+
}[];
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
};
|
|
911
|
+
};
|
|
632
912
|
} & {
|
|
633
913
|
v1: {
|
|
634
914
|
library: {
|
|
@@ -776,7 +1056,36 @@ declare const app: Elysia<"", {
|
|
|
776
1056
|
};
|
|
777
1057
|
} & {
|
|
778
1058
|
v1: {
|
|
779
|
-
user: {
|
|
1059
|
+
user: {
|
|
1060
|
+
v1: {
|
|
1061
|
+
auth: {
|
|
1062
|
+
"validate-reset-token": {
|
|
1063
|
+
get: {
|
|
1064
|
+
body: unknown;
|
|
1065
|
+
params: {};
|
|
1066
|
+
query: {
|
|
1067
|
+
token: string;
|
|
1068
|
+
};
|
|
1069
|
+
headers: unknown;
|
|
1070
|
+
response: {
|
|
1071
|
+
200: {
|
|
1072
|
+
valid: boolean;
|
|
1073
|
+
};
|
|
1074
|
+
422: {
|
|
1075
|
+
type: "validation";
|
|
1076
|
+
on: string;
|
|
1077
|
+
summary?: string;
|
|
1078
|
+
message?: string;
|
|
1079
|
+
found?: unknown;
|
|
1080
|
+
property?: string;
|
|
1081
|
+
expected?: string;
|
|
1082
|
+
};
|
|
1083
|
+
};
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
780
1089
|
};
|
|
781
1090
|
} & {
|
|
782
1091
|
v1: {
|
|
@@ -795,6 +1104,7 @@ declare const app: Elysia<"", {
|
|
|
795
1104
|
email: string;
|
|
796
1105
|
image: string | null;
|
|
797
1106
|
role: import("@vestcards/shared").UserRole;
|
|
1107
|
+
goal: string | null;
|
|
798
1108
|
learnDailyLimit: number | null;
|
|
799
1109
|
universityId: number | null;
|
|
800
1110
|
universityName: string | null;
|
|
@@ -837,6 +1147,77 @@ declare const app: Elysia<"", {
|
|
|
837
1147
|
};
|
|
838
1148
|
};
|
|
839
1149
|
};
|
|
1150
|
+
} & {
|
|
1151
|
+
v1: {
|
|
1152
|
+
user: {
|
|
1153
|
+
account: {
|
|
1154
|
+
delete: {
|
|
1155
|
+
body: {};
|
|
1156
|
+
params: {};
|
|
1157
|
+
query: {};
|
|
1158
|
+
headers: {};
|
|
1159
|
+
response: {
|
|
1160
|
+
200: {
|
|
1161
|
+
success: boolean;
|
|
1162
|
+
};
|
|
1163
|
+
};
|
|
1164
|
+
};
|
|
1165
|
+
};
|
|
1166
|
+
};
|
|
1167
|
+
};
|
|
1168
|
+
} & {
|
|
1169
|
+
v1: {
|
|
1170
|
+
user: {
|
|
1171
|
+
membership: {
|
|
1172
|
+
get: {
|
|
1173
|
+
body: {};
|
|
1174
|
+
params: {};
|
|
1175
|
+
query: {};
|
|
1176
|
+
headers: {};
|
|
1177
|
+
response: {
|
|
1178
|
+
200: {
|
|
1179
|
+
status: import("@vestcards/shared").MembershipStatus;
|
|
1180
|
+
expiresAt: Date | null;
|
|
1181
|
+
} | null;
|
|
1182
|
+
};
|
|
1183
|
+
};
|
|
1184
|
+
};
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
1187
|
+
} & {
|
|
1188
|
+
v1: {
|
|
1189
|
+
user: {
|
|
1190
|
+
"complete-profile": {
|
|
1191
|
+
post: {
|
|
1192
|
+
body: {
|
|
1193
|
+
dayTimeReminder?: string | undefined;
|
|
1194
|
+
university?: number | undefined;
|
|
1195
|
+
course?: number | undefined;
|
|
1196
|
+
goal: string;
|
|
1197
|
+
hoursStudied: string;
|
|
1198
|
+
referral: string;
|
|
1199
|
+
};
|
|
1200
|
+
params: {};
|
|
1201
|
+
query: {};
|
|
1202
|
+
headers: {};
|
|
1203
|
+
response: {
|
|
1204
|
+
200: {
|
|
1205
|
+
success: boolean;
|
|
1206
|
+
};
|
|
1207
|
+
422: {
|
|
1208
|
+
type: "validation";
|
|
1209
|
+
on: string;
|
|
1210
|
+
summary?: string;
|
|
1211
|
+
message?: string;
|
|
1212
|
+
found?: unknown;
|
|
1213
|
+
property?: string;
|
|
1214
|
+
expected?: string;
|
|
1215
|
+
};
|
|
1216
|
+
};
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1219
|
+
};
|
|
1220
|
+
};
|
|
840
1221
|
} & {
|
|
841
1222
|
v1: {
|
|
842
1223
|
data: {
|
|
@@ -901,10 +1282,10 @@ declare const app: Elysia<"", {
|
|
|
901
1282
|
} & {
|
|
902
1283
|
health: {
|
|
903
1284
|
get: {
|
|
904
|
-
body:
|
|
1285
|
+
body: {};
|
|
905
1286
|
params: {};
|
|
906
|
-
query:
|
|
907
|
-
headers:
|
|
1287
|
+
query: {};
|
|
1288
|
+
headers: {};
|
|
908
1289
|
response: {
|
|
909
1290
|
200: {
|
|
910
1291
|
status: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export declare const config: {
|
|
2
2
|
databaseUrl: string;
|
|
3
3
|
baseUrl: string;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
webAppUrl: string;
|
|
5
|
+
redisUrl: string | undefined;
|
|
6
|
+
redisToken: string | undefined;
|
|
6
7
|
betterAuthSecret: string;
|
|
7
8
|
googleClientId: string;
|
|
8
9
|
googleClientSecret: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Entitlement } from '@vestcards
|
|
1
|
+
import type { Entitlement } from '@vestcards/shared';
|
|
2
2
|
import Elysia from 'elysia';
|
|
3
3
|
import { type Permission } from './permissions/permissions';
|
|
4
4
|
export declare const OpenAPI: {
|
|
@@ -41,7 +41,7 @@ export declare const authModule: Elysia<"/v1", {
|
|
|
41
41
|
route: string;
|
|
42
42
|
request: Request;
|
|
43
43
|
store: {};
|
|
44
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends
|
|
44
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
|
|
45
45
|
readonly 100: "Continue";
|
|
46
46
|
readonly 101: "Switching Protocols";
|
|
47
47
|
readonly 102: "Processing";
|
|
@@ -168,6 +168,7 @@ export declare const authModule: Elysia<"/v1", {
|
|
|
168
168
|
}[Code] : Code>;
|
|
169
169
|
}) => Promise<{
|
|
170
170
|
entitlements: Entitlement[];
|
|
171
|
+
completedProfile: boolean;
|
|
171
172
|
user: {
|
|
172
173
|
id: string;
|
|
173
174
|
createdAt: Date;
|
|
@@ -182,6 +183,7 @@ export declare const authModule: Elysia<"/v1", {
|
|
|
182
183
|
};
|
|
183
184
|
session: {
|
|
184
185
|
entitlements: Entitlement[];
|
|
186
|
+
completedProfile: boolean;
|
|
185
187
|
id: string;
|
|
186
188
|
createdAt: Date;
|
|
187
189
|
updatedAt: Date;
|
|
@@ -213,7 +215,7 @@ export declare const authModule: Elysia<"/v1", {
|
|
|
213
215
|
route: string;
|
|
214
216
|
request: Request;
|
|
215
217
|
store: {};
|
|
216
|
-
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends
|
|
218
|
+
status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 200 | 400 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 300 | 304 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
|
|
217
219
|
readonly 100: "Continue";
|
|
218
220
|
readonly 101: "Switching Protocols";
|
|
219
221
|
readonly 102: "Processing";
|
|
@@ -343,7 +345,36 @@ export declare const authModule: Elysia<"/v1", {
|
|
|
343
345
|
};
|
|
344
346
|
parser: {};
|
|
345
347
|
response: {};
|
|
346
|
-
}, {
|
|
348
|
+
}, {
|
|
349
|
+
v1: {
|
|
350
|
+
auth: {
|
|
351
|
+
"validate-reset-token": {
|
|
352
|
+
get: {
|
|
353
|
+
body: unknown;
|
|
354
|
+
params: {};
|
|
355
|
+
query: {
|
|
356
|
+
token: string;
|
|
357
|
+
};
|
|
358
|
+
headers: unknown;
|
|
359
|
+
response: {
|
|
360
|
+
200: {
|
|
361
|
+
valid: boolean;
|
|
362
|
+
};
|
|
363
|
+
422: {
|
|
364
|
+
type: "validation";
|
|
365
|
+
on: string;
|
|
366
|
+
summary?: string;
|
|
367
|
+
message?: string;
|
|
368
|
+
found?: unknown;
|
|
369
|
+
property?: string;
|
|
370
|
+
expected?: string;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
}, {
|
|
347
378
|
derive: {};
|
|
348
379
|
resolve: {};
|
|
349
380
|
schema: {};
|