appwrite-utils-cli 0.0.273 → 0.0.275

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 (77) hide show
  1. package/README.md +5 -39
  2. package/dist/init.d.ts +2 -0
  3. package/dist/init.js +57 -0
  4. package/dist/main.js +62 -100
  5. package/dist/migrations/afterImportActions.d.ts +1 -4
  6. package/dist/migrations/afterImportActions.js +1 -0
  7. package/dist/migrations/appwriteToX.d.ts +46 -46
  8. package/dist/migrations/appwriteToX.js +6 -2
  9. package/dist/migrations/attributes.d.ts +1 -1
  10. package/dist/migrations/attributes.js +98 -70
  11. package/dist/migrations/backup.d.ts +240 -240
  12. package/dist/migrations/backup.js +1 -1
  13. package/dist/migrations/collections.d.ts +1 -1
  14. package/dist/migrations/collections.js +5 -5
  15. package/dist/migrations/converters.d.ts +9 -127
  16. package/dist/migrations/converters.js +1 -504
  17. package/dist/migrations/dataLoader.d.ts +470 -453
  18. package/dist/migrations/dataLoader.js +19 -1
  19. package/dist/migrations/dbHelpers.d.ts +1 -1
  20. package/dist/migrations/dbHelpers.js +3 -0
  21. package/dist/migrations/importController.d.ts +1 -1
  22. package/dist/migrations/importController.js +4 -7
  23. package/dist/migrations/importDataActions.d.ts +4 -6
  24. package/dist/migrations/importDataActions.js +6 -4
  25. package/dist/migrations/indexes.d.ts +1 -1
  26. package/dist/migrations/indexes.js +1 -1
  27. package/dist/migrations/migrationHelper.d.ts +29 -29
  28. package/dist/migrations/migrationHelper.js +1 -1
  29. package/dist/migrations/openapi.d.ts +1 -1
  30. package/dist/migrations/openapi.js +4 -1
  31. package/dist/migrations/queue.d.ts +1 -1
  32. package/dist/migrations/relationships.d.ts +5 -5
  33. package/dist/migrations/relationships.js +3 -0
  34. package/dist/migrations/schemaStrings.d.ts +2 -2
  35. package/dist/migrations/schemaStrings.js +93 -8
  36. package/dist/migrations/setupDatabase.d.ts +1 -1
  37. package/dist/migrations/setupDatabase.js +1 -1
  38. package/dist/migrations/storage.d.ts +1 -1
  39. package/dist/migrations/users.d.ts +1 -1
  40. package/dist/schemas/authUser.d.ts +12 -10
  41. package/dist/types.d.ts +0 -5
  42. package/dist/types.js +0 -2
  43. package/dist/utils/helperFunctions.d.ts +2 -3
  44. package/dist/utils/loadConfigs.d.ts +13 -0
  45. package/dist/utils/loadConfigs.js +47 -0
  46. package/dist/utils/setupFiles.d.ts +1 -0
  47. package/dist/utils/setupFiles.js +98 -223
  48. package/dist/utilsController.d.ts +1 -3
  49. package/dist/utilsController.js +14 -18
  50. package/package.json +9 -2
  51. package/src/init.ts +64 -0
  52. package/src/main.ts +73 -98
  53. package/src/migrations/afterImportActions.ts +1 -5
  54. package/src/migrations/appwriteToX.ts +6 -2
  55. package/src/migrations/attributes.ts +198 -145
  56. package/src/migrations/backup.ts +1 -1
  57. package/src/migrations/collections.ts +6 -12
  58. package/src/migrations/converters.ts +1 -540
  59. package/src/migrations/dataLoader.ts +19 -2
  60. package/src/migrations/dbHelpers.ts +4 -1
  61. package/src/migrations/importController.ts +5 -15
  62. package/src/migrations/importDataActions.ts +10 -14
  63. package/src/migrations/indexes.ts +1 -1
  64. package/src/migrations/migrationHelper.ts +1 -1
  65. package/src/migrations/openapi.ts +4 -1
  66. package/src/migrations/queue.ts +1 -1
  67. package/src/migrations/relationships.ts +4 -1
  68. package/src/migrations/schemaStrings.ts +106 -9
  69. package/src/migrations/setupDatabase.ts +1 -1
  70. package/src/migrations/storage.ts +1 -1
  71. package/src/migrations/users.ts +1 -1
  72. package/src/types.ts +0 -5
  73. package/src/utils/helperFunctions.ts +2 -3
  74. package/src/utils/loadConfigs.ts +55 -0
  75. package/src/utils/setupFiles.ts +114 -225
  76. package/src/utilsController.ts +27 -35
  77. package/src/migrations/schema.ts +0 -748
@@ -1,17 +1,17 @@
1
1
  import type { ImportDataActions } from "./importDataActions.js";
2
- import { type AppwriteConfig, type AttributeMappings, type ConfigCollection, type ConfigDatabase, type IdMapping, type ImportDef } from "./schema.js";
2
+ import { type AppwriteConfig, type AttributeMappings, type ConfigCollection, type ConfigDatabase, type IdMapping, type ImportDef } from "appwrite-utils";
3
3
  import { z } from "zod";
4
4
  import { type Databases } from "node-appwrite";
5
5
  export declare const CollectionImportDataSchema: z.ZodObject<{
6
6
  collection: z.ZodOptional<z.ZodObject<Omit<{
7
7
  name: z.ZodString;
8
8
  $id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
9
- enabled: z.ZodDefault<z.ZodBoolean>;
10
- documentSecurity: z.ZodDefault<z.ZodBoolean>;
9
+ enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
10
+ documentSecurity: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
11
11
  description: z.ZodOptional<z.ZodString>;
12
12
  $createdAt: z.ZodString;
13
13
  $updatedAt: z.ZodString;
14
- $permissions: z.ZodDefault<z.ZodArray<z.ZodObject<{
14
+ $permissions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
15
15
  permission: z.ZodString;
16
16
  target: z.ZodString;
17
17
  }, "strip", z.ZodTypeAny, {
@@ -20,253 +20,253 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
20
20
  }, {
21
21
  permission: string;
22
22
  target: string;
23
- }>, "many">>;
23
+ }>, "many">>>;
24
24
  attributes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
25
25
  key: z.ZodString;
26
26
  type: z.ZodDefault<z.ZodLiteral<"string">>;
27
- error: z.ZodDefault<z.ZodString>;
28
- required: z.ZodDefault<z.ZodBoolean>;
29
- array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
27
+ error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
28
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
29
+ array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
30
30
  size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
31
31
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
32
  encrypted: z.ZodOptional<z.ZodBoolean>;
33
33
  format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
- description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
34
+ description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
35
35
  }, "strip", z.ZodTypeAny, {
36
- key: string;
37
36
  type: "string";
38
- error: string;
39
- required: boolean;
40
- array: boolean;
37
+ key: string;
41
38
  size: number;
39
+ array?: boolean | undefined;
40
+ error?: string | undefined;
41
+ required?: boolean | undefined;
42
42
  xdefault?: string | null | undefined;
43
43
  encrypted?: boolean | undefined;
44
44
  format?: string | null | undefined;
45
- description?: string | Record<string, string> | null | undefined;
45
+ description?: string | Record<string, string> | undefined;
46
46
  }, {
47
47
  key: string;
48
48
  type?: "string" | undefined;
49
+ array?: boolean | undefined;
49
50
  error?: string | undefined;
50
51
  required?: boolean | undefined;
51
- array?: boolean | undefined;
52
52
  size?: number | undefined;
53
53
  xdefault?: string | null | undefined;
54
54
  encrypted?: boolean | undefined;
55
55
  format?: string | null | undefined;
56
- description?: string | Record<string, string> | null | undefined;
56
+ description?: string | Record<string, string> | undefined;
57
57
  }>, z.ZodObject<{
58
58
  key: z.ZodString;
59
59
  type: z.ZodDefault<z.ZodLiteral<"integer">>;
60
- error: z.ZodDefault<z.ZodString>;
61
- required: z.ZodDefault<z.ZodBoolean>;
62
- array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
60
+ error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
61
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
62
+ array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
63
63
  min: z.ZodOptional<z.ZodNumber>;
64
64
  max: z.ZodOptional<z.ZodNumber>;
65
65
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
66
66
  description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
67
67
  }, "strip", z.ZodTypeAny, {
68
- key: string;
69
68
  type: "integer";
70
- error: string;
71
- required: boolean;
72
- array: boolean;
73
- min?: number | undefined;
74
- max?: number | undefined;
69
+ key: string;
70
+ array?: boolean | undefined;
71
+ error?: string | undefined;
72
+ required?: boolean | undefined;
75
73
  xdefault?: number | null | undefined;
76
74
  description?: string | Record<string, string> | null | undefined;
75
+ min?: number | undefined;
76
+ max?: number | undefined;
77
77
  }, {
78
78
  key: string;
79
79
  type?: "integer" | undefined;
80
+ array?: boolean | undefined;
80
81
  error?: string | undefined;
81
82
  required?: boolean | undefined;
82
- array?: boolean | undefined;
83
- min?: number | undefined;
84
- max?: number | undefined;
85
83
  xdefault?: number | null | undefined;
86
84
  description?: string | Record<string, string> | null | undefined;
85
+ min?: number | undefined;
86
+ max?: number | undefined;
87
87
  }>, z.ZodObject<{
88
88
  key: z.ZodString;
89
89
  type: z.ZodDefault<z.ZodLiteral<"float">>;
90
- error: z.ZodDefault<z.ZodString>;
91
- required: z.ZodDefault<z.ZodBoolean>;
92
- array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
90
+ error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
91
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
92
+ array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
93
93
  min: z.ZodOptional<z.ZodNumber>;
94
94
  max: z.ZodOptional<z.ZodNumber>;
95
95
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
96
96
  description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
97
97
  }, "strip", z.ZodTypeAny, {
98
- key: string;
99
98
  type: "float";
100
- error: string;
101
- required: boolean;
102
- array: boolean;
103
- min?: number | undefined;
104
- max?: number | undefined;
99
+ key: string;
100
+ array?: boolean | undefined;
101
+ error?: string | undefined;
102
+ required?: boolean | undefined;
105
103
  xdefault?: number | null | undefined;
106
104
  description?: string | Record<string, string> | null | undefined;
105
+ min?: number | undefined;
106
+ max?: number | undefined;
107
107
  }, {
108
108
  key: string;
109
109
  type?: "float" | undefined;
110
+ array?: boolean | undefined;
110
111
  error?: string | undefined;
111
112
  required?: boolean | undefined;
112
- array?: boolean | undefined;
113
- min?: number | undefined;
114
- max?: number | undefined;
115
113
  xdefault?: number | null | undefined;
116
114
  description?: string | Record<string, string> | null | undefined;
115
+ min?: number | undefined;
116
+ max?: number | undefined;
117
117
  }>, z.ZodObject<{
118
118
  key: z.ZodString;
119
119
  type: z.ZodDefault<z.ZodLiteral<"boolean">>;
120
- error: z.ZodDefault<z.ZodString>;
121
- required: z.ZodDefault<z.ZodBoolean>;
122
- array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
120
+ error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
121
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
122
+ array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
123
123
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
124
124
  description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
125
125
  }, "strip", z.ZodTypeAny, {
126
- key: string;
127
126
  type: "boolean";
128
- error: string;
129
- required: boolean;
130
- array: boolean;
127
+ key: string;
128
+ array?: boolean | undefined;
129
+ error?: string | undefined;
130
+ required?: boolean | undefined;
131
131
  xdefault?: boolean | null | undefined;
132
132
  description?: string | Record<string, string> | null | undefined;
133
133
  }, {
134
134
  key: string;
135
135
  type?: "boolean" | undefined;
136
+ array?: boolean | undefined;
136
137
  error?: string | undefined;
137
138
  required?: boolean | undefined;
138
- array?: boolean | undefined;
139
139
  xdefault?: boolean | null | undefined;
140
140
  description?: string | Record<string, string> | null | undefined;
141
141
  }>, z.ZodObject<{
142
142
  key: z.ZodString;
143
143
  type: z.ZodDefault<z.ZodLiteral<"datetime">>;
144
- error: z.ZodDefault<z.ZodString>;
145
- required: z.ZodDefault<z.ZodBoolean>;
146
- array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
144
+ error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
145
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
146
+ array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
147
147
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
148
148
  description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
149
149
  }, "strip", z.ZodTypeAny, {
150
- key: string;
151
150
  type: "datetime";
152
- error: string;
153
- required: boolean;
154
- array: boolean;
151
+ key: string;
152
+ array?: boolean | undefined;
153
+ error?: string | undefined;
154
+ required?: boolean | undefined;
155
155
  xdefault?: string | null | undefined;
156
156
  description?: string | Record<string, string> | null | undefined;
157
157
  }, {
158
158
  key: string;
159
159
  type?: "datetime" | undefined;
160
+ array?: boolean | undefined;
160
161
  error?: string | undefined;
161
162
  required?: boolean | undefined;
162
- array?: boolean | undefined;
163
163
  xdefault?: string | null | undefined;
164
164
  description?: string | Record<string, string> | null | undefined;
165
165
  }>, z.ZodObject<{
166
166
  key: z.ZodString;
167
167
  type: z.ZodDefault<z.ZodLiteral<"email">>;
168
- error: z.ZodDefault<z.ZodString>;
169
- required: z.ZodDefault<z.ZodBoolean>;
170
- array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
168
+ error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
169
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
170
+ array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
171
171
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
172
172
  description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
173
173
  }, "strip", z.ZodTypeAny, {
174
- key: string;
175
174
  type: "email";
176
- error: string;
177
- required: boolean;
178
- array: boolean;
175
+ key: string;
176
+ array?: boolean | undefined;
177
+ error?: string | undefined;
178
+ required?: boolean | undefined;
179
179
  xdefault?: string | null | undefined;
180
180
  description?: string | Record<string, string> | null | undefined;
181
181
  }, {
182
182
  key: string;
183
183
  type?: "email" | undefined;
184
+ array?: boolean | undefined;
184
185
  error?: string | undefined;
185
186
  required?: boolean | undefined;
186
- array?: boolean | undefined;
187
187
  xdefault?: string | null | undefined;
188
188
  description?: string | Record<string, string> | null | undefined;
189
189
  }>, z.ZodObject<{
190
190
  key: z.ZodString;
191
191
  type: z.ZodLiteral<"ip">;
192
- error: z.ZodDefault<z.ZodString>;
193
- required: z.ZodDefault<z.ZodBoolean>;
194
- array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
192
+ error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
193
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
194
+ array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
195
195
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
196
  description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
197
197
  }, "strip", z.ZodTypeAny, {
198
- key: string;
199
198
  type: "ip";
200
- error: string;
201
- required: boolean;
202
- array: boolean;
199
+ key: string;
200
+ array?: boolean | undefined;
201
+ error?: string | undefined;
202
+ required?: boolean | undefined;
203
203
  xdefault?: string | null | undefined;
204
204
  description?: string | Record<string, string> | null | undefined;
205
205
  }, {
206
- key: string;
207
206
  type: "ip";
207
+ key: string;
208
+ array?: boolean | undefined;
208
209
  error?: string | undefined;
209
210
  required?: boolean | undefined;
210
- array?: boolean | undefined;
211
211
  xdefault?: string | null | undefined;
212
212
  description?: string | Record<string, string> | null | undefined;
213
213
  }>, z.ZodObject<{
214
214
  key: z.ZodString;
215
215
  type: z.ZodDefault<z.ZodLiteral<"url">>;
216
- error: z.ZodDefault<z.ZodString>;
217
- required: z.ZodDefault<z.ZodBoolean>;
218
- array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
216
+ error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
217
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
218
+ array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
219
219
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
220
220
  description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
221
221
  }, "strip", z.ZodTypeAny, {
222
- key: string;
223
222
  type: "url";
224
- error: string;
225
- required: boolean;
226
- array: boolean;
223
+ key: string;
224
+ array?: boolean | undefined;
225
+ error?: string | undefined;
226
+ required?: boolean | undefined;
227
227
  xdefault?: string | null | undefined;
228
228
  description?: string | Record<string, string> | null | undefined;
229
229
  }, {
230
230
  key: string;
231
231
  type?: "url" | undefined;
232
+ array?: boolean | undefined;
232
233
  error?: string | undefined;
233
234
  required?: boolean | undefined;
234
- array?: boolean | undefined;
235
235
  xdefault?: string | null | undefined;
236
236
  description?: string | Record<string, string> | null | undefined;
237
237
  }>, z.ZodObject<{
238
238
  key: z.ZodString;
239
239
  type: z.ZodDefault<z.ZodLiteral<"enum">>;
240
- error: z.ZodDefault<z.ZodString>;
241
- required: z.ZodDefault<z.ZodBoolean>;
242
- array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
240
+ error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
241
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
242
+ array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
243
243
  elements: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
244
244
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
245
  description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
246
246
  }, "strip", z.ZodTypeAny, {
247
- key: string;
248
247
  type: "enum";
249
- error: string;
250
- required: boolean;
251
- array: boolean;
248
+ key: string;
252
249
  elements: string[];
250
+ array?: boolean | undefined;
251
+ error?: string | undefined;
252
+ required?: boolean | undefined;
253
253
  xdefault?: string | null | undefined;
254
254
  description?: string | Record<string, string> | null | undefined;
255
255
  }, {
256
256
  key: string;
257
257
  type?: "enum" | undefined;
258
+ array?: boolean | undefined;
258
259
  error?: string | undefined;
259
260
  required?: boolean | undefined;
260
- array?: boolean | undefined;
261
- elements?: string[] | undefined;
262
261
  xdefault?: string | null | undefined;
263
262
  description?: string | Record<string, string> | null | undefined;
263
+ elements?: string[] | undefined;
264
264
  }>, z.ZodObject<{
265
265
  key: z.ZodString;
266
266
  type: z.ZodDefault<z.ZodLiteral<"relationship">>;
267
- error: z.ZodDefault<z.ZodString>;
268
- required: z.ZodDefault<z.ZodBoolean>;
269
- array: z.ZodOptional<z.ZodBoolean>;
267
+ error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
268
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
269
+ array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
270
270
  relatedCollection: z.ZodString;
271
271
  relationType: z.ZodEnum<["oneToMany", "manyToOne", "oneToOne", "manyToMany"]>;
272
272
  twoWay: z.ZodBoolean;
@@ -285,10 +285,8 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
285
285
  }>>;
286
286
  description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
287
287
  }, "strip", z.ZodTypeAny, {
288
- key: string;
289
288
  type: "relationship";
290
- error: string;
291
- required: boolean;
289
+ key: string;
292
290
  relatedCollection: string;
293
291
  relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
294
292
  twoWay: boolean;
@@ -296,11 +294,13 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
296
294
  onDelete: "setNull" | "cascade" | "restrict";
297
295
  side: "parent" | "child";
298
296
  array?: boolean | undefined;
297
+ error?: string | undefined;
298
+ required?: boolean | undefined;
299
+ description?: string | Record<string, string> | null | undefined;
299
300
  importMapping?: {
300
301
  originalIdField: string;
301
302
  targetField?: string | undefined;
302
303
  } | undefined;
303
- description?: string | Record<string, string> | null | undefined;
304
304
  }, {
305
305
  key: string;
306
306
  relatedCollection: string;
@@ -309,17 +309,17 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
309
309
  twoWayKey: string;
310
310
  side: "parent" | "child";
311
311
  type?: "relationship" | undefined;
312
+ array?: boolean | undefined;
312
313
  error?: string | undefined;
313
314
  required?: boolean | undefined;
314
- array?: boolean | undefined;
315
+ description?: string | Record<string, string> | null | undefined;
315
316
  onDelete?: "setNull" | "cascade" | "restrict" | undefined;
316
317
  importMapping?: {
317
318
  originalIdField: string;
318
319
  targetField?: string | undefined;
319
320
  } | undefined;
320
- description?: string | Record<string, string> | null | undefined;
321
321
  }>]>, "many">>;
322
- indexes: z.ZodDefault<z.ZodArray<z.ZodObject<{
322
+ indexes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
323
323
  key: z.ZodString;
324
324
  type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["key", "unique", "fulltext"]>>>;
325
325
  status: z.ZodOptional<z.ZodString>;
@@ -327,8 +327,8 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
327
327
  attributes: z.ZodArray<z.ZodString, "many">;
328
328
  orders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
329
329
  }, "strip", z.ZodTypeAny, {
330
- key: string;
331
330
  type: "key" | "unique" | "fulltext";
331
+ key: string;
332
332
  attributes: string[];
333
333
  status?: string | undefined;
334
334
  error?: string | undefined;
@@ -340,8 +340,8 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
340
340
  status?: string | undefined;
341
341
  error?: string | undefined;
342
342
  orders?: string[] | undefined;
343
- }>, "many">>;
344
- importDefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
343
+ }>, "many">>>;
344
+ importDefs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
345
345
  type: z.ZodOptional<z.ZodDefault<z.ZodEnum<["create", "update"]>>>;
346
346
  filePath: z.ZodString;
347
347
  basePath: z.ZodOptional<z.ZodString>;
@@ -352,13 +352,13 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
352
352
  targetField: z.ZodString;
353
353
  targetCollection: z.ZodString;
354
354
  }, "strip", z.ZodTypeAny, {
355
- targetField: string;
356
355
  sourceField: string;
356
+ targetField: string;
357
357
  targetCollection: string;
358
358
  fieldToSet?: string | undefined;
359
359
  }, {
360
- targetField: string;
361
360
  sourceField: string;
361
+ targetField: string;
362
362
  targetCollection: string;
363
363
  fieldToSet?: string | undefined;
364
364
  }>, "many">>;
@@ -366,11 +366,11 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
366
366
  originalIdField: z.ZodString;
367
367
  targetField: z.ZodString;
368
368
  }, "strip", z.ZodTypeAny, {
369
- originalIdField: string;
370
369
  targetField: string;
371
- }, {
372
370
  originalIdField: string;
371
+ }, {
373
372
  targetField: string;
373
+ originalIdField: string;
374
374
  }>>;
375
375
  attributeMappings: z.ZodArray<z.ZodObject<{
376
376
  oldKey: z.ZodOptional<z.ZodString>;
@@ -386,8 +386,8 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
386
386
  path: string;
387
387
  name: string;
388
388
  }>>;
389
- converters: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
390
- validationActions: z.ZodDefault<z.ZodArray<z.ZodObject<{
389
+ converters: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
390
+ validationActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
391
391
  action: z.ZodString;
392
392
  params: z.ZodArray<z.ZodString, "many">;
393
393
  }, "strip", z.ZodTypeAny, {
@@ -396,8 +396,8 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
396
396
  }, {
397
397
  params: string[];
398
398
  action: string;
399
- }>, "many">>;
400
- postImportActions: z.ZodDefault<z.ZodArray<z.ZodObject<{
399
+ }>, "many">>>;
400
+ postImportActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
401
401
  action: z.ZodString;
402
402
  params: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
403
403
  }, "strip", z.ZodTypeAny, {
@@ -406,24 +406,24 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
406
406
  }, {
407
407
  params: (string | Record<string, any>)[];
408
408
  action: string;
409
- }>, "many">>;
409
+ }>, "many">>>;
410
410
  }, "strip", z.ZodTypeAny, {
411
411
  targetKey: string;
412
- converters: string[];
413
- validationActions: {
414
- params: string[];
415
- action: string;
416
- }[];
417
- postImportActions: {
418
- params: (string | Record<string, any>)[];
419
- action: string;
420
- }[];
421
412
  oldKey?: string | undefined;
422
413
  oldKeys?: string[] | undefined;
423
414
  fileData?: {
424
415
  path: string;
425
416
  name: string;
426
417
  } | undefined;
418
+ converters?: string[] | undefined;
419
+ validationActions?: {
420
+ params: string[];
421
+ action: string;
422
+ }[] | undefined;
423
+ postImportActions?: {
424
+ params: (string | Record<string, any>)[];
425
+ action: string;
426
+ }[] | undefined;
427
427
  }, {
428
428
  targetKey: string;
429
429
  oldKey?: string | undefined;
@@ -447,33 +447,33 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
447
447
  primaryKeyField: string;
448
448
  attributeMappings: {
449
449
  targetKey: string;
450
- converters: string[];
451
- validationActions: {
452
- params: string[];
453
- action: string;
454
- }[];
455
- postImportActions: {
456
- params: (string | Record<string, any>)[];
457
- action: string;
458
- }[];
459
450
  oldKey?: string | undefined;
460
451
  oldKeys?: string[] | undefined;
461
452
  fileData?: {
462
453
  path: string;
463
454
  name: string;
464
455
  } | undefined;
456
+ converters?: string[] | undefined;
457
+ validationActions?: {
458
+ params: string[];
459
+ action: string;
460
+ }[] | undefined;
461
+ postImportActions?: {
462
+ params: (string | Record<string, any>)[];
463
+ action: string;
464
+ }[] | undefined;
465
465
  }[];
466
466
  type?: "create" | "update" | undefined;
467
467
  basePath?: string | undefined;
468
468
  idMappings?: {
469
- targetField: string;
470
469
  sourceField: string;
470
+ targetField: string;
471
471
  targetCollection: string;
472
472
  fieldToSet?: string | undefined;
473
473
  }[] | undefined;
474
474
  updateMapping?: {
475
- originalIdField: string;
476
475
  targetField: string;
476
+ originalIdField: string;
477
477
  } | undefined;
478
478
  }, {
479
479
  filePath: string;
@@ -499,104 +499,102 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
499
499
  basePath?: string | undefined;
500
500
  primaryKeyField?: string | undefined;
501
501
  idMappings?: {
502
- targetField: string;
503
502
  sourceField: string;
503
+ targetField: string;
504
504
  targetCollection: string;
505
505
  fieldToSet?: string | undefined;
506
506
  }[] | undefined;
507
507
  updateMapping?: {
508
- originalIdField: string;
509
508
  targetField: string;
509
+ originalIdField: string;
510
510
  } | undefined;
511
- }>, "many">>;
511
+ }>, "many">>>;
512
512
  databaseId: z.ZodOptional<z.ZodString>;
513
513
  }, "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
514
514
  name: string;
515
515
  attributes: ({
516
- key: string;
517
516
  type: "string";
518
- error: string;
519
- required: boolean;
520
- array: boolean;
517
+ key: string;
521
518
  size: number;
519
+ array?: boolean | undefined;
520
+ error?: string | undefined;
521
+ required?: boolean | undefined;
522
522
  xdefault?: string | null | undefined;
523
523
  encrypted?: boolean | undefined;
524
524
  format?: string | null | undefined;
525
- description?: string | Record<string, string> | null | undefined;
525
+ description?: string | Record<string, string> | undefined;
526
526
  } | {
527
- key: string;
528
527
  type: "integer";
529
- error: string;
530
- required: boolean;
531
- array: boolean;
532
- min?: number | undefined;
533
- max?: number | undefined;
528
+ key: string;
529
+ array?: boolean | undefined;
530
+ error?: string | undefined;
531
+ required?: boolean | undefined;
534
532
  xdefault?: number | null | undefined;
535
533
  description?: string | Record<string, string> | null | undefined;
536
- } | {
537
- key: string;
538
- type: "float";
539
- error: string;
540
- required: boolean;
541
- array: boolean;
542
534
  min?: number | undefined;
543
535
  max?: number | undefined;
536
+ } | {
537
+ type: "float";
538
+ key: string;
539
+ array?: boolean | undefined;
540
+ error?: string | undefined;
541
+ required?: boolean | undefined;
544
542
  xdefault?: number | null | undefined;
545
543
  description?: string | Record<string, string> | null | undefined;
544
+ min?: number | undefined;
545
+ max?: number | undefined;
546
546
  } | {
547
- key: string;
548
547
  type: "boolean";
549
- error: string;
550
- required: boolean;
551
- array: boolean;
548
+ key: string;
549
+ array?: boolean | undefined;
550
+ error?: string | undefined;
551
+ required?: boolean | undefined;
552
552
  xdefault?: boolean | null | undefined;
553
553
  description?: string | Record<string, string> | null | undefined;
554
554
  } | {
555
- key: string;
556
555
  type: "datetime";
557
- error: string;
558
- required: boolean;
559
- array: boolean;
556
+ key: string;
557
+ array?: boolean | undefined;
558
+ error?: string | undefined;
559
+ required?: boolean | undefined;
560
560
  xdefault?: string | null | undefined;
561
561
  description?: string | Record<string, string> | null | undefined;
562
562
  } | {
563
- key: string;
564
563
  type: "email";
565
- error: string;
566
- required: boolean;
567
- array: boolean;
564
+ key: string;
565
+ array?: boolean | undefined;
566
+ error?: string | undefined;
567
+ required?: boolean | undefined;
568
568
  xdefault?: string | null | undefined;
569
569
  description?: string | Record<string, string> | null | undefined;
570
570
  } | {
571
- key: string;
572
571
  type: "ip";
573
- error: string;
574
- required: boolean;
575
- array: boolean;
572
+ key: string;
573
+ array?: boolean | undefined;
574
+ error?: string | undefined;
575
+ required?: boolean | undefined;
576
576
  xdefault?: string | null | undefined;
577
577
  description?: string | Record<string, string> | null | undefined;
578
578
  } | {
579
- key: string;
580
579
  type: "url";
581
- error: string;
582
- required: boolean;
583
- array: boolean;
580
+ key: string;
581
+ array?: boolean | undefined;
582
+ error?: string | undefined;
583
+ required?: boolean | undefined;
584
584
  xdefault?: string | null | undefined;
585
585
  description?: string | Record<string, string> | null | undefined;
586
586
  } | {
587
- key: string;
588
587
  type: "enum";
589
- error: string;
590
- required: boolean;
591
- array: boolean;
588
+ key: string;
592
589
  elements: string[];
590
+ array?: boolean | undefined;
591
+ error?: string | undefined;
592
+ required?: boolean | undefined;
593
593
  xdefault?: string | null | undefined;
594
594
  description?: string | Record<string, string> | null | undefined;
595
595
  } | {
596
- key: string;
597
596
  type: "relationship";
598
- error: string;
599
- required: boolean;
597
+ key: string;
600
598
  relatedCollection: string;
601
599
  relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
602
600
  twoWay: boolean;
@@ -604,62 +602,64 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
604
602
  onDelete: "setNull" | "cascade" | "restrict";
605
603
  side: "parent" | "child";
606
604
  array?: boolean | undefined;
605
+ error?: string | undefined;
606
+ required?: boolean | undefined;
607
+ description?: string | Record<string, string> | null | undefined;
607
608
  importMapping?: {
608
609
  originalIdField: string;
609
610
  targetField?: string | undefined;
610
611
  } | undefined;
611
- description?: string | Record<string, string> | null | undefined;
612
612
  })[];
613
613
  $id: string;
614
- enabled: boolean;
615
- documentSecurity: boolean;
616
614
  $permissions: {
617
615
  permission: string;
618
616
  target: string;
619
617
  }[];
620
- indexes: {
621
- key: string;
622
- type: "key" | "unique" | "fulltext";
623
- attributes: string[];
624
- status?: string | undefined;
625
- error?: string | undefined;
626
- orders?: string[] | undefined;
627
- }[];
628
618
  importDefs: {
629
619
  filePath: string;
630
620
  primaryKeyField: string;
631
621
  attributeMappings: {
632
622
  targetKey: string;
633
- converters: string[];
634
- validationActions: {
635
- params: string[];
636
- action: string;
637
- }[];
638
- postImportActions: {
639
- params: (string | Record<string, any>)[];
640
- action: string;
641
- }[];
642
623
  oldKey?: string | undefined;
643
624
  oldKeys?: string[] | undefined;
644
625
  fileData?: {
645
626
  path: string;
646
627
  name: string;
647
628
  } | undefined;
629
+ converters?: string[] | undefined;
630
+ validationActions?: {
631
+ params: string[];
632
+ action: string;
633
+ }[] | undefined;
634
+ postImportActions?: {
635
+ params: (string | Record<string, any>)[];
636
+ action: string;
637
+ }[] | undefined;
648
638
  }[];
649
639
  type?: "create" | "update" | undefined;
650
640
  basePath?: string | undefined;
651
641
  idMappings?: {
652
- targetField: string;
653
642
  sourceField: string;
643
+ targetField: string;
654
644
  targetCollection: string;
655
645
  fieldToSet?: string | undefined;
656
646
  }[] | undefined;
657
647
  updateMapping?: {
658
- originalIdField: string;
659
648
  targetField: string;
649
+ originalIdField: string;
660
650
  } | undefined;
661
651
  }[];
662
652
  description?: string | undefined;
653
+ enabled?: boolean | undefined;
654
+ documentSecurity?: boolean | undefined;
655
+ indexes?: {
656
+ type: "key" | "unique" | "fulltext";
657
+ key: string;
658
+ attributes: string[];
659
+ status?: string | undefined;
660
+ error?: string | undefined;
661
+ orders?: string[] | undefined;
662
+ }[] | undefined;
663
663
  databaseId?: string | undefined;
664
664
  }, {
665
665
  name: string;
@@ -667,83 +667,83 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
667
667
  attributes?: ({
668
668
  key: string;
669
669
  type?: "string" | undefined;
670
+ array?: boolean | undefined;
670
671
  error?: string | undefined;
671
672
  required?: boolean | undefined;
672
- array?: boolean | undefined;
673
673
  size?: number | undefined;
674
674
  xdefault?: string | null | undefined;
675
675
  encrypted?: boolean | undefined;
676
676
  format?: string | null | undefined;
677
- description?: string | Record<string, string> | null | undefined;
677
+ description?: string | Record<string, string> | undefined;
678
678
  } | {
679
679
  key: string;
680
680
  type?: "integer" | undefined;
681
+ array?: boolean | undefined;
681
682
  error?: string | undefined;
682
683
  required?: boolean | undefined;
683
- array?: boolean | undefined;
684
- min?: number | undefined;
685
- max?: number | undefined;
686
684
  xdefault?: number | null | undefined;
687
685
  description?: string | Record<string, string> | null | undefined;
686
+ min?: number | undefined;
687
+ max?: number | undefined;
688
688
  } | {
689
689
  key: string;
690
690
  type?: "float" | undefined;
691
+ array?: boolean | undefined;
691
692
  error?: string | undefined;
692
693
  required?: boolean | undefined;
693
- array?: boolean | undefined;
694
- min?: number | undefined;
695
- max?: number | undefined;
696
694
  xdefault?: number | null | undefined;
697
695
  description?: string | Record<string, string> | null | undefined;
696
+ min?: number | undefined;
697
+ max?: number | undefined;
698
698
  } | {
699
699
  key: string;
700
700
  type?: "boolean" | undefined;
701
+ array?: boolean | undefined;
701
702
  error?: string | undefined;
702
703
  required?: boolean | undefined;
703
- array?: boolean | undefined;
704
704
  xdefault?: boolean | null | undefined;
705
705
  description?: string | Record<string, string> | null | undefined;
706
706
  } | {
707
707
  key: string;
708
708
  type?: "datetime" | undefined;
709
+ array?: boolean | undefined;
709
710
  error?: string | undefined;
710
711
  required?: boolean | undefined;
711
- array?: boolean | undefined;
712
712
  xdefault?: string | null | undefined;
713
713
  description?: string | Record<string, string> | null | undefined;
714
714
  } | {
715
715
  key: string;
716
716
  type?: "email" | undefined;
717
+ array?: boolean | undefined;
717
718
  error?: string | undefined;
718
719
  required?: boolean | undefined;
719
- array?: boolean | undefined;
720
720
  xdefault?: string | null | undefined;
721
721
  description?: string | Record<string, string> | null | undefined;
722
722
  } | {
723
- key: string;
724
723
  type: "ip";
724
+ key: string;
725
+ array?: boolean | undefined;
725
726
  error?: string | undefined;
726
727
  required?: boolean | undefined;
727
- array?: boolean | undefined;
728
728
  xdefault?: string | null | undefined;
729
729
  description?: string | Record<string, string> | null | undefined;
730
730
  } | {
731
731
  key: string;
732
732
  type?: "url" | undefined;
733
+ array?: boolean | undefined;
733
734
  error?: string | undefined;
734
735
  required?: boolean | undefined;
735
- array?: boolean | undefined;
736
736
  xdefault?: string | null | undefined;
737
737
  description?: string | Record<string, string> | null | undefined;
738
738
  } | {
739
739
  key: string;
740
740
  type?: "enum" | undefined;
741
+ array?: boolean | undefined;
741
742
  error?: string | undefined;
742
743
  required?: boolean | undefined;
743
- array?: boolean | undefined;
744
- elements?: string[] | undefined;
745
744
  xdefault?: string | null | undefined;
746
745
  description?: string | Record<string, string> | null | undefined;
746
+ elements?: string[] | undefined;
747
747
  } | {
748
748
  key: string;
749
749
  relatedCollection: string;
@@ -752,15 +752,15 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
752
752
  twoWayKey: string;
753
753
  side: "parent" | "child";
754
754
  type?: "relationship" | undefined;
755
+ array?: boolean | undefined;
755
756
  error?: string | undefined;
756
757
  required?: boolean | undefined;
757
- array?: boolean | undefined;
758
+ description?: string | Record<string, string> | null | undefined;
758
759
  onDelete?: "setNull" | "cascade" | "restrict" | undefined;
759
760
  importMapping?: {
760
761
  originalIdField: string;
761
762
  targetField?: string | undefined;
762
763
  } | undefined;
763
- description?: string | Record<string, string> | null | undefined;
764
764
  })[] | undefined;
765
765
  $id?: string | undefined;
766
766
  enabled?: boolean | undefined;
@@ -801,14 +801,14 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
801
801
  basePath?: string | undefined;
802
802
  primaryKeyField?: string | undefined;
803
803
  idMappings?: {
804
- targetField: string;
805
804
  sourceField: string;
805
+ targetField: string;
806
806
  targetCollection: string;
807
807
  fieldToSet?: string | undefined;
808
808
  }[] | undefined;
809
809
  updateMapping?: {
810
- originalIdField: string;
811
810
  targetField: string;
811
+ originalIdField: string;
812
812
  } | undefined;
813
813
  }[] | undefined;
814
814
  databaseId?: string | undefined;
@@ -828,13 +828,13 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
828
828
  targetField: z.ZodString;
829
829
  targetCollection: z.ZodString;
830
830
  }, "strip", z.ZodTypeAny, {
831
- targetField: string;
832
831
  sourceField: string;
832
+ targetField: string;
833
833
  targetCollection: string;
834
834
  fieldToSet?: string | undefined;
835
835
  }, {
836
- targetField: string;
837
836
  sourceField: string;
837
+ targetField: string;
838
838
  targetCollection: string;
839
839
  fieldToSet?: string | undefined;
840
840
  }>, "many">>;
@@ -842,11 +842,11 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
842
842
  originalIdField: z.ZodString;
843
843
  targetField: z.ZodString;
844
844
  }, "strip", z.ZodTypeAny, {
845
- originalIdField: string;
846
845
  targetField: string;
847
- }, {
848
846
  originalIdField: string;
847
+ }, {
849
848
  targetField: string;
849
+ originalIdField: string;
850
850
  }>>;
851
851
  attributeMappings: z.ZodArray<z.ZodObject<{
852
852
  oldKey: z.ZodOptional<z.ZodString>;
@@ -862,8 +862,8 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
862
862
  path: string;
863
863
  name: string;
864
864
  }>>;
865
- converters: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
866
- validationActions: z.ZodDefault<z.ZodArray<z.ZodObject<{
865
+ converters: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
866
+ validationActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
867
867
  action: z.ZodString;
868
868
  params: z.ZodArray<z.ZodString, "many">;
869
869
  }, "strip", z.ZodTypeAny, {
@@ -872,8 +872,8 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
872
872
  }, {
873
873
  params: string[];
874
874
  action: string;
875
- }>, "many">>;
876
- postImportActions: z.ZodDefault<z.ZodArray<z.ZodObject<{
875
+ }>, "many">>>;
876
+ postImportActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
877
877
  action: z.ZodString;
878
878
  params: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
879
879
  }, "strip", z.ZodTypeAny, {
@@ -882,24 +882,24 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
882
882
  }, {
883
883
  params: (string | Record<string, any>)[];
884
884
  action: string;
885
- }>, "many">>;
885
+ }>, "many">>>;
886
886
  }, "strip", z.ZodTypeAny, {
887
887
  targetKey: string;
888
- converters: string[];
889
- validationActions: {
890
- params: string[];
891
- action: string;
892
- }[];
893
- postImportActions: {
894
- params: (string | Record<string, any>)[];
895
- action: string;
896
- }[];
897
888
  oldKey?: string | undefined;
898
889
  oldKeys?: string[] | undefined;
899
890
  fileData?: {
900
891
  path: string;
901
892
  name: string;
902
893
  } | undefined;
894
+ converters?: string[] | undefined;
895
+ validationActions?: {
896
+ params: string[];
897
+ action: string;
898
+ }[] | undefined;
899
+ postImportActions?: {
900
+ params: (string | Record<string, any>)[];
901
+ action: string;
902
+ }[] | undefined;
903
903
  }, {
904
904
  targetKey: string;
905
905
  oldKey?: string | undefined;
@@ -923,33 +923,33 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
923
923
  primaryKeyField: string;
924
924
  attributeMappings: {
925
925
  targetKey: string;
926
- converters: string[];
927
- validationActions: {
928
- params: string[];
929
- action: string;
930
- }[];
931
- postImportActions: {
932
- params: (string | Record<string, any>)[];
933
- action: string;
934
- }[];
935
926
  oldKey?: string | undefined;
936
927
  oldKeys?: string[] | undefined;
937
928
  fileData?: {
938
929
  path: string;
939
930
  name: string;
940
931
  } | undefined;
932
+ converters?: string[] | undefined;
933
+ validationActions?: {
934
+ params: string[];
935
+ action: string;
936
+ }[] | undefined;
937
+ postImportActions?: {
938
+ params: (string | Record<string, any>)[];
939
+ action: string;
940
+ }[] | undefined;
941
941
  }[];
942
942
  type?: "create" | "update" | undefined;
943
943
  basePath?: string | undefined;
944
944
  idMappings?: {
945
- targetField: string;
946
945
  sourceField: string;
946
+ targetField: string;
947
947
  targetCollection: string;
948
948
  fieldToSet?: string | undefined;
949
949
  }[] | undefined;
950
950
  updateMapping?: {
951
- originalIdField: string;
952
951
  targetField: string;
952
+ originalIdField: string;
953
953
  } | undefined;
954
954
  }, {
955
955
  filePath: string;
@@ -975,58 +975,58 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
975
975
  basePath?: string | undefined;
976
976
  primaryKeyField?: string | undefined;
977
977
  idMappings?: {
978
- targetField: string;
979
978
  sourceField: string;
979
+ targetField: string;
980
980
  targetCollection: string;
981
981
  fieldToSet?: string | undefined;
982
982
  }[] | undefined;
983
983
  updateMapping?: {
984
- originalIdField: string;
985
984
  targetField: string;
985
+ originalIdField: string;
986
986
  } | undefined;
987
987
  }>>;
988
988
  }, "strip", z.ZodTypeAny, {
989
+ context?: any;
989
990
  rawData?: any;
990
991
  finalData?: any;
991
- context?: any;
992
992
  importDef?: {
993
993
  filePath: string;
994
994
  primaryKeyField: string;
995
995
  attributeMappings: {
996
996
  targetKey: string;
997
- converters: string[];
998
- validationActions: {
999
- params: string[];
1000
- action: string;
1001
- }[];
1002
- postImportActions: {
1003
- params: (string | Record<string, any>)[];
1004
- action: string;
1005
- }[];
1006
997
  oldKey?: string | undefined;
1007
998
  oldKeys?: string[] | undefined;
1008
999
  fileData?: {
1009
1000
  path: string;
1010
1001
  name: string;
1011
1002
  } | undefined;
1003
+ converters?: string[] | undefined;
1004
+ validationActions?: {
1005
+ params: string[];
1006
+ action: string;
1007
+ }[] | undefined;
1008
+ postImportActions?: {
1009
+ params: (string | Record<string, any>)[];
1010
+ action: string;
1011
+ }[] | undefined;
1012
1012
  }[];
1013
1013
  type?: "create" | "update" | undefined;
1014
1014
  basePath?: string | undefined;
1015
1015
  idMappings?: {
1016
- targetField: string;
1017
1016
  sourceField: string;
1017
+ targetField: string;
1018
1018
  targetCollection: string;
1019
1019
  fieldToSet?: string | undefined;
1020
1020
  }[] | undefined;
1021
1021
  updateMapping?: {
1022
- originalIdField: string;
1023
1022
  targetField: string;
1023
+ originalIdField: string;
1024
1024
  } | undefined;
1025
1025
  } | undefined;
1026
1026
  }, {
1027
+ context?: any;
1027
1028
  rawData?: any;
1028
1029
  finalData?: any;
1029
- context?: any;
1030
1030
  importDef?: {
1031
1031
  filePath: string;
1032
1032
  attributeMappings: {
@@ -1051,144 +1051,142 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
1051
1051
  basePath?: string | undefined;
1052
1052
  primaryKeyField?: string | undefined;
1053
1053
  idMappings?: {
1054
- targetField: string;
1055
1054
  sourceField: string;
1055
+ targetField: string;
1056
1056
  targetCollection: string;
1057
1057
  fieldToSet?: string | undefined;
1058
1058
  }[] | undefined;
1059
1059
  updateMapping?: {
1060
- originalIdField: string;
1061
1060
  targetField: string;
1061
+ originalIdField: string;
1062
1062
  } | undefined;
1063
1063
  } | undefined;
1064
1064
  }>, "many">;
1065
1065
  }, "strip", z.ZodTypeAny, {
1066
1066
  data: {
1067
+ context?: any;
1067
1068
  rawData?: any;
1068
1069
  finalData?: any;
1069
- context?: any;
1070
1070
  importDef?: {
1071
1071
  filePath: string;
1072
1072
  primaryKeyField: string;
1073
1073
  attributeMappings: {
1074
1074
  targetKey: string;
1075
- converters: string[];
1076
- validationActions: {
1077
- params: string[];
1078
- action: string;
1079
- }[];
1080
- postImportActions: {
1081
- params: (string | Record<string, any>)[];
1082
- action: string;
1083
- }[];
1084
1075
  oldKey?: string | undefined;
1085
1076
  oldKeys?: string[] | undefined;
1086
1077
  fileData?: {
1087
1078
  path: string;
1088
1079
  name: string;
1089
1080
  } | undefined;
1081
+ converters?: string[] | undefined;
1082
+ validationActions?: {
1083
+ params: string[];
1084
+ action: string;
1085
+ }[] | undefined;
1086
+ postImportActions?: {
1087
+ params: (string | Record<string, any>)[];
1088
+ action: string;
1089
+ }[] | undefined;
1090
1090
  }[];
1091
1091
  type?: "create" | "update" | undefined;
1092
1092
  basePath?: string | undefined;
1093
1093
  idMappings?: {
1094
- targetField: string;
1095
1094
  sourceField: string;
1095
+ targetField: string;
1096
1096
  targetCollection: string;
1097
1097
  fieldToSet?: string | undefined;
1098
1098
  }[] | undefined;
1099
1099
  updateMapping?: {
1100
- originalIdField: string;
1101
1100
  targetField: string;
1101
+ originalIdField: string;
1102
1102
  } | undefined;
1103
1103
  } | undefined;
1104
1104
  }[];
1105
1105
  collection?: {
1106
1106
  name: string;
1107
1107
  attributes: ({
1108
- key: string;
1109
1108
  type: "string";
1110
- error: string;
1111
- required: boolean;
1112
- array: boolean;
1109
+ key: string;
1113
1110
  size: number;
1111
+ array?: boolean | undefined;
1112
+ error?: string | undefined;
1113
+ required?: boolean | undefined;
1114
1114
  xdefault?: string | null | undefined;
1115
1115
  encrypted?: boolean | undefined;
1116
1116
  format?: string | null | undefined;
1117
- description?: string | Record<string, string> | null | undefined;
1117
+ description?: string | Record<string, string> | undefined;
1118
1118
  } | {
1119
- key: string;
1120
1119
  type: "integer";
1121
- error: string;
1122
- required: boolean;
1123
- array: boolean;
1124
- min?: number | undefined;
1125
- max?: number | undefined;
1120
+ key: string;
1121
+ array?: boolean | undefined;
1122
+ error?: string | undefined;
1123
+ required?: boolean | undefined;
1126
1124
  xdefault?: number | null | undefined;
1127
1125
  description?: string | Record<string, string> | null | undefined;
1128
- } | {
1129
- key: string;
1130
- type: "float";
1131
- error: string;
1132
- required: boolean;
1133
- array: boolean;
1134
1126
  min?: number | undefined;
1135
1127
  max?: number | undefined;
1128
+ } | {
1129
+ type: "float";
1130
+ key: string;
1131
+ array?: boolean | undefined;
1132
+ error?: string | undefined;
1133
+ required?: boolean | undefined;
1136
1134
  xdefault?: number | null | undefined;
1137
1135
  description?: string | Record<string, string> | null | undefined;
1136
+ min?: number | undefined;
1137
+ max?: number | undefined;
1138
1138
  } | {
1139
- key: string;
1140
1139
  type: "boolean";
1141
- error: string;
1142
- required: boolean;
1143
- array: boolean;
1140
+ key: string;
1141
+ array?: boolean | undefined;
1142
+ error?: string | undefined;
1143
+ required?: boolean | undefined;
1144
1144
  xdefault?: boolean | null | undefined;
1145
1145
  description?: string | Record<string, string> | null | undefined;
1146
1146
  } | {
1147
- key: string;
1148
1147
  type: "datetime";
1149
- error: string;
1150
- required: boolean;
1151
- array: boolean;
1148
+ key: string;
1149
+ array?: boolean | undefined;
1150
+ error?: string | undefined;
1151
+ required?: boolean | undefined;
1152
1152
  xdefault?: string | null | undefined;
1153
1153
  description?: string | Record<string, string> | null | undefined;
1154
1154
  } | {
1155
- key: string;
1156
1155
  type: "email";
1157
- error: string;
1158
- required: boolean;
1159
- array: boolean;
1156
+ key: string;
1157
+ array?: boolean | undefined;
1158
+ error?: string | undefined;
1159
+ required?: boolean | undefined;
1160
1160
  xdefault?: string | null | undefined;
1161
1161
  description?: string | Record<string, string> | null | undefined;
1162
1162
  } | {
1163
- key: string;
1164
1163
  type: "ip";
1165
- error: string;
1166
- required: boolean;
1167
- array: boolean;
1164
+ key: string;
1165
+ array?: boolean | undefined;
1166
+ error?: string | undefined;
1167
+ required?: boolean | undefined;
1168
1168
  xdefault?: string | null | undefined;
1169
1169
  description?: string | Record<string, string> | null | undefined;
1170
1170
  } | {
1171
- key: string;
1172
1171
  type: "url";
1173
- error: string;
1174
- required: boolean;
1175
- array: boolean;
1172
+ key: string;
1173
+ array?: boolean | undefined;
1174
+ error?: string | undefined;
1175
+ required?: boolean | undefined;
1176
1176
  xdefault?: string | null | undefined;
1177
1177
  description?: string | Record<string, string> | null | undefined;
1178
1178
  } | {
1179
- key: string;
1180
1179
  type: "enum";
1181
- error: string;
1182
- required: boolean;
1183
- array: boolean;
1180
+ key: string;
1184
1181
  elements: string[];
1182
+ array?: boolean | undefined;
1183
+ error?: string | undefined;
1184
+ required?: boolean | undefined;
1185
1185
  xdefault?: string | null | undefined;
1186
1186
  description?: string | Record<string, string> | null | undefined;
1187
1187
  } | {
1188
- key: string;
1189
1188
  type: "relationship";
1190
- error: string;
1191
- required: boolean;
1189
+ key: string;
1192
1190
  relatedCollection: string;
1193
1191
  relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
1194
1192
  twoWay: boolean;
@@ -1196,69 +1194,71 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
1196
1194
  onDelete: "setNull" | "cascade" | "restrict";
1197
1195
  side: "parent" | "child";
1198
1196
  array?: boolean | undefined;
1197
+ error?: string | undefined;
1198
+ required?: boolean | undefined;
1199
+ description?: string | Record<string, string> | null | undefined;
1199
1200
  importMapping?: {
1200
1201
  originalIdField: string;
1201
1202
  targetField?: string | undefined;
1202
1203
  } | undefined;
1203
- description?: string | Record<string, string> | null | undefined;
1204
1204
  })[];
1205
1205
  $id: string;
1206
- enabled: boolean;
1207
- documentSecurity: boolean;
1208
1206
  $permissions: {
1209
1207
  permission: string;
1210
1208
  target: string;
1211
1209
  }[];
1212
- indexes: {
1213
- key: string;
1214
- type: "key" | "unique" | "fulltext";
1215
- attributes: string[];
1216
- status?: string | undefined;
1217
- error?: string | undefined;
1218
- orders?: string[] | undefined;
1219
- }[];
1220
1210
  importDefs: {
1221
1211
  filePath: string;
1222
1212
  primaryKeyField: string;
1223
1213
  attributeMappings: {
1224
1214
  targetKey: string;
1225
- converters: string[];
1226
- validationActions: {
1227
- params: string[];
1228
- action: string;
1229
- }[];
1230
- postImportActions: {
1231
- params: (string | Record<string, any>)[];
1232
- action: string;
1233
- }[];
1234
1215
  oldKey?: string | undefined;
1235
1216
  oldKeys?: string[] | undefined;
1236
1217
  fileData?: {
1237
1218
  path: string;
1238
1219
  name: string;
1239
1220
  } | undefined;
1221
+ converters?: string[] | undefined;
1222
+ validationActions?: {
1223
+ params: string[];
1224
+ action: string;
1225
+ }[] | undefined;
1226
+ postImportActions?: {
1227
+ params: (string | Record<string, any>)[];
1228
+ action: string;
1229
+ }[] | undefined;
1240
1230
  }[];
1241
1231
  type?: "create" | "update" | undefined;
1242
1232
  basePath?: string | undefined;
1243
1233
  idMappings?: {
1244
- targetField: string;
1245
1234
  sourceField: string;
1235
+ targetField: string;
1246
1236
  targetCollection: string;
1247
1237
  fieldToSet?: string | undefined;
1248
1238
  }[] | undefined;
1249
1239
  updateMapping?: {
1250
- originalIdField: string;
1251
1240
  targetField: string;
1241
+ originalIdField: string;
1252
1242
  } | undefined;
1253
1243
  }[];
1254
1244
  description?: string | undefined;
1245
+ enabled?: boolean | undefined;
1246
+ documentSecurity?: boolean | undefined;
1247
+ indexes?: {
1248
+ type: "key" | "unique" | "fulltext";
1249
+ key: string;
1250
+ attributes: string[];
1251
+ status?: string | undefined;
1252
+ error?: string | undefined;
1253
+ orders?: string[] | undefined;
1254
+ }[] | undefined;
1255
1255
  databaseId?: string | undefined;
1256
1256
  } | undefined;
1257
1257
  }, {
1258
1258
  data: {
1259
+ context?: any;
1259
1260
  rawData?: any;
1260
1261
  finalData?: any;
1261
- context?: any;
1262
1262
  importDef?: {
1263
1263
  filePath: string;
1264
1264
  attributeMappings: {
@@ -1283,14 +1283,14 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
1283
1283
  basePath?: string | undefined;
1284
1284
  primaryKeyField?: string | undefined;
1285
1285
  idMappings?: {
1286
- targetField: string;
1287
1286
  sourceField: string;
1287
+ targetField: string;
1288
1288
  targetCollection: string;
1289
1289
  fieldToSet?: string | undefined;
1290
1290
  }[] | undefined;
1291
1291
  updateMapping?: {
1292
- originalIdField: string;
1293
1292
  targetField: string;
1293
+ originalIdField: string;
1294
1294
  } | undefined;
1295
1295
  } | undefined;
1296
1296
  }[];
@@ -1300,83 +1300,83 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
1300
1300
  attributes?: ({
1301
1301
  key: string;
1302
1302
  type?: "string" | undefined;
1303
+ array?: boolean | undefined;
1303
1304
  error?: string | undefined;
1304
1305
  required?: boolean | undefined;
1305
- array?: boolean | undefined;
1306
1306
  size?: number | undefined;
1307
1307
  xdefault?: string | null | undefined;
1308
1308
  encrypted?: boolean | undefined;
1309
1309
  format?: string | null | undefined;
1310
- description?: string | Record<string, string> | null | undefined;
1310
+ description?: string | Record<string, string> | undefined;
1311
1311
  } | {
1312
1312
  key: string;
1313
1313
  type?: "integer" | undefined;
1314
+ array?: boolean | undefined;
1314
1315
  error?: string | undefined;
1315
1316
  required?: boolean | undefined;
1316
- array?: boolean | undefined;
1317
- min?: number | undefined;
1318
- max?: number | undefined;
1319
1317
  xdefault?: number | null | undefined;
1320
1318
  description?: string | Record<string, string> | null | undefined;
1319
+ min?: number | undefined;
1320
+ max?: number | undefined;
1321
1321
  } | {
1322
1322
  key: string;
1323
1323
  type?: "float" | undefined;
1324
+ array?: boolean | undefined;
1324
1325
  error?: string | undefined;
1325
1326
  required?: boolean | undefined;
1326
- array?: boolean | undefined;
1327
- min?: number | undefined;
1328
- max?: number | undefined;
1329
1327
  xdefault?: number | null | undefined;
1330
1328
  description?: string | Record<string, string> | null | undefined;
1329
+ min?: number | undefined;
1330
+ max?: number | undefined;
1331
1331
  } | {
1332
1332
  key: string;
1333
1333
  type?: "boolean" | undefined;
1334
+ array?: boolean | undefined;
1334
1335
  error?: string | undefined;
1335
1336
  required?: boolean | undefined;
1336
- array?: boolean | undefined;
1337
1337
  xdefault?: boolean | null | undefined;
1338
1338
  description?: string | Record<string, string> | null | undefined;
1339
1339
  } | {
1340
1340
  key: string;
1341
1341
  type?: "datetime" | undefined;
1342
+ array?: boolean | undefined;
1342
1343
  error?: string | undefined;
1343
1344
  required?: boolean | undefined;
1344
- array?: boolean | undefined;
1345
1345
  xdefault?: string | null | undefined;
1346
1346
  description?: string | Record<string, string> | null | undefined;
1347
1347
  } | {
1348
1348
  key: string;
1349
1349
  type?: "email" | undefined;
1350
+ array?: boolean | undefined;
1350
1351
  error?: string | undefined;
1351
1352
  required?: boolean | undefined;
1352
- array?: boolean | undefined;
1353
1353
  xdefault?: string | null | undefined;
1354
1354
  description?: string | Record<string, string> | null | undefined;
1355
1355
  } | {
1356
- key: string;
1357
1356
  type: "ip";
1357
+ key: string;
1358
+ array?: boolean | undefined;
1358
1359
  error?: string | undefined;
1359
1360
  required?: boolean | undefined;
1360
- array?: boolean | undefined;
1361
1361
  xdefault?: string | null | undefined;
1362
1362
  description?: string | Record<string, string> | null | undefined;
1363
1363
  } | {
1364
1364
  key: string;
1365
1365
  type?: "url" | undefined;
1366
+ array?: boolean | undefined;
1366
1367
  error?: string | undefined;
1367
1368
  required?: boolean | undefined;
1368
- array?: boolean | undefined;
1369
1369
  xdefault?: string | null | undefined;
1370
1370
  description?: string | Record<string, string> | null | undefined;
1371
1371
  } | {
1372
1372
  key: string;
1373
1373
  type?: "enum" | undefined;
1374
+ array?: boolean | undefined;
1374
1375
  error?: string | undefined;
1375
1376
  required?: boolean | undefined;
1376
- array?: boolean | undefined;
1377
- elements?: string[] | undefined;
1378
1377
  xdefault?: string | null | undefined;
1379
1378
  description?: string | Record<string, string> | null | undefined;
1379
+ elements?: string[] | undefined;
1380
1380
  } | {
1381
1381
  key: string;
1382
1382
  relatedCollection: string;
@@ -1385,15 +1385,15 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
1385
1385
  twoWayKey: string;
1386
1386
  side: "parent" | "child";
1387
1387
  type?: "relationship" | undefined;
1388
+ array?: boolean | undefined;
1388
1389
  error?: string | undefined;
1389
1390
  required?: boolean | undefined;
1390
- array?: boolean | undefined;
1391
+ description?: string | Record<string, string> | null | undefined;
1391
1392
  onDelete?: "setNull" | "cascade" | "restrict" | undefined;
1392
1393
  importMapping?: {
1393
1394
  originalIdField: string;
1394
1395
  targetField?: string | undefined;
1395
1396
  } | undefined;
1396
- description?: string | Record<string, string> | null | undefined;
1397
1397
  })[] | undefined;
1398
1398
  $id?: string | undefined;
1399
1399
  enabled?: boolean | undefined;
@@ -1434,14 +1434,14 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
1434
1434
  basePath?: string | undefined;
1435
1435
  primaryKeyField?: string | undefined;
1436
1436
  idMappings?: {
1437
- targetField: string;
1438
1437
  sourceField: string;
1438
+ targetField: string;
1439
1439
  targetCollection: string;
1440
1440
  fieldToSet?: string | undefined;
1441
1441
  }[] | undefined;
1442
1442
  updateMapping?: {
1443
- originalIdField: string;
1444
1443
  targetField: string;
1444
+ originalIdField: string;
1445
1445
  } | undefined;
1446
1446
  }[] | undefined;
1447
1447
  databaseId?: string | undefined;
@@ -1456,131 +1456,129 @@ export declare class DataLoader {
1456
1456
  private config;
1457
1457
  importMap: Map<string, {
1458
1458
  data: {
1459
+ context?: any;
1459
1460
  rawData?: any;
1460
1461
  finalData?: any;
1461
- context?: any;
1462
1462
  importDef?: {
1463
1463
  filePath: string;
1464
1464
  primaryKeyField: string;
1465
1465
  attributeMappings: {
1466
1466
  targetKey: string;
1467
- converters: string[];
1468
- validationActions: {
1469
- params: string[];
1470
- action: string;
1471
- }[];
1472
- postImportActions: {
1473
- params: (string | Record<string, any>)[];
1474
- action: string;
1475
- }[];
1476
1467
  oldKey?: string | undefined;
1477
1468
  oldKeys?: string[] | undefined;
1478
1469
  fileData?: {
1479
1470
  path: string;
1480
1471
  name: string;
1481
1472
  } | undefined;
1473
+ converters?: string[] | undefined;
1474
+ validationActions?: {
1475
+ params: string[];
1476
+ action: string;
1477
+ }[] | undefined;
1478
+ postImportActions?: {
1479
+ params: (string | Record<string, any>)[];
1480
+ action: string;
1481
+ }[] | undefined;
1482
1482
  }[];
1483
1483
  type?: "create" | "update" | undefined;
1484
1484
  basePath?: string | undefined;
1485
1485
  idMappings?: {
1486
- targetField: string;
1487
1486
  sourceField: string;
1487
+ targetField: string;
1488
1488
  targetCollection: string;
1489
1489
  fieldToSet?: string | undefined;
1490
1490
  }[] | undefined;
1491
1491
  updateMapping?: {
1492
- originalIdField: string;
1493
1492
  targetField: string;
1493
+ originalIdField: string;
1494
1494
  } | undefined;
1495
1495
  } | undefined;
1496
1496
  }[];
1497
1497
  collection?: {
1498
1498
  name: string;
1499
1499
  attributes: ({
1500
- key: string;
1501
1500
  type: "string";
1502
- error: string;
1503
- required: boolean;
1504
- array: boolean;
1501
+ key: string;
1505
1502
  size: number;
1503
+ array?: boolean | undefined;
1504
+ error?: string | undefined;
1505
+ required?: boolean | undefined;
1506
1506
  xdefault?: string | null | undefined;
1507
1507
  encrypted?: boolean | undefined;
1508
1508
  format?: string | null | undefined;
1509
- description?: string | Record<string, string> | null | undefined;
1509
+ description?: string | Record<string, string> | undefined;
1510
1510
  } | {
1511
- key: string;
1512
1511
  type: "integer";
1513
- error: string;
1514
- required: boolean;
1515
- array: boolean;
1516
- min?: number | undefined;
1517
- max?: number | undefined;
1512
+ key: string;
1513
+ array?: boolean | undefined;
1514
+ error?: string | undefined;
1515
+ required?: boolean | undefined;
1518
1516
  xdefault?: number | null | undefined;
1519
1517
  description?: string | Record<string, string> | null | undefined;
1520
- } | {
1521
- key: string;
1522
- type: "float";
1523
- error: string;
1524
- required: boolean;
1525
- array: boolean;
1526
1518
  min?: number | undefined;
1527
1519
  max?: number | undefined;
1520
+ } | {
1521
+ type: "float";
1522
+ key: string;
1523
+ array?: boolean | undefined;
1524
+ error?: string | undefined;
1525
+ required?: boolean | undefined;
1528
1526
  xdefault?: number | null | undefined;
1529
1527
  description?: string | Record<string, string> | null | undefined;
1528
+ min?: number | undefined;
1529
+ max?: number | undefined;
1530
1530
  } | {
1531
- key: string;
1532
1531
  type: "boolean";
1533
- error: string;
1534
- required: boolean;
1535
- array: boolean;
1532
+ key: string;
1533
+ array?: boolean | undefined;
1534
+ error?: string | undefined;
1535
+ required?: boolean | undefined;
1536
1536
  xdefault?: boolean | null | undefined;
1537
1537
  description?: string | Record<string, string> | null | undefined;
1538
1538
  } | {
1539
- key: string;
1540
1539
  type: "datetime";
1541
- error: string;
1542
- required: boolean;
1543
- array: boolean;
1540
+ key: string;
1541
+ array?: boolean | undefined;
1542
+ error?: string | undefined;
1543
+ required?: boolean | undefined;
1544
1544
  xdefault?: string | null | undefined;
1545
1545
  description?: string | Record<string, string> | null | undefined;
1546
1546
  } | {
1547
- key: string;
1548
1547
  type: "email";
1549
- error: string;
1550
- required: boolean;
1551
- array: boolean;
1548
+ key: string;
1549
+ array?: boolean | undefined;
1550
+ error?: string | undefined;
1551
+ required?: boolean | undefined;
1552
1552
  xdefault?: string | null | undefined;
1553
1553
  description?: string | Record<string, string> | null | undefined;
1554
1554
  } | {
1555
- key: string;
1556
1555
  type: "ip";
1557
- error: string;
1558
- required: boolean;
1559
- array: boolean;
1556
+ key: string;
1557
+ array?: boolean | undefined;
1558
+ error?: string | undefined;
1559
+ required?: boolean | undefined;
1560
1560
  xdefault?: string | null | undefined;
1561
1561
  description?: string | Record<string, string> | null | undefined;
1562
1562
  } | {
1563
- key: string;
1564
1563
  type: "url";
1565
- error: string;
1566
- required: boolean;
1567
- array: boolean;
1564
+ key: string;
1565
+ array?: boolean | undefined;
1566
+ error?: string | undefined;
1567
+ required?: boolean | undefined;
1568
1568
  xdefault?: string | null | undefined;
1569
1569
  description?: string | Record<string, string> | null | undefined;
1570
1570
  } | {
1571
- key: string;
1572
1571
  type: "enum";
1573
- error: string;
1574
- required: boolean;
1575
- array: boolean;
1572
+ key: string;
1576
1573
  elements: string[];
1574
+ array?: boolean | undefined;
1575
+ error?: string | undefined;
1576
+ required?: boolean | undefined;
1577
1577
  xdefault?: string | null | undefined;
1578
1578
  description?: string | Record<string, string> | null | undefined;
1579
1579
  } | {
1580
- key: string;
1581
1580
  type: "relationship";
1582
- error: string;
1583
- required: boolean;
1581
+ key: string;
1584
1582
  relatedCollection: string;
1585
1583
  relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
1586
1584
  twoWay: boolean;
@@ -1588,62 +1586,64 @@ export declare class DataLoader {
1588
1586
  onDelete: "setNull" | "cascade" | "restrict";
1589
1587
  side: "parent" | "child";
1590
1588
  array?: boolean | undefined;
1589
+ error?: string | undefined;
1590
+ required?: boolean | undefined;
1591
+ description?: string | Record<string, string> | null | undefined;
1591
1592
  importMapping?: {
1592
1593
  originalIdField: string;
1593
1594
  targetField?: string | undefined;
1594
1595
  } | undefined;
1595
- description?: string | Record<string, string> | null | undefined;
1596
1596
  })[];
1597
1597
  $id: string;
1598
- enabled: boolean;
1599
- documentSecurity: boolean;
1600
1598
  $permissions: {
1601
1599
  permission: string;
1602
1600
  target: string;
1603
1601
  }[];
1604
- indexes: {
1605
- key: string;
1606
- type: "key" | "unique" | "fulltext";
1607
- attributes: string[];
1608
- status?: string | undefined;
1609
- error?: string | undefined;
1610
- orders?: string[] | undefined;
1611
- }[];
1612
1602
  importDefs: {
1613
1603
  filePath: string;
1614
1604
  primaryKeyField: string;
1615
1605
  attributeMappings: {
1616
1606
  targetKey: string;
1617
- converters: string[];
1618
- validationActions: {
1619
- params: string[];
1620
- action: string;
1621
- }[];
1622
- postImportActions: {
1623
- params: (string | Record<string, any>)[];
1624
- action: string;
1625
- }[];
1626
1607
  oldKey?: string | undefined;
1627
1608
  oldKeys?: string[] | undefined;
1628
1609
  fileData?: {
1629
1610
  path: string;
1630
1611
  name: string;
1631
1612
  } | undefined;
1613
+ converters?: string[] | undefined;
1614
+ validationActions?: {
1615
+ params: string[];
1616
+ action: string;
1617
+ }[] | undefined;
1618
+ postImportActions?: {
1619
+ params: (string | Record<string, any>)[];
1620
+ action: string;
1621
+ }[] | undefined;
1632
1622
  }[];
1633
1623
  type?: "create" | "update" | undefined;
1634
1624
  basePath?: string | undefined;
1635
1625
  idMappings?: {
1636
- targetField: string;
1637
1626
  sourceField: string;
1627
+ targetField: string;
1638
1628
  targetCollection: string;
1639
1629
  fieldToSet?: string | undefined;
1640
1630
  }[] | undefined;
1641
1631
  updateMapping?: {
1642
- originalIdField: string;
1643
1632
  targetField: string;
1633
+ originalIdField: string;
1644
1634
  } | undefined;
1645
1635
  }[];
1646
1636
  description?: string | undefined;
1637
+ enabled?: boolean | undefined;
1638
+ documentSecurity?: boolean | undefined;
1639
+ indexes?: {
1640
+ type: "key" | "unique" | "fulltext";
1641
+ key: string;
1642
+ attributes: string[];
1643
+ status?: string | undefined;
1644
+ error?: string | undefined;
1645
+ orders?: string[] | undefined;
1646
+ }[] | undefined;
1647
1647
  databaseId?: string | undefined;
1648
1648
  } | undefined;
1649
1649
  }>;
@@ -1739,22 +1739,39 @@ export declare class DataLoader {
1739
1739
  * @param item - The item being imported, used for resolving template paths in fileData mappings.
1740
1740
  * @returns The attribute mappings updated with any necessary post-import actions.
1741
1741
  */
1742
- getAttributeMappingsWithActions(attributeMappings: AttributeMappings, context: any, item: any): {
1742
+ getAttributeMappingsWithActions(attributeMappings: AttributeMappings, context: any, item: any): ({
1743
+ targetKey: string;
1744
+ oldKey?: string | undefined;
1745
+ oldKeys?: string[] | undefined;
1746
+ fileData?: {
1747
+ path: string;
1748
+ name: string;
1749
+ } | undefined;
1750
+ converters?: string[] | undefined;
1751
+ validationActions?: {
1752
+ params: string[];
1753
+ action: string;
1754
+ }[] | undefined;
1755
+ postImportActions?: {
1756
+ params: (string | Record<string, any>)[];
1757
+ action: string;
1758
+ }[] | undefined;
1759
+ } | {
1743
1760
  postImportActions: {
1744
1761
  action: string;
1745
1762
  params: any[];
1746
1763
  }[];
1747
1764
  targetKey: string;
1748
- converters: string[];
1749
- validationActions: {
1750
- params: string[];
1751
- action: string;
1752
- }[];
1753
1765
  oldKey?: string | undefined;
1754
1766
  oldKeys?: string[] | undefined;
1755
1767
  fileData?: {
1756
1768
  path: string;
1757
1769
  name: string;
1758
1770
  } | undefined;
1759
- }[];
1771
+ converters?: string[] | undefined;
1772
+ validationActions?: {
1773
+ params: string[];
1774
+ action: string;
1775
+ }[] | undefined;
1776
+ })[];
1760
1777
  }