appwrite-utils-cli 0.0.286 → 0.9.0
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 +122 -96
- package/dist/collections/attributes.d.ts +4 -0
- package/dist/collections/attributes.js +224 -0
- package/dist/collections/indexes.d.ts +4 -0
- package/dist/collections/indexes.js +27 -0
- package/dist/collections/methods.d.ts +16 -0
- package/dist/collections/methods.js +216 -0
- package/dist/databases/methods.d.ts +6 -0
- package/dist/databases/methods.js +33 -0
- package/dist/interactiveCLI.d.ts +19 -0
- package/dist/interactiveCLI.js +555 -0
- package/dist/main.js +227 -62
- package/dist/migrations/afterImportActions.js +37 -40
- package/dist/migrations/appwriteToX.d.ts +26 -25
- package/dist/migrations/appwriteToX.js +42 -6
- package/dist/migrations/attributes.js +21 -20
- package/dist/migrations/backup.d.ts +93 -87
- package/dist/migrations/collections.d.ts +6 -0
- package/dist/migrations/collections.js +149 -20
- package/dist/migrations/converters.d.ts +2 -18
- package/dist/migrations/converters.js +13 -2
- package/dist/migrations/dataLoader.d.ts +276 -161
- package/dist/migrations/dataLoader.js +535 -292
- package/dist/migrations/databases.js +8 -2
- package/dist/migrations/helper.d.ts +3 -0
- package/dist/migrations/helper.js +21 -0
- package/dist/migrations/importController.d.ts +5 -2
- package/dist/migrations/importController.js +125 -88
- package/dist/migrations/importDataActions.d.ts +9 -1
- package/dist/migrations/importDataActions.js +15 -3
- package/dist/migrations/indexes.js +3 -2
- package/dist/migrations/logging.js +20 -8
- package/dist/migrations/migrationHelper.d.ts +9 -4
- package/dist/migrations/migrationHelper.js +6 -5
- package/dist/migrations/openapi.d.ts +1 -1
- package/dist/migrations/openapi.js +33 -18
- package/dist/migrations/queue.js +3 -2
- package/dist/migrations/relationships.d.ts +2 -2
- package/dist/migrations/schemaStrings.js +53 -41
- package/dist/migrations/setupDatabase.d.ts +2 -4
- package/dist/migrations/setupDatabase.js +24 -105
- package/dist/migrations/storage.d.ts +3 -1
- package/dist/migrations/storage.js +110 -16
- package/dist/migrations/transfer.d.ts +30 -0
- package/dist/migrations/transfer.js +337 -0
- package/dist/migrations/users.d.ts +2 -1
- package/dist/migrations/users.js +78 -43
- package/dist/schemas/authUser.d.ts +2 -2
- package/dist/storage/methods.d.ts +15 -0
- package/dist/storage/methods.js +207 -0
- package/dist/storage/schemas.d.ts +687 -0
- package/dist/storage/schemas.js +175 -0
- package/dist/utils/getClientFromConfig.d.ts +4 -0
- package/dist/utils/getClientFromConfig.js +16 -0
- package/dist/utils/helperFunctions.d.ts +11 -1
- package/dist/utils/helperFunctions.js +38 -0
- package/dist/utils/retryFailedPromises.d.ts +2 -0
- package/dist/utils/retryFailedPromises.js +21 -0
- package/dist/utils/schemaStrings.d.ts +13 -0
- package/dist/utils/schemaStrings.js +403 -0
- package/dist/utils/setupFiles.js +110 -61
- package/dist/utilsController.d.ts +40 -22
- package/dist/utilsController.js +164 -84
- package/package.json +13 -15
- package/src/collections/attributes.ts +483 -0
- package/src/collections/indexes.ts +53 -0
- package/src/collections/methods.ts +331 -0
- package/src/databases/methods.ts +47 -0
- package/src/init.ts +64 -64
- package/src/interactiveCLI.ts +767 -0
- package/src/main.ts +292 -83
- package/src/migrations/afterImportActions.ts +553 -490
- package/src/migrations/appwriteToX.ts +237 -174
- package/src/migrations/attributes.ts +483 -422
- package/src/migrations/backup.ts +205 -205
- package/src/migrations/collections.ts +545 -300
- package/src/migrations/converters.ts +161 -150
- package/src/migrations/dataLoader.ts +1615 -1304
- package/src/migrations/databases.ts +44 -25
- package/src/migrations/dbHelpers.ts +92 -92
- package/src/migrations/helper.ts +40 -0
- package/src/migrations/importController.ts +448 -384
- package/src/migrations/importDataActions.ts +315 -307
- package/src/migrations/indexes.ts +40 -37
- package/src/migrations/logging.ts +29 -16
- package/src/migrations/migrationHelper.ts +207 -201
- package/src/migrations/openapi.ts +83 -70
- package/src/migrations/queue.ts +118 -119
- package/src/migrations/relationships.ts +324 -324
- package/src/migrations/schemaStrings.ts +472 -460
- package/src/migrations/setupDatabase.ts +118 -219
- package/src/migrations/storage.ts +538 -358
- package/src/migrations/transfer.ts +608 -0
- package/src/migrations/users.ts +362 -285
- package/src/migrations/validationRules.ts +63 -63
- package/src/schemas/authUser.ts +23 -23
- package/src/setup.ts +8 -8
- package/src/storage/methods.ts +371 -0
- package/src/storage/schemas.ts +205 -0
- package/src/types.ts +9 -9
- package/src/utils/getClientFromConfig.ts +17 -0
- package/src/utils/helperFunctions.ts +181 -127
- package/src/utils/index.ts +2 -2
- package/src/utils/loadConfigs.ts +59 -59
- package/src/utils/retryFailedPromises.ts +27 -0
- package/src/utils/schemaStrings.ts +473 -0
- package/src/utils/setupFiles.ts +228 -182
- package/src/utilsController.ts +325 -194
- package/tsconfig.json +37 -37
@@ -116,11 +116,11 @@ export declare const OperationSchema: z.ZodObject<{
|
|
116
116
|
error: z.ZodString;
|
117
117
|
status: z.ZodDefault<z.ZodEnum<["pending", "ready", "in_progress", "completed", "error", "cancelled"]>>;
|
118
118
|
}, "strip", z.ZodTypeAny, {
|
119
|
-
error: string;
|
120
119
|
$id: string;
|
121
120
|
$createdAt: string;
|
122
121
|
$updatedAt: string;
|
123
122
|
status: "error" | "pending" | "ready" | "in_progress" | "completed" | "cancelled";
|
123
|
+
error: string;
|
124
124
|
collectionId: string;
|
125
125
|
operationType: string;
|
126
126
|
progress: number;
|
@@ -128,10 +128,10 @@ export declare const OperationSchema: z.ZodObject<{
|
|
128
128
|
data?: any;
|
129
129
|
batches?: string[] | undefined;
|
130
130
|
}, {
|
131
|
-
error: string;
|
132
131
|
$id: string;
|
133
132
|
$createdAt: string;
|
134
133
|
$updatedAt: string;
|
134
|
+
error: string;
|
135
135
|
collectionId: string;
|
136
136
|
operationType: string;
|
137
137
|
progress: number;
|
@@ -154,8 +154,8 @@ export declare const OperationCreateSchema: z.ZodObject<Omit<{
|
|
154
154
|
error: z.ZodString;
|
155
155
|
status: z.ZodDefault<z.ZodEnum<["pending", "ready", "in_progress", "completed", "error", "cancelled"]>>;
|
156
156
|
}, "$id" | "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
|
157
|
-
error: string;
|
158
157
|
status: "error" | "pending" | "ready" | "in_progress" | "completed" | "cancelled";
|
158
|
+
error: string;
|
159
159
|
collectionId: string;
|
160
160
|
operationType: string;
|
161
161
|
progress: number;
|
@@ -181,82 +181,82 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
181
181
|
type: "string";
|
182
182
|
key: string;
|
183
183
|
size: number;
|
184
|
+
format?: string | null | undefined;
|
185
|
+
description?: string | Record<string, string> | undefined;
|
186
|
+
required?: boolean | undefined;
|
184
187
|
array?: boolean | undefined;
|
185
188
|
error?: string | undefined;
|
186
|
-
required?: boolean | undefined;
|
187
189
|
xdefault?: string | null | undefined;
|
188
190
|
encrypted?: boolean | undefined;
|
189
|
-
format?: string | null | undefined;
|
190
|
-
description?: string | Record<string, string> | undefined;
|
191
191
|
} | {
|
192
192
|
type: "integer";
|
193
193
|
key: string;
|
194
|
+
description?: string | Record<string, string> | null | undefined;
|
195
|
+
required?: boolean | undefined;
|
194
196
|
array?: boolean | undefined;
|
195
197
|
error?: string | undefined;
|
196
|
-
required?: boolean | undefined;
|
197
198
|
xdefault?: number | null | undefined;
|
198
|
-
description?: string | Record<string, string> | null | undefined;
|
199
199
|
min?: number | undefined;
|
200
200
|
max?: number | undefined;
|
201
201
|
} | {
|
202
202
|
type: "float";
|
203
203
|
key: string;
|
204
|
+
description?: string | Record<string, string> | null | undefined;
|
205
|
+
required?: boolean | undefined;
|
204
206
|
array?: boolean | undefined;
|
205
207
|
error?: string | undefined;
|
206
|
-
required?: boolean | undefined;
|
207
208
|
xdefault?: number | null | undefined;
|
208
|
-
description?: string | Record<string, string> | null | undefined;
|
209
209
|
min?: number | undefined;
|
210
210
|
max?: number | undefined;
|
211
211
|
} | {
|
212
212
|
type: "boolean";
|
213
213
|
key: string;
|
214
|
+
description?: string | Record<string, string> | null | undefined;
|
215
|
+
required?: boolean | undefined;
|
214
216
|
array?: boolean | undefined;
|
215
217
|
error?: string | undefined;
|
216
|
-
required?: boolean | undefined;
|
217
218
|
xdefault?: boolean | null | undefined;
|
218
|
-
description?: string | Record<string, string> | null | undefined;
|
219
219
|
} | {
|
220
220
|
type: "datetime";
|
221
221
|
key: string;
|
222
|
+
description?: string | Record<string, string> | null | undefined;
|
223
|
+
required?: boolean | undefined;
|
222
224
|
array?: boolean | undefined;
|
223
225
|
error?: string | undefined;
|
224
|
-
required?: boolean | undefined;
|
225
226
|
xdefault?: string | null | undefined;
|
226
|
-
description?: string | Record<string, string> | null | undefined;
|
227
227
|
} | {
|
228
228
|
type: "email";
|
229
229
|
key: string;
|
230
|
+
description?: string | Record<string, string> | null | undefined;
|
231
|
+
required?: boolean | undefined;
|
230
232
|
array?: boolean | undefined;
|
231
233
|
error?: string | undefined;
|
232
|
-
required?: boolean | undefined;
|
233
234
|
xdefault?: string | null | undefined;
|
234
|
-
description?: string | Record<string, string> | null | undefined;
|
235
235
|
} | {
|
236
236
|
type: "ip";
|
237
237
|
key: string;
|
238
|
+
description?: string | Record<string, string> | null | undefined;
|
239
|
+
required?: boolean | undefined;
|
238
240
|
array?: boolean | undefined;
|
239
241
|
error?: string | undefined;
|
240
|
-
required?: boolean | undefined;
|
241
242
|
xdefault?: string | null | undefined;
|
242
|
-
description?: string | Record<string, string> | null | undefined;
|
243
243
|
} | {
|
244
244
|
type: "url";
|
245
245
|
key: string;
|
246
|
+
description?: string | Record<string, string> | null | undefined;
|
247
|
+
required?: boolean | undefined;
|
246
248
|
array?: boolean | undefined;
|
247
249
|
error?: string | undefined;
|
248
|
-
required?: boolean | undefined;
|
249
250
|
xdefault?: string | null | undefined;
|
250
|
-
description?: string | Record<string, string> | null | undefined;
|
251
251
|
} | {
|
252
252
|
type: "enum";
|
253
253
|
key: string;
|
254
254
|
elements: string[];
|
255
|
+
description?: string | Record<string, string> | null | undefined;
|
256
|
+
required?: boolean | undefined;
|
255
257
|
array?: boolean | undefined;
|
256
258
|
error?: string | undefined;
|
257
|
-
required?: boolean | undefined;
|
258
259
|
xdefault?: string | null | undefined;
|
259
|
-
description?: string | Record<string, string> | null | undefined;
|
260
260
|
} | {
|
261
261
|
type: "relationship";
|
262
262
|
key: string;
|
@@ -266,10 +266,10 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
266
266
|
twoWayKey: string;
|
267
267
|
onDelete: "setNull" | "cascade" | "restrict";
|
268
268
|
side: "parent" | "child";
|
269
|
+
description?: string | Record<string, string> | null | undefined;
|
270
|
+
required?: boolean | undefined;
|
269
271
|
array?: boolean | undefined;
|
270
272
|
error?: string | undefined;
|
271
|
-
required?: boolean | undefined;
|
272
|
-
description?: string | Record<string, string> | null | undefined;
|
273
273
|
importMapping?: {
|
274
274
|
originalIdField: string;
|
275
275
|
targetField?: string | undefined;
|
@@ -295,6 +295,7 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
295
295
|
targetKey: string;
|
296
296
|
oldKey?: string | undefined;
|
297
297
|
oldKeys?: string[] | undefined;
|
298
|
+
valueToSet?: any;
|
298
299
|
fileData?: {
|
299
300
|
path: string;
|
300
301
|
name: string;
|
@@ -316,7 +317,9 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
316
317
|
targetField: string;
|
317
318
|
targetCollection: string;
|
318
319
|
fieldToSet?: string | undefined;
|
320
|
+
targetFieldToMatch?: string | undefined;
|
319
321
|
}[] | undefined;
|
322
|
+
createUsers?: boolean | null | undefined;
|
320
323
|
updateMapping?: {
|
321
324
|
targetField: string;
|
322
325
|
originalIdField: string;
|
@@ -331,82 +334,82 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
331
334
|
type: "string";
|
332
335
|
key: string;
|
333
336
|
size: number;
|
337
|
+
format?: string | null | undefined;
|
338
|
+
description?: string | Record<string, string> | undefined;
|
339
|
+
required?: boolean | undefined;
|
334
340
|
array?: boolean | undefined;
|
335
341
|
error?: string | undefined;
|
336
|
-
required?: boolean | undefined;
|
337
342
|
xdefault?: string | null | undefined;
|
338
343
|
encrypted?: boolean | undefined;
|
339
|
-
format?: string | null | undefined;
|
340
|
-
description?: string | Record<string, string> | undefined;
|
341
344
|
} | {
|
342
345
|
type: "integer";
|
343
346
|
key: string;
|
347
|
+
description?: string | Record<string, string> | null | undefined;
|
348
|
+
required?: boolean | undefined;
|
344
349
|
array?: boolean | undefined;
|
345
350
|
error?: string | undefined;
|
346
|
-
required?: boolean | undefined;
|
347
351
|
xdefault?: number | null | undefined;
|
348
|
-
description?: string | Record<string, string> | null | undefined;
|
349
352
|
min?: number | undefined;
|
350
353
|
max?: number | undefined;
|
351
354
|
} | {
|
352
355
|
type: "float";
|
353
356
|
key: string;
|
357
|
+
description?: string | Record<string, string> | null | undefined;
|
358
|
+
required?: boolean | undefined;
|
354
359
|
array?: boolean | undefined;
|
355
360
|
error?: string | undefined;
|
356
|
-
required?: boolean | undefined;
|
357
361
|
xdefault?: number | null | undefined;
|
358
|
-
description?: string | Record<string, string> | null | undefined;
|
359
362
|
min?: number | undefined;
|
360
363
|
max?: number | undefined;
|
361
364
|
} | {
|
362
365
|
type: "boolean";
|
363
366
|
key: string;
|
367
|
+
description?: string | Record<string, string> | null | undefined;
|
368
|
+
required?: boolean | undefined;
|
364
369
|
array?: boolean | undefined;
|
365
370
|
error?: string | undefined;
|
366
|
-
required?: boolean | undefined;
|
367
371
|
xdefault?: boolean | null | undefined;
|
368
|
-
description?: string | Record<string, string> | null | undefined;
|
369
372
|
} | {
|
370
373
|
type: "datetime";
|
371
374
|
key: string;
|
375
|
+
description?: string | Record<string, string> | null | undefined;
|
376
|
+
required?: boolean | undefined;
|
372
377
|
array?: boolean | undefined;
|
373
378
|
error?: string | undefined;
|
374
|
-
required?: boolean | undefined;
|
375
379
|
xdefault?: string | null | undefined;
|
376
|
-
description?: string | Record<string, string> | null | undefined;
|
377
380
|
} | {
|
378
381
|
type: "email";
|
379
382
|
key: string;
|
383
|
+
description?: string | Record<string, string> | null | undefined;
|
384
|
+
required?: boolean | undefined;
|
380
385
|
array?: boolean | undefined;
|
381
386
|
error?: string | undefined;
|
382
|
-
required?: boolean | undefined;
|
383
387
|
xdefault?: string | null | undefined;
|
384
|
-
description?: string | Record<string, string> | null | undefined;
|
385
388
|
} | {
|
386
389
|
type: "ip";
|
387
390
|
key: string;
|
391
|
+
description?: string | Record<string, string> | null | undefined;
|
392
|
+
required?: boolean | undefined;
|
388
393
|
array?: boolean | undefined;
|
389
394
|
error?: string | undefined;
|
390
|
-
required?: boolean | undefined;
|
391
395
|
xdefault?: string | null | undefined;
|
392
|
-
description?: string | Record<string, string> | null | undefined;
|
393
396
|
} | {
|
394
397
|
type: "url";
|
395
398
|
key: string;
|
399
|
+
description?: string | Record<string, string> | null | undefined;
|
400
|
+
required?: boolean | undefined;
|
396
401
|
array?: boolean | undefined;
|
397
402
|
error?: string | undefined;
|
398
|
-
required?: boolean | undefined;
|
399
403
|
xdefault?: string | null | undefined;
|
400
|
-
description?: string | Record<string, string> | null | undefined;
|
401
404
|
} | {
|
402
405
|
type: "enum";
|
403
406
|
key: string;
|
404
407
|
elements: string[];
|
408
|
+
description?: string | Record<string, string> | null | undefined;
|
409
|
+
required?: boolean | undefined;
|
405
410
|
array?: boolean | undefined;
|
406
411
|
error?: string | undefined;
|
407
|
-
required?: boolean | undefined;
|
408
412
|
xdefault?: string | null | undefined;
|
409
|
-
description?: string | Record<string, string> | null | undefined;
|
410
413
|
} | {
|
411
414
|
type: "relationship";
|
412
415
|
key: string;
|
@@ -416,10 +419,10 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
416
419
|
twoWayKey: string;
|
417
420
|
onDelete: "setNull" | "cascade" | "restrict";
|
418
421
|
side: "parent" | "child";
|
422
|
+
description?: string | Record<string, string> | null | undefined;
|
423
|
+
required?: boolean | undefined;
|
419
424
|
array?: boolean | undefined;
|
420
425
|
error?: string | undefined;
|
421
|
-
required?: boolean | undefined;
|
422
|
-
description?: string | Record<string, string> | null | undefined;
|
423
426
|
importMapping?: {
|
424
427
|
originalIdField: string;
|
425
428
|
targetField?: string | undefined;
|
@@ -433,82 +436,82 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
433
436
|
type: "string";
|
434
437
|
key: string;
|
435
438
|
size: number;
|
439
|
+
format?: string | null | undefined;
|
440
|
+
description?: string | Record<string, string> | undefined;
|
441
|
+
required?: boolean | undefined;
|
436
442
|
array?: boolean | undefined;
|
437
443
|
error?: string | undefined;
|
438
|
-
required?: boolean | undefined;
|
439
444
|
xdefault?: string | null | undefined;
|
440
445
|
encrypted?: boolean | undefined;
|
441
|
-
format?: string | null | undefined;
|
442
|
-
description?: string | Record<string, string> | undefined;
|
443
446
|
} | {
|
444
447
|
type: "integer";
|
445
448
|
key: string;
|
449
|
+
description?: string | Record<string, string> | null | undefined;
|
450
|
+
required?: boolean | undefined;
|
446
451
|
array?: boolean | undefined;
|
447
452
|
error?: string | undefined;
|
448
|
-
required?: boolean | undefined;
|
449
453
|
xdefault?: number | null | undefined;
|
450
|
-
description?: string | Record<string, string> | null | undefined;
|
451
454
|
min?: number | undefined;
|
452
455
|
max?: number | undefined;
|
453
456
|
} | {
|
454
457
|
type: "float";
|
455
458
|
key: string;
|
459
|
+
description?: string | Record<string, string> | null | undefined;
|
460
|
+
required?: boolean | undefined;
|
456
461
|
array?: boolean | undefined;
|
457
462
|
error?: string | undefined;
|
458
|
-
required?: boolean | undefined;
|
459
463
|
xdefault?: number | null | undefined;
|
460
|
-
description?: string | Record<string, string> | null | undefined;
|
461
464
|
min?: number | undefined;
|
462
465
|
max?: number | undefined;
|
463
466
|
} | {
|
464
467
|
type: "boolean";
|
465
468
|
key: string;
|
469
|
+
description?: string | Record<string, string> | null | undefined;
|
470
|
+
required?: boolean | undefined;
|
466
471
|
array?: boolean | undefined;
|
467
472
|
error?: string | undefined;
|
468
|
-
required?: boolean | undefined;
|
469
473
|
xdefault?: boolean | null | undefined;
|
470
|
-
description?: string | Record<string, string> | null | undefined;
|
471
474
|
} | {
|
472
475
|
type: "datetime";
|
473
476
|
key: string;
|
477
|
+
description?: string | Record<string, string> | null | undefined;
|
478
|
+
required?: boolean | undefined;
|
474
479
|
array?: boolean | undefined;
|
475
480
|
error?: string | undefined;
|
476
|
-
required?: boolean | undefined;
|
477
481
|
xdefault?: string | null | undefined;
|
478
|
-
description?: string | Record<string, string> | null | undefined;
|
479
482
|
} | {
|
480
483
|
type: "email";
|
481
484
|
key: string;
|
485
|
+
description?: string | Record<string, string> | null | undefined;
|
486
|
+
required?: boolean | undefined;
|
482
487
|
array?: boolean | undefined;
|
483
488
|
error?: string | undefined;
|
484
|
-
required?: boolean | undefined;
|
485
489
|
xdefault?: string | null | undefined;
|
486
|
-
description?: string | Record<string, string> | null | undefined;
|
487
490
|
} | {
|
488
491
|
type: "ip";
|
489
492
|
key: string;
|
493
|
+
description?: string | Record<string, string> | null | undefined;
|
494
|
+
required?: boolean | undefined;
|
490
495
|
array?: boolean | undefined;
|
491
496
|
error?: string | undefined;
|
492
|
-
required?: boolean | undefined;
|
493
497
|
xdefault?: string | null | undefined;
|
494
|
-
description?: string | Record<string, string> | null | undefined;
|
495
498
|
} | {
|
496
499
|
type: "url";
|
497
500
|
key: string;
|
501
|
+
description?: string | Record<string, string> | null | undefined;
|
502
|
+
required?: boolean | undefined;
|
498
503
|
array?: boolean | undefined;
|
499
504
|
error?: string | undefined;
|
500
|
-
required?: boolean | undefined;
|
501
505
|
xdefault?: string | null | undefined;
|
502
|
-
description?: string | Record<string, string> | null | undefined;
|
503
506
|
} | {
|
504
507
|
type: "enum";
|
505
508
|
key: string;
|
506
509
|
elements: string[];
|
510
|
+
description?: string | Record<string, string> | null | undefined;
|
511
|
+
required?: boolean | undefined;
|
507
512
|
array?: boolean | undefined;
|
508
513
|
error?: string | undefined;
|
509
|
-
required?: boolean | undefined;
|
510
514
|
xdefault?: string | null | undefined;
|
511
|
-
description?: string | Record<string, string> | null | undefined;
|
512
515
|
} | {
|
513
516
|
type: "relationship";
|
514
517
|
key: string;
|
@@ -518,10 +521,10 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
518
521
|
twoWayKey: string;
|
519
522
|
onDelete: "setNull" | "cascade" | "restrict";
|
520
523
|
side: "parent" | "child";
|
524
|
+
description?: string | Record<string, string> | null | undefined;
|
525
|
+
required?: boolean | undefined;
|
521
526
|
array?: boolean | undefined;
|
522
527
|
error?: string | undefined;
|
523
|
-
required?: boolean | undefined;
|
524
|
-
description?: string | Record<string, string> | null | undefined;
|
525
528
|
importMapping?: {
|
526
529
|
originalIdField: string;
|
527
530
|
targetField?: string | undefined;
|
@@ -547,6 +550,7 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
547
550
|
targetKey: string;
|
548
551
|
oldKey?: string | undefined;
|
549
552
|
oldKeys?: string[] | undefined;
|
553
|
+
valueToSet?: any;
|
550
554
|
fileData?: {
|
551
555
|
path: string;
|
552
556
|
name: string;
|
@@ -568,7 +572,9 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
568
572
|
targetField: string;
|
569
573
|
targetCollection: string;
|
570
574
|
fieldToSet?: string | undefined;
|
575
|
+
targetFieldToMatch?: string | undefined;
|
571
576
|
}[] | undefined;
|
577
|
+
createUsers?: boolean | null | undefined;
|
572
578
|
updateMapping?: {
|
573
579
|
targetField: string;
|
574
580
|
originalIdField: string;
|
@@ -583,82 +589,82 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
583
589
|
type: "string";
|
584
590
|
key: string;
|
585
591
|
size: number;
|
592
|
+
format?: string | null | undefined;
|
593
|
+
description?: string | Record<string, string> | undefined;
|
594
|
+
required?: boolean | undefined;
|
586
595
|
array?: boolean | undefined;
|
587
596
|
error?: string | undefined;
|
588
|
-
required?: boolean | undefined;
|
589
597
|
xdefault?: string | null | undefined;
|
590
598
|
encrypted?: boolean | undefined;
|
591
|
-
format?: string | null | undefined;
|
592
|
-
description?: string | Record<string, string> | undefined;
|
593
599
|
} | {
|
594
600
|
type: "integer";
|
595
601
|
key: string;
|
602
|
+
description?: string | Record<string, string> | null | undefined;
|
603
|
+
required?: boolean | undefined;
|
596
604
|
array?: boolean | undefined;
|
597
605
|
error?: string | undefined;
|
598
|
-
required?: boolean | undefined;
|
599
606
|
xdefault?: number | null | undefined;
|
600
|
-
description?: string | Record<string, string> | null | undefined;
|
601
607
|
min?: number | undefined;
|
602
608
|
max?: number | undefined;
|
603
609
|
} | {
|
604
610
|
type: "float";
|
605
611
|
key: string;
|
612
|
+
description?: string | Record<string, string> | null | undefined;
|
613
|
+
required?: boolean | undefined;
|
606
614
|
array?: boolean | undefined;
|
607
615
|
error?: string | undefined;
|
608
|
-
required?: boolean | undefined;
|
609
616
|
xdefault?: number | null | undefined;
|
610
|
-
description?: string | Record<string, string> | null | undefined;
|
611
617
|
min?: number | undefined;
|
612
618
|
max?: number | undefined;
|
613
619
|
} | {
|
614
620
|
type: "boolean";
|
615
621
|
key: string;
|
622
|
+
description?: string | Record<string, string> | null | undefined;
|
623
|
+
required?: boolean | undefined;
|
616
624
|
array?: boolean | undefined;
|
617
625
|
error?: string | undefined;
|
618
|
-
required?: boolean | undefined;
|
619
626
|
xdefault?: boolean | null | undefined;
|
620
|
-
description?: string | Record<string, string> | null | undefined;
|
621
627
|
} | {
|
622
628
|
type: "datetime";
|
623
629
|
key: string;
|
630
|
+
description?: string | Record<string, string> | null | undefined;
|
631
|
+
required?: boolean | undefined;
|
624
632
|
array?: boolean | undefined;
|
625
633
|
error?: string | undefined;
|
626
|
-
required?: boolean | undefined;
|
627
634
|
xdefault?: string | null | undefined;
|
628
|
-
description?: string | Record<string, string> | null | undefined;
|
629
635
|
} | {
|
630
636
|
type: "email";
|
631
637
|
key: string;
|
638
|
+
description?: string | Record<string, string> | null | undefined;
|
639
|
+
required?: boolean | undefined;
|
632
640
|
array?: boolean | undefined;
|
633
641
|
error?: string | undefined;
|
634
|
-
required?: boolean | undefined;
|
635
642
|
xdefault?: string | null | undefined;
|
636
|
-
description?: string | Record<string, string> | null | undefined;
|
637
643
|
} | {
|
638
644
|
type: "ip";
|
639
645
|
key: string;
|
646
|
+
description?: string | Record<string, string> | null | undefined;
|
647
|
+
required?: boolean | undefined;
|
640
648
|
array?: boolean | undefined;
|
641
649
|
error?: string | undefined;
|
642
|
-
required?: boolean | undefined;
|
643
650
|
xdefault?: string | null | undefined;
|
644
|
-
description?: string | Record<string, string> | null | undefined;
|
645
651
|
} | {
|
646
652
|
type: "url";
|
647
653
|
key: string;
|
654
|
+
description?: string | Record<string, string> | null | undefined;
|
655
|
+
required?: boolean | undefined;
|
648
656
|
array?: boolean | undefined;
|
649
657
|
error?: string | undefined;
|
650
|
-
required?: boolean | undefined;
|
651
658
|
xdefault?: string | null | undefined;
|
652
|
-
description?: string | Record<string, string> | null | undefined;
|
653
659
|
} | {
|
654
660
|
type: "enum";
|
655
661
|
key: string;
|
656
662
|
elements: string[];
|
663
|
+
description?: string | Record<string, string> | null | undefined;
|
664
|
+
required?: boolean | undefined;
|
657
665
|
array?: boolean | undefined;
|
658
666
|
error?: string | undefined;
|
659
|
-
required?: boolean | undefined;
|
660
667
|
xdefault?: string | null | undefined;
|
661
|
-
description?: string | Record<string, string> | null | undefined;
|
662
668
|
} | {
|
663
669
|
type: "relationship";
|
664
670
|
key: string;
|
@@ -668,10 +674,10 @@ export declare const getMigrationCollectionSchemas: () => {
|
|
668
674
|
twoWayKey: string;
|
669
675
|
onDelete: "setNull" | "cascade" | "restrict";
|
670
676
|
side: "parent" | "child";
|
677
|
+
description?: string | Record<string, string> | null | undefined;
|
678
|
+
required?: boolean | undefined;
|
671
679
|
array?: boolean | undefined;
|
672
680
|
error?: string | undefined;
|
673
|
-
required?: boolean | undefined;
|
674
|
-
description?: string | Record<string, string> | null | undefined;
|
675
681
|
importMapping?: {
|
676
682
|
originalIdField: string;
|
677
683
|
targetField?: string | undefined;
|
@@ -14,3 +14,9 @@ export declare const createOrUpdateCollections: (database: Databases, databaseId
|
|
14
14
|
}[]) => Promise<void>;
|
15
15
|
export declare const generateMockData: (database: Databases, databaseId: string, configCollections: any[]) => Promise<void>;
|
16
16
|
export declare const fetchAllCollections: (dbId: string, database: Databases) => Promise<Models.Collection[]>;
|
17
|
+
/**
|
18
|
+
* Transfers all documents from one collection to another in a different database
|
19
|
+
* within the same Appwrite Project
|
20
|
+
*/
|
21
|
+
export declare const transferDocumentsBetweenDbsLocalToLocal: (db: Databases, fromDbId: string, toDbId: string, fromCollId: string, toCollId: string) => Promise<void>;
|
22
|
+
export declare const transferDocumentsBetweenDbsLocalToRemote: (localDb: Databases, endpoint: string, projectId: string, apiKey: string, fromDbId: string, toDbId: string, fromCollId: string, toCollId: string) => Promise<void>;
|