@aeriajs/builtins 0.0.162 → 0.0.164
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/authentication.d.ts +3 -1
- package/dist/authentication.js +5 -10
- package/dist/authentication.mjs +5 -10
- package/dist/collections/file/description.d.ts +2 -2
- package/dist/collections/file/description.js +12 -7
- package/dist/collections/file/description.mjs +12 -7
- package/dist/collections/file/index.d.ts +10 -10
- package/dist/collections/file/insert.d.ts +2 -2
- package/dist/collections/log/index.d.ts +2 -18
- package/dist/collections/user/createAccount.d.ts +110 -8
- package/dist/collections/user/createAccount.js +16 -10
- package/dist/collections/user/createAccount.mjs +16 -10
- package/dist/collections/user/description.d.ts +3 -3
- package/dist/collections/user/description.js +12 -6
- package/dist/collections/user/description.mjs +12 -6
- package/dist/collections/user/getCurrentUser.d.ts +3 -3
- package/dist/collections/user/index.d.ts +249 -67
- package/dist/collections/user/index.js +15 -14
- package/dist/collections/user/index.mjs +15 -14
- package/dist/functions/describe.d.ts +1 -1
- package/dist/index.d.ts +261 -95
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -40,10 +40,10 @@ export declare const collections: {
|
|
|
40
40
|
readonly type: "boolean";
|
|
41
41
|
};
|
|
42
42
|
readonly link: {
|
|
43
|
-
readonly getter: (
|
|
43
|
+
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
44
44
|
};
|
|
45
45
|
readonly download_link: {
|
|
46
|
-
readonly getter: (
|
|
46
|
+
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
readonly actions: {
|
|
@@ -97,10 +97,10 @@ export declare const collections: {
|
|
|
97
97
|
readonly type: "boolean";
|
|
98
98
|
};
|
|
99
99
|
readonly link: {
|
|
100
|
-
readonly getter: (
|
|
100
|
+
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
101
101
|
};
|
|
102
102
|
readonly download_link: {
|
|
103
|
-
readonly getter: (
|
|
103
|
+
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
106
|
readonly actions: {
|
|
@@ -192,10 +192,10 @@ export declare const collections: {
|
|
|
192
192
|
readonly type: "boolean";
|
|
193
193
|
};
|
|
194
194
|
readonly link: {
|
|
195
|
-
readonly getter: (
|
|
195
|
+
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
196
196
|
};
|
|
197
197
|
readonly download_link: {
|
|
198
|
-
readonly getter: (
|
|
198
|
+
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
199
199
|
};
|
|
200
200
|
};
|
|
201
201
|
readonly actions: {
|
|
@@ -243,10 +243,10 @@ export declare const collections: {
|
|
|
243
243
|
readonly type: "boolean";
|
|
244
244
|
};
|
|
245
245
|
readonly link: {
|
|
246
|
-
readonly getter: (
|
|
246
|
+
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
247
247
|
};
|
|
248
248
|
readonly download_link: {
|
|
249
|
-
readonly getter: (
|
|
249
|
+
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
250
250
|
};
|
|
251
251
|
};
|
|
252
252
|
readonly actions: {
|
|
@@ -300,10 +300,10 @@ export declare const collections: {
|
|
|
300
300
|
readonly type: "boolean";
|
|
301
301
|
};
|
|
302
302
|
readonly link: {
|
|
303
|
-
readonly getter: (
|
|
303
|
+
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
304
304
|
};
|
|
305
305
|
readonly download_link: {
|
|
306
|
-
readonly getter: (
|
|
306
|
+
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
307
307
|
};
|
|
308
308
|
};
|
|
309
309
|
readonly actions: {
|
|
@@ -492,15 +492,7 @@ export declare const collections: {
|
|
|
492
492
|
};
|
|
493
493
|
functions: {
|
|
494
494
|
readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetOptions) => Promise<import("@aeriajs/types").GetReturnType<import("@aeriajs/types").SchemaWithId<any>>>;
|
|
495
|
-
readonly getAll: (payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetAllOptions) => Promise<
|
|
496
|
-
readonly _tag: "Error";
|
|
497
|
-
readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
|
|
498
|
-
readonly result: undefined;
|
|
499
|
-
} | {
|
|
500
|
-
readonly _tag: "Result";
|
|
501
|
-
readonly error: undefined;
|
|
502
|
-
readonly result: import("@aeriajs/types").SchemaWithId<any>[];
|
|
503
|
-
}>;
|
|
495
|
+
readonly getAll: (payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetAllOptions) => Promise<import("@aeriajs/types").Result.Either<any, any>>;
|
|
504
496
|
readonly insert: (payload: import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").InsertOptions) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<any>>>;
|
|
505
497
|
};
|
|
506
498
|
exposedFunctions: {
|
|
@@ -565,15 +557,7 @@ export declare const collections: {
|
|
|
565
557
|
};
|
|
566
558
|
functions: {
|
|
567
559
|
readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetOptions) => Promise<import("@aeriajs/types").GetReturnType<import("@aeriajs/types").SchemaWithId<any>>>;
|
|
568
|
-
readonly getAll: (payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetAllOptions) => Promise<
|
|
569
|
-
readonly _tag: "Error";
|
|
570
|
-
readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
|
|
571
|
-
readonly result: undefined;
|
|
572
|
-
} | {
|
|
573
|
-
readonly _tag: "Result";
|
|
574
|
-
readonly error: undefined;
|
|
575
|
-
readonly result: import("@aeriajs/types").SchemaWithId<any>[];
|
|
576
|
-
}>;
|
|
560
|
+
readonly getAll: (payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<any>> | undefined, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").GetAllOptions) => Promise<import("@aeriajs/types").Result.Either<any, any>>;
|
|
577
561
|
readonly insert: (payload: import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").InsertOptions) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<any>>>;
|
|
578
562
|
};
|
|
579
563
|
contracts: {
|
|
@@ -706,10 +690,10 @@ export declare const collections: {
|
|
|
706
690
|
readonly type: "string";
|
|
707
691
|
};
|
|
708
692
|
readonly given_name: {
|
|
709
|
-
readonly getter: (
|
|
693
|
+
readonly getter: (doc: object) => string | undefined;
|
|
710
694
|
};
|
|
711
695
|
readonly family_name: {
|
|
712
|
-
readonly getter: (
|
|
696
|
+
readonly getter: (doc: object) => string | undefined;
|
|
713
697
|
};
|
|
714
698
|
readonly active: {
|
|
715
699
|
readonly type: "boolean";
|
|
@@ -740,7 +724,7 @@ export declare const collections: {
|
|
|
740
724
|
readonly accept: readonly ["image/*"];
|
|
741
725
|
};
|
|
742
726
|
readonly picture: {
|
|
743
|
-
readonly getter: (
|
|
727
|
+
readonly getter: (doc: object) => string | undefined;
|
|
744
728
|
};
|
|
745
729
|
readonly group: {
|
|
746
730
|
readonly type: "string";
|
|
@@ -796,17 +780,9 @@ export declare const collections: {
|
|
|
796
780
|
};
|
|
797
781
|
};
|
|
798
782
|
functions: {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
|
|
803
|
-
readonly result: undefined;
|
|
804
|
-
} | {
|
|
805
|
-
readonly _tag: "Result";
|
|
806
|
-
readonly error: undefined;
|
|
807
|
-
readonly result: import("@aeriajs/types").SchemaWithId<any>[];
|
|
808
|
-
}>;
|
|
809
|
-
readonly remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").RemoveOptions) => Promise<{
|
|
783
|
+
get: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>>, context: TContext, options?: import("@aeriajs/core").GetOptions) => Promise<import("@aeriajs/types").GetReturnType<import("@aeriajs/types").SchemaWithId<TContext["description"]>>>;
|
|
784
|
+
getAll: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>> | undefined, context: TContext, options?: import("@aeriajs/core").GetAllOptions) => Promise<import("@aeriajs/types").Result.Either<any, any>>;
|
|
785
|
+
remove: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>>, context: TContext, options?: import("@aeriajs/core").RemoveOptions) => Promise<{
|
|
810
786
|
readonly _tag: "Result";
|
|
811
787
|
readonly error: undefined;
|
|
812
788
|
readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
|
|
@@ -819,7 +795,7 @@ export declare const collections: {
|
|
|
819
795
|
} & {
|
|
820
796
|
httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
|
|
821
797
|
}>>;
|
|
822
|
-
|
|
798
|
+
upload: <TContext extends import("@aeriajs/types").Context>(_props: unknown, context: TContext) => Promise<import("@aeriajs/types").Result.Error<{
|
|
823
799
|
readonly code: import("@aeriajs/types").ACError.MalformedInput;
|
|
824
800
|
readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
|
|
825
801
|
} & {
|
|
@@ -831,7 +807,7 @@ export declare const collections: {
|
|
|
831
807
|
readonly tempId: any;
|
|
832
808
|
};
|
|
833
809
|
}>;
|
|
834
|
-
|
|
810
|
+
removeFile: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemoveFilePayload, context: TContext, options?: import("@aeriajs/core").RemoveFileOptions) => Promise<{
|
|
835
811
|
readonly _tag: "Result";
|
|
836
812
|
readonly error: undefined;
|
|
837
813
|
readonly result: any;
|
|
@@ -840,8 +816,8 @@ export declare const collections: {
|
|
|
840
816
|
} & {
|
|
841
817
|
httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
|
|
842
818
|
}>>;
|
|
843
|
-
|
|
844
|
-
|
|
819
|
+
insert: <TDescription extends import("@aeriajs/types").Description, TInsertPayload extends import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<TDescription>>>(payload: NoInfer<TInsertPayload>, context: import("@aeriajs/types").Context<TDescription>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<TDescription>>>;
|
|
820
|
+
authenticate: (props: {
|
|
845
821
|
email: string;
|
|
846
822
|
password: string;
|
|
847
823
|
} | {
|
|
@@ -880,7 +856,7 @@ export declare const collections: {
|
|
|
880
856
|
} & {
|
|
881
857
|
httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
|
|
882
858
|
}>>;
|
|
883
|
-
|
|
859
|
+
activate: (payload: {
|
|
884
860
|
password: string;
|
|
885
861
|
}, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description> & {
|
|
886
862
|
request: {
|
|
@@ -915,17 +891,116 @@ export declare const collections: {
|
|
|
915
891
|
readonly userId: any;
|
|
916
892
|
};
|
|
917
893
|
} | undefined>;
|
|
918
|
-
|
|
894
|
+
createAccount: (payload: Partial<import("@aeriajs/types").SchemaWithId<typeof import("./collections/user/description.js").description>>, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<import("@aeriajs/types").Result.Error<{
|
|
895
|
+
readonly code: import("./collections/user/createAccount.js").CreateAccountError;
|
|
896
|
+
} & {
|
|
897
|
+
httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
|
|
898
|
+
}> | import("@aeriajs/types").Result.Error<{
|
|
919
899
|
readonly code: import("@aeriajs/types").ACError.MalformedInput;
|
|
920
|
-
readonly details: import("@aeriajs/types").
|
|
900
|
+
readonly details: import("@aeriajs/types").PropertyValidationError | import("@aeriajs/types").ValidationError;
|
|
921
901
|
} & {
|
|
922
902
|
httpStatus: import("@aeriajs/types").HTTPStatus.BadRequest;
|
|
923
|
-
}> | {
|
|
924
|
-
readonly
|
|
925
|
-
readonly
|
|
926
|
-
readonly
|
|
927
|
-
|
|
928
|
-
|
|
903
|
+
}> | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
|
|
904
|
+
readonly $id: "user";
|
|
905
|
+
readonly icon: "users";
|
|
906
|
+
readonly required: readonly ["name", "roles", "email"];
|
|
907
|
+
readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
|
|
908
|
+
readonly indexes: readonly ["name"];
|
|
909
|
+
readonly properties: {
|
|
910
|
+
readonly name: {
|
|
911
|
+
readonly type: "string";
|
|
912
|
+
};
|
|
913
|
+
readonly given_name: {
|
|
914
|
+
readonly getter: (doc: object) => string | undefined;
|
|
915
|
+
};
|
|
916
|
+
readonly family_name: {
|
|
917
|
+
readonly getter: (doc: object) => string | undefined;
|
|
918
|
+
};
|
|
919
|
+
readonly active: {
|
|
920
|
+
readonly type: "boolean";
|
|
921
|
+
};
|
|
922
|
+
readonly roles: {
|
|
923
|
+
readonly type: "array";
|
|
924
|
+
readonly items: {
|
|
925
|
+
readonly type: "string";
|
|
926
|
+
};
|
|
927
|
+
readonly uniqueItems: true;
|
|
928
|
+
};
|
|
929
|
+
readonly email: {
|
|
930
|
+
readonly type: "string";
|
|
931
|
+
readonly inputType: "email";
|
|
932
|
+
readonly unique: true;
|
|
933
|
+
};
|
|
934
|
+
readonly password: {
|
|
935
|
+
readonly type: "string";
|
|
936
|
+
readonly inputType: "password";
|
|
937
|
+
readonly hidden: true;
|
|
938
|
+
};
|
|
939
|
+
readonly phone_number: {
|
|
940
|
+
readonly type: "string";
|
|
941
|
+
readonly mask: "(##) #####-####";
|
|
942
|
+
};
|
|
943
|
+
readonly picture_file: {
|
|
944
|
+
readonly $ref: "file";
|
|
945
|
+
readonly accept: readonly ["image/*"];
|
|
946
|
+
};
|
|
947
|
+
readonly picture: {
|
|
948
|
+
readonly getter: (doc: object) => string | undefined;
|
|
949
|
+
};
|
|
950
|
+
readonly group: {
|
|
951
|
+
readonly type: "string";
|
|
952
|
+
};
|
|
953
|
+
readonly self_registered: {
|
|
954
|
+
readonly type: "boolean";
|
|
955
|
+
readonly readOnly: true;
|
|
956
|
+
};
|
|
957
|
+
readonly updated_at: {
|
|
958
|
+
readonly type: "string";
|
|
959
|
+
readonly format: "date-time";
|
|
960
|
+
};
|
|
961
|
+
};
|
|
962
|
+
readonly presets: readonly ["crud", "duplicate"];
|
|
963
|
+
readonly layout: {
|
|
964
|
+
readonly name: "grid";
|
|
965
|
+
readonly options: {
|
|
966
|
+
readonly title: "name";
|
|
967
|
+
readonly badge: "roles";
|
|
968
|
+
readonly picture: "picture_file";
|
|
969
|
+
readonly information: "email";
|
|
970
|
+
readonly active: "active";
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
readonly individualActions: {
|
|
974
|
+
readonly changePassword: {
|
|
975
|
+
readonly label: "change_password";
|
|
976
|
+
readonly icon: "key";
|
|
977
|
+
readonly translate: true;
|
|
978
|
+
readonly route: {
|
|
979
|
+
readonly name: "/dashboard/user/changepass";
|
|
980
|
+
readonly fetchItem: true;
|
|
981
|
+
};
|
|
982
|
+
};
|
|
983
|
+
readonly copyActivationLink: {
|
|
984
|
+
readonly label: "copy_activation_link";
|
|
985
|
+
readonly icon: "link";
|
|
986
|
+
readonly translate: true;
|
|
987
|
+
};
|
|
988
|
+
};
|
|
989
|
+
readonly filters: readonly ["name", "roles", "email", "phone_number"];
|
|
990
|
+
readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
|
|
991
|
+
readonly tableMeta: readonly ["email"];
|
|
992
|
+
readonly formLayout: {
|
|
993
|
+
readonly fields: {
|
|
994
|
+
readonly given_name: {
|
|
995
|
+
readonly span: 3;
|
|
996
|
+
};
|
|
997
|
+
readonly family_name: {
|
|
998
|
+
readonly span: 3;
|
|
999
|
+
};
|
|
1000
|
+
};
|
|
1001
|
+
};
|
|
1002
|
+
}>>>;
|
|
1003
|
+
getInfo: (payload: {
|
|
929
1004
|
userId: string;
|
|
930
1005
|
token: string;
|
|
931
1006
|
}, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<import("@aeriajs/types").Result.Error<{
|
|
@@ -948,7 +1023,7 @@ export declare const collections: {
|
|
|
948
1023
|
readonly email: any;
|
|
949
1024
|
};
|
|
950
1025
|
}>;
|
|
951
|
-
|
|
1026
|
+
getCurrentUser: (_payload: undefined, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<{
|
|
952
1027
|
readonly _tag: "Result";
|
|
953
1028
|
readonly error: undefined;
|
|
954
1029
|
readonly result: import("@aeriajs/types").SchemaWithId<{
|
|
@@ -962,10 +1037,10 @@ export declare const collections: {
|
|
|
962
1037
|
readonly type: "string";
|
|
963
1038
|
};
|
|
964
1039
|
readonly given_name: {
|
|
965
|
-
readonly getter: (
|
|
1040
|
+
readonly getter: (doc: object) => string | undefined;
|
|
966
1041
|
};
|
|
967
1042
|
readonly family_name: {
|
|
968
|
-
readonly getter: (
|
|
1043
|
+
readonly getter: (doc: object) => string | undefined;
|
|
969
1044
|
};
|
|
970
1045
|
readonly active: {
|
|
971
1046
|
readonly type: "boolean";
|
|
@@ -996,7 +1071,7 @@ export declare const collections: {
|
|
|
996
1071
|
readonly accept: readonly ["image/*"];
|
|
997
1072
|
};
|
|
998
1073
|
readonly picture: {
|
|
999
|
-
readonly getter: (
|
|
1074
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1000
1075
|
};
|
|
1001
1076
|
readonly group: {
|
|
1002
1077
|
readonly type: "string";
|
|
@@ -1052,7 +1127,7 @@ export declare const collections: {
|
|
|
1052
1127
|
};
|
|
1053
1128
|
}>;
|
|
1054
1129
|
}>;
|
|
1055
|
-
|
|
1130
|
+
getActivationLink: (payload: {
|
|
1056
1131
|
userId: import("mongodb").ObjectId | string;
|
|
1057
1132
|
}, context: import("@aeriajs/types").Context) => Promise<{
|
|
1058
1133
|
readonly _tag: "Error";
|
|
@@ -1090,10 +1165,10 @@ export declare const collections: {
|
|
|
1090
1165
|
readonly type: "string";
|
|
1091
1166
|
};
|
|
1092
1167
|
readonly given_name: {
|
|
1093
|
-
readonly getter: (
|
|
1168
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1094
1169
|
};
|
|
1095
1170
|
readonly family_name: {
|
|
1096
|
-
readonly getter: (
|
|
1171
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1097
1172
|
};
|
|
1098
1173
|
readonly active: {
|
|
1099
1174
|
readonly type: "boolean";
|
|
@@ -1124,7 +1199,7 @@ export declare const collections: {
|
|
|
1124
1199
|
readonly accept: readonly ["image/*"];
|
|
1125
1200
|
};
|
|
1126
1201
|
readonly picture: {
|
|
1127
|
-
readonly getter: (
|
|
1202
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1128
1203
|
};
|
|
1129
1204
|
readonly group: {
|
|
1130
1205
|
readonly type: "string";
|
|
@@ -1190,10 +1265,10 @@ export declare const collections: {
|
|
|
1190
1265
|
readonly type: "string";
|
|
1191
1266
|
};
|
|
1192
1267
|
readonly given_name: {
|
|
1193
|
-
readonly getter: (
|
|
1268
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1194
1269
|
};
|
|
1195
1270
|
readonly family_name: {
|
|
1196
|
-
readonly getter: (
|
|
1271
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1197
1272
|
};
|
|
1198
1273
|
readonly active: {
|
|
1199
1274
|
readonly type: "boolean";
|
|
@@ -1224,7 +1299,7 @@ export declare const collections: {
|
|
|
1224
1299
|
readonly accept: readonly ["image/*"];
|
|
1225
1300
|
};
|
|
1226
1301
|
readonly picture: {
|
|
1227
|
-
readonly getter: (
|
|
1302
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1228
1303
|
};
|
|
1229
1304
|
readonly group: {
|
|
1230
1305
|
readonly type: "string";
|
|
@@ -1280,17 +1355,9 @@ export declare const collections: {
|
|
|
1280
1355
|
};
|
|
1281
1356
|
};
|
|
1282
1357
|
functions: {
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
|
|
1287
|
-
readonly result: undefined;
|
|
1288
|
-
} | {
|
|
1289
|
-
readonly _tag: "Result";
|
|
1290
|
-
readonly error: undefined;
|
|
1291
|
-
readonly result: import("@aeriajs/types").SchemaWithId<any>[];
|
|
1292
|
-
}>;
|
|
1293
|
-
readonly remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").RemoveOptions) => Promise<{
|
|
1358
|
+
get: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>>, context: TContext, options?: import("@aeriajs/core").GetOptions) => Promise<import("@aeriajs/types").GetReturnType<import("@aeriajs/types").SchemaWithId<TContext["description"]>>>;
|
|
1359
|
+
getAll: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").GetAllPayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>> | undefined, context: TContext, options?: import("@aeriajs/core").GetAllOptions) => Promise<import("@aeriajs/types").Result.Either<any, any>>;
|
|
1360
|
+
remove: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<TContext["description"]>>, context: TContext, options?: import("@aeriajs/core").RemoveOptions) => Promise<{
|
|
1294
1361
|
readonly _tag: "Result";
|
|
1295
1362
|
readonly error: undefined;
|
|
1296
1363
|
readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
|
|
@@ -1303,7 +1370,7 @@ export declare const collections: {
|
|
|
1303
1370
|
} & {
|
|
1304
1371
|
httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
|
|
1305
1372
|
}>>;
|
|
1306
|
-
|
|
1373
|
+
upload: <TContext extends import("@aeriajs/types").Context>(_props: unknown, context: TContext) => Promise<import("@aeriajs/types").Result.Error<{
|
|
1307
1374
|
readonly code: import("@aeriajs/types").ACError.MalformedInput;
|
|
1308
1375
|
readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
|
|
1309
1376
|
} & {
|
|
@@ -1315,7 +1382,7 @@ export declare const collections: {
|
|
|
1315
1382
|
readonly tempId: any;
|
|
1316
1383
|
};
|
|
1317
1384
|
}>;
|
|
1318
|
-
|
|
1385
|
+
removeFile: <TContext extends import("@aeriajs/types").Context>(payload: import("@aeriajs/types").RemoveFilePayload, context: TContext, options?: import("@aeriajs/core").RemoveFileOptions) => Promise<{
|
|
1319
1386
|
readonly _tag: "Result";
|
|
1320
1387
|
readonly error: undefined;
|
|
1321
1388
|
readonly result: any;
|
|
@@ -1324,8 +1391,8 @@ export declare const collections: {
|
|
|
1324
1391
|
} & {
|
|
1325
1392
|
httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
|
|
1326
1393
|
}>>;
|
|
1327
|
-
|
|
1328
|
-
|
|
1394
|
+
insert: <TDescription extends import("@aeriajs/types").Description, TInsertPayload extends import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<TDescription>>>(payload: NoInfer<TInsertPayload>, context: import("@aeriajs/types").Context<TDescription>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<TDescription>>>;
|
|
1395
|
+
authenticate: (props: {
|
|
1329
1396
|
email: string;
|
|
1330
1397
|
password: string;
|
|
1331
1398
|
} | {
|
|
@@ -1364,7 +1431,7 @@ export declare const collections: {
|
|
|
1364
1431
|
} & {
|
|
1365
1432
|
httpStatus: import("@aeriajs/types").HTTPStatus.Unauthorized;
|
|
1366
1433
|
}>>;
|
|
1367
|
-
|
|
1434
|
+
activate: (payload: {
|
|
1368
1435
|
password: string;
|
|
1369
1436
|
}, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description> & {
|
|
1370
1437
|
request: {
|
|
@@ -1399,17 +1466,116 @@ export declare const collections: {
|
|
|
1399
1466
|
readonly userId: any;
|
|
1400
1467
|
};
|
|
1401
1468
|
} | undefined>;
|
|
1402
|
-
|
|
1469
|
+
createAccount: (payload: Partial<import("@aeriajs/types").SchemaWithId<typeof import("./collections/user/description.js").description>>, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<import("@aeriajs/types").Result.Error<{
|
|
1470
|
+
readonly code: import("./collections/user/createAccount.js").CreateAccountError;
|
|
1471
|
+
} & {
|
|
1472
|
+
httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
|
|
1473
|
+
}> | import("@aeriajs/types").Result.Error<{
|
|
1403
1474
|
readonly code: import("@aeriajs/types").ACError.MalformedInput;
|
|
1404
|
-
readonly details: import("@aeriajs/types").
|
|
1475
|
+
readonly details: import("@aeriajs/types").PropertyValidationError | import("@aeriajs/types").ValidationError;
|
|
1405
1476
|
} & {
|
|
1406
1477
|
httpStatus: import("@aeriajs/types").HTTPStatus.BadRequest;
|
|
1407
|
-
}> | {
|
|
1408
|
-
readonly
|
|
1409
|
-
readonly
|
|
1410
|
-
readonly
|
|
1411
|
-
|
|
1412
|
-
|
|
1478
|
+
}> | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
|
|
1479
|
+
readonly $id: "user";
|
|
1480
|
+
readonly icon: "users";
|
|
1481
|
+
readonly required: readonly ["name", "roles", "email"];
|
|
1482
|
+
readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
|
|
1483
|
+
readonly indexes: readonly ["name"];
|
|
1484
|
+
readonly properties: {
|
|
1485
|
+
readonly name: {
|
|
1486
|
+
readonly type: "string";
|
|
1487
|
+
};
|
|
1488
|
+
readonly given_name: {
|
|
1489
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1490
|
+
};
|
|
1491
|
+
readonly family_name: {
|
|
1492
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1493
|
+
};
|
|
1494
|
+
readonly active: {
|
|
1495
|
+
readonly type: "boolean";
|
|
1496
|
+
};
|
|
1497
|
+
readonly roles: {
|
|
1498
|
+
readonly type: "array";
|
|
1499
|
+
readonly items: {
|
|
1500
|
+
readonly type: "string";
|
|
1501
|
+
};
|
|
1502
|
+
readonly uniqueItems: true;
|
|
1503
|
+
};
|
|
1504
|
+
readonly email: {
|
|
1505
|
+
readonly type: "string";
|
|
1506
|
+
readonly inputType: "email";
|
|
1507
|
+
readonly unique: true;
|
|
1508
|
+
};
|
|
1509
|
+
readonly password: {
|
|
1510
|
+
readonly type: "string";
|
|
1511
|
+
readonly inputType: "password";
|
|
1512
|
+
readonly hidden: true;
|
|
1513
|
+
};
|
|
1514
|
+
readonly phone_number: {
|
|
1515
|
+
readonly type: "string";
|
|
1516
|
+
readonly mask: "(##) #####-####";
|
|
1517
|
+
};
|
|
1518
|
+
readonly picture_file: {
|
|
1519
|
+
readonly $ref: "file";
|
|
1520
|
+
readonly accept: readonly ["image/*"];
|
|
1521
|
+
};
|
|
1522
|
+
readonly picture: {
|
|
1523
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1524
|
+
};
|
|
1525
|
+
readonly group: {
|
|
1526
|
+
readonly type: "string";
|
|
1527
|
+
};
|
|
1528
|
+
readonly self_registered: {
|
|
1529
|
+
readonly type: "boolean";
|
|
1530
|
+
readonly readOnly: true;
|
|
1531
|
+
};
|
|
1532
|
+
readonly updated_at: {
|
|
1533
|
+
readonly type: "string";
|
|
1534
|
+
readonly format: "date-time";
|
|
1535
|
+
};
|
|
1536
|
+
};
|
|
1537
|
+
readonly presets: readonly ["crud", "duplicate"];
|
|
1538
|
+
readonly layout: {
|
|
1539
|
+
readonly name: "grid";
|
|
1540
|
+
readonly options: {
|
|
1541
|
+
readonly title: "name";
|
|
1542
|
+
readonly badge: "roles";
|
|
1543
|
+
readonly picture: "picture_file";
|
|
1544
|
+
readonly information: "email";
|
|
1545
|
+
readonly active: "active";
|
|
1546
|
+
};
|
|
1547
|
+
};
|
|
1548
|
+
readonly individualActions: {
|
|
1549
|
+
readonly changePassword: {
|
|
1550
|
+
readonly label: "change_password";
|
|
1551
|
+
readonly icon: "key";
|
|
1552
|
+
readonly translate: true;
|
|
1553
|
+
readonly route: {
|
|
1554
|
+
readonly name: "/dashboard/user/changepass";
|
|
1555
|
+
readonly fetchItem: true;
|
|
1556
|
+
};
|
|
1557
|
+
};
|
|
1558
|
+
readonly copyActivationLink: {
|
|
1559
|
+
readonly label: "copy_activation_link";
|
|
1560
|
+
readonly icon: "link";
|
|
1561
|
+
readonly translate: true;
|
|
1562
|
+
};
|
|
1563
|
+
};
|
|
1564
|
+
readonly filters: readonly ["name", "roles", "email", "phone_number"];
|
|
1565
|
+
readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
|
|
1566
|
+
readonly tableMeta: readonly ["email"];
|
|
1567
|
+
readonly formLayout: {
|
|
1568
|
+
readonly fields: {
|
|
1569
|
+
readonly given_name: {
|
|
1570
|
+
readonly span: 3;
|
|
1571
|
+
};
|
|
1572
|
+
readonly family_name: {
|
|
1573
|
+
readonly span: 3;
|
|
1574
|
+
};
|
|
1575
|
+
};
|
|
1576
|
+
};
|
|
1577
|
+
}>>>;
|
|
1578
|
+
getInfo: (payload: {
|
|
1413
1579
|
userId: string;
|
|
1414
1580
|
token: string;
|
|
1415
1581
|
}, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<import("@aeriajs/types").Result.Error<{
|
|
@@ -1432,7 +1598,7 @@ export declare const collections: {
|
|
|
1432
1598
|
readonly email: any;
|
|
1433
1599
|
};
|
|
1434
1600
|
}>;
|
|
1435
|
-
|
|
1601
|
+
getCurrentUser: (_payload: undefined, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<{
|
|
1436
1602
|
readonly _tag: "Result";
|
|
1437
1603
|
readonly error: undefined;
|
|
1438
1604
|
readonly result: import("@aeriajs/types").SchemaWithId<{
|
|
@@ -1446,10 +1612,10 @@ export declare const collections: {
|
|
|
1446
1612
|
readonly type: "string";
|
|
1447
1613
|
};
|
|
1448
1614
|
readonly given_name: {
|
|
1449
|
-
readonly getter: (
|
|
1615
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1450
1616
|
};
|
|
1451
1617
|
readonly family_name: {
|
|
1452
|
-
readonly getter: (
|
|
1618
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1453
1619
|
};
|
|
1454
1620
|
readonly active: {
|
|
1455
1621
|
readonly type: "boolean";
|
|
@@ -1480,7 +1646,7 @@ export declare const collections: {
|
|
|
1480
1646
|
readonly accept: readonly ["image/*"];
|
|
1481
1647
|
};
|
|
1482
1648
|
readonly picture: {
|
|
1483
|
-
readonly getter: (
|
|
1649
|
+
readonly getter: (doc: object) => string | undefined;
|
|
1484
1650
|
};
|
|
1485
1651
|
readonly group: {
|
|
1486
1652
|
readonly type: "string";
|
|
@@ -1536,7 +1702,7 @@ export declare const collections: {
|
|
|
1536
1702
|
};
|
|
1537
1703
|
}>;
|
|
1538
1704
|
}>;
|
|
1539
|
-
|
|
1705
|
+
getActivationLink: (payload: {
|
|
1540
1706
|
userId: import("mongodb").ObjectId | string;
|
|
1541
1707
|
}, context: import("@aeriajs/types").Context) => Promise<{
|
|
1542
1708
|
readonly _tag: "Error";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/builtins",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.164",
|
|
4
4
|
"description": "## Installation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"mongodb": "^6.5.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@aeriajs/core": "^0.0.
|
|
49
|
-
"@aeriajs/common": "^0.0.
|
|
50
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
51
|
-
"@aeriajs/types": "^0.0.
|
|
52
|
-
"@aeriajs/validation": "^0.0.
|
|
48
|
+
"@aeriajs/core": "^0.0.164",
|
|
49
|
+
"@aeriajs/common": "^0.0.100",
|
|
50
|
+
"@aeriajs/entrypoint": "^0.0.102",
|
|
51
|
+
"@aeriajs/types": "^0.0.86",
|
|
52
|
+
"@aeriajs/validation": "^0.0.103"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"test": "echo skipping",
|