appwrite-utils-cli 0.0.274 → 0.0.276
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/README.md +4 -39
- package/dist/init.d.ts +2 -0
- package/dist/init.js +57 -0
- package/dist/main.js +62 -100
- package/dist/migrations/afterImportActions.d.ts +1 -4
- package/dist/migrations/afterImportActions.js +1 -0
- package/dist/migrations/appwriteToX.d.ts +46 -46
- package/dist/migrations/appwriteToX.js +6 -2
- package/dist/migrations/attributes.d.ts +1 -1
- package/dist/migrations/attributes.js +97 -71
- package/dist/migrations/backup.d.ts +240 -240
- package/dist/migrations/backup.js +1 -1
- package/dist/migrations/collections.d.ts +1 -1
- package/dist/migrations/collections.js +4 -4
- package/dist/migrations/converters.d.ts +9 -127
- package/dist/migrations/converters.js +1 -504
- package/dist/migrations/dataLoader.d.ts +470 -453
- package/dist/migrations/dataLoader.js +19 -1
- package/dist/migrations/dbHelpers.d.ts +1 -1
- package/dist/migrations/dbHelpers.js +3 -0
- package/dist/migrations/importController.d.ts +1 -1
- package/dist/migrations/importController.js +4 -7
- package/dist/migrations/importDataActions.d.ts +4 -6
- package/dist/migrations/importDataActions.js +6 -4
- package/dist/migrations/indexes.d.ts +1 -1
- package/dist/migrations/indexes.js +1 -1
- package/dist/migrations/migrationHelper.d.ts +29 -29
- package/dist/migrations/migrationHelper.js +1 -1
- package/dist/migrations/openapi.d.ts +1 -1
- package/dist/migrations/openapi.js +4 -1
- package/dist/migrations/queue.d.ts +1 -1
- package/dist/migrations/relationships.d.ts +5 -5
- package/dist/migrations/relationships.js +3 -0
- package/dist/migrations/schemaStrings.d.ts +2 -2
- package/dist/migrations/schemaStrings.js +93 -8
- package/dist/migrations/setupDatabase.d.ts +1 -1
- package/dist/migrations/setupDatabase.js +1 -1
- package/dist/migrations/storage.d.ts +1 -1
- package/dist/migrations/users.d.ts +1 -1
- package/dist/schemas/authUser.d.ts +12 -10
- package/dist/types.d.ts +0 -5
- package/dist/types.js +0 -2
- package/dist/utils/helperFunctions.d.ts +2 -3
- package/dist/utils/loadConfigs.d.ts +13 -0
- package/dist/utils/loadConfigs.js +47 -0
- package/dist/utils/setupFiles.d.ts +1 -0
- package/dist/utils/setupFiles.js +98 -223
- package/dist/utilsController.d.ts +1 -3
- package/dist/utilsController.js +14 -18
- package/package.json +9 -2
- package/src/init.ts +64 -0
- package/src/main.ts +73 -98
- package/src/migrations/afterImportActions.ts +1 -5
- package/src/migrations/appwriteToX.ts +6 -2
- package/src/migrations/attributes.ts +198 -150
- package/src/migrations/backup.ts +1 -1
- package/src/migrations/collections.ts +5 -11
- package/src/migrations/converters.ts +1 -540
- package/src/migrations/dataLoader.ts +19 -2
- package/src/migrations/dbHelpers.ts +4 -1
- package/src/migrations/importController.ts +5 -15
- package/src/migrations/importDataActions.ts +10 -14
- package/src/migrations/indexes.ts +1 -1
- package/src/migrations/migrationHelper.ts +1 -1
- package/src/migrations/openapi.ts +4 -1
- package/src/migrations/queue.ts +1 -1
- package/src/migrations/relationships.ts +4 -1
- package/src/migrations/schemaStrings.ts +106 -9
- package/src/migrations/setupDatabase.ts +1 -1
- package/src/migrations/storage.ts +1 -1
- package/src/migrations/users.ts +1 -1
- package/src/types.ts +0 -5
- package/src/utils/helperFunctions.ts +2 -3
- package/src/utils/loadConfigs.ts +55 -0
- package/src/utils/setupFiles.ts +114 -225
- package/src/utilsController.ts +27 -35
- package/src/migrations/schema.ts +0 -748
|
@@ -9,31 +9,31 @@ export declare const BackupSchema: z.ZodObject<{
|
|
|
9
9
|
collectionId: z.ZodString;
|
|
10
10
|
data: z.ZodString;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
data: string;
|
|
13
12
|
collectionId: string;
|
|
14
|
-
}, {
|
|
15
13
|
data: string;
|
|
14
|
+
}, {
|
|
16
15
|
collectionId: string;
|
|
16
|
+
data: string;
|
|
17
17
|
}>, "many">>;
|
|
18
18
|
}, "strip", z.ZodTypeAny, {
|
|
19
19
|
$id: string;
|
|
20
20
|
$createdAt: string;
|
|
21
21
|
$updatedAt: string;
|
|
22
|
+
database: string;
|
|
23
|
+
collections: string[];
|
|
22
24
|
documents: {
|
|
23
|
-
data: string;
|
|
24
25
|
collectionId: string;
|
|
26
|
+
data: string;
|
|
25
27
|
}[];
|
|
26
|
-
collections: string[];
|
|
27
|
-
database: string;
|
|
28
28
|
}, {
|
|
29
29
|
$id: string;
|
|
30
30
|
$createdAt: string;
|
|
31
31
|
$updatedAt: string;
|
|
32
|
-
collections: string[];
|
|
33
32
|
database: string;
|
|
33
|
+
collections: string[];
|
|
34
34
|
documents?: {
|
|
35
|
-
data: string;
|
|
36
35
|
collectionId: string;
|
|
36
|
+
data: string;
|
|
37
37
|
}[] | undefined;
|
|
38
38
|
}>;
|
|
39
39
|
export type Backup = z.infer<typeof BackupSchema>;
|
|
@@ -47,25 +47,25 @@ export declare const BackupCreateSchema: z.ZodObject<Omit<{
|
|
|
47
47
|
collectionId: z.ZodString;
|
|
48
48
|
data: z.ZodString;
|
|
49
49
|
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
data: string;
|
|
51
50
|
collectionId: string;
|
|
52
|
-
}, {
|
|
53
51
|
data: string;
|
|
52
|
+
}, {
|
|
54
53
|
collectionId: string;
|
|
54
|
+
data: string;
|
|
55
55
|
}>, "many">>;
|
|
56
56
|
}, "$id" | "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
|
|
57
|
+
database: string;
|
|
58
|
+
collections: string[];
|
|
57
59
|
documents: {
|
|
58
|
-
data: string;
|
|
59
60
|
collectionId: string;
|
|
61
|
+
data: string;
|
|
60
62
|
}[];
|
|
61
|
-
collections: string[];
|
|
62
|
-
database: string;
|
|
63
63
|
}, {
|
|
64
|
-
collections: string[];
|
|
65
64
|
database: string;
|
|
65
|
+
collections: string[];
|
|
66
66
|
documents?: {
|
|
67
|
-
data: string;
|
|
68
67
|
collectionId: string;
|
|
68
|
+
data: string;
|
|
69
69
|
}[] | undefined;
|
|
70
70
|
}>;
|
|
71
71
|
export type BackupCreate = z.infer<typeof BackupCreateSchema>;
|
|
@@ -76,16 +76,16 @@ export declare const BatchSchema: z.ZodObject<{
|
|
|
76
76
|
data: z.ZodString;
|
|
77
77
|
processed: z.ZodDefault<z.ZodBoolean>;
|
|
78
78
|
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
data: string;
|
|
80
79
|
$id: string;
|
|
81
80
|
$createdAt: string;
|
|
82
81
|
$updatedAt: string;
|
|
82
|
+
data: string;
|
|
83
83
|
processed: boolean;
|
|
84
84
|
}, {
|
|
85
|
-
data: string;
|
|
86
85
|
$id: string;
|
|
87
86
|
$createdAt: string;
|
|
88
87
|
$updatedAt: string;
|
|
88
|
+
data: string;
|
|
89
89
|
processed?: boolean | undefined;
|
|
90
90
|
}>;
|
|
91
91
|
export type Batch = z.infer<typeof BatchSchema>;
|
|
@@ -117,10 +117,10 @@ export declare const OperationSchema: z.ZodObject<{
|
|
|
117
117
|
status: z.ZodDefault<z.ZodEnum<["pending", "ready", "in_progress", "completed", "error", "cancelled"]>>;
|
|
118
118
|
}, "strip", z.ZodTypeAny, {
|
|
119
119
|
error: string;
|
|
120
|
-
status: "error" | "pending" | "ready" | "in_progress" | "completed" | "cancelled";
|
|
121
120
|
$id: string;
|
|
122
121
|
$createdAt: string;
|
|
123
122
|
$updatedAt: string;
|
|
123
|
+
status: "error" | "pending" | "ready" | "in_progress" | "completed" | "cancelled";
|
|
124
124
|
collectionId: string;
|
|
125
125
|
operationType: string;
|
|
126
126
|
progress: number;
|
|
@@ -136,9 +136,9 @@ export declare const OperationSchema: z.ZodObject<{
|
|
|
136
136
|
operationType: string;
|
|
137
137
|
progress: number;
|
|
138
138
|
total: number;
|
|
139
|
+
status?: "error" | "pending" | "ready" | "in_progress" | "completed" | "cancelled" | undefined;
|
|
139
140
|
data?: any;
|
|
140
141
|
batches?: string[] | undefined;
|
|
141
|
-
status?: "error" | "pending" | "ready" | "in_progress" | "completed" | "cancelled" | undefined;
|
|
142
142
|
}>;
|
|
143
143
|
export type Operation = z.infer<typeof OperationSchema>;
|
|
144
144
|
export declare const OperationCreateSchema: z.ZodObject<Omit<{
|
|
@@ -178,90 +178,88 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
|
178
178
|
collection: {
|
|
179
179
|
name: string;
|
|
180
180
|
attributes: ({
|
|
181
|
-
key: string;
|
|
182
181
|
type: "string";
|
|
183
|
-
|
|
184
|
-
required: boolean;
|
|
185
|
-
array: boolean;
|
|
182
|
+
key: string;
|
|
186
183
|
size: number;
|
|
184
|
+
array?: boolean | undefined;
|
|
185
|
+
error?: string | undefined;
|
|
186
|
+
required?: boolean | undefined;
|
|
187
187
|
xdefault?: string | null | undefined;
|
|
188
188
|
encrypted?: boolean | undefined;
|
|
189
189
|
format?: string | null | undefined;
|
|
190
|
-
description?: string | Record<string, string> |
|
|
190
|
+
description?: string | Record<string, string> | undefined;
|
|
191
191
|
} | {
|
|
192
|
-
key: string;
|
|
193
192
|
type: "integer";
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
max?: number | undefined;
|
|
193
|
+
key: string;
|
|
194
|
+
array?: boolean | undefined;
|
|
195
|
+
error?: string | undefined;
|
|
196
|
+
required?: boolean | undefined;
|
|
199
197
|
xdefault?: number | null | undefined;
|
|
200
198
|
description?: string | Record<string, string> | null | undefined;
|
|
201
|
-
} | {
|
|
202
|
-
key: string;
|
|
203
|
-
type: "float";
|
|
204
|
-
error: string;
|
|
205
|
-
required: boolean;
|
|
206
|
-
array: boolean;
|
|
207
199
|
min?: number | undefined;
|
|
208
200
|
max?: number | undefined;
|
|
201
|
+
} | {
|
|
202
|
+
type: "float";
|
|
203
|
+
key: string;
|
|
204
|
+
array?: boolean | undefined;
|
|
205
|
+
error?: string | undefined;
|
|
206
|
+
required?: boolean | undefined;
|
|
209
207
|
xdefault?: number | null | undefined;
|
|
210
208
|
description?: string | Record<string, string> | null | undefined;
|
|
209
|
+
min?: number | undefined;
|
|
210
|
+
max?: number | undefined;
|
|
211
211
|
} | {
|
|
212
|
-
key: string;
|
|
213
212
|
type: "boolean";
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
key: string;
|
|
214
|
+
array?: boolean | undefined;
|
|
215
|
+
error?: string | undefined;
|
|
216
|
+
required?: boolean | undefined;
|
|
217
217
|
xdefault?: boolean | null | undefined;
|
|
218
218
|
description?: string | Record<string, string> | null | undefined;
|
|
219
219
|
} | {
|
|
220
|
-
key: string;
|
|
221
220
|
type: "datetime";
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
221
|
+
key: string;
|
|
222
|
+
array?: boolean | undefined;
|
|
223
|
+
error?: string | undefined;
|
|
224
|
+
required?: boolean | undefined;
|
|
225
225
|
xdefault?: string | null | undefined;
|
|
226
226
|
description?: string | Record<string, string> | null | undefined;
|
|
227
227
|
} | {
|
|
228
|
-
key: string;
|
|
229
228
|
type: "email";
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
key: string;
|
|
230
|
+
array?: boolean | undefined;
|
|
231
|
+
error?: string | undefined;
|
|
232
|
+
required?: boolean | undefined;
|
|
233
233
|
xdefault?: string | null | undefined;
|
|
234
234
|
description?: string | Record<string, string> | null | undefined;
|
|
235
235
|
} | {
|
|
236
|
-
key: string;
|
|
237
236
|
type: "ip";
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
key: string;
|
|
238
|
+
array?: boolean | undefined;
|
|
239
|
+
error?: string | undefined;
|
|
240
|
+
required?: boolean | undefined;
|
|
241
241
|
xdefault?: string | null | undefined;
|
|
242
242
|
description?: string | Record<string, string> | null | undefined;
|
|
243
243
|
} | {
|
|
244
|
-
key: string;
|
|
245
244
|
type: "url";
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
245
|
+
key: string;
|
|
246
|
+
array?: boolean | undefined;
|
|
247
|
+
error?: string | undefined;
|
|
248
|
+
required?: boolean | undefined;
|
|
249
249
|
xdefault?: string | null | undefined;
|
|
250
250
|
description?: string | Record<string, string> | null | undefined;
|
|
251
251
|
} | {
|
|
252
|
-
key: string;
|
|
253
252
|
type: "enum";
|
|
254
|
-
|
|
255
|
-
required: boolean;
|
|
256
|
-
array: boolean;
|
|
253
|
+
key: string;
|
|
257
254
|
elements: string[];
|
|
255
|
+
array?: boolean | undefined;
|
|
256
|
+
error?: string | undefined;
|
|
257
|
+
required?: boolean | undefined;
|
|
258
258
|
xdefault?: string | null | undefined;
|
|
259
259
|
description?: string | Record<string, string> | null | undefined;
|
|
260
260
|
} | {
|
|
261
|
-
key: string;
|
|
262
261
|
type: "relationship";
|
|
263
|
-
|
|
264
|
-
required: boolean;
|
|
262
|
+
key: string;
|
|
265
263
|
relatedCollection: string;
|
|
266
264
|
relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
|
|
267
265
|
twoWay: boolean;
|
|
@@ -269,149 +267,149 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
|
269
267
|
onDelete: "setNull" | "cascade" | "restrict";
|
|
270
268
|
side: "parent" | "child";
|
|
271
269
|
array?: boolean | undefined;
|
|
270
|
+
error?: string | undefined;
|
|
271
|
+
required?: boolean | undefined;
|
|
272
|
+
description?: string | Record<string, string> | null | undefined;
|
|
272
273
|
importMapping?: {
|
|
273
274
|
originalIdField: string;
|
|
274
275
|
targetField?: string | undefined;
|
|
275
276
|
} | undefined;
|
|
276
|
-
description?: string | Record<string, string> | null | undefined;
|
|
277
277
|
})[];
|
|
278
278
|
$id: string;
|
|
279
|
-
enabled: boolean;
|
|
280
|
-
documentSecurity: boolean;
|
|
281
279
|
$permissions: {
|
|
282
280
|
permission: string;
|
|
283
281
|
target: string;
|
|
284
282
|
}[];
|
|
285
|
-
indexes: {
|
|
286
|
-
key: string;
|
|
287
|
-
type: "key" | "unique" | "fulltext";
|
|
288
|
-
attributes: string[];
|
|
289
|
-
status?: string | undefined;
|
|
290
|
-
error?: string | undefined;
|
|
291
|
-
orders?: string[] | undefined;
|
|
292
|
-
}[];
|
|
293
283
|
importDefs: {
|
|
294
284
|
filePath: string;
|
|
295
285
|
primaryKeyField: string;
|
|
296
286
|
attributeMappings: {
|
|
297
287
|
targetKey: string;
|
|
298
|
-
converters: string[];
|
|
299
|
-
validationActions: {
|
|
300
|
-
params: string[];
|
|
301
|
-
action: string;
|
|
302
|
-
}[];
|
|
303
|
-
postImportActions: {
|
|
304
|
-
params: (string | Record<string, any>)[];
|
|
305
|
-
action: string;
|
|
306
|
-
}[];
|
|
307
288
|
oldKey?: string | undefined;
|
|
308
289
|
oldKeys?: string[] | undefined;
|
|
309
290
|
fileData?: {
|
|
310
291
|
path: string;
|
|
311
292
|
name: string;
|
|
312
293
|
} | undefined;
|
|
294
|
+
converters?: string[] | undefined;
|
|
295
|
+
validationActions?: {
|
|
296
|
+
params: string[];
|
|
297
|
+
action: string;
|
|
298
|
+
}[] | undefined;
|
|
299
|
+
postImportActions?: {
|
|
300
|
+
params: (string | Record<string, any>)[];
|
|
301
|
+
action: string;
|
|
302
|
+
}[] | undefined;
|
|
313
303
|
}[];
|
|
314
304
|
type?: "create" | "update" | undefined;
|
|
315
305
|
basePath?: string | undefined;
|
|
316
306
|
idMappings?: {
|
|
317
|
-
targetField: string;
|
|
318
307
|
sourceField: string;
|
|
308
|
+
targetField: string;
|
|
319
309
|
targetCollection: string;
|
|
320
310
|
fieldToSet?: string | undefined;
|
|
321
311
|
}[] | undefined;
|
|
322
312
|
updateMapping?: {
|
|
323
|
-
originalIdField: string;
|
|
324
313
|
targetField: string;
|
|
314
|
+
originalIdField: string;
|
|
325
315
|
} | undefined;
|
|
326
316
|
}[];
|
|
327
317
|
description?: string | undefined;
|
|
318
|
+
enabled?: boolean | undefined;
|
|
319
|
+
documentSecurity?: boolean | undefined;
|
|
320
|
+
indexes?: {
|
|
321
|
+
type: "key" | "unique" | "fulltext";
|
|
322
|
+
key: string;
|
|
323
|
+
attributes: string[];
|
|
324
|
+
status?: string | undefined;
|
|
325
|
+
error?: string | undefined;
|
|
326
|
+
orders?: string[] | undefined;
|
|
327
|
+
}[] | undefined;
|
|
328
328
|
databaseId?: string | undefined;
|
|
329
329
|
};
|
|
330
330
|
attributes: ({
|
|
331
|
-
key: string;
|
|
332
331
|
type: "string";
|
|
333
|
-
|
|
334
|
-
required: boolean;
|
|
335
|
-
array: boolean;
|
|
332
|
+
key: string;
|
|
336
333
|
size: number;
|
|
334
|
+
array?: boolean | undefined;
|
|
335
|
+
error?: string | undefined;
|
|
336
|
+
required?: boolean | undefined;
|
|
337
337
|
xdefault?: string | null | undefined;
|
|
338
338
|
encrypted?: boolean | undefined;
|
|
339
339
|
format?: string | null | undefined;
|
|
340
|
-
description?: string | Record<string, string> |
|
|
340
|
+
description?: string | Record<string, string> | undefined;
|
|
341
341
|
} | {
|
|
342
|
-
key: string;
|
|
343
342
|
type: "integer";
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
max?: number | undefined;
|
|
343
|
+
key: string;
|
|
344
|
+
array?: boolean | undefined;
|
|
345
|
+
error?: string | undefined;
|
|
346
|
+
required?: boolean | undefined;
|
|
349
347
|
xdefault?: number | null | undefined;
|
|
350
348
|
description?: string | Record<string, string> | null | undefined;
|
|
351
|
-
} | {
|
|
352
|
-
key: string;
|
|
353
|
-
type: "float";
|
|
354
|
-
error: string;
|
|
355
|
-
required: boolean;
|
|
356
|
-
array: boolean;
|
|
357
349
|
min?: number | undefined;
|
|
358
350
|
max?: number | undefined;
|
|
351
|
+
} | {
|
|
352
|
+
type: "float";
|
|
353
|
+
key: string;
|
|
354
|
+
array?: boolean | undefined;
|
|
355
|
+
error?: string | undefined;
|
|
356
|
+
required?: boolean | undefined;
|
|
359
357
|
xdefault?: number | null | undefined;
|
|
360
358
|
description?: string | Record<string, string> | null | undefined;
|
|
359
|
+
min?: number | undefined;
|
|
360
|
+
max?: number | undefined;
|
|
361
361
|
} | {
|
|
362
|
-
key: string;
|
|
363
362
|
type: "boolean";
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
363
|
+
key: string;
|
|
364
|
+
array?: boolean | undefined;
|
|
365
|
+
error?: string | undefined;
|
|
366
|
+
required?: boolean | undefined;
|
|
367
367
|
xdefault?: boolean | null | undefined;
|
|
368
368
|
description?: string | Record<string, string> | null | undefined;
|
|
369
369
|
} | {
|
|
370
|
-
key: string;
|
|
371
370
|
type: "datetime";
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
371
|
+
key: string;
|
|
372
|
+
array?: boolean | undefined;
|
|
373
|
+
error?: string | undefined;
|
|
374
|
+
required?: boolean | undefined;
|
|
375
375
|
xdefault?: string | null | undefined;
|
|
376
376
|
description?: string | Record<string, string> | null | undefined;
|
|
377
377
|
} | {
|
|
378
|
-
key: string;
|
|
379
378
|
type: "email";
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
379
|
+
key: string;
|
|
380
|
+
array?: boolean | undefined;
|
|
381
|
+
error?: string | undefined;
|
|
382
|
+
required?: boolean | undefined;
|
|
383
383
|
xdefault?: string | null | undefined;
|
|
384
384
|
description?: string | Record<string, string> | null | undefined;
|
|
385
385
|
} | {
|
|
386
|
-
key: string;
|
|
387
386
|
type: "ip";
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
387
|
+
key: string;
|
|
388
|
+
array?: boolean | undefined;
|
|
389
|
+
error?: string | undefined;
|
|
390
|
+
required?: boolean | undefined;
|
|
391
391
|
xdefault?: string | null | undefined;
|
|
392
392
|
description?: string | Record<string, string> | null | undefined;
|
|
393
393
|
} | {
|
|
394
|
-
key: string;
|
|
395
394
|
type: "url";
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
395
|
+
key: string;
|
|
396
|
+
array?: boolean | undefined;
|
|
397
|
+
error?: string | undefined;
|
|
398
|
+
required?: boolean | undefined;
|
|
399
399
|
xdefault?: string | null | undefined;
|
|
400
400
|
description?: string | Record<string, string> | null | undefined;
|
|
401
401
|
} | {
|
|
402
|
-
key: string;
|
|
403
402
|
type: "enum";
|
|
404
|
-
|
|
405
|
-
required: boolean;
|
|
406
|
-
array: boolean;
|
|
403
|
+
key: string;
|
|
407
404
|
elements: string[];
|
|
405
|
+
array?: boolean | undefined;
|
|
406
|
+
error?: string | undefined;
|
|
407
|
+
required?: boolean | undefined;
|
|
408
408
|
xdefault?: string | null | undefined;
|
|
409
409
|
description?: string | Record<string, string> | null | undefined;
|
|
410
410
|
} | {
|
|
411
|
-
key: string;
|
|
412
411
|
type: "relationship";
|
|
413
|
-
|
|
414
|
-
required: boolean;
|
|
412
|
+
key: string;
|
|
415
413
|
relatedCollection: string;
|
|
416
414
|
relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
|
|
417
415
|
twoWay: boolean;
|
|
@@ -419,101 +417,101 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
|
419
417
|
onDelete: "setNull" | "cascade" | "restrict";
|
|
420
418
|
side: "parent" | "child";
|
|
421
419
|
array?: boolean | undefined;
|
|
420
|
+
error?: string | undefined;
|
|
421
|
+
required?: boolean | undefined;
|
|
422
|
+
description?: string | Record<string, string> | null | undefined;
|
|
422
423
|
importMapping?: {
|
|
423
424
|
originalIdField: string;
|
|
424
425
|
targetField?: string | undefined;
|
|
425
426
|
} | undefined;
|
|
426
|
-
description?: string | Record<string, string> | null | undefined;
|
|
427
427
|
})[];
|
|
428
428
|
};
|
|
429
429
|
Batches: {
|
|
430
430
|
collection: {
|
|
431
431
|
name: string;
|
|
432
432
|
attributes: ({
|
|
433
|
-
key: string;
|
|
434
433
|
type: "string";
|
|
435
|
-
|
|
436
|
-
required: boolean;
|
|
437
|
-
array: boolean;
|
|
434
|
+
key: string;
|
|
438
435
|
size: number;
|
|
436
|
+
array?: boolean | undefined;
|
|
437
|
+
error?: string | undefined;
|
|
438
|
+
required?: boolean | undefined;
|
|
439
439
|
xdefault?: string | null | undefined;
|
|
440
440
|
encrypted?: boolean | undefined;
|
|
441
441
|
format?: string | null | undefined;
|
|
442
|
-
description?: string | Record<string, string> |
|
|
442
|
+
description?: string | Record<string, string> | undefined;
|
|
443
443
|
} | {
|
|
444
|
-
key: string;
|
|
445
444
|
type: "integer";
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
max?: number | undefined;
|
|
445
|
+
key: string;
|
|
446
|
+
array?: boolean | undefined;
|
|
447
|
+
error?: string | undefined;
|
|
448
|
+
required?: boolean | undefined;
|
|
451
449
|
xdefault?: number | null | undefined;
|
|
452
450
|
description?: string | Record<string, string> | null | undefined;
|
|
453
|
-
} | {
|
|
454
|
-
key: string;
|
|
455
|
-
type: "float";
|
|
456
|
-
error: string;
|
|
457
|
-
required: boolean;
|
|
458
|
-
array: boolean;
|
|
459
451
|
min?: number | undefined;
|
|
460
452
|
max?: number | undefined;
|
|
453
|
+
} | {
|
|
454
|
+
type: "float";
|
|
455
|
+
key: string;
|
|
456
|
+
array?: boolean | undefined;
|
|
457
|
+
error?: string | undefined;
|
|
458
|
+
required?: boolean | undefined;
|
|
461
459
|
xdefault?: number | null | undefined;
|
|
462
460
|
description?: string | Record<string, string> | null | undefined;
|
|
461
|
+
min?: number | undefined;
|
|
462
|
+
max?: number | undefined;
|
|
463
463
|
} | {
|
|
464
|
-
key: string;
|
|
465
464
|
type: "boolean";
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
465
|
+
key: string;
|
|
466
|
+
array?: boolean | undefined;
|
|
467
|
+
error?: string | undefined;
|
|
468
|
+
required?: boolean | undefined;
|
|
469
469
|
xdefault?: boolean | null | undefined;
|
|
470
470
|
description?: string | Record<string, string> | null | undefined;
|
|
471
471
|
} | {
|
|
472
|
-
key: string;
|
|
473
472
|
type: "datetime";
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
473
|
+
key: string;
|
|
474
|
+
array?: boolean | undefined;
|
|
475
|
+
error?: string | undefined;
|
|
476
|
+
required?: boolean | undefined;
|
|
477
477
|
xdefault?: string | null | undefined;
|
|
478
478
|
description?: string | Record<string, string> | null | undefined;
|
|
479
479
|
} | {
|
|
480
|
-
key: string;
|
|
481
480
|
type: "email";
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
481
|
+
key: string;
|
|
482
|
+
array?: boolean | undefined;
|
|
483
|
+
error?: string | undefined;
|
|
484
|
+
required?: boolean | undefined;
|
|
485
485
|
xdefault?: string | null | undefined;
|
|
486
486
|
description?: string | Record<string, string> | null | undefined;
|
|
487
487
|
} | {
|
|
488
|
-
key: string;
|
|
489
488
|
type: "ip";
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
489
|
+
key: string;
|
|
490
|
+
array?: boolean | undefined;
|
|
491
|
+
error?: string | undefined;
|
|
492
|
+
required?: boolean | undefined;
|
|
493
493
|
xdefault?: string | null | undefined;
|
|
494
494
|
description?: string | Record<string, string> | null | undefined;
|
|
495
495
|
} | {
|
|
496
|
-
key: string;
|
|
497
496
|
type: "url";
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
497
|
+
key: string;
|
|
498
|
+
array?: boolean | undefined;
|
|
499
|
+
error?: string | undefined;
|
|
500
|
+
required?: boolean | undefined;
|
|
501
501
|
xdefault?: string | null | undefined;
|
|
502
502
|
description?: string | Record<string, string> | null | undefined;
|
|
503
503
|
} | {
|
|
504
|
-
key: string;
|
|
505
504
|
type: "enum";
|
|
506
|
-
|
|
507
|
-
required: boolean;
|
|
508
|
-
array: boolean;
|
|
505
|
+
key: string;
|
|
509
506
|
elements: string[];
|
|
507
|
+
array?: boolean | undefined;
|
|
508
|
+
error?: string | undefined;
|
|
509
|
+
required?: boolean | undefined;
|
|
510
510
|
xdefault?: string | null | undefined;
|
|
511
511
|
description?: string | Record<string, string> | null | undefined;
|
|
512
512
|
} | {
|
|
513
|
-
key: string;
|
|
514
513
|
type: "relationship";
|
|
515
|
-
|
|
516
|
-
required: boolean;
|
|
514
|
+
key: string;
|
|
517
515
|
relatedCollection: string;
|
|
518
516
|
relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
|
|
519
517
|
twoWay: boolean;
|
|
@@ -521,149 +519,149 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
|
521
519
|
onDelete: "setNull" | "cascade" | "restrict";
|
|
522
520
|
side: "parent" | "child";
|
|
523
521
|
array?: boolean | undefined;
|
|
522
|
+
error?: string | undefined;
|
|
523
|
+
required?: boolean | undefined;
|
|
524
|
+
description?: string | Record<string, string> | null | undefined;
|
|
524
525
|
importMapping?: {
|
|
525
526
|
originalIdField: string;
|
|
526
527
|
targetField?: string | undefined;
|
|
527
528
|
} | undefined;
|
|
528
|
-
description?: string | Record<string, string> | null | undefined;
|
|
529
529
|
})[];
|
|
530
530
|
$id: string;
|
|
531
|
-
enabled: boolean;
|
|
532
|
-
documentSecurity: boolean;
|
|
533
531
|
$permissions: {
|
|
534
532
|
permission: string;
|
|
535
533
|
target: string;
|
|
536
534
|
}[];
|
|
537
|
-
indexes: {
|
|
538
|
-
key: string;
|
|
539
|
-
type: "key" | "unique" | "fulltext";
|
|
540
|
-
attributes: string[];
|
|
541
|
-
status?: string | undefined;
|
|
542
|
-
error?: string | undefined;
|
|
543
|
-
orders?: string[] | undefined;
|
|
544
|
-
}[];
|
|
545
535
|
importDefs: {
|
|
546
536
|
filePath: string;
|
|
547
537
|
primaryKeyField: string;
|
|
548
538
|
attributeMappings: {
|
|
549
539
|
targetKey: string;
|
|
550
|
-
converters: string[];
|
|
551
|
-
validationActions: {
|
|
552
|
-
params: string[];
|
|
553
|
-
action: string;
|
|
554
|
-
}[];
|
|
555
|
-
postImportActions: {
|
|
556
|
-
params: (string | Record<string, any>)[];
|
|
557
|
-
action: string;
|
|
558
|
-
}[];
|
|
559
540
|
oldKey?: string | undefined;
|
|
560
541
|
oldKeys?: string[] | undefined;
|
|
561
542
|
fileData?: {
|
|
562
543
|
path: string;
|
|
563
544
|
name: string;
|
|
564
545
|
} | undefined;
|
|
546
|
+
converters?: string[] | undefined;
|
|
547
|
+
validationActions?: {
|
|
548
|
+
params: string[];
|
|
549
|
+
action: string;
|
|
550
|
+
}[] | undefined;
|
|
551
|
+
postImportActions?: {
|
|
552
|
+
params: (string | Record<string, any>)[];
|
|
553
|
+
action: string;
|
|
554
|
+
}[] | undefined;
|
|
565
555
|
}[];
|
|
566
556
|
type?: "create" | "update" | undefined;
|
|
567
557
|
basePath?: string | undefined;
|
|
568
558
|
idMappings?: {
|
|
569
|
-
targetField: string;
|
|
570
559
|
sourceField: string;
|
|
560
|
+
targetField: string;
|
|
571
561
|
targetCollection: string;
|
|
572
562
|
fieldToSet?: string | undefined;
|
|
573
563
|
}[] | undefined;
|
|
574
564
|
updateMapping?: {
|
|
575
|
-
originalIdField: string;
|
|
576
565
|
targetField: string;
|
|
566
|
+
originalIdField: string;
|
|
577
567
|
} | undefined;
|
|
578
568
|
}[];
|
|
579
569
|
description?: string | undefined;
|
|
570
|
+
enabled?: boolean | undefined;
|
|
571
|
+
documentSecurity?: boolean | undefined;
|
|
572
|
+
indexes?: {
|
|
573
|
+
type: "key" | "unique" | "fulltext";
|
|
574
|
+
key: string;
|
|
575
|
+
attributes: string[];
|
|
576
|
+
status?: string | undefined;
|
|
577
|
+
error?: string | undefined;
|
|
578
|
+
orders?: string[] | undefined;
|
|
579
|
+
}[] | undefined;
|
|
580
580
|
databaseId?: string | undefined;
|
|
581
581
|
};
|
|
582
582
|
attributes: ({
|
|
583
|
-
key: string;
|
|
584
583
|
type: "string";
|
|
585
|
-
|
|
586
|
-
required: boolean;
|
|
587
|
-
array: boolean;
|
|
584
|
+
key: string;
|
|
588
585
|
size: number;
|
|
586
|
+
array?: boolean | undefined;
|
|
587
|
+
error?: string | undefined;
|
|
588
|
+
required?: boolean | undefined;
|
|
589
589
|
xdefault?: string | null | undefined;
|
|
590
590
|
encrypted?: boolean | undefined;
|
|
591
591
|
format?: string | null | undefined;
|
|
592
|
-
description?: string | Record<string, string> |
|
|
592
|
+
description?: string | Record<string, string> | undefined;
|
|
593
593
|
} | {
|
|
594
|
-
key: string;
|
|
595
594
|
type: "integer";
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
max?: number | undefined;
|
|
595
|
+
key: string;
|
|
596
|
+
array?: boolean | undefined;
|
|
597
|
+
error?: string | undefined;
|
|
598
|
+
required?: boolean | undefined;
|
|
601
599
|
xdefault?: number | null | undefined;
|
|
602
600
|
description?: string | Record<string, string> | null | undefined;
|
|
603
|
-
} | {
|
|
604
|
-
key: string;
|
|
605
|
-
type: "float";
|
|
606
|
-
error: string;
|
|
607
|
-
required: boolean;
|
|
608
|
-
array: boolean;
|
|
609
601
|
min?: number | undefined;
|
|
610
602
|
max?: number | undefined;
|
|
603
|
+
} | {
|
|
604
|
+
type: "float";
|
|
605
|
+
key: string;
|
|
606
|
+
array?: boolean | undefined;
|
|
607
|
+
error?: string | undefined;
|
|
608
|
+
required?: boolean | undefined;
|
|
611
609
|
xdefault?: number | null | undefined;
|
|
612
610
|
description?: string | Record<string, string> | null | undefined;
|
|
611
|
+
min?: number | undefined;
|
|
612
|
+
max?: number | undefined;
|
|
613
613
|
} | {
|
|
614
|
-
key: string;
|
|
615
614
|
type: "boolean";
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
615
|
+
key: string;
|
|
616
|
+
array?: boolean | undefined;
|
|
617
|
+
error?: string | undefined;
|
|
618
|
+
required?: boolean | undefined;
|
|
619
619
|
xdefault?: boolean | null | undefined;
|
|
620
620
|
description?: string | Record<string, string> | null | undefined;
|
|
621
621
|
} | {
|
|
622
|
-
key: string;
|
|
623
622
|
type: "datetime";
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
623
|
+
key: string;
|
|
624
|
+
array?: boolean | undefined;
|
|
625
|
+
error?: string | undefined;
|
|
626
|
+
required?: boolean | undefined;
|
|
627
627
|
xdefault?: string | null | undefined;
|
|
628
628
|
description?: string | Record<string, string> | null | undefined;
|
|
629
629
|
} | {
|
|
630
|
-
key: string;
|
|
631
630
|
type: "email";
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
631
|
+
key: string;
|
|
632
|
+
array?: boolean | undefined;
|
|
633
|
+
error?: string | undefined;
|
|
634
|
+
required?: boolean | undefined;
|
|
635
635
|
xdefault?: string | null | undefined;
|
|
636
636
|
description?: string | Record<string, string> | null | undefined;
|
|
637
637
|
} | {
|
|
638
|
-
key: string;
|
|
639
638
|
type: "ip";
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
639
|
+
key: string;
|
|
640
|
+
array?: boolean | undefined;
|
|
641
|
+
error?: string | undefined;
|
|
642
|
+
required?: boolean | undefined;
|
|
643
643
|
xdefault?: string | null | undefined;
|
|
644
644
|
description?: string | Record<string, string> | null | undefined;
|
|
645
645
|
} | {
|
|
646
|
-
key: string;
|
|
647
646
|
type: "url";
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
647
|
+
key: string;
|
|
648
|
+
array?: boolean | undefined;
|
|
649
|
+
error?: string | undefined;
|
|
650
|
+
required?: boolean | undefined;
|
|
651
651
|
xdefault?: string | null | undefined;
|
|
652
652
|
description?: string | Record<string, string> | null | undefined;
|
|
653
653
|
} | {
|
|
654
|
-
key: string;
|
|
655
654
|
type: "enum";
|
|
656
|
-
|
|
657
|
-
required: boolean;
|
|
658
|
-
array: boolean;
|
|
655
|
+
key: string;
|
|
659
656
|
elements: string[];
|
|
657
|
+
array?: boolean | undefined;
|
|
658
|
+
error?: string | undefined;
|
|
659
|
+
required?: boolean | undefined;
|
|
660
660
|
xdefault?: string | null | undefined;
|
|
661
661
|
description?: string | Record<string, string> | null | undefined;
|
|
662
662
|
} | {
|
|
663
|
-
key: string;
|
|
664
663
|
type: "relationship";
|
|
665
|
-
|
|
666
|
-
required: boolean;
|
|
664
|
+
key: string;
|
|
667
665
|
relatedCollection: string;
|
|
668
666
|
relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
|
|
669
667
|
twoWay: boolean;
|
|
@@ -671,11 +669,13 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
|
671
669
|
onDelete: "setNull" | "cascade" | "restrict";
|
|
672
670
|
side: "parent" | "child";
|
|
673
671
|
array?: boolean | undefined;
|
|
672
|
+
error?: string | undefined;
|
|
673
|
+
required?: boolean | undefined;
|
|
674
|
+
description?: string | Record<string, string> | null | undefined;
|
|
674
675
|
importMapping?: {
|
|
675
676
|
originalIdField: string;
|
|
676
677
|
targetField?: string | undefined;
|
|
677
678
|
} | undefined;
|
|
678
|
-
description?: string | Record<string, string> | null | undefined;
|
|
679
679
|
})[];
|
|
680
680
|
};
|
|
681
681
|
};
|