@aeriajs/builtins 0.0.231 → 0.0.233
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 +4 -4
- package/dist/authentication.js +4 -5
- package/dist/authentication.mjs +4 -5
- package/dist/collections/file/download.d.ts +7 -8
- package/dist/collections/file/download.js +4 -5
- package/dist/collections/file/download.mjs +4 -5
- package/dist/collections/file/index.d.ts +18 -18
- package/dist/collections/file/remove.d.ts +12 -12
- package/dist/collections/file/removeAll.d.ts +2 -2
- package/dist/collections/user/activate.d.ts +17 -17
- package/dist/collections/user/activate.js +10 -11
- package/dist/collections/user/activate.mjs +10 -11
- package/dist/collections/user/authenticate.d.ts +7 -8
- package/dist/collections/user/createAccount.d.ts +10 -10
- package/dist/collections/user/createAccount.js +4 -5
- package/dist/collections/user/createAccount.mjs +4 -5
- package/dist/collections/user/description.d.ts +1 -0
- package/dist/collections/user/description.js +1 -0
- package/dist/collections/user/description.mjs +2 -1
- package/dist/collections/user/editProfile.d.ts +4 -3
- package/dist/collections/user/getActivationLink.d.ts +13 -14
- package/dist/collections/user/getCurrentUser.d.ts +6 -5
- package/dist/collections/user/getCurrentUser.js +5 -6
- package/dist/collections/user/getCurrentUser.mjs +5 -6
- package/dist/collections/user/getInfo.d.ts +13 -13
- package/dist/collections/user/getInfo.js +9 -10
- package/dist/collections/user/getInfo.mjs +9 -10
- package/dist/collections/user/getRedefinePasswordLink.d.ts +11 -12
- package/dist/collections/user/index.d.ts +85 -78
- package/dist/collections/user/insert.d.ts +8 -9
- package/dist/collections/user/redefinePassword.d.ts +17 -17
- package/dist/collections/user/redefinePassword.js +10 -11
- package/dist/collections/user/redefinePassword.mjs +10 -11
- package/dist/functions/describe.d.ts +9 -9
- package/dist/index.d.ts +103 -96
- package/package.json +15 -15
package/dist/index.d.ts
CHANGED
|
@@ -174,34 +174,34 @@ export declare const collections: {
|
|
|
174
174
|
options: readonly ("picture" | "download")[];
|
|
175
175
|
noHeaders?: boolean;
|
|
176
176
|
}, context: import("@aeriajs/types").Context<typeof import("./collections/file/description.js").description>) => Promise<import("@aeriajs/types").Result.Error<{
|
|
177
|
-
readonly code:
|
|
177
|
+
readonly code: "RESOURCE_NOT_FOUND";
|
|
178
178
|
} & {
|
|
179
|
-
httpStatus:
|
|
179
|
+
httpStatus: 404;
|
|
180
180
|
}> | import("@aeriajs/types").Result.Error<{
|
|
181
|
-
readonly code:
|
|
181
|
+
readonly code: "RANGE_NOT_SATISFIABLE";
|
|
182
182
|
} & {
|
|
183
|
-
httpStatus:
|
|
183
|
+
httpStatus: 416;
|
|
184
184
|
}> | import("fs").ReadStream>;
|
|
185
185
|
remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<typeof import("./collections/file/description.js").description>>, context: import("@aeriajs/types").Context<typeof import("./collections/file/description.js").description>) => Promise<{
|
|
186
186
|
readonly _tag: "Result";
|
|
187
187
|
readonly error: undefined;
|
|
188
188
|
readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
|
|
189
189
|
} | import("@aeriajs/types").Result.Error<{
|
|
190
|
-
readonly code:
|
|
190
|
+
readonly code: "RESOURCE_NOT_FOUND";
|
|
191
191
|
} & {
|
|
192
|
-
httpStatus:
|
|
192
|
+
httpStatus: 404;
|
|
193
193
|
}> | import("@aeriajs/types").Result.Error<{
|
|
194
|
-
readonly code:
|
|
194
|
+
readonly code: "OWNERSHIP_ERROR";
|
|
195
195
|
} & {
|
|
196
|
-
httpStatus:
|
|
196
|
+
httpStatus: 403;
|
|
197
197
|
}> | {
|
|
198
198
|
readonly _tag: "Error";
|
|
199
199
|
readonly error: Pick<{} & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
|
|
200
200
|
readonly httpStatus: {
|
|
201
|
-
readonly enum: [
|
|
201
|
+
readonly enum: [403, 404, 400];
|
|
202
202
|
};
|
|
203
203
|
readonly code: {
|
|
204
|
-
readonly enum: [
|
|
204
|
+
readonly enum: ["RESOURCE_NOT_FOUND", "OWNERSHIP_ERROR", "INSECURE_OPERATOR", "MALFORMED_INPUT"];
|
|
205
205
|
};
|
|
206
206
|
readonly message: {
|
|
207
207
|
readonly type: "string";
|
|
@@ -211,16 +211,16 @@ export declare const collections: {
|
|
|
211
211
|
readonly additionalProperties: true;
|
|
212
212
|
};
|
|
213
213
|
}>> & {
|
|
214
|
-
code:
|
|
215
|
-
httpStatus:
|
|
214
|
+
code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "MALFORMED_INPUT";
|
|
215
|
+
httpStatus: 403 | 400 | 404;
|
|
216
216
|
message: string;
|
|
217
217
|
details: any;
|
|
218
218
|
}, never>, "code" | "httpStatus"> & Partial<{} & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
|
|
219
219
|
readonly httpStatus: {
|
|
220
|
-
readonly enum: [
|
|
220
|
+
readonly enum: [403, 404, 400];
|
|
221
221
|
};
|
|
222
222
|
readonly code: {
|
|
223
|
-
readonly enum: [
|
|
223
|
+
readonly enum: ["RESOURCE_NOT_FOUND", "OWNERSHIP_ERROR", "INSECURE_OPERATOR", "MALFORMED_INPUT"];
|
|
224
224
|
};
|
|
225
225
|
readonly message: {
|
|
226
226
|
readonly type: "string";
|
|
@@ -230,8 +230,8 @@ export declare const collections: {
|
|
|
230
230
|
readonly additionalProperties: true;
|
|
231
231
|
};
|
|
232
232
|
}>> & {
|
|
233
|
-
code:
|
|
234
|
-
httpStatus:
|
|
233
|
+
code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "MALFORMED_INPUT";
|
|
234
|
+
httpStatus: 403 | 400 | 404;
|
|
235
235
|
message: string;
|
|
236
236
|
details: any;
|
|
237
237
|
}, never>>;
|
|
@@ -242,9 +242,9 @@ export declare const collections: {
|
|
|
242
242
|
readonly error: undefined;
|
|
243
243
|
readonly result: import("mongodb").DeleteResult;
|
|
244
244
|
} | import("@aeriajs/types").Result.Error<{
|
|
245
|
-
readonly code:
|
|
245
|
+
readonly code: "OWNERSHIP_ERROR";
|
|
246
246
|
} & {
|
|
247
|
-
httpStatus:
|
|
247
|
+
httpStatus: 403;
|
|
248
248
|
}>>;
|
|
249
249
|
};
|
|
250
250
|
contracts: {
|
|
@@ -532,6 +532,7 @@ export declare const collections: {
|
|
|
532
532
|
readonly picture: "picture_file";
|
|
533
533
|
readonly information: "email";
|
|
534
534
|
readonly active: "active";
|
|
535
|
+
readonly translateBadge: true;
|
|
535
536
|
};
|
|
536
537
|
};
|
|
537
538
|
readonly individualActions: {
|
|
@@ -637,6 +638,7 @@ export declare const collections: {
|
|
|
637
638
|
readonly picture: "picture_file";
|
|
638
639
|
readonly information: "email";
|
|
639
640
|
readonly active: "active";
|
|
641
|
+
readonly translateBadge: true;
|
|
640
642
|
};
|
|
641
643
|
};
|
|
642
644
|
readonly individualActions: {
|
|
@@ -682,19 +684,19 @@ export declare const collections: {
|
|
|
682
684
|
readonly error: undefined;
|
|
683
685
|
readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
|
|
684
686
|
} | import("@aeriajs/types").Result.Error<{
|
|
685
|
-
readonly code:
|
|
687
|
+
readonly code: "RESOURCE_NOT_FOUND";
|
|
686
688
|
} & {
|
|
687
|
-
httpStatus:
|
|
689
|
+
httpStatus: 404;
|
|
688
690
|
}> | import("@aeriajs/types").Result.Error<{
|
|
689
|
-
readonly code:
|
|
691
|
+
readonly code: "OWNERSHIP_ERROR";
|
|
690
692
|
} & {
|
|
691
|
-
httpStatus:
|
|
693
|
+
httpStatus: 403;
|
|
692
694
|
}>>;
|
|
693
695
|
readonly upload: (payload: unknown, context: Omit<import("@aeriajs/types").Context, "token">) => Promise<import("@aeriajs/types").Result.Error<{
|
|
694
|
-
readonly code:
|
|
696
|
+
readonly code: "MALFORMED_INPUT";
|
|
695
697
|
readonly details: import("@aeriajs/types").ValidationError | import("@aeriajs/types").PropertyValidationError;
|
|
696
698
|
} & {
|
|
697
|
-
httpStatus:
|
|
699
|
+
httpStatus: 400;
|
|
698
700
|
}> | {
|
|
699
701
|
readonly _tag: "Result";
|
|
700
702
|
readonly error: undefined;
|
|
@@ -707,29 +709,29 @@ export declare const collections: {
|
|
|
707
709
|
readonly error: undefined;
|
|
708
710
|
readonly result: any;
|
|
709
711
|
} | import("@aeriajs/types").Result.Error<{
|
|
710
|
-
readonly code:
|
|
712
|
+
readonly code: "OWNERSHIP_ERROR";
|
|
711
713
|
} & {
|
|
712
|
-
httpStatus:
|
|
714
|
+
httpStatus: 403;
|
|
713
715
|
}>>;
|
|
714
716
|
readonly insert: (payload: NoInfer<import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>>, context: Omit<import("@aeriajs/types").Context, "token">) => Promise<import("@aeriajs/types").Result.Error<{
|
|
715
|
-
readonly code:
|
|
717
|
+
readonly code: "AUTHORIZATION_ERROR";
|
|
716
718
|
readonly message: "user is not allowed to edit other users roles";
|
|
717
719
|
} & {
|
|
718
|
-
httpStatus:
|
|
720
|
+
httpStatus: 403;
|
|
719
721
|
}> | import("@aeriajs/types").Result.Error<{
|
|
720
|
-
readonly code:
|
|
722
|
+
readonly code: "AUTHORIZATION_ERROR";
|
|
721
723
|
readonly message: "tried to set unallowed roles";
|
|
722
724
|
} & {
|
|
723
|
-
httpStatus:
|
|
725
|
+
httpStatus: 403;
|
|
724
726
|
}> | import("@aeriajs/types").Result.Error<{
|
|
725
|
-
readonly code:
|
|
727
|
+
readonly code: "RESOURCE_NOT_FOUND";
|
|
726
728
|
} & {
|
|
727
|
-
httpStatus:
|
|
729
|
+
httpStatus: 404;
|
|
728
730
|
}> | import("@aeriajs/types").Result.Error<{
|
|
729
|
-
readonly code:
|
|
731
|
+
readonly code: "AUTHORIZATION_ERROR";
|
|
730
732
|
readonly message: "tried to edit an user with a role higher in the hierarchy";
|
|
731
733
|
} & {
|
|
732
|
-
httpStatus:
|
|
734
|
+
httpStatus: 403;
|
|
733
735
|
}> | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>>;
|
|
734
736
|
readonly editProfile: (payload: Partial<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
|
|
735
737
|
readonly $id: "user";
|
|
@@ -799,6 +801,7 @@ export declare const collections: {
|
|
|
799
801
|
readonly picture: "picture_file";
|
|
800
802
|
readonly information: "email";
|
|
801
803
|
readonly active: "active";
|
|
804
|
+
readonly translateBadge: true;
|
|
802
805
|
};
|
|
803
806
|
};
|
|
804
807
|
readonly individualActions: {
|
|
@@ -903,6 +906,7 @@ export declare const collections: {
|
|
|
903
906
|
readonly picture: "picture_file";
|
|
904
907
|
readonly information: "email";
|
|
905
908
|
readonly active: "active";
|
|
909
|
+
readonly translateBadge: true;
|
|
906
910
|
};
|
|
907
911
|
};
|
|
908
912
|
readonly individualActions: {
|
|
@@ -940,9 +944,9 @@ export declare const collections: {
|
|
|
940
944
|
};
|
|
941
945
|
};
|
|
942
946
|
}>> | import("@aeriajs/types").Result.Error<{
|
|
943
|
-
readonly code:
|
|
947
|
+
readonly code: "TARGET_IMMUTABLE";
|
|
944
948
|
} & {
|
|
945
|
-
httpStatus:
|
|
949
|
+
httpStatus: 403;
|
|
946
950
|
}>>;
|
|
947
951
|
readonly authenticate: (payload: {
|
|
948
952
|
email: string;
|
|
@@ -951,9 +955,9 @@ export declare const collections: {
|
|
|
951
955
|
token?: import("@aeriajs/types").TokenRecipient;
|
|
952
956
|
revalidate: true;
|
|
953
957
|
}, context: Omit<import("@aeriajs/types").Context, "token">) => Promise<import("@aeriajs/types").Result.Error<{
|
|
954
|
-
readonly code:
|
|
958
|
+
readonly code: "AUTHORIZATION_ERROR";
|
|
955
959
|
} & {
|
|
956
|
-
httpStatus:
|
|
960
|
+
httpStatus: 401;
|
|
957
961
|
}> | {
|
|
958
962
|
readonly _tag: "Result";
|
|
959
963
|
readonly error: undefined;
|
|
@@ -975,38 +979,38 @@ export declare const collections: {
|
|
|
975
979
|
readonly error: undefined;
|
|
976
980
|
readonly result: import("./authentication.js").SuccessfulAuthentication;
|
|
977
981
|
} | import("@aeriajs/types").Result.Error<{
|
|
978
|
-
readonly code:
|
|
982
|
+
readonly code: "INVALID_CREDENTIALS";
|
|
979
983
|
} & {
|
|
980
|
-
httpStatus:
|
|
984
|
+
httpStatus: 401;
|
|
981
985
|
}> | import("@aeriajs/types").Result.Error<{
|
|
982
|
-
readonly code:
|
|
986
|
+
readonly code: "INACTIVE_USER";
|
|
983
987
|
} & {
|
|
984
|
-
httpStatus:
|
|
988
|
+
httpStatus: 401;
|
|
985
989
|
}>>;
|
|
986
990
|
readonly activate: (payload: {
|
|
987
991
|
password?: string;
|
|
988
992
|
userId?: string;
|
|
989
993
|
token?: string;
|
|
990
994
|
}, context: Omit<import("@aeriajs/types").Context, "token">) => Promise<import("@aeriajs/types").Result.Error<{
|
|
991
|
-
readonly code:
|
|
995
|
+
readonly code: "INVALID_LINK";
|
|
992
996
|
} & {
|
|
993
|
-
httpStatus:
|
|
997
|
+
httpStatus: 404;
|
|
994
998
|
}> | import("@aeriajs/types").Result.Error<{
|
|
995
|
-
readonly code:
|
|
999
|
+
readonly code: "USER_NOT_FOUND";
|
|
996
1000
|
} & {
|
|
997
|
-
httpStatus:
|
|
1001
|
+
httpStatus: 404;
|
|
998
1002
|
}> | import("@aeriajs/types").Result.Error<{
|
|
999
|
-
readonly code:
|
|
1003
|
+
readonly code: "ALREADY_ACTIVE_USER";
|
|
1000
1004
|
} & {
|
|
1001
|
-
httpStatus:
|
|
1005
|
+
httpStatus: 403;
|
|
1002
1006
|
}> | import("@aeriajs/types").Result.Error<{
|
|
1003
|
-
readonly code:
|
|
1007
|
+
readonly code: "INVALID_TOKEN";
|
|
1004
1008
|
} & {
|
|
1005
|
-
httpStatus:
|
|
1009
|
+
httpStatus: 401;
|
|
1006
1010
|
}> | import("@aeriajs/types").Result.Error<{
|
|
1007
|
-
readonly code:
|
|
1011
|
+
readonly code: "MALFORMED_INPUT";
|
|
1008
1012
|
} & {
|
|
1009
|
-
httpStatus:
|
|
1013
|
+
httpStatus: 422;
|
|
1010
1014
|
}> | {
|
|
1011
1015
|
readonly _tag: "Result";
|
|
1012
1016
|
readonly error: undefined;
|
|
@@ -1082,6 +1086,7 @@ export declare const collections: {
|
|
|
1082
1086
|
readonly picture: "picture_file";
|
|
1083
1087
|
readonly information: "email";
|
|
1084
1088
|
readonly active: "active";
|
|
1089
|
+
readonly translateBadge: true;
|
|
1085
1090
|
};
|
|
1086
1091
|
};
|
|
1087
1092
|
readonly individualActions: {
|
|
@@ -1119,18 +1124,18 @@ export declare const collections: {
|
|
|
1119
1124
|
};
|
|
1120
1125
|
};
|
|
1121
1126
|
}>>> & Record<string, unknown>, context: Omit<import("@aeriajs/types").Context, "token">) => Promise<import("@aeriajs/types").Result.Error<{
|
|
1122
|
-
readonly code:
|
|
1127
|
+
readonly code: "SIGNUP_DISALLOWED";
|
|
1123
1128
|
} & {
|
|
1124
|
-
httpStatus:
|
|
1129
|
+
httpStatus: 403;
|
|
1125
1130
|
}> | import("@aeriajs/types").Result.Error<{
|
|
1126
|
-
readonly code:
|
|
1131
|
+
readonly code: "MALFORMED_INPUT";
|
|
1127
1132
|
readonly details: import("@aeriajs/types").PropertyValidationError | import("@aeriajs/types").ValidationError;
|
|
1128
1133
|
} & {
|
|
1129
|
-
httpStatus:
|
|
1134
|
+
httpStatus: 400;
|
|
1130
1135
|
}> | import("@aeriajs/types").Result.Error<{
|
|
1131
|
-
readonly code:
|
|
1136
|
+
readonly code: "OWNERSHIP_ERROR";
|
|
1132
1137
|
} & {
|
|
1133
|
-
httpStatus:
|
|
1138
|
+
httpStatus: 403;
|
|
1134
1139
|
}> | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
|
|
1135
1140
|
readonly $id: "user";
|
|
1136
1141
|
readonly icon: "users";
|
|
@@ -1199,6 +1204,7 @@ export declare const collections: {
|
|
|
1199
1204
|
readonly picture: "picture_file";
|
|
1200
1205
|
readonly information: "email";
|
|
1201
1206
|
readonly active: "active";
|
|
1207
|
+
readonly translateBadge: true;
|
|
1202
1208
|
};
|
|
1203
1209
|
};
|
|
1204
1210
|
readonly individualActions: {
|
|
@@ -1240,17 +1246,17 @@ export declare const collections: {
|
|
|
1240
1246
|
userId: string;
|
|
1241
1247
|
token: string;
|
|
1242
1248
|
}, context: Omit<import("@aeriajs/types").Context, "token">) => Promise<import("@aeriajs/types").Result.Error<{
|
|
1243
|
-
readonly code:
|
|
1249
|
+
readonly code: "INVALID_LINK";
|
|
1244
1250
|
} & {
|
|
1245
|
-
httpStatus:
|
|
1251
|
+
httpStatus: 404;
|
|
1246
1252
|
}> | import("@aeriajs/types").Result.Error<{
|
|
1247
|
-
readonly code:
|
|
1253
|
+
readonly code: "USER_NOT_FOUND";
|
|
1248
1254
|
} & {
|
|
1249
|
-
httpStatus:
|
|
1255
|
+
httpStatus: 404;
|
|
1250
1256
|
}> | import("@aeriajs/types").Result.Error<{
|
|
1251
|
-
readonly code:
|
|
1257
|
+
readonly code: "INVALID_TOKEN";
|
|
1252
1258
|
} & {
|
|
1253
|
-
httpStatus:
|
|
1259
|
+
httpStatus: 401;
|
|
1254
1260
|
}> | {
|
|
1255
1261
|
readonly _tag: "Result";
|
|
1256
1262
|
readonly error: undefined;
|
|
@@ -1341,6 +1347,7 @@ export declare const collections: {
|
|
|
1341
1347
|
readonly picture: "picture_file";
|
|
1342
1348
|
readonly information: "email";
|
|
1343
1349
|
readonly active: "active";
|
|
1350
|
+
readonly translateBadge: true;
|
|
1344
1351
|
};
|
|
1345
1352
|
};
|
|
1346
1353
|
readonly individualActions: {
|
|
@@ -1386,10 +1393,10 @@ export declare const collections: {
|
|
|
1386
1393
|
readonly _tag: "Error";
|
|
1387
1394
|
readonly error: Pick<{} & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
|
|
1388
1395
|
readonly httpStatus: {
|
|
1389
|
-
readonly enum: [
|
|
1396
|
+
readonly enum: [403, 404, 400];
|
|
1390
1397
|
};
|
|
1391
1398
|
readonly code: {
|
|
1392
|
-
readonly enum: [
|
|
1399
|
+
readonly enum: ["RESOURCE_NOT_FOUND", "OWNERSHIP_ERROR", "INSECURE_OPERATOR", "MALFORMED_INPUT"];
|
|
1393
1400
|
};
|
|
1394
1401
|
readonly message: {
|
|
1395
1402
|
readonly type: "string";
|
|
@@ -1399,16 +1406,16 @@ export declare const collections: {
|
|
|
1399
1406
|
readonly additionalProperties: true;
|
|
1400
1407
|
};
|
|
1401
1408
|
}>> & {
|
|
1402
|
-
code:
|
|
1403
|
-
httpStatus:
|
|
1409
|
+
code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "MALFORMED_INPUT";
|
|
1410
|
+
httpStatus: 403 | 400 | 404;
|
|
1404
1411
|
message: string;
|
|
1405
1412
|
details: any;
|
|
1406
1413
|
}, never>, "code" | "httpStatus"> & Partial<{} & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
|
|
1407
1414
|
readonly httpStatus: {
|
|
1408
|
-
readonly enum: [
|
|
1415
|
+
readonly enum: [403, 404, 400];
|
|
1409
1416
|
};
|
|
1410
1417
|
readonly code: {
|
|
1411
|
-
readonly enum: [
|
|
1418
|
+
readonly enum: ["RESOURCE_NOT_FOUND", "OWNERSHIP_ERROR", "INSECURE_OPERATOR", "MALFORMED_INPUT"];
|
|
1412
1419
|
};
|
|
1413
1420
|
readonly message: {
|
|
1414
1421
|
readonly type: "string";
|
|
@@ -1418,20 +1425,20 @@ export declare const collections: {
|
|
|
1418
1425
|
readonly additionalProperties: true;
|
|
1419
1426
|
};
|
|
1420
1427
|
}>> & {
|
|
1421
|
-
code:
|
|
1422
|
-
httpStatus:
|
|
1428
|
+
code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "MALFORMED_INPUT";
|
|
1429
|
+
httpStatus: 403 | 400 | 404;
|
|
1423
1430
|
message: string;
|
|
1424
1431
|
details: any;
|
|
1425
1432
|
}, never>>;
|
|
1426
1433
|
readonly result: undefined;
|
|
1427
1434
|
} | import("@aeriajs/types").Result.Error<{
|
|
1428
|
-
readonly code:
|
|
1435
|
+
readonly code: "INVALID_LINK";
|
|
1429
1436
|
} & {
|
|
1430
|
-
httpStatus:
|
|
1437
|
+
httpStatus: 400;
|
|
1431
1438
|
}> | import("@aeriajs/types").Result.Error<{
|
|
1432
|
-
readonly code:
|
|
1439
|
+
readonly code: "ALREADY_ACTIVE_USER";
|
|
1433
1440
|
} & {
|
|
1434
|
-
httpStatus:
|
|
1441
|
+
httpStatus: 403;
|
|
1435
1442
|
}> | {
|
|
1436
1443
|
readonly _tag: "Result";
|
|
1437
1444
|
readonly error: undefined;
|
|
@@ -1446,10 +1453,10 @@ export declare const collections: {
|
|
|
1446
1453
|
readonly _tag: "Error";
|
|
1447
1454
|
readonly error: Pick<{} & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
|
|
1448
1455
|
readonly httpStatus: {
|
|
1449
|
-
readonly enum: [
|
|
1456
|
+
readonly enum: [403, 404, 400];
|
|
1450
1457
|
};
|
|
1451
1458
|
readonly code: {
|
|
1452
|
-
readonly enum: [
|
|
1459
|
+
readonly enum: ["RESOURCE_NOT_FOUND", "OWNERSHIP_ERROR", "INSECURE_OPERATOR", "MALFORMED_INPUT"];
|
|
1453
1460
|
};
|
|
1454
1461
|
readonly message: {
|
|
1455
1462
|
readonly type: "string";
|
|
@@ -1459,16 +1466,16 @@ export declare const collections: {
|
|
|
1459
1466
|
readonly additionalProperties: true;
|
|
1460
1467
|
};
|
|
1461
1468
|
}>> & {
|
|
1462
|
-
code:
|
|
1463
|
-
httpStatus:
|
|
1469
|
+
code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "MALFORMED_INPUT";
|
|
1470
|
+
httpStatus: 403 | 400 | 404;
|
|
1464
1471
|
message: string;
|
|
1465
1472
|
details: any;
|
|
1466
1473
|
}, never>, "code" | "httpStatus"> & Partial<{} & Omit<Readonly<import("@aeriajs/types").FilterReadonlyProperties<{
|
|
1467
1474
|
readonly httpStatus: {
|
|
1468
|
-
readonly enum: [
|
|
1475
|
+
readonly enum: [403, 404, 400];
|
|
1469
1476
|
};
|
|
1470
1477
|
readonly code: {
|
|
1471
|
-
readonly enum: [
|
|
1478
|
+
readonly enum: ["RESOURCE_NOT_FOUND", "OWNERSHIP_ERROR", "INSECURE_OPERATOR", "MALFORMED_INPUT"];
|
|
1472
1479
|
};
|
|
1473
1480
|
readonly message: {
|
|
1474
1481
|
readonly type: "string";
|
|
@@ -1478,16 +1485,16 @@ export declare const collections: {
|
|
|
1478
1485
|
readonly additionalProperties: true;
|
|
1479
1486
|
};
|
|
1480
1487
|
}>> & {
|
|
1481
|
-
code:
|
|
1482
|
-
httpStatus:
|
|
1488
|
+
code: "RESOURCE_NOT_FOUND" | "INSECURE_OPERATOR" | "OWNERSHIP_ERROR" | "MALFORMED_INPUT";
|
|
1489
|
+
httpStatus: 403 | 400 | 404;
|
|
1483
1490
|
message: string;
|
|
1484
1491
|
details: any;
|
|
1485
1492
|
}, never>>;
|
|
1486
1493
|
readonly result: undefined;
|
|
1487
1494
|
} | import("@aeriajs/types").Result.Error<{
|
|
1488
|
-
readonly code:
|
|
1495
|
+
readonly code: "USER_NOT_ACTIVE";
|
|
1489
1496
|
} & {
|
|
1490
|
-
httpStatus:
|
|
1497
|
+
httpStatus: 403;
|
|
1491
1498
|
}> | {
|
|
1492
1499
|
readonly _tag: "Result";
|
|
1493
1500
|
readonly error: undefined;
|
|
@@ -1500,25 +1507,25 @@ export declare const collections: {
|
|
|
1500
1507
|
userId?: string;
|
|
1501
1508
|
token?: string;
|
|
1502
1509
|
}, context: Omit<import("@aeriajs/types").Context, "token">) => Promise<import("@aeriajs/types").Result.Error<{
|
|
1503
|
-
readonly code:
|
|
1510
|
+
readonly code: "INVALID_LINK";
|
|
1504
1511
|
} & {
|
|
1505
|
-
httpStatus:
|
|
1512
|
+
httpStatus: 404;
|
|
1506
1513
|
}> | import("@aeriajs/types").Result.Error<{
|
|
1507
|
-
readonly code:
|
|
1514
|
+
readonly code: "USER_NOT_FOUND";
|
|
1508
1515
|
} & {
|
|
1509
|
-
httpStatus:
|
|
1516
|
+
httpStatus: 404;
|
|
1510
1517
|
}> | import("@aeriajs/types").Result.Error<{
|
|
1511
|
-
readonly code:
|
|
1518
|
+
readonly code: "USER_NOT_ACTIVE";
|
|
1512
1519
|
} & {
|
|
1513
|
-
httpStatus:
|
|
1520
|
+
httpStatus: 403;
|
|
1514
1521
|
}> | import("@aeriajs/types").Result.Error<{
|
|
1515
|
-
readonly code:
|
|
1522
|
+
readonly code: "INVALID_TOKEN";
|
|
1516
1523
|
} & {
|
|
1517
|
-
httpStatus:
|
|
1524
|
+
httpStatus: 401;
|
|
1518
1525
|
}> | import("@aeriajs/types").Result.Error<{
|
|
1519
|
-
readonly code:
|
|
1526
|
+
readonly code: "MALFORMED_INPUT";
|
|
1520
1527
|
} & {
|
|
1521
|
-
httpStatus:
|
|
1528
|
+
httpStatus: 422;
|
|
1522
1529
|
}> | {
|
|
1523
1530
|
readonly _tag: "Result";
|
|
1524
1531
|
readonly error: undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/builtins",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.233",
|
|
4
4
|
"description": "## Installation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -8,16 +8,6 @@
|
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
|
-
"scripts": {
|
|
12
|
-
"test": "echo skipping",
|
|
13
|
-
"lint": "eslint .",
|
|
14
|
-
"lint:fix": "eslint . --fix",
|
|
15
|
-
"build": "pnpm build:cjs && pnpm build:esm",
|
|
16
|
-
"build:cjs": "tsc",
|
|
17
|
-
"build:esm": "esbuild './src/**/*.ts' --outdir=dist --out-extension:.js=.mjs && pnpm build:esm-transform",
|
|
18
|
-
"build:esm-transform": "pnpm -w esm-transform $PWD/dist",
|
|
19
|
-
"write-icons": "pnpm -w write-icons"
|
|
20
|
-
},
|
|
21
11
|
"keywords": [],
|
|
22
12
|
"author": "",
|
|
23
13
|
"license": "ISC",
|
|
@@ -55,10 +45,20 @@
|
|
|
55
45
|
"mongodb": "^6.5.0"
|
|
56
46
|
},
|
|
57
47
|
"peerDependencies": {
|
|
58
|
-
"@aeriajs/core": "^0.0.
|
|
48
|
+
"@aeriajs/core": "^0.0.233",
|
|
59
49
|
"@aeriajs/common": "^0.0.132",
|
|
60
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
50
|
+
"@aeriajs/entrypoint": "^0.0.136",
|
|
61
51
|
"@aeriajs/types": "^0.0.114",
|
|
62
|
-
"@aeriajs/validation": "^0.0.
|
|
52
|
+
"@aeriajs/validation": "^0.0.148"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"test": "echo skipping",
|
|
56
|
+
"lint": "eslint .",
|
|
57
|
+
"lint:fix": "eslint . --fix",
|
|
58
|
+
"build": "pnpm build:cjs && pnpm build:esm",
|
|
59
|
+
"build:cjs": "tsc",
|
|
60
|
+
"build:esm": "esbuild './src/**/*.ts' --outdir=dist --out-extension:.js=.mjs && pnpm build:esm-transform",
|
|
61
|
+
"build:esm-transform": "pnpm -w esm-transform $PWD/dist",
|
|
62
|
+
"write-icons": "pnpm -w write-icons"
|
|
63
63
|
}
|
|
64
|
-
}
|
|
64
|
+
}
|