appwrite-utils-cli 1.3.4 → 1.4.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.
Files changed (116) hide show
  1. package/dist/adapters/AdapterFactory.d.ts +87 -0
  2. package/dist/adapters/AdapterFactory.js +217 -0
  3. package/dist/adapters/DatabaseAdapter.d.ts +217 -0
  4. package/dist/adapters/DatabaseAdapter.js +50 -0
  5. package/dist/adapters/LegacyAdapter.d.ts +49 -0
  6. package/dist/adapters/LegacyAdapter.js +382 -0
  7. package/dist/adapters/TablesDBAdapter.d.ts +55 -0
  8. package/dist/adapters/TablesDBAdapter.js +302 -0
  9. package/dist/adapters/index.d.ts +11 -0
  10. package/dist/adapters/index.js +12 -0
  11. package/dist/collections/attributes.js +43 -24
  12. package/dist/collections/methods.d.ts +4 -3
  13. package/dist/collections/methods.js +34 -14
  14. package/dist/config/yamlConfig.d.ts +40 -437
  15. package/dist/config/yamlConfig.js +8 -2
  16. package/dist/databases/setup.js +2 -2
  17. package/dist/main.js +0 -0
  18. package/dist/migrations/appwriteToX.d.ts +26 -37
  19. package/dist/migrations/comprehensiveTransfer.js +4 -4
  20. package/dist/migrations/dataLoader.d.ts +124 -1484
  21. package/dist/migrations/dataLoader.js +2 -1
  22. package/dist/migrations/relationships.d.ts +2 -3
  23. package/dist/migrations/relationships.js +1 -1
  24. package/dist/migrations/services/UserMappingService.js +1 -1
  25. package/dist/migrations/yaml/YamlImportConfigLoader.d.ts +24 -279
  26. package/dist/migrations/yaml/YamlImportConfigLoader.js +7 -2
  27. package/dist/schemas/authUser.d.ts +7 -47
  28. package/dist/schemas/authUser.js +1 -1
  29. package/dist/shared/jsonSchemaGenerator.d.ts +0 -2
  30. package/dist/shared/jsonSchemaGenerator.js +4 -17
  31. package/dist/shared/migrationHelpers.d.ts +17 -119
  32. package/dist/shared/operationQueue.js +16 -7
  33. package/dist/shared/schemaGenerator.js +2 -17
  34. package/dist/storage/schemas.d.ts +149 -296
  35. package/dist/users/methods.d.ts +2 -2
  36. package/dist/utils/configMigration.js +0 -1
  37. package/dist/utils/getClientFromConfig.d.ts +26 -0
  38. package/dist/utils/getClientFromConfig.js +37 -0
  39. package/dist/utils/loadConfigs.js +0 -2
  40. package/dist/utils/schemaStrings.js +2 -17
  41. package/dist/utils/setupFiles.js +2 -0
  42. package/dist/utils/versionDetection.d.ts +56 -0
  43. package/dist/utils/versionDetection.js +217 -0
  44. package/dist/utils/yamlConverter.d.ts +0 -1
  45. package/dist/utils/yamlConverter.js +0 -2
  46. package/dist/utilsController.js +2 -0
  47. package/package.json +3 -2
  48. package/src/adapters/AdapterFactory.ts +296 -0
  49. package/src/adapters/DatabaseAdapter.ts +290 -0
  50. package/src/adapters/LegacyAdapter.ts +667 -0
  51. package/src/adapters/TablesDBAdapter.ts +429 -0
  52. package/src/adapters/index.ts +37 -0
  53. package/src/collections/attributes.ts +351 -157
  54. package/src/collections/methods.ts +43 -28
  55. package/src/config/yamlConfig.ts +8 -2
  56. package/src/databases/setup.ts +2 -2
  57. package/src/migrations/afterImportActions.ts +2 -2
  58. package/src/migrations/comprehensiveTransfer.ts +4 -0
  59. package/src/migrations/dataLoader.ts +2 -1
  60. package/src/migrations/relationships.ts +1 -1
  61. package/src/migrations/services/UserMappingService.ts +1 -1
  62. package/src/migrations/yaml/YamlImportConfigLoader.ts +7 -2
  63. package/src/schemas/authUser.ts +1 -1
  64. package/src/shared/jsonSchemaGenerator.ts +4 -19
  65. package/src/shared/operationQueue.ts +20 -13
  66. package/src/shared/schemaGenerator.ts +2 -16
  67. package/src/types/node-appwrite-tablesdb.d.ts +44 -0
  68. package/src/users/methods.ts +2 -2
  69. package/src/utils/configMigration.ts +0 -1
  70. package/src/utils/getClientFromConfig.ts +56 -0
  71. package/src/utils/loadConfigs.ts +0 -2
  72. package/src/utils/schemaStrings.ts +2 -16
  73. package/src/utils/setupFiles.ts +2 -0
  74. package/src/utils/versionDetection.ts +265 -0
  75. package/src/utils/yamlConverter.ts +0 -2
  76. package/src/utilsController.ts +2 -0
  77. package/dist/functions/openapi.d.ts +0 -4
  78. package/dist/functions/openapi.js +0 -60
  79. package/dist/migrations/attributes.d.ts +0 -4
  80. package/dist/migrations/attributes.js +0 -301
  81. package/dist/migrations/backup.d.ts +0 -687
  82. package/dist/migrations/backup.js +0 -175
  83. package/dist/migrations/collections.d.ts +0 -22
  84. package/dist/migrations/collections.js +0 -347
  85. package/dist/migrations/converters.d.ts +0 -46
  86. package/dist/migrations/converters.js +0 -139
  87. package/dist/migrations/databases.d.ts +0 -2
  88. package/dist/migrations/databases.js +0 -28
  89. package/dist/migrations/dbHelpers.d.ts +0 -5
  90. package/dist/migrations/dbHelpers.js +0 -57
  91. package/dist/migrations/helper.d.ts +0 -3
  92. package/dist/migrations/helper.js +0 -21
  93. package/dist/migrations/indexes.d.ts +0 -4
  94. package/dist/migrations/indexes.js +0 -19
  95. package/dist/migrations/logging.d.ts +0 -10
  96. package/dist/migrations/logging.js +0 -46
  97. package/dist/migrations/migrationHelper.d.ts +0 -173
  98. package/dist/migrations/migrationHelper.js +0 -130
  99. package/dist/migrations/openapi.d.ts +0 -4
  100. package/dist/migrations/openapi.js +0 -60
  101. package/dist/migrations/queue.d.ts +0 -13
  102. package/dist/migrations/queue.js +0 -79
  103. package/dist/migrations/schemaStrings.d.ts +0 -14
  104. package/dist/migrations/schemaStrings.js +0 -478
  105. package/dist/migrations/setupDatabase.d.ts +0 -6
  106. package/dist/migrations/setupDatabase.js +0 -115
  107. package/dist/migrations/storage.d.ts +0 -10
  108. package/dist/migrations/storage.js +0 -340
  109. package/dist/migrations/users.d.ts +0 -16
  110. package/dist/migrations/users.js +0 -276
  111. package/dist/migrations/validationRules.d.ts +0 -43
  112. package/dist/migrations/validationRules.js +0 -42
  113. package/dist/shared/attributeManager.d.ts +0 -17
  114. package/dist/shared/attributeManager.js +0 -272
  115. package/src/functions/openapi.ts +0 -83
  116. package/src/shared/attributeManager.ts +0 -428
@@ -4,70 +4,21 @@ export declare const BackupSchema: z.ZodObject<{
4
4
  $createdAt: z.ZodString;
5
5
  $updatedAt: z.ZodString;
6
6
  database: z.ZodString;
7
- collections: z.ZodArray<z.ZodString, "many">;
7
+ collections: z.ZodArray<z.ZodString>;
8
8
  documents: z.ZodDefault<z.ZodArray<z.ZodObject<{
9
9
  collectionId: z.ZodString;
10
10
  data: z.ZodString;
11
- }, "strip", z.ZodTypeAny, {
12
- data: string;
13
- collectionId: string;
14
- }, {
15
- data: string;
16
- collectionId: string;
17
- }>, "many">>;
18
- }, "strip", z.ZodTypeAny, {
19
- documents: {
20
- data: string;
21
- collectionId: string;
22
- }[];
23
- $id: string;
24
- $createdAt: string;
25
- $updatedAt: string;
26
- collections: string[];
27
- database: string;
28
- }, {
29
- $id: string;
30
- $createdAt: string;
31
- $updatedAt: string;
32
- collections: string[];
33
- database: string;
34
- documents?: {
35
- data: string;
36
- collectionId: string;
37
- }[] | undefined;
38
- }>;
11
+ }, z.core.$strip>>>;
12
+ }, z.core.$strip>;
39
13
  export type Backup = z.infer<typeof BackupSchema>;
40
- export declare const BackupCreateSchema: z.ZodObject<Omit<{
41
- $id: z.ZodString;
42
- $createdAt: z.ZodString;
43
- $updatedAt: z.ZodString;
44
- database: z.ZodString;
45
- collections: z.ZodArray<z.ZodString, "many">;
14
+ export declare const BackupCreateSchema: z.ZodObject<{
46
15
  documents: z.ZodDefault<z.ZodArray<z.ZodObject<{
47
16
  collectionId: z.ZodString;
48
17
  data: z.ZodString;
49
- }, "strip", z.ZodTypeAny, {
50
- data: string;
51
- collectionId: string;
52
- }, {
53
- data: string;
54
- collectionId: string;
55
- }>, "many">>;
56
- }, "$id" | "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
57
- documents: {
58
- data: string;
59
- collectionId: string;
60
- }[];
61
- collections: string[];
62
- database: string;
63
- }, {
64
- collections: string[];
65
- database: string;
66
- documents?: {
67
- data: string;
68
- collectionId: string;
69
- }[] | undefined;
70
- }>;
18
+ }, z.core.$strip>>>;
19
+ collections: z.ZodArray<z.ZodString>;
20
+ database: z.ZodString;
21
+ }, z.core.$strip>;
71
22
  export type BackupCreate = z.infer<typeof BackupCreateSchema>;
72
23
  export declare const BatchSchema: z.ZodObject<{
73
24
  $id: z.ZodString;
@@ -75,33 +26,12 @@ export declare const BatchSchema: z.ZodObject<{
75
26
  $updatedAt: z.ZodString;
76
27
  data: z.ZodString;
77
28
  processed: z.ZodDefault<z.ZodBoolean>;
78
- }, "strip", z.ZodTypeAny, {
79
- data: string;
80
- $id: string;
81
- $createdAt: string;
82
- $updatedAt: string;
83
- processed: boolean;
84
- }, {
85
- data: string;
86
- $id: string;
87
- $createdAt: string;
88
- $updatedAt: string;
89
- processed?: boolean | undefined;
90
- }>;
29
+ }, z.core.$strip>;
91
30
  export type Batch = z.infer<typeof BatchSchema>;
92
- export declare const BatchCreateSchema: z.ZodObject<Omit<{
93
- $id: z.ZodString;
94
- $createdAt: z.ZodString;
95
- $updatedAt: z.ZodString;
31
+ export declare const BatchCreateSchema: z.ZodObject<{
96
32
  data: z.ZodString;
97
33
  processed: z.ZodDefault<z.ZodBoolean>;
98
- }, "$id" | "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
99
- data: string;
100
- processed: boolean;
101
- }, {
102
- data: string;
103
- processed?: boolean | undefined;
104
- }>;
34
+ }, z.core.$strip>;
105
35
  export type BatchCreate = z.infer<typeof BatchCreateSchema>;
106
36
  export declare const OperationSchema: z.ZodObject<{
107
37
  $id: z.ZodString;
@@ -110,176 +40,134 @@ export declare const OperationSchema: z.ZodObject<{
110
40
  operationType: z.ZodString;
111
41
  collectionId: z.ZodString;
112
42
  data: z.ZodAny;
113
- batches: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
43
+ batches: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
114
44
  progress: z.ZodNumber;
115
45
  total: z.ZodNumber;
116
46
  error: z.ZodString;
117
- status: z.ZodDefault<z.ZodEnum<["pending", "ready", "in_progress", "completed", "error", "cancelled"]>>;
118
- }, "strip", z.ZodTypeAny, {
119
- status: "error" | "pending" | "ready" | "in_progress" | "completed" | "cancelled";
120
- error: string;
121
- $id: string;
122
- $createdAt: string;
123
- $updatedAt: string;
124
- collectionId: string;
125
- operationType: string;
126
- progress: number;
127
- total: number;
128
- data?: any;
129
- batches?: string[] | undefined;
130
- }, {
131
- error: string;
132
- $id: string;
133
- $createdAt: string;
134
- $updatedAt: string;
135
- collectionId: string;
136
- operationType: string;
137
- progress: number;
138
- total: number;
139
- status?: "error" | "pending" | "ready" | "in_progress" | "completed" | "cancelled" | undefined;
140
- data?: any;
141
- batches?: string[] | undefined;
142
- }>;
47
+ status: z.ZodDefault<z.ZodEnum<{
48
+ error: "error";
49
+ pending: "pending";
50
+ ready: "ready";
51
+ in_progress: "in_progress";
52
+ completed: "completed";
53
+ cancelled: "cancelled";
54
+ }>>;
55
+ }, z.core.$strip>;
143
56
  export type Operation = z.infer<typeof OperationSchema>;
144
- export declare const OperationCreateSchema: z.ZodObject<Omit<{
145
- $id: z.ZodString;
146
- $createdAt: z.ZodString;
147
- $updatedAt: z.ZodString;
148
- operationType: z.ZodString;
149
- collectionId: z.ZodString;
57
+ export declare const OperationCreateSchema: z.ZodObject<{
58
+ error: z.ZodString;
150
59
  data: z.ZodAny;
151
- batches: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
60
+ status: z.ZodDefault<z.ZodEnum<{
61
+ error: "error";
62
+ pending: "pending";
63
+ ready: "ready";
64
+ in_progress: "in_progress";
65
+ completed: "completed";
66
+ cancelled: "cancelled";
67
+ }>>;
68
+ collectionId: z.ZodString;
69
+ operationType: z.ZodString;
70
+ batches: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
152
71
  progress: z.ZodNumber;
153
72
  total: z.ZodNumber;
154
- error: z.ZodString;
155
- status: z.ZodDefault<z.ZodEnum<["pending", "ready", "in_progress", "completed", "error", "cancelled"]>>;
156
- }, "$id" | "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
157
- status: "error" | "pending" | "ready" | "in_progress" | "completed" | "cancelled";
158
- error: string;
159
- collectionId: string;
160
- operationType: string;
161
- progress: number;
162
- total: number;
163
- data?: any;
164
- batches?: string[] | undefined;
165
- }, {
166
- error: string;
167
- collectionId: string;
168
- operationType: string;
169
- progress: number;
170
- total: number;
171
- status?: "error" | "pending" | "ready" | "in_progress" | "completed" | "cancelled" | undefined;
172
- data?: any;
173
- batches?: string[] | undefined;
174
- }>;
73
+ }, z.core.$strip>;
175
74
  export type OperationCreate = z.infer<typeof OperationCreateSchema>;
176
75
  export declare const getMigrationCollectionSchemas: () => {
177
76
  CurrentOperations: {
178
77
  collection: {
179
78
  name: string;
180
79
  attributes: ({
181
- type: "string";
182
80
  key: string;
81
+ type: "string";
183
82
  size: number;
184
- format?: string | null | undefined;
185
- description?: string | Record<string, string> | undefined;
83
+ error?: string | undefined;
186
84
  required?: boolean | undefined;
187
85
  array?: boolean | undefined;
188
- error?: string | undefined;
189
86
  xdefault?: string | null | undefined;
190
87
  encrypted?: boolean | undefined;
88
+ format?: string | null | undefined;
191
89
  } | {
192
- type: "integer";
193
90
  key: string;
194
- description?: string | Record<string, string> | null | undefined;
91
+ type: "integer";
92
+ error?: string | undefined;
195
93
  required?: boolean | undefined;
196
94
  array?: boolean | undefined;
197
- error?: string | undefined;
198
- xdefault?: number | null | undefined;
199
95
  min?: number | undefined;
200
96
  max?: number | undefined;
97
+ xdefault?: number | null | undefined;
201
98
  } | {
202
- type: "double";
203
99
  key: string;
204
- description?: string | Record<string, string> | null | undefined;
100
+ type: "double";
101
+ error?: string | undefined;
205
102
  required?: boolean | undefined;
206
103
  array?: boolean | undefined;
207
- error?: string | undefined;
208
- xdefault?: number | null | undefined;
209
104
  min?: number | undefined;
210
105
  max?: number | undefined;
106
+ xdefault?: number | null | undefined;
211
107
  } | {
212
- type: "float";
213
108
  key: string;
214
- description?: string | Record<string, string> | null | undefined;
109
+ type: "float";
110
+ error?: string | undefined;
215
111
  required?: boolean | undefined;
216
112
  array?: boolean | undefined;
217
- error?: string | undefined;
218
- xdefault?: number | null | undefined;
219
113
  min?: number | undefined;
220
114
  max?: number | undefined;
115
+ xdefault?: number | null | undefined;
221
116
  } | {
222
- type: "boolean";
223
117
  key: string;
224
- description?: string | Record<string, string> | null | undefined;
118
+ type: "boolean";
119
+ error?: string | undefined;
225
120
  required?: boolean | undefined;
226
121
  array?: boolean | undefined;
227
- error?: string | undefined;
228
122
  xdefault?: boolean | null | undefined;
229
123
  } | {
230
- type: "datetime";
231
124
  key: string;
232
- description?: string | Record<string, string> | null | undefined;
125
+ type: "datetime";
126
+ error?: string | undefined;
233
127
  required?: boolean | undefined;
234
128
  array?: boolean | undefined;
235
- error?: string | undefined;
236
129
  xdefault?: string | null | undefined;
237
130
  } | {
238
- type: "email";
239
131
  key: string;
240
- description?: string | Record<string, string> | null | undefined;
132
+ type: "email";
133
+ error?: string | undefined;
241
134
  required?: boolean | undefined;
242
135
  array?: boolean | undefined;
243
- error?: string | undefined;
244
136
  xdefault?: string | null | undefined;
245
137
  } | {
246
- type: "ip";
247
138
  key: string;
248
- description?: string | Record<string, string> | null | undefined;
139
+ type: "ip";
140
+ error?: string | undefined;
249
141
  required?: boolean | undefined;
250
142
  array?: boolean | undefined;
251
- error?: string | undefined;
252
143
  xdefault?: string | null | undefined;
253
144
  } | {
254
- type: "url";
255
145
  key: string;
256
- description?: string | Record<string, string> | null | undefined;
146
+ type: "url";
147
+ error?: string | undefined;
257
148
  required?: boolean | undefined;
258
149
  array?: boolean | undefined;
259
- error?: string | undefined;
260
150
  xdefault?: string | null | undefined;
261
151
  } | {
262
- type: "enum";
263
152
  key: string;
153
+ type: "enum";
264
154
  elements: string[];
265
- description?: string | Record<string, string> | null | undefined;
155
+ error?: string | undefined;
266
156
  required?: boolean | undefined;
267
157
  array?: boolean | undefined;
268
- error?: string | undefined;
269
158
  xdefault?: string | null | undefined;
270
159
  } | {
271
- type: "relationship";
272
160
  key: string;
161
+ type: "relationship";
273
162
  relatedCollection: string;
274
163
  relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
275
164
  twoWay: boolean;
276
165
  twoWayKey: string;
277
166
  onDelete: "setNull" | "cascade" | "restrict";
278
167
  side: "parent" | "child";
279
- description?: string | Record<string, string> | null | undefined;
168
+ error?: string | undefined;
280
169
  required?: boolean | undefined;
281
170
  array?: boolean | undefined;
282
- error?: string | undefined;
283
171
  importMapping?: {
284
172
  originalIdField: string;
285
173
  targetField?: string | undefined;
@@ -290,8 +178,8 @@ export declare const getMigrationCollectionSchemas: () => {
290
178
  target: string;
291
179
  }[];
292
180
  indexes: {
293
- type: "key" | "unique" | "fulltext";
294
181
  key: string;
182
+ type: "key" | "unique" | "fulltext";
295
183
  attributes: string[];
296
184
  status?: string | undefined;
297
185
  error?: string | undefined;
@@ -306,17 +194,17 @@ export declare const getMigrationCollectionSchemas: () => {
306
194
  oldKeys?: string[] | undefined;
307
195
  valueToSet?: any;
308
196
  fileData?: {
309
- path: string;
310
197
  name: string;
198
+ path: string;
311
199
  } | undefined;
312
200
  converters?: string[] | undefined;
313
201
  validationActions?: {
314
- params: string[];
315
202
  action: string;
203
+ params: string[];
316
204
  }[] | undefined;
317
205
  postImportActions?: {
318
- params: (string | Record<string, any>)[];
319
206
  action: string;
207
+ params: (string | Record<string, any>)[];
320
208
  }[] | undefined;
321
209
  }[];
322
210
  type?: "create" | "update" | undefined;
@@ -330,119 +218,107 @@ export declare const getMigrationCollectionSchemas: () => {
330
218
  }[] | undefined;
331
219
  createUsers?: boolean | null | undefined;
332
220
  updateMapping?: {
333
- targetField: string;
334
221
  originalIdField: string;
222
+ targetField: string;
335
223
  } | undefined;
336
224
  }[];
337
- description?: string | undefined;
338
225
  $id?: string | undefined;
339
226
  enabled?: boolean | undefined;
340
227
  documentSecurity?: boolean | undefined;
341
228
  databaseId?: string | undefined;
342
229
  };
343
230
  attributes: ({
344
- type: "string";
345
231
  key: string;
232
+ type: "string";
346
233
  size: number;
347
- format?: string | null | undefined;
348
- description?: string | Record<string, string> | undefined;
234
+ error?: string | undefined;
349
235
  required?: boolean | undefined;
350
236
  array?: boolean | undefined;
351
- error?: string | undefined;
352
237
  xdefault?: string | null | undefined;
353
238
  encrypted?: boolean | undefined;
239
+ format?: string | null | undefined;
354
240
  } | {
355
- type: "integer";
356
241
  key: string;
357
- description?: string | Record<string, string> | null | undefined;
242
+ type: "integer";
243
+ error?: string | undefined;
358
244
  required?: boolean | undefined;
359
245
  array?: boolean | undefined;
360
- error?: string | undefined;
361
- xdefault?: number | null | undefined;
362
246
  min?: number | undefined;
363
247
  max?: number | undefined;
248
+ xdefault?: number | null | undefined;
364
249
  } | {
365
- type: "double";
366
250
  key: string;
367
- description?: string | Record<string, string> | null | undefined;
251
+ type: "double";
252
+ error?: string | undefined;
368
253
  required?: boolean | undefined;
369
254
  array?: boolean | undefined;
370
- error?: string | undefined;
371
- xdefault?: number | null | undefined;
372
255
  min?: number | undefined;
373
256
  max?: number | undefined;
257
+ xdefault?: number | null | undefined;
374
258
  } | {
375
- type: "float";
376
259
  key: string;
377
- description?: string | Record<string, string> | null | undefined;
260
+ type: "float";
261
+ error?: string | undefined;
378
262
  required?: boolean | undefined;
379
263
  array?: boolean | undefined;
380
- error?: string | undefined;
381
- xdefault?: number | null | undefined;
382
264
  min?: number | undefined;
383
265
  max?: number | undefined;
266
+ xdefault?: number | null | undefined;
384
267
  } | {
385
- type: "boolean";
386
268
  key: string;
387
- description?: string | Record<string, string> | null | undefined;
269
+ type: "boolean";
270
+ error?: string | undefined;
388
271
  required?: boolean | undefined;
389
272
  array?: boolean | undefined;
390
- error?: string | undefined;
391
273
  xdefault?: boolean | null | undefined;
392
274
  } | {
393
- type: "datetime";
394
275
  key: string;
395
- description?: string | Record<string, string> | null | undefined;
276
+ type: "datetime";
277
+ error?: string | undefined;
396
278
  required?: boolean | undefined;
397
279
  array?: boolean | undefined;
398
- error?: string | undefined;
399
280
  xdefault?: string | null | undefined;
400
281
  } | {
401
- type: "email";
402
282
  key: string;
403
- description?: string | Record<string, string> | null | undefined;
283
+ type: "email";
284
+ error?: string | undefined;
404
285
  required?: boolean | undefined;
405
286
  array?: boolean | undefined;
406
- error?: string | undefined;
407
287
  xdefault?: string | null | undefined;
408
288
  } | {
409
- type: "ip";
410
289
  key: string;
411
- description?: string | Record<string, string> | null | undefined;
290
+ type: "ip";
291
+ error?: string | undefined;
412
292
  required?: boolean | undefined;
413
293
  array?: boolean | undefined;
414
- error?: string | undefined;
415
294
  xdefault?: string | null | undefined;
416
295
  } | {
417
- type: "url";
418
296
  key: string;
419
- description?: string | Record<string, string> | null | undefined;
297
+ type: "url";
298
+ error?: string | undefined;
420
299
  required?: boolean | undefined;
421
300
  array?: boolean | undefined;
422
- error?: string | undefined;
423
301
  xdefault?: string | null | undefined;
424
302
  } | {
425
- type: "enum";
426
303
  key: string;
304
+ type: "enum";
427
305
  elements: string[];
428
- description?: string | Record<string, string> | null | undefined;
306
+ error?: string | undefined;
429
307
  required?: boolean | undefined;
430
308
  array?: boolean | undefined;
431
- error?: string | undefined;
432
309
  xdefault?: string | null | undefined;
433
310
  } | {
434
- type: "relationship";
435
311
  key: string;
312
+ type: "relationship";
436
313
  relatedCollection: string;
437
314
  relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
438
315
  twoWay: boolean;
439
316
  twoWayKey: string;
440
317
  onDelete: "setNull" | "cascade" | "restrict";
441
318
  side: "parent" | "child";
442
- description?: string | Record<string, string> | null | undefined;
319
+ error?: string | undefined;
443
320
  required?: boolean | undefined;
444
321
  array?: boolean | undefined;
445
- error?: string | undefined;
446
322
  importMapping?: {
447
323
  originalIdField: string;
448
324
  targetField?: string | undefined;
@@ -453,108 +329,97 @@ export declare const getMigrationCollectionSchemas: () => {
453
329
  collection: {
454
330
  name: string;
455
331
  attributes: ({
456
- type: "string";
457
332
  key: string;
333
+ type: "string";
458
334
  size: number;
459
- format?: string | null | undefined;
460
- description?: string | Record<string, string> | undefined;
335
+ error?: string | undefined;
461
336
  required?: boolean | undefined;
462
337
  array?: boolean | undefined;
463
- error?: string | undefined;
464
338
  xdefault?: string | null | undefined;
465
339
  encrypted?: boolean | undefined;
340
+ format?: string | null | undefined;
466
341
  } | {
467
- type: "integer";
468
342
  key: string;
469
- description?: string | Record<string, string> | null | undefined;
343
+ type: "integer";
344
+ error?: string | undefined;
470
345
  required?: boolean | undefined;
471
346
  array?: boolean | undefined;
472
- error?: string | undefined;
473
- xdefault?: number | null | undefined;
474
347
  min?: number | undefined;
475
348
  max?: number | undefined;
349
+ xdefault?: number | null | undefined;
476
350
  } | {
477
- type: "double";
478
351
  key: string;
479
- description?: string | Record<string, string> | null | undefined;
352
+ type: "double";
353
+ error?: string | undefined;
480
354
  required?: boolean | undefined;
481
355
  array?: boolean | undefined;
482
- error?: string | undefined;
483
- xdefault?: number | null | undefined;
484
356
  min?: number | undefined;
485
357
  max?: number | undefined;
358
+ xdefault?: number | null | undefined;
486
359
  } | {
487
- type: "float";
488
360
  key: string;
489
- description?: string | Record<string, string> | null | undefined;
361
+ type: "float";
362
+ error?: string | undefined;
490
363
  required?: boolean | undefined;
491
364
  array?: boolean | undefined;
492
- error?: string | undefined;
493
- xdefault?: number | null | undefined;
494
365
  min?: number | undefined;
495
366
  max?: number | undefined;
367
+ xdefault?: number | null | undefined;
496
368
  } | {
497
- type: "boolean";
498
369
  key: string;
499
- description?: string | Record<string, string> | null | undefined;
370
+ type: "boolean";
371
+ error?: string | undefined;
500
372
  required?: boolean | undefined;
501
373
  array?: boolean | undefined;
502
- error?: string | undefined;
503
374
  xdefault?: boolean | null | undefined;
504
375
  } | {
505
- type: "datetime";
506
376
  key: string;
507
- description?: string | Record<string, string> | null | undefined;
377
+ type: "datetime";
378
+ error?: string | undefined;
508
379
  required?: boolean | undefined;
509
380
  array?: boolean | undefined;
510
- error?: string | undefined;
511
381
  xdefault?: string | null | undefined;
512
382
  } | {
513
- type: "email";
514
383
  key: string;
515
- description?: string | Record<string, string> | null | undefined;
384
+ type: "email";
385
+ error?: string | undefined;
516
386
  required?: boolean | undefined;
517
387
  array?: boolean | undefined;
518
- error?: string | undefined;
519
388
  xdefault?: string | null | undefined;
520
389
  } | {
521
- type: "ip";
522
390
  key: string;
523
- description?: string | Record<string, string> | null | undefined;
391
+ type: "ip";
392
+ error?: string | undefined;
524
393
  required?: boolean | undefined;
525
394
  array?: boolean | undefined;
526
- error?: string | undefined;
527
395
  xdefault?: string | null | undefined;
528
396
  } | {
529
- type: "url";
530
397
  key: string;
531
- description?: string | Record<string, string> | null | undefined;
398
+ type: "url";
399
+ error?: string | undefined;
532
400
  required?: boolean | undefined;
533
401
  array?: boolean | undefined;
534
- error?: string | undefined;
535
402
  xdefault?: string | null | undefined;
536
403
  } | {
537
- type: "enum";
538
404
  key: string;
405
+ type: "enum";
539
406
  elements: string[];
540
- description?: string | Record<string, string> | null | undefined;
407
+ error?: string | undefined;
541
408
  required?: boolean | undefined;
542
409
  array?: boolean | undefined;
543
- error?: string | undefined;
544
410
  xdefault?: string | null | undefined;
545
411
  } | {
546
- type: "relationship";
547
412
  key: string;
413
+ type: "relationship";
548
414
  relatedCollection: string;
549
415
  relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
550
416
  twoWay: boolean;
551
417
  twoWayKey: string;
552
418
  onDelete: "setNull" | "cascade" | "restrict";
553
419
  side: "parent" | "child";
554
- description?: string | Record<string, string> | null | undefined;
420
+ error?: string | undefined;
555
421
  required?: boolean | undefined;
556
422
  array?: boolean | undefined;
557
- error?: string | undefined;
558
423
  importMapping?: {
559
424
  originalIdField: string;
560
425
  targetField?: string | undefined;
@@ -565,8 +430,8 @@ export declare const getMigrationCollectionSchemas: () => {
565
430
  target: string;
566
431
  }[];
567
432
  indexes: {
568
- type: "key" | "unique" | "fulltext";
569
433
  key: string;
434
+ type: "key" | "unique" | "fulltext";
570
435
  attributes: string[];
571
436
  status?: string | undefined;
572
437
  error?: string | undefined;
@@ -581,17 +446,17 @@ export declare const getMigrationCollectionSchemas: () => {
581
446
  oldKeys?: string[] | undefined;
582
447
  valueToSet?: any;
583
448
  fileData?: {
584
- path: string;
585
449
  name: string;
450
+ path: string;
586
451
  } | undefined;
587
452
  converters?: string[] | undefined;
588
453
  validationActions?: {
589
- params: string[];
590
454
  action: string;
455
+ params: string[];
591
456
  }[] | undefined;
592
457
  postImportActions?: {
593
- params: (string | Record<string, any>)[];
594
458
  action: string;
459
+ params: (string | Record<string, any>)[];
595
460
  }[] | undefined;
596
461
  }[];
597
462
  type?: "create" | "update" | undefined;
@@ -605,119 +470,107 @@ export declare const getMigrationCollectionSchemas: () => {
605
470
  }[] | undefined;
606
471
  createUsers?: boolean | null | undefined;
607
472
  updateMapping?: {
608
- targetField: string;
609
473
  originalIdField: string;
474
+ targetField: string;
610
475
  } | undefined;
611
476
  }[];
612
- description?: string | undefined;
613
477
  $id?: string | undefined;
614
478
  enabled?: boolean | undefined;
615
479
  documentSecurity?: boolean | undefined;
616
480
  databaseId?: string | undefined;
617
481
  };
618
482
  attributes: ({
619
- type: "string";
620
483
  key: string;
484
+ type: "string";
621
485
  size: number;
622
- format?: string | null | undefined;
623
- description?: string | Record<string, string> | undefined;
486
+ error?: string | undefined;
624
487
  required?: boolean | undefined;
625
488
  array?: boolean | undefined;
626
- error?: string | undefined;
627
489
  xdefault?: string | null | undefined;
628
490
  encrypted?: boolean | undefined;
491
+ format?: string | null | undefined;
629
492
  } | {
630
- type: "integer";
631
493
  key: string;
632
- description?: string | Record<string, string> | null | undefined;
494
+ type: "integer";
495
+ error?: string | undefined;
633
496
  required?: boolean | undefined;
634
497
  array?: boolean | undefined;
635
- error?: string | undefined;
636
- xdefault?: number | null | undefined;
637
498
  min?: number | undefined;
638
499
  max?: number | undefined;
500
+ xdefault?: number | null | undefined;
639
501
  } | {
640
- type: "double";
641
502
  key: string;
642
- description?: string | Record<string, string> | null | undefined;
503
+ type: "double";
504
+ error?: string | undefined;
643
505
  required?: boolean | undefined;
644
506
  array?: boolean | undefined;
645
- error?: string | undefined;
646
- xdefault?: number | null | undefined;
647
507
  min?: number | undefined;
648
508
  max?: number | undefined;
509
+ xdefault?: number | null | undefined;
649
510
  } | {
650
- type: "float";
651
511
  key: string;
652
- description?: string | Record<string, string> | null | undefined;
512
+ type: "float";
513
+ error?: string | undefined;
653
514
  required?: boolean | undefined;
654
515
  array?: boolean | undefined;
655
- error?: string | undefined;
656
- xdefault?: number | null | undefined;
657
516
  min?: number | undefined;
658
517
  max?: number | undefined;
518
+ xdefault?: number | null | undefined;
659
519
  } | {
660
- type: "boolean";
661
520
  key: string;
662
- description?: string | Record<string, string> | null | undefined;
521
+ type: "boolean";
522
+ error?: string | undefined;
663
523
  required?: boolean | undefined;
664
524
  array?: boolean | undefined;
665
- error?: string | undefined;
666
525
  xdefault?: boolean | null | undefined;
667
526
  } | {
668
- type: "datetime";
669
527
  key: string;
670
- description?: string | Record<string, string> | null | undefined;
528
+ type: "datetime";
529
+ error?: string | undefined;
671
530
  required?: boolean | undefined;
672
531
  array?: boolean | undefined;
673
- error?: string | undefined;
674
532
  xdefault?: string | null | undefined;
675
533
  } | {
676
- type: "email";
677
534
  key: string;
678
- description?: string | Record<string, string> | null | undefined;
535
+ type: "email";
536
+ error?: string | undefined;
679
537
  required?: boolean | undefined;
680
538
  array?: boolean | undefined;
681
- error?: string | undefined;
682
539
  xdefault?: string | null | undefined;
683
540
  } | {
684
- type: "ip";
685
541
  key: string;
686
- description?: string | Record<string, string> | null | undefined;
542
+ type: "ip";
543
+ error?: string | undefined;
687
544
  required?: boolean | undefined;
688
545
  array?: boolean | undefined;
689
- error?: string | undefined;
690
546
  xdefault?: string | null | undefined;
691
547
  } | {
692
- type: "url";
693
548
  key: string;
694
- description?: string | Record<string, string> | null | undefined;
549
+ type: "url";
550
+ error?: string | undefined;
695
551
  required?: boolean | undefined;
696
552
  array?: boolean | undefined;
697
- error?: string | undefined;
698
553
  xdefault?: string | null | undefined;
699
554
  } | {
700
- type: "enum";
701
555
  key: string;
556
+ type: "enum";
702
557
  elements: string[];
703
- description?: string | Record<string, string> | null | undefined;
558
+ error?: string | undefined;
704
559
  required?: boolean | undefined;
705
560
  array?: boolean | undefined;
706
- error?: string | undefined;
707
561
  xdefault?: string | null | undefined;
708
562
  } | {
709
- type: "relationship";
710
563
  key: string;
564
+ type: "relationship";
711
565
  relatedCollection: string;
712
566
  relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
713
567
  twoWay: boolean;
714
568
  twoWayKey: string;
715
569
  onDelete: "setNull" | "cascade" | "restrict";
716
570
  side: "parent" | "child";
717
- description?: string | Record<string, string> | null | undefined;
571
+ error?: string | undefined;
718
572
  required?: boolean | undefined;
719
573
  array?: boolean | undefined;
720
- error?: string | undefined;
721
574
  importMapping?: {
722
575
  originalIdField: string;
723
576
  targetField?: string | undefined;