@aeriajs/builtins 0.0.142 → 0.0.143

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.
@@ -154,11 +154,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
154
154
  what: {
155
155
  content: string;
156
156
  } & Pick<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof description>>, "_id" | "name" | "owner" | "absolute_path">;
157
- }, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
158
- readonly _tag: "Error";
159
- readonly error: import("@aeriajs/types").ACError;
160
- readonly result: undefined;
161
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
157
+ }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
162
158
  readonly $id: "file";
163
159
  readonly icon: "paperclip";
164
160
  readonly owned: "always";
@@ -226,6 +222,10 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
226
222
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
227
223
  } & {
228
224
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
225
+ }> | import("@aeriajs/types").Result.Error<{
226
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
227
+ } & {
228
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
229
229
  }>>;
230
230
  readonly removeAll: (payload: import("@aeriajs/types").RemoveAllPayload, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
231
231
  readonly _tag: "Result";
@@ -235,6 +235,10 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
235
235
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
236
236
  } & {
237
237
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
238
+ }> | import("@aeriajs/types").Result.Error<{
239
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
240
+ } & {
241
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
238
242
  }>>;
239
243
  };
240
244
  exposedFunctions: {
@@ -353,11 +357,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
353
357
  what: {
354
358
  content: string;
355
359
  } & Pick<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof description>>, "_id" | "name" | "owner" | "absolute_path">;
356
- }, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
357
- readonly _tag: "Error";
358
- readonly error: import("@aeriajs/types").ACError;
359
- readonly result: undefined;
360
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
360
+ }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
361
361
  readonly $id: "file";
362
362
  readonly icon: "paperclip";
363
363
  readonly owned: "always";
@@ -425,6 +425,10 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
425
425
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
426
426
  } & {
427
427
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
428
+ }> | import("@aeriajs/types").Result.Error<{
429
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
430
+ } & {
431
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
428
432
  }>>;
429
433
  readonly removeAll: (payload: import("@aeriajs/types").RemoveAllPayload, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
430
434
  readonly _tag: "Result";
@@ -434,6 +438,10 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
434
438
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
435
439
  } & {
436
440
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
441
+ }> | import("@aeriajs/types").Result.Error<{
442
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
443
+ } & {
444
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
437
445
  }>>;
438
446
  };
439
447
  contracts: {
@@ -4,11 +4,7 @@ export declare const insert: (payload: {
4
4
  what: {
5
5
  content: string;
6
6
  } & Pick<PackReferences<SchemaWithId<typeof description>>, "_id" | "name" | "owner" | "absolute_path">;
7
- }, context: Context<typeof description>) => Promise<{
8
- readonly _tag: "Error";
9
- readonly error: import("@aeriajs/types").ACError;
10
- readonly result: undefined;
11
- } | import("@aeriajs/types").InsertReturnType<SchemaWithId<{
7
+ }, context: Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<SchemaWithId<{
12
8
  readonly $id: "file";
13
9
  readonly icon: "paperclip";
14
10
  readonly owned: "always";
@@ -8,4 +8,8 @@ export declare const remove: (payload: RemovePayload<SchemaWithId<typeof descrip
8
8
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
9
9
  } & {
10
10
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
11
+ }> | import("@aeriajs/types").Result.Error<{
12
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
13
+ } & {
14
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
11
15
  }>>;
@@ -8,4 +8,8 @@ export declare const removeAll: (payload: RemoveAllPayload, context: Context<typ
8
8
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
9
9
  } & {
10
10
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
11
+ }> | import("@aeriajs/types").Result.Error<{
12
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
13
+ } & {
14
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
11
15
  }>>;
@@ -30,18 +30,14 @@ export declare const log: Omit<import("@aeriajs/types").Collection<{
30
30
  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>>>;
31
31
  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<{
32
32
  readonly _tag: "Error";
33
- readonly error: import("@aeriajs/types").ACError.InvalidLimit;
33
+ readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
34
34
  readonly result: undefined;
35
35
  } | {
36
36
  readonly _tag: "Result";
37
37
  readonly error: undefined;
38
38
  readonly result: import("@aeriajs/types").SchemaWithId<any>[];
39
39
  }>;
40
- readonly insert: (payload: import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").InsertOptions) => Promise<{
41
- readonly _tag: "Error";
42
- readonly error: import("@aeriajs/types").ACError;
43
- readonly result: undefined;
44
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<any>>>;
40
+ 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>>>;
45
41
  };
46
42
  exposedFunctions: {
47
43
  readonly get: true;
@@ -107,18 +103,14 @@ export declare const log: Omit<import("@aeriajs/types").Collection<{
107
103
  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>>>;
108
104
  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<{
109
105
  readonly _tag: "Error";
110
- readonly error: import("@aeriajs/types").ACError.InvalidLimit;
106
+ readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
111
107
  readonly result: undefined;
112
108
  } | {
113
109
  readonly _tag: "Result";
114
110
  readonly error: undefined;
115
111
  readonly result: import("@aeriajs/types").SchemaWithId<any>[];
116
112
  }>;
117
- readonly insert: (payload: import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").InsertOptions) => Promise<{
118
- readonly _tag: "Error";
119
- readonly error: import("@aeriajs/types").ACError;
120
- readonly result: undefined;
121
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<any>>>;
113
+ 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>>>;
122
114
  };
123
115
  contracts: {
124
116
  readonly get?: import("@aeriajs/types").Contract | undefined;
@@ -7,7 +7,7 @@ export declare const getActivationLink: (payload: {
7
7
  userId: ObjectId | string;
8
8
  }, context: Context) => Promise<{
9
9
  readonly _tag: "Error";
10
- readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, HTTPStatus.BadRequest | HTTPStatus.NotFound>;
10
+ readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.OwnershipError | import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, HTTPStatus.BadRequest | HTTPStatus.Forbidden | HTTPStatus.NotFound>;
11
11
  readonly result: undefined;
12
12
  } | Result.Error<{
13
13
  readonly code: ActivationError.AlreadyActiveUser;
@@ -104,7 +104,7 @@ export declare const user: {
104
104
  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>>>;
105
105
  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<{
106
106
  readonly _tag: "Error";
107
- readonly error: import("@aeriajs/types").ACError.InvalidLimit;
107
+ readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
108
108
  readonly result: undefined;
109
109
  } | {
110
110
  readonly _tag: "Result";
@@ -119,6 +119,10 @@ export declare const user: {
119
119
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
120
120
  } & {
121
121
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
122
+ }> | import("@aeriajs/types").Result.Error<{
123
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
124
+ } & {
125
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
122
126
  }>>;
123
127
  readonly upload: (_props: unknown, context: import("@aeriajs/types").StrictContext<any>) => Promise<import("@aeriajs/types").Result.Error<{
124
128
  readonly code: import("@aeriajs/types").ACError.MalformedInput;
@@ -136,14 +140,14 @@ export declare const user: {
136
140
  readonly _tag: "Result";
137
141
  readonly error: undefined;
138
142
  readonly result: any;
139
- }>;
143
+ } | import("@aeriajs/types").Result.Error<{
144
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
145
+ } & {
146
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
147
+ }>>;
140
148
  readonly insert: (payload: {
141
149
  what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof description>>, "roles">;
142
- }, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
143
- readonly _tag: "Error";
144
- readonly error: import("@aeriajs/types").ACError;
145
- readonly result: undefined;
146
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
150
+ }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
147
151
  readonly $id: "user";
148
152
  readonly icon: "users";
149
153
  readonly required: readonly ["name", "roles", "email"];
@@ -458,7 +462,7 @@ export declare const user: {
458
462
  userId: import("@aeriajs/core").ObjectId | string;
459
463
  }, context: import("@aeriajs/types").Context) => Promise<{
460
464
  readonly _tag: "Error";
461
- readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, import("@aeriajs/types").HTTPStatus.BadRequest | import("@aeriajs/types").HTTPStatus.NotFound>;
465
+ readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.OwnershipError | import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, import("@aeriajs/types").HTTPStatus.BadRequest | import("@aeriajs/types").HTTPStatus.Forbidden | import("@aeriajs/types").HTTPStatus.NotFound>;
462
466
  readonly result: undefined;
463
467
  } | import("@aeriajs/types").Result.Error<{
464
468
  readonly code: import("./activate.js").ActivationError.AlreadyActiveUser;
@@ -685,7 +689,7 @@ export declare const user: {
685
689
  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>>>;
686
690
  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<{
687
691
  readonly _tag: "Error";
688
- readonly error: import("@aeriajs/types").ACError.InvalidLimit;
692
+ readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
689
693
  readonly result: undefined;
690
694
  } | {
691
695
  readonly _tag: "Result";
@@ -700,6 +704,10 @@ export declare const user: {
700
704
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
701
705
  } & {
702
706
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
707
+ }> | import("@aeriajs/types").Result.Error<{
708
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
709
+ } & {
710
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
703
711
  }>>;
704
712
  readonly upload: (_props: unknown, context: import("@aeriajs/types").StrictContext<any>) => Promise<import("@aeriajs/types").Result.Error<{
705
713
  readonly code: import("@aeriajs/types").ACError.MalformedInput;
@@ -717,14 +725,14 @@ export declare const user: {
717
725
  readonly _tag: "Result";
718
726
  readonly error: undefined;
719
727
  readonly result: any;
720
- }>;
728
+ } | import("@aeriajs/types").Result.Error<{
729
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
730
+ } & {
731
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
732
+ }>>;
721
733
  readonly insert: (payload: {
722
734
  what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof description>>, "roles">;
723
- }, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
724
- readonly _tag: "Error";
725
- readonly error: import("@aeriajs/types").ACError;
726
- readonly result: undefined;
727
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
735
+ }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
728
736
  readonly $id: "user";
729
737
  readonly icon: "users";
730
738
  readonly required: readonly ["name", "roles", "email"];
@@ -1039,7 +1047,7 @@ export declare const user: {
1039
1047
  userId: import("@aeriajs/core").ObjectId | string;
1040
1048
  }, context: import("@aeriajs/types").Context) => Promise<{
1041
1049
  readonly _tag: "Error";
1042
- readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, import("@aeriajs/types").HTTPStatus.BadRequest | import("@aeriajs/types").HTTPStatus.NotFound>;
1050
+ readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.OwnershipError | import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, import("@aeriajs/types").HTTPStatus.BadRequest | import("@aeriajs/types").HTTPStatus.Forbidden | import("@aeriajs/types").HTTPStatus.NotFound>;
1043
1051
  readonly result: undefined;
1044
1052
  } | import("@aeriajs/types").Result.Error<{
1045
1053
  readonly code: import("./activate.js").ActivationError.AlreadyActiveUser;
@@ -2,11 +2,7 @@ import type { Context, SchemaWithId, PackReferences } from '@aeriajs/types';
2
2
  import type { description } from './description';
3
3
  export declare const insert: (payload: {
4
4
  what: Omit<PackReferences<SchemaWithId<typeof description>>, "roles">;
5
- }, context: Context<typeof description>) => Promise<{
6
- readonly _tag: "Error";
7
- readonly error: import("@aeriajs/types").ACError;
8
- readonly result: undefined;
9
- } | import("@aeriajs/types").InsertReturnType<SchemaWithId<{
5
+ }, context: Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<SchemaWithId<{
10
6
  readonly $id: "user";
11
7
  readonly icon: "users";
12
8
  readonly required: readonly ["name", "roles", "email"];
package/dist/index.d.ts CHANGED
@@ -66,11 +66,7 @@ export declare const collections: {
66
66
  what: {
67
67
  content: string;
68
68
  } & Pick<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof import("./collections/file/description.js").description>>, "_id" | "name" | "owner" | "absolute_path">;
69
- }, context: import("@aeriajs/types").Context<typeof import("./collections/file/description.js").description>) => Promise<{
70
- readonly _tag: "Error";
71
- readonly error: import("@aeriajs/types").ACError;
72
- readonly result: undefined;
73
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
69
+ }, context: import("@aeriajs/types").Context<typeof import("./collections/file/description.js").description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
74
70
  readonly $id: "file";
75
71
  readonly icon: "paperclip";
76
72
  readonly owned: "always";
@@ -138,6 +134,10 @@ export declare const collections: {
138
134
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
139
135
  } & {
140
136
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
137
+ }> | import("@aeriajs/types").Result.Error<{
138
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
139
+ } & {
140
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
141
141
  }>>;
142
142
  readonly removeAll: (payload: import("@aeriajs/types").RemoveAllPayload, context: import("@aeriajs/types").Context<typeof import("./collections/file/description.js").description>) => Promise<{
143
143
  readonly _tag: "Result";
@@ -147,6 +147,10 @@ export declare const collections: {
147
147
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
148
148
  } & {
149
149
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
150
+ }> | import("@aeriajs/types").Result.Error<{
151
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
152
+ } & {
153
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
150
154
  }>>;
151
155
  };
152
156
  exposedFunctions: {
@@ -265,11 +269,7 @@ export declare const collections: {
265
269
  what: {
266
270
  content: string;
267
271
  } & Pick<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof import("./collections/file/description.js").description>>, "_id" | "name" | "owner" | "absolute_path">;
268
- }, context: import("@aeriajs/types").Context<typeof import("./collections/file/description.js").description>) => Promise<{
269
- readonly _tag: "Error";
270
- readonly error: import("@aeriajs/types").ACError;
271
- readonly result: undefined;
272
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
272
+ }, context: import("@aeriajs/types").Context<typeof import("./collections/file/description.js").description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
273
273
  readonly $id: "file";
274
274
  readonly icon: "paperclip";
275
275
  readonly owned: "always";
@@ -337,6 +337,10 @@ export declare const collections: {
337
337
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
338
338
  } & {
339
339
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
340
+ }> | import("@aeriajs/types").Result.Error<{
341
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
342
+ } & {
343
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
340
344
  }>>;
341
345
  readonly removeAll: (payload: import("@aeriajs/types").RemoveAllPayload, context: import("@aeriajs/types").Context<typeof import("./collections/file/description.js").description>) => Promise<{
342
346
  readonly _tag: "Result";
@@ -346,6 +350,10 @@ export declare const collections: {
346
350
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
347
351
  } & {
348
352
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
353
+ }> | import("@aeriajs/types").Result.Error<{
354
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
355
+ } & {
356
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
349
357
  }>>;
350
358
  };
351
359
  contracts: {
@@ -485,18 +493,14 @@ export declare const collections: {
485
493
  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>>>;
486
494
  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<{
487
495
  readonly _tag: "Error";
488
- readonly error: import("@aeriajs/types").ACError.InvalidLimit;
496
+ readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
489
497
  readonly result: undefined;
490
498
  } | {
491
499
  readonly _tag: "Result";
492
500
  readonly error: undefined;
493
501
  readonly result: import("@aeriajs/types").SchemaWithId<any>[];
494
502
  }>;
495
- readonly insert: (payload: import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").InsertOptions) => Promise<{
496
- readonly _tag: "Error";
497
- readonly error: import("@aeriajs/types").ACError;
498
- readonly result: undefined;
499
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<any>>>;
503
+ 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>>>;
500
504
  };
501
505
  exposedFunctions: {
502
506
  readonly get: true;
@@ -562,18 +566,14 @@ export declare const collections: {
562
566
  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>>>;
563
567
  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<{
564
568
  readonly _tag: "Error";
565
- readonly error: import("@aeriajs/types").ACError.InvalidLimit;
569
+ readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
566
570
  readonly result: undefined;
567
571
  } | {
568
572
  readonly _tag: "Result";
569
573
  readonly error: undefined;
570
574
  readonly result: import("@aeriajs/types").SchemaWithId<any>[];
571
575
  }>;
572
- readonly insert: (payload: import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").StrictContext<any>, options?: import("@aeriajs/core").InsertOptions) => Promise<{
573
- readonly _tag: "Error";
574
- readonly error: import("@aeriajs/types").ACError;
575
- readonly result: undefined;
576
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<any>>>;
576
+ 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>>>;
577
577
  };
578
578
  contracts: {
579
579
  readonly get?: import("@aeriajs/types").Contract | undefined;
@@ -798,7 +798,7 @@ export declare const collections: {
798
798
  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>>>;
799
799
  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<{
800
800
  readonly _tag: "Error";
801
- readonly error: import("@aeriajs/types").ACError.InvalidLimit;
801
+ readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
802
802
  readonly result: undefined;
803
803
  } | {
804
804
  readonly _tag: "Result";
@@ -813,6 +813,10 @@ export declare const collections: {
813
813
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
814
814
  } & {
815
815
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
816
+ }> | import("@aeriajs/types").Result.Error<{
817
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
818
+ } & {
819
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
816
820
  }>>;
817
821
  readonly upload: (_props: unknown, context: import("@aeriajs/types").StrictContext<any>) => Promise<import("@aeriajs/types").Result.Error<{
818
822
  readonly code: import("@aeriajs/types").ACError.MalformedInput;
@@ -830,14 +834,14 @@ export declare const collections: {
830
834
  readonly _tag: "Result";
831
835
  readonly error: undefined;
832
836
  readonly result: any;
833
- }>;
837
+ } | import("@aeriajs/types").Result.Error<{
838
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
839
+ } & {
840
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
841
+ }>>;
834
842
  readonly insert: (payload: {
835
843
  what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof import("./collections/user/description.js").description>>, "roles">;
836
- }, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<{
837
- readonly _tag: "Error";
838
- readonly error: import("@aeriajs/types").ACError;
839
- readonly result: undefined;
840
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
844
+ }, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
841
845
  readonly $id: "user";
842
846
  readonly icon: "users";
843
847
  readonly required: readonly ["name", "roles", "email"];
@@ -1152,7 +1156,7 @@ export declare const collections: {
1152
1156
  userId: import("mongodb").ObjectId | string;
1153
1157
  }, context: import("@aeriajs/types").Context) => Promise<{
1154
1158
  readonly _tag: "Error";
1155
- readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, import("@aeriajs/types").HTTPStatus.BadRequest | import("@aeriajs/types").HTTPStatus.NotFound>;
1159
+ readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.OwnershipError | import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, import("@aeriajs/types").HTTPStatus.BadRequest | import("@aeriajs/types").HTTPStatus.Forbidden | import("@aeriajs/types").HTTPStatus.NotFound>;
1156
1160
  readonly result: undefined;
1157
1161
  } | import("@aeriajs/types").Result.Error<{
1158
1162
  readonly code: import("./collections/user/activate.js").ActivationError.AlreadyActiveUser;
@@ -1379,7 +1383,7 @@ export declare const collections: {
1379
1383
  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>>>;
1380
1384
  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<{
1381
1385
  readonly _tag: "Error";
1382
- readonly error: import("@aeriajs/types").ACError.InvalidLimit;
1386
+ readonly error: import("@aeriajs/types").ACError.InvalidLimit | import("@aeriajs/types").ACError.OwnershipError;
1383
1387
  readonly result: undefined;
1384
1388
  } | {
1385
1389
  readonly _tag: "Result";
@@ -1394,6 +1398,10 @@ export declare const collections: {
1394
1398
  readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
1395
1399
  } & {
1396
1400
  httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
1401
+ }> | import("@aeriajs/types").Result.Error<{
1402
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
1403
+ } & {
1404
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
1397
1405
  }>>;
1398
1406
  readonly upload: (_props: unknown, context: import("@aeriajs/types").StrictContext<any>) => Promise<import("@aeriajs/types").Result.Error<{
1399
1407
  readonly code: import("@aeriajs/types").ACError.MalformedInput;
@@ -1411,14 +1419,14 @@ export declare const collections: {
1411
1419
  readonly _tag: "Result";
1412
1420
  readonly error: undefined;
1413
1421
  readonly result: any;
1414
- }>;
1422
+ } | import("@aeriajs/types").Result.Error<{
1423
+ readonly code: import("@aeriajs/types").ACError.OwnershipError;
1424
+ } & {
1425
+ httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
1426
+ }>>;
1415
1427
  readonly insert: (payload: {
1416
1428
  what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof import("./collections/user/description.js").description>>, "roles">;
1417
- }, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<{
1418
- readonly _tag: "Error";
1419
- readonly error: import("@aeriajs/types").ACError;
1420
- readonly result: undefined;
1421
- } | import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
1429
+ }, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
1422
1430
  readonly $id: "user";
1423
1431
  readonly icon: "users";
1424
1432
  readonly required: readonly ["name", "roles", "email"];
@@ -1733,7 +1741,7 @@ export declare const collections: {
1733
1741
  userId: import("mongodb").ObjectId | string;
1734
1742
  }, context: import("@aeriajs/types").Context) => Promise<{
1735
1743
  readonly _tag: "Error";
1736
- readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, import("@aeriajs/types").HTTPStatus.BadRequest | import("@aeriajs/types").HTTPStatus.NotFound>;
1744
+ readonly error: import("@aeriajs/types").StrictEndpointError<import("@aeriajs/types").ACError.OwnershipError | import("@aeriajs/types").ACError.ResourceNotFound | import("@aeriajs/types").ACError.MalformedInput, unknown, import("@aeriajs/types").HTTPStatus.BadRequest | import("@aeriajs/types").HTTPStatus.Forbidden | import("@aeriajs/types").HTTPStatus.NotFound>;
1737
1745
  readonly result: undefined;
1738
1746
  } | import("@aeriajs/types").Result.Error<{
1739
1747
  readonly code: import("./collections/user/activate.js").ActivationError.AlreadyActiveUser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/builtins",
3
- "version": "0.0.142",
3
+ "version": "0.0.143",
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.142",
49
- "@aeriajs/common": "^0.0.88",
50
- "@aeriajs/entrypoint": "^0.0.90",
51
- "@aeriajs/types": "^0.0.76",
52
- "@aeriajs/validation": "^0.0.91"
48
+ "@aeriajs/core": "^0.0.143",
49
+ "@aeriajs/common": "^0.0.89",
50
+ "@aeriajs/entrypoint": "^0.0.91",
51
+ "@aeriajs/types": "^0.0.77",
52
+ "@aeriajs/validation": "^0.0.92"
53
53
  },
54
54
  "scripts": {
55
55
  "test": "echo skipping",