@aeriajs/builtins 0.0.164 → 0.0.166
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/collections/file/index.d.ts +14 -197
- package/dist/collections/log/index.d.ts +7 -45
- package/dist/collections/resourceUsage/index.d.ts +3 -39
- package/dist/collections/user/createAccount.d.ts +1 -0
- 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/getCurrentUser.d.ts +1 -0
- package/dist/collections/user/index.d.ts +18 -481
- package/dist/collections/user/index.js +3 -1
- package/dist/collections/user/index.mjs +5 -3
- package/dist/functions/describe.d.ts +1 -1
- package/dist/index.d.ts +119 -840
- package/package.json +6 -6
|
@@ -1,36 +1,5 @@
|
|
|
1
1
|
import { description } from './description.js';
|
|
2
|
-
export declare const tempFile: Omit<import("@aeriajs/types").Collection<{
|
|
3
|
-
description: {
|
|
4
|
-
readonly $id: "tempFile";
|
|
5
|
-
readonly icon: "file";
|
|
6
|
-
readonly hidden: true;
|
|
7
|
-
readonly temporary: {
|
|
8
|
-
readonly index: "created_at";
|
|
9
|
-
readonly expireAfterSeconds: 3600;
|
|
10
|
-
};
|
|
11
|
-
readonly properties: {
|
|
12
|
-
readonly created_at: {
|
|
13
|
-
readonly type: "string";
|
|
14
|
-
readonly format: "date-time";
|
|
15
|
-
};
|
|
16
|
-
readonly absolute_path: {
|
|
17
|
-
readonly type: "string";
|
|
18
|
-
};
|
|
19
|
-
readonly size: {
|
|
20
|
-
readonly type: "number";
|
|
21
|
-
};
|
|
22
|
-
readonly mime: {
|
|
23
|
-
readonly type: "number";
|
|
24
|
-
};
|
|
25
|
-
readonly collection: {
|
|
26
|
-
readonly type: "string";
|
|
27
|
-
};
|
|
28
|
-
readonly filename: {
|
|
29
|
-
readonly type: "string";
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
}>, "description" | "functions" | "item" | "exposedFunctions" | "security"> & {
|
|
2
|
+
export declare const tempFile: Omit<import("@aeriajs/types").Collection<never>, "functions" | "description" | "middlewares" | "item" | "exposedFunctions" | "security"> & {
|
|
34
3
|
item: import("@aeriajs/types").SchemaWithId<{
|
|
35
4
|
readonly $id: "tempFile";
|
|
36
5
|
readonly icon: "file";
|
|
@@ -91,164 +60,12 @@ export declare const tempFile: Omit<import("@aeriajs/types").Collection<{
|
|
|
91
60
|
};
|
|
92
61
|
};
|
|
93
62
|
};
|
|
94
|
-
functions: Record<string, (payload: any, context: import("@aeriajs/types").StrictContext<any>) => any> & {};
|
|
63
|
+
functions: (Record<string, (payload: any, context: import("@aeriajs/types").StrictContext<any>) => any> & {}) | undefined;
|
|
95
64
|
contracts: {
|
|
96
65
|
[x: string]: import("@aeriajs/types").Contract | undefined;
|
|
97
|
-
};
|
|
66
|
+
} | undefined;
|
|
98
67
|
};
|
|
99
|
-
export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
100
|
-
description: {
|
|
101
|
-
readonly $id: "file";
|
|
102
|
-
readonly icon: "paperclip";
|
|
103
|
-
readonly owned: "always";
|
|
104
|
-
readonly presets: readonly ["owned"];
|
|
105
|
-
readonly indexes: readonly ["name", "link", "type"];
|
|
106
|
-
readonly properties: {
|
|
107
|
-
readonly type: {
|
|
108
|
-
readonly type: "string";
|
|
109
|
-
};
|
|
110
|
-
readonly size: {
|
|
111
|
-
readonly type: "number";
|
|
112
|
-
};
|
|
113
|
-
readonly last_modified: {
|
|
114
|
-
readonly type: "string";
|
|
115
|
-
readonly format: "date-time";
|
|
116
|
-
};
|
|
117
|
-
readonly name: {
|
|
118
|
-
readonly type: "string";
|
|
119
|
-
};
|
|
120
|
-
readonly absolute_path: {
|
|
121
|
-
readonly type: "string";
|
|
122
|
-
};
|
|
123
|
-
readonly relative_path: {
|
|
124
|
-
readonly type: "string";
|
|
125
|
-
};
|
|
126
|
-
readonly immutable: {
|
|
127
|
-
readonly type: "boolean";
|
|
128
|
-
};
|
|
129
|
-
readonly link: {
|
|
130
|
-
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
131
|
-
};
|
|
132
|
-
readonly download_link: {
|
|
133
|
-
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
readonly actions: {
|
|
137
|
-
readonly deleteAll: {
|
|
138
|
-
readonly label: "Remover";
|
|
139
|
-
readonly ask: true;
|
|
140
|
-
readonly selection: true;
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
|
-
readonly individualActions: {
|
|
144
|
-
readonly remove: {
|
|
145
|
-
readonly label: "Remover";
|
|
146
|
-
readonly icon: "trash";
|
|
147
|
-
readonly ask: true;
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
functions: {
|
|
152
|
-
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>>>;
|
|
153
|
-
readonly insert: (payload: {
|
|
154
|
-
what: {
|
|
155
|
-
content: string;
|
|
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<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
|
|
158
|
-
readonly $id: "file";
|
|
159
|
-
readonly icon: "paperclip";
|
|
160
|
-
readonly owned: "always";
|
|
161
|
-
readonly presets: readonly ["owned"];
|
|
162
|
-
readonly indexes: readonly ["name", "link", "type"];
|
|
163
|
-
readonly properties: {
|
|
164
|
-
readonly type: {
|
|
165
|
-
readonly type: "string";
|
|
166
|
-
};
|
|
167
|
-
readonly size: {
|
|
168
|
-
readonly type: "number";
|
|
169
|
-
};
|
|
170
|
-
readonly last_modified: {
|
|
171
|
-
readonly type: "string";
|
|
172
|
-
readonly format: "date-time";
|
|
173
|
-
};
|
|
174
|
-
readonly name: {
|
|
175
|
-
readonly type: "string";
|
|
176
|
-
};
|
|
177
|
-
readonly absolute_path: {
|
|
178
|
-
readonly type: "string";
|
|
179
|
-
};
|
|
180
|
-
readonly relative_path: {
|
|
181
|
-
readonly type: "string";
|
|
182
|
-
};
|
|
183
|
-
readonly immutable: {
|
|
184
|
-
readonly type: "boolean";
|
|
185
|
-
};
|
|
186
|
-
readonly link: {
|
|
187
|
-
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
188
|
-
};
|
|
189
|
-
readonly download_link: {
|
|
190
|
-
readonly getter: (doc: object) => Promise<string | undefined>;
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
readonly actions: {
|
|
194
|
-
readonly deleteAll: {
|
|
195
|
-
readonly label: "Remover";
|
|
196
|
-
readonly ask: true;
|
|
197
|
-
readonly selection: true;
|
|
198
|
-
};
|
|
199
|
-
};
|
|
200
|
-
readonly individualActions: {
|
|
201
|
-
readonly remove: {
|
|
202
|
-
readonly label: "Remover";
|
|
203
|
-
readonly icon: "trash";
|
|
204
|
-
readonly ask: true;
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
}>>>;
|
|
208
|
-
readonly download: (payload: {
|
|
209
|
-
fileId: string;
|
|
210
|
-
options: readonly ("picture" | "download")[];
|
|
211
|
-
noHeaders?: boolean;
|
|
212
|
-
}, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").Result.Error<{
|
|
213
|
-
readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
|
|
214
|
-
} & {
|
|
215
|
-
httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
|
|
216
|
-
}> | import("fs").ReadStream>;
|
|
217
|
-
readonly remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<typeof description>>, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
|
|
218
|
-
readonly _tag: "Result";
|
|
219
|
-
readonly error: undefined;
|
|
220
|
-
readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
|
|
221
|
-
} | import("@aeriajs/types").Result.Error<{
|
|
222
|
-
readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
|
|
223
|
-
} & {
|
|
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
|
-
}>>;
|
|
230
|
-
readonly removeAll: (payload: import("@aeriajs/types").RemoveAllPayload, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
|
|
231
|
-
readonly _tag: "Result";
|
|
232
|
-
readonly error: undefined;
|
|
233
|
-
readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
|
|
234
|
-
} | import("@aeriajs/types").Result.Error<{
|
|
235
|
-
readonly code: import("@aeriajs/types").ACError.ResourceNotFound;
|
|
236
|
-
} & {
|
|
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;
|
|
242
|
-
}>>;
|
|
243
|
-
};
|
|
244
|
-
exposedFunctions: {
|
|
245
|
-
readonly get: "unauthenticated";
|
|
246
|
-
readonly insert: true;
|
|
247
|
-
readonly download: "unauthenticated";
|
|
248
|
-
readonly remove: true;
|
|
249
|
-
readonly removeAll: true;
|
|
250
|
-
};
|
|
251
|
-
}>, "description" | "functions" | "item" | "exposedFunctions" | "security"> & {
|
|
68
|
+
export declare const file: Omit<import("@aeriajs/types").Collection<never>, "functions" | "description" | "middlewares" | "item" | "exposedFunctions" | "security"> & {
|
|
252
69
|
item: import("@aeriajs/types").SchemaWithId<{
|
|
253
70
|
readonly $id: "file";
|
|
254
71
|
readonly icon: "paperclip";
|
|
@@ -352,8 +169,8 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
352
169
|
};
|
|
353
170
|
};
|
|
354
171
|
functions: {
|
|
355
|
-
|
|
356
|
-
|
|
172
|
+
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>>>;
|
|
173
|
+
insert: (payload: {
|
|
357
174
|
what: {
|
|
358
175
|
content: string;
|
|
359
176
|
} & Pick<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof description>>, "_id" | "name" | "owner" | "absolute_path">;
|
|
@@ -408,7 +225,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
408
225
|
};
|
|
409
226
|
};
|
|
410
227
|
}>>>;
|
|
411
|
-
|
|
228
|
+
download: (payload: {
|
|
412
229
|
fileId: string;
|
|
413
230
|
options: readonly ("picture" | "download")[];
|
|
414
231
|
noHeaders?: boolean;
|
|
@@ -417,7 +234,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
417
234
|
} & {
|
|
418
235
|
httpStatus: import("@aeriajs/types").HTTPStatus.NotFound;
|
|
419
236
|
}> | import("fs").ReadStream>;
|
|
420
|
-
|
|
237
|
+
remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<typeof description>>, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
|
|
421
238
|
readonly _tag: "Result";
|
|
422
239
|
readonly error: undefined;
|
|
423
240
|
readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
|
|
@@ -430,7 +247,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
430
247
|
} & {
|
|
431
248
|
httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
|
|
432
249
|
}>>;
|
|
433
|
-
|
|
250
|
+
removeAll: (payload: import("@aeriajs/types").RemoveAllPayload, context: import("@aeriajs/types").Context<typeof description>) => Promise<{
|
|
434
251
|
readonly _tag: "Result";
|
|
435
252
|
readonly error: undefined;
|
|
436
253
|
readonly result: import("mongodb").WithId<Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<import("@aeriajs/types").Description>>, "_id">> | null;
|
|
@@ -445,10 +262,10 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
|
|
|
445
262
|
}>>;
|
|
446
263
|
};
|
|
447
264
|
contracts: {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
265
|
+
get?: import("@aeriajs/types").Contract | undefined;
|
|
266
|
+
insert?: import("@aeriajs/types").Contract | undefined;
|
|
267
|
+
download?: import("@aeriajs/types").Contract | undefined;
|
|
268
|
+
remove?: import("@aeriajs/types").Contract | undefined;
|
|
269
|
+
removeAll?: import("@aeriajs/types").Contract | undefined;
|
|
453
270
|
};
|
|
454
271
|
};
|
|
@@ -1,42 +1,4 @@
|
|
|
1
|
-
export declare const log: Omit<import("@aeriajs/types").Collection<{
|
|
2
|
-
description: {
|
|
3
|
-
readonly $id: "log";
|
|
4
|
-
readonly icon: "magnifying-glass";
|
|
5
|
-
readonly required: readonly ["context", "message"];
|
|
6
|
-
readonly properties: {
|
|
7
|
-
readonly owner: {
|
|
8
|
-
readonly $ref: "user";
|
|
9
|
-
readonly noForm: true;
|
|
10
|
-
};
|
|
11
|
-
readonly context: {
|
|
12
|
-
readonly type: "string";
|
|
13
|
-
};
|
|
14
|
-
readonly message: {
|
|
15
|
-
readonly type: "string";
|
|
16
|
-
};
|
|
17
|
-
readonly details: {
|
|
18
|
-
readonly type: "object";
|
|
19
|
-
readonly variable: true;
|
|
20
|
-
};
|
|
21
|
-
readonly created_at: {
|
|
22
|
-
readonly type: "string";
|
|
23
|
-
readonly format: "date-time";
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
readonly presets: readonly ["view"];
|
|
27
|
-
readonly filters: readonly ["context", "message", "owner"];
|
|
28
|
-
};
|
|
29
|
-
functions: {
|
|
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
|
-
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>>;
|
|
32
|
-
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>>>;
|
|
33
|
-
};
|
|
34
|
-
exposedFunctions: {
|
|
35
|
-
readonly get: true;
|
|
36
|
-
readonly getAll: true;
|
|
37
|
-
readonly insert: true;
|
|
38
|
-
};
|
|
39
|
-
}>, "description" | "functions" | "item" | "exposedFunctions" | "security"> & {
|
|
1
|
+
export declare const log: Omit<import("@aeriajs/types").Collection<never>, "functions" | "description" | "middlewares" | "item" | "exposedFunctions" | "security"> & {
|
|
40
2
|
item: import("@aeriajs/types").SchemaWithId<{
|
|
41
3
|
readonly $id: "log";
|
|
42
4
|
readonly icon: "magnifying-glass";
|
|
@@ -92,13 +54,13 @@ export declare const log: Omit<import("@aeriajs/types").Collection<{
|
|
|
92
54
|
readonly filters: readonly ["context", "message", "owner"];
|
|
93
55
|
};
|
|
94
56
|
functions: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
57
|
+
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>>>;
|
|
58
|
+
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>>;
|
|
59
|
+
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>>>;
|
|
98
60
|
};
|
|
99
61
|
contracts: {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
62
|
+
get?: import("@aeriajs/types").Contract | undefined;
|
|
63
|
+
getAll?: import("@aeriajs/types").Contract | undefined;
|
|
64
|
+
insert?: import("@aeriajs/types").Contract | undefined;
|
|
103
65
|
};
|
|
104
66
|
};
|
|
@@ -1,40 +1,4 @@
|
|
|
1
|
-
export declare const resourceUsage: Omit<import("@aeriajs/types").Collection<{
|
|
2
|
-
description: {
|
|
3
|
-
readonly $id: "resourceUsage";
|
|
4
|
-
readonly icon: "wrench";
|
|
5
|
-
readonly required: readonly ["usage"];
|
|
6
|
-
readonly properties: {
|
|
7
|
-
readonly user: {
|
|
8
|
-
readonly $ref: "user";
|
|
9
|
-
};
|
|
10
|
-
readonly address: {
|
|
11
|
-
readonly type: "string";
|
|
12
|
-
};
|
|
13
|
-
readonly usage: {
|
|
14
|
-
readonly type: "object";
|
|
15
|
-
readonly additionalProperties: {
|
|
16
|
-
readonly type: "object";
|
|
17
|
-
readonly properties: {
|
|
18
|
-
readonly hits: {
|
|
19
|
-
readonly type: "integer";
|
|
20
|
-
};
|
|
21
|
-
readonly points: {
|
|
22
|
-
readonly type: "integer";
|
|
23
|
-
};
|
|
24
|
-
readonly last_reach: {
|
|
25
|
-
readonly type: "string";
|
|
26
|
-
readonly format: "date-time";
|
|
27
|
-
};
|
|
28
|
-
readonly last_maximum_reach: {
|
|
29
|
-
readonly type: "string";
|
|
30
|
-
readonly format: "date-time";
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
}>, "description" | "functions" | "item" | "exposedFunctions" | "security"> & {
|
|
1
|
+
export declare const resourceUsage: Omit<import("@aeriajs/types").Collection<never>, "functions" | "description" | "middlewares" | "item" | "exposedFunctions" | "security"> & {
|
|
38
2
|
item: import("@aeriajs/types").SchemaWithId<{
|
|
39
3
|
readonly $id: "resourceUsage";
|
|
40
4
|
readonly icon: "wrench";
|
|
@@ -105,8 +69,8 @@ export declare const resourceUsage: Omit<import("@aeriajs/types").Collection<{
|
|
|
105
69
|
};
|
|
106
70
|
};
|
|
107
71
|
};
|
|
108
|
-
functions: Record<string, (payload: any, context: import("@aeriajs/types").StrictContext<any>) => any> & {};
|
|
72
|
+
functions: (Record<string, (payload: any, context: import("@aeriajs/types").StrictContext<any>) => any> & {}) | undefined;
|
|
109
73
|
contracts: {
|
|
110
74
|
[x: string]: import("@aeriajs/types").Contract | undefined;
|
|
111
|
-
};
|
|
75
|
+
} | undefined;
|
|
112
76
|
};
|