appwrite-utils-cli 1.3.5 → 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 +41 -22
  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 +347 -153
  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,25 +4,9 @@ import { z } from "zod";
4
4
  import { type Databases } from "node-appwrite";
5
5
  import { AuthUserCreateSchema } from "../schemas/authUser.js";
6
6
  export declare const CollectionImportDataSchema: z.ZodObject<{
7
- collection: z.ZodOptional<z.ZodObject<Omit<{
7
+ collection: z.ZodOptional<z.ZodObject<{
8
8
  name: z.ZodString;
9
- $id: z.ZodOptional<z.ZodString>;
10
- enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
11
- documentSecurity: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
12
- description: z.ZodOptional<z.ZodString>;
13
- $createdAt: z.ZodString;
14
- $updatedAt: z.ZodString;
15
- $permissions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
16
- permission: z.ZodString;
17
- target: z.ZodString;
18
- }, "strip", z.ZodTypeAny, {
19
- permission: string;
20
- target: string;
21
- }, {
22
- permission: string;
23
- target: string;
24
- }>, "many">>>;
25
- attributes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
9
+ attributes: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
26
10
  key: z.ZodString;
27
11
  type: z.ZodDefault<z.ZodLiteral<"string">>;
28
12
  error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
@@ -32,30 +16,7 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
32
16
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
17
  encrypted: z.ZodOptional<z.ZodBoolean>;
34
18
  format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
- description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
36
- }, "strip", z.ZodTypeAny, {
37
- type: "string";
38
- key: string;
39
- size: number;
40
- format?: string | null | undefined;
41
- description?: string | Record<string, string> | undefined;
42
- required?: boolean | undefined;
43
- array?: boolean | undefined;
44
- error?: string | undefined;
45
- xdefault?: string | null | undefined;
46
- encrypted?: boolean | undefined;
47
- }, {
48
- key: string;
49
- type?: "string" | undefined;
50
- format?: string | null | undefined;
51
- description?: string | Record<string, string> | undefined;
52
- required?: boolean | undefined;
53
- array?: boolean | undefined;
54
- error?: string | undefined;
55
- size?: number | undefined;
56
- xdefault?: string | null | undefined;
57
- encrypted?: boolean | undefined;
58
- }>, z.ZodObject<{
19
+ }, z.core.$strip>, z.ZodObject<{
59
20
  key: z.ZodString;
60
21
  type: z.ZodDefault<z.ZodLiteral<"integer">>;
61
22
  error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
@@ -64,28 +25,7 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
64
25
  min: z.ZodOptional<z.ZodNumber>;
65
26
  max: z.ZodOptional<z.ZodNumber>;
66
27
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
67
- description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
68
- }, "strip", z.ZodTypeAny, {
69
- type: "integer";
70
- key: string;
71
- description?: string | Record<string, string> | null | undefined;
72
- required?: boolean | undefined;
73
- array?: boolean | undefined;
74
- error?: string | undefined;
75
- xdefault?: number | null | undefined;
76
- min?: number | undefined;
77
- max?: number | undefined;
78
- }, {
79
- key: string;
80
- type?: "integer" | undefined;
81
- description?: string | Record<string, string> | null | undefined;
82
- required?: boolean | undefined;
83
- array?: boolean | undefined;
84
- error?: string | undefined;
85
- xdefault?: number | null | undefined;
86
- min?: number | undefined;
87
- max?: number | undefined;
88
- }>, z.ZodObject<{
28
+ }, z.core.$strip>, z.ZodObject<{
89
29
  key: z.ZodString;
90
30
  error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
91
31
  required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
@@ -93,30 +33,8 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
93
33
  min: z.ZodOptional<z.ZodNumber>;
94
34
  max: z.ZodOptional<z.ZodNumber>;
95
35
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
96
- description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
97
- } & {
98
36
  type: z.ZodDefault<z.ZodLiteral<"double">>;
99
- }, "strip", z.ZodTypeAny, {
100
- type: "double";
101
- key: string;
102
- description?: string | Record<string, string> | null | undefined;
103
- required?: boolean | undefined;
104
- array?: boolean | undefined;
105
- error?: string | undefined;
106
- xdefault?: number | null | undefined;
107
- min?: number | undefined;
108
- max?: number | undefined;
109
- }, {
110
- key: string;
111
- type?: "double" | undefined;
112
- description?: string | Record<string, string> | null | undefined;
113
- required?: boolean | undefined;
114
- array?: boolean | undefined;
115
- error?: string | undefined;
116
- xdefault?: number | null | undefined;
117
- min?: number | undefined;
118
- max?: number | undefined;
119
- }>, z.ZodObject<{
37
+ }, z.core.$strip>, z.ZodObject<{
120
38
  key: z.ZodString;
121
39
  error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
122
40
  required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
@@ -124,272 +42,117 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
124
42
  min: z.ZodOptional<z.ZodNumber>;
125
43
  max: z.ZodOptional<z.ZodNumber>;
126
44
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
127
- description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
128
- } & {
129
45
  type: z.ZodDefault<z.ZodLiteral<"float">>;
130
- }, "strip", z.ZodTypeAny, {
131
- type: "float";
132
- key: string;
133
- description?: string | Record<string, string> | null | undefined;
134
- required?: boolean | undefined;
135
- array?: boolean | undefined;
136
- error?: string | undefined;
137
- xdefault?: number | null | undefined;
138
- min?: number | undefined;
139
- max?: number | undefined;
140
- }, {
141
- key: string;
142
- type?: "float" | undefined;
143
- description?: string | Record<string, string> | null | undefined;
144
- required?: boolean | undefined;
145
- array?: boolean | undefined;
146
- error?: string | undefined;
147
- xdefault?: number | null | undefined;
148
- min?: number | undefined;
149
- max?: number | undefined;
150
- }>, z.ZodObject<{
46
+ }, z.core.$strip>, z.ZodObject<{
151
47
  key: z.ZodString;
152
48
  type: z.ZodDefault<z.ZodLiteral<"boolean">>;
153
49
  error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
154
50
  required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
155
51
  array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
156
52
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
157
- description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
158
- }, "strip", z.ZodTypeAny, {
159
- type: "boolean";
160
- key: string;
161
- description?: string | Record<string, string> | null | undefined;
162
- required?: boolean | undefined;
163
- array?: boolean | undefined;
164
- error?: string | undefined;
165
- xdefault?: boolean | null | undefined;
166
- }, {
167
- key: string;
168
- type?: "boolean" | undefined;
169
- description?: string | Record<string, string> | null | undefined;
170
- required?: boolean | undefined;
171
- array?: boolean | undefined;
172
- error?: string | undefined;
173
- xdefault?: boolean | null | undefined;
174
- }>, z.ZodObject<{
53
+ }, z.core.$strip>, z.ZodObject<{
175
54
  key: z.ZodString;
176
55
  type: z.ZodDefault<z.ZodLiteral<"datetime">>;
177
56
  error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
178
57
  required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
179
58
  array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
180
59
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
- description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
182
- }, "strip", z.ZodTypeAny, {
183
- type: "datetime";
184
- key: string;
185
- description?: string | Record<string, string> | null | undefined;
186
- required?: boolean | undefined;
187
- array?: boolean | undefined;
188
- error?: string | undefined;
189
- xdefault?: string | null | undefined;
190
- }, {
191
- key: string;
192
- type?: "datetime" | undefined;
193
- description?: string | Record<string, string> | null | undefined;
194
- required?: boolean | undefined;
195
- array?: boolean | undefined;
196
- error?: string | undefined;
197
- xdefault?: string | null | undefined;
198
- }>, z.ZodObject<{
60
+ }, z.core.$strip>, z.ZodObject<{
199
61
  key: z.ZodString;
200
62
  type: z.ZodDefault<z.ZodLiteral<"email">>;
201
63
  error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
202
64
  required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
203
65
  array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
204
66
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
205
- description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
206
- }, "strip", z.ZodTypeAny, {
207
- type: "email";
208
- key: string;
209
- description?: string | Record<string, string> | null | undefined;
210
- required?: boolean | undefined;
211
- array?: boolean | undefined;
212
- error?: string | undefined;
213
- xdefault?: string | null | undefined;
214
- }, {
215
- key: string;
216
- type?: "email" | undefined;
217
- description?: string | Record<string, string> | null | undefined;
218
- required?: boolean | undefined;
219
- array?: boolean | undefined;
220
- error?: string | undefined;
221
- xdefault?: string | null | undefined;
222
- }>, z.ZodObject<{
67
+ }, z.core.$strip>, z.ZodObject<{
223
68
  key: z.ZodString;
224
69
  type: z.ZodLiteral<"ip">;
225
70
  error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
226
71
  required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
227
72
  array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
228
73
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
229
- description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
230
- }, "strip", z.ZodTypeAny, {
231
- type: "ip";
232
- key: string;
233
- description?: string | Record<string, string> | null | undefined;
234
- required?: boolean | undefined;
235
- array?: boolean | undefined;
236
- error?: string | undefined;
237
- xdefault?: string | null | undefined;
238
- }, {
239
- type: "ip";
240
- key: string;
241
- description?: string | Record<string, string> | null | undefined;
242
- required?: boolean | undefined;
243
- array?: boolean | undefined;
244
- error?: string | undefined;
245
- xdefault?: string | null | undefined;
246
- }>, z.ZodObject<{
74
+ }, z.core.$strip>, z.ZodObject<{
247
75
  key: z.ZodString;
248
76
  type: z.ZodDefault<z.ZodLiteral<"url">>;
249
77
  error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
250
78
  required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
251
79
  array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
252
80
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
253
- description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
254
- }, "strip", z.ZodTypeAny, {
255
- type: "url";
256
- key: string;
257
- description?: string | Record<string, string> | null | undefined;
258
- required?: boolean | undefined;
259
- array?: boolean | undefined;
260
- error?: string | undefined;
261
- xdefault?: string | null | undefined;
262
- }, {
263
- key: string;
264
- type?: "url" | undefined;
265
- description?: string | Record<string, string> | null | undefined;
266
- required?: boolean | undefined;
267
- array?: boolean | undefined;
268
- error?: string | undefined;
269
- xdefault?: string | null | undefined;
270
- }>, z.ZodObject<{
81
+ }, z.core.$strip>, z.ZodObject<{
271
82
  key: z.ZodString;
272
83
  type: z.ZodDefault<z.ZodLiteral<"enum">>;
273
84
  error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
274
85
  required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
275
86
  array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
276
- elements: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
87
+ elements: z.ZodDefault<z.ZodArray<z.ZodString>>;
277
88
  xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
278
- description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
279
- }, "strip", z.ZodTypeAny, {
280
- type: "enum";
281
- key: string;
282
- elements: string[];
283
- description?: string | Record<string, string> | null | undefined;
284
- required?: boolean | undefined;
285
- array?: boolean | undefined;
286
- error?: string | undefined;
287
- xdefault?: string | null | undefined;
288
- }, {
289
- key: string;
290
- type?: "enum" | undefined;
291
- description?: string | Record<string, string> | null | undefined;
292
- required?: boolean | undefined;
293
- array?: boolean | undefined;
294
- error?: string | undefined;
295
- xdefault?: string | null | undefined;
296
- elements?: string[] | undefined;
297
- }>, z.ZodObject<{
89
+ }, z.core.$strip>, z.ZodObject<{
298
90
  key: z.ZodString;
299
91
  type: z.ZodDefault<z.ZodLiteral<"relationship">>;
300
92
  error: z.ZodOptional<z.ZodDefault<z.ZodString>>;
301
93
  required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
302
94
  array: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
303
95
  relatedCollection: z.ZodString;
304
- relationType: z.ZodEnum<["oneToMany", "manyToOne", "oneToOne", "manyToMany"]>;
96
+ relationType: z.ZodEnum<{
97
+ oneToMany: "oneToMany";
98
+ manyToOne: "manyToOne";
99
+ oneToOne: "oneToOne";
100
+ manyToMany: "manyToMany";
101
+ }>;
305
102
  twoWay: z.ZodBoolean;
306
103
  twoWayKey: z.ZodString;
307
- onDelete: z.ZodDefault<z.ZodEnum<["setNull", "cascade", "restrict"]>>;
308
- side: z.ZodEnum<["parent", "child"]>;
104
+ onDelete: z.ZodDefault<z.ZodEnum<{
105
+ setNull: "setNull";
106
+ cascade: "cascade";
107
+ restrict: "restrict";
108
+ }>>;
109
+ side: z.ZodEnum<{
110
+ parent: "parent";
111
+ child: "child";
112
+ }>;
309
113
  importMapping: z.ZodOptional<z.ZodObject<{
310
114
  originalIdField: z.ZodString;
311
115
  targetField: z.ZodOptional<z.ZodString>;
312
- }, "strip", z.ZodTypeAny, {
313
- originalIdField: string;
314
- targetField?: string | undefined;
315
- }, {
316
- originalIdField: string;
317
- targetField?: string | undefined;
318
- }>>;
319
- description: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
320
- }, "strip", z.ZodTypeAny, {
321
- type: "relationship";
322
- key: string;
323
- relatedCollection: string;
324
- relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
325
- twoWay: boolean;
326
- twoWayKey: string;
327
- onDelete: "setNull" | "cascade" | "restrict";
328
- side: "parent" | "child";
329
- description?: string | Record<string, string> | null | undefined;
330
- required?: boolean | undefined;
331
- array?: boolean | undefined;
332
- error?: string | undefined;
333
- importMapping?: {
334
- originalIdField: string;
335
- targetField?: string | undefined;
336
- } | undefined;
337
- }, {
338
- key: string;
339
- relatedCollection: string;
340
- relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
341
- twoWay: boolean;
342
- twoWayKey: string;
343
- side: "parent" | "child";
344
- type?: "relationship" | undefined;
345
- description?: string | Record<string, string> | null | undefined;
346
- required?: boolean | undefined;
347
- array?: boolean | undefined;
348
- error?: string | undefined;
349
- onDelete?: "setNull" | "cascade" | "restrict" | undefined;
350
- importMapping?: {
351
- originalIdField: string;
352
- targetField?: string | undefined;
353
- } | undefined;
354
- }>]>, "many">>;
355
- indexes: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
116
+ }, z.core.$strip>>;
117
+ }, z.core.$strip>], "type">>>;
118
+ $id: z.ZodOptional<z.ZodString>;
119
+ enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
120
+ documentSecurity: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
121
+ $permissions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
122
+ permission: z.ZodString;
123
+ target: z.ZodString;
124
+ }, z.core.$strip>>>>;
125
+ indexes: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
356
126
  key: z.ZodString;
357
- type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["key", "unique", "fulltext"]>>>;
127
+ type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
128
+ key: "key";
129
+ unique: "unique";
130
+ fulltext: "fulltext";
131
+ }>>>;
358
132
  status: z.ZodOptional<z.ZodString>;
359
133
  error: z.ZodOptional<z.ZodString>;
360
- attributes: z.ZodArray<z.ZodString, "many">;
361
- orders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
362
- }, "strip", z.ZodTypeAny, {
363
- type: "key" | "unique" | "fulltext";
134
+ attributes: z.ZodArray<z.ZodString>;
135
+ orders: z.ZodOptional<z.ZodArray<z.ZodString>>;
136
+ }, z.core.$strip>>>>, z.ZodTransform<{
364
137
  key: string;
365
- attributes: string[];
366
- status?: string | undefined;
367
- error?: string | undefined;
368
- orders?: string[] | undefined;
369
- }, {
370
- key: string;
371
- attributes: string[];
372
- type?: "key" | "unique" | "fulltext" | undefined;
373
- status?: string | undefined;
374
- error?: string | undefined;
375
- orders?: string[] | undefined;
376
- }>, "many">>>, {
377
138
  type: "key" | "unique" | "fulltext";
378
- key: string;
379
139
  attributes: string[];
380
140
  status?: string | undefined;
381
141
  error?: string | undefined;
382
142
  orders?: string[] | undefined;
383
143
  }[], {
384
144
  key: string;
145
+ type: "key" | "unique" | "fulltext";
385
146
  attributes: string[];
386
- type?: "key" | "unique" | "fulltext" | undefined;
387
147
  status?: string | undefined;
388
148
  error?: string | undefined;
389
149
  orders?: string[] | undefined;
390
- }[] | undefined>;
150
+ }[]>>;
391
151
  importDefs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
392
- type: z.ZodOptional<z.ZodDefault<z.ZodEnum<["create", "update"]>>>;
152
+ type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
153
+ create: "create";
154
+ update: "update";
155
+ }>>>;
393
156
  filePath: z.ZodString;
394
157
  basePath: z.ZodOptional<z.ZodString>;
395
158
  primaryKeyField: z.ZodDefault<z.ZodString>;
@@ -399,512 +162,43 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
399
162
  targetFieldToMatch: z.ZodOptional<z.ZodString>;
400
163
  targetField: z.ZodString;
401
164
  targetCollection: z.ZodString;
402
- }, "strip", z.ZodTypeAny, {
403
- sourceField: string;
404
- targetField: string;
405
- targetCollection: string;
406
- fieldToSet?: string | undefined;
407
- targetFieldToMatch?: string | undefined;
408
- }, {
409
- sourceField: string;
410
- targetField: string;
411
- targetCollection: string;
412
- fieldToSet?: string | undefined;
413
- targetFieldToMatch?: string | undefined;
414
- }>, "many">>;
165
+ }, z.core.$strip>>>;
415
166
  createUsers: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>;
416
167
  updateMapping: z.ZodOptional<z.ZodObject<{
417
168
  originalIdField: z.ZodString;
418
169
  targetField: z.ZodString;
419
- }, "strip", z.ZodTypeAny, {
420
- targetField: string;
421
- originalIdField: string;
422
- }, {
423
- targetField: string;
424
- originalIdField: string;
425
- }>>;
170
+ }, z.core.$strip>>;
426
171
  attributeMappings: z.ZodArray<z.ZodObject<{
427
172
  oldKey: z.ZodOptional<z.ZodString>;
428
- oldKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
173
+ oldKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
429
174
  targetKey: z.ZodString;
430
175
  valueToSet: z.ZodOptional<z.ZodAny>;
431
176
  fileData: z.ZodOptional<z.ZodObject<{
432
177
  name: z.ZodString;
433
178
  path: z.ZodString;
434
- }, "strip", z.ZodTypeAny, {
435
- path: string;
436
- name: string;
437
- }, {
438
- path: string;
439
- name: string;
440
- }>>;
441
- converters: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
179
+ }, z.core.$strip>>;
180
+ converters: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
442
181
  validationActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
443
182
  action: z.ZodString;
444
- params: z.ZodArray<z.ZodString, "many">;
445
- }, "strip", z.ZodTypeAny, {
446
- params: string[];
447
- action: string;
448
- }, {
449
- params: string[];
450
- action: string;
451
- }>, "many">>>;
183
+ params: z.ZodArray<z.ZodString>;
184
+ }, z.core.$strip>>>>;
452
185
  postImportActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
453
186
  action: z.ZodString;
454
- params: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
455
- }, "strip", z.ZodTypeAny, {
456
- params: (string | Record<string, any>)[];
457
- action: string;
458
- }, {
459
- params: (string | Record<string, any>)[];
460
- action: string;
461
- }>, "many">>>;
462
- }, "strip", z.ZodTypeAny, {
463
- targetKey: string;
464
- oldKey?: string | undefined;
465
- oldKeys?: string[] | undefined;
466
- valueToSet?: any;
467
- fileData?: {
468
- path: string;
469
- name: string;
470
- } | undefined;
471
- converters?: string[] | undefined;
472
- validationActions?: {
473
- params: string[];
474
- action: string;
475
- }[] | undefined;
476
- postImportActions?: {
477
- params: (string | Record<string, any>)[];
478
- action: string;
479
- }[] | undefined;
480
- }, {
481
- targetKey: string;
482
- oldKey?: string | undefined;
483
- oldKeys?: string[] | undefined;
484
- valueToSet?: any;
485
- fileData?: {
486
- path: string;
487
- name: string;
488
- } | undefined;
489
- converters?: string[] | undefined;
490
- validationActions?: {
491
- params: string[];
492
- action: string;
493
- }[] | undefined;
494
- postImportActions?: {
495
- params: (string | Record<string, any>)[];
496
- action: string;
497
- }[] | undefined;
498
- }>, "many">;
499
- }, "strip", z.ZodTypeAny, {
500
- filePath: string;
501
- primaryKeyField: string;
502
- attributeMappings: {
503
- targetKey: string;
504
- oldKey?: string | undefined;
505
- oldKeys?: string[] | undefined;
506
- valueToSet?: any;
507
- fileData?: {
508
- path: string;
509
- name: string;
510
- } | undefined;
511
- converters?: string[] | undefined;
512
- validationActions?: {
513
- params: string[];
514
- action: string;
515
- }[] | undefined;
516
- postImportActions?: {
517
- params: (string | Record<string, any>)[];
518
- action: string;
519
- }[] | undefined;
520
- }[];
521
- type?: "create" | "update" | undefined;
522
- basePath?: string | undefined;
523
- idMappings?: {
524
- sourceField: string;
525
- targetField: string;
526
- targetCollection: string;
527
- fieldToSet?: string | undefined;
528
- targetFieldToMatch?: string | undefined;
529
- }[] | undefined;
530
- createUsers?: boolean | null | undefined;
531
- updateMapping?: {
532
- targetField: string;
533
- originalIdField: string;
534
- } | undefined;
535
- }, {
536
- filePath: string;
537
- attributeMappings: {
538
- targetKey: string;
539
- oldKey?: string | undefined;
540
- oldKeys?: string[] | undefined;
541
- valueToSet?: any;
542
- fileData?: {
543
- path: string;
544
- name: string;
545
- } | undefined;
546
- converters?: string[] | undefined;
547
- validationActions?: {
548
- params: string[];
549
- action: string;
550
- }[] | undefined;
551
- postImportActions?: {
552
- params: (string | Record<string, any>)[];
553
- action: string;
554
- }[] | undefined;
555
- }[];
556
- type?: "create" | "update" | undefined;
557
- basePath?: string | undefined;
558
- primaryKeyField?: string | undefined;
559
- idMappings?: {
560
- sourceField: string;
561
- targetField: string;
562
- targetCollection: string;
563
- fieldToSet?: string | undefined;
564
- targetFieldToMatch?: string | undefined;
565
- }[] | undefined;
566
- createUsers?: boolean | null | undefined;
567
- updateMapping?: {
568
- targetField: string;
569
- originalIdField: string;
570
- } | undefined;
571
- }>, "many">>>;
187
+ params: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
188
+ }, z.core.$strip>>>>;
189
+ }, z.core.$strip>>;
190
+ }, z.core.$strip>>>>;
572
191
  databaseId: z.ZodOptional<z.ZodString>;
573
- }, "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
574
- name: string;
575
- attributes: ({
576
- type: "string";
577
- key: string;
578
- size: number;
579
- format?: string | null | undefined;
580
- description?: string | Record<string, string> | undefined;
581
- required?: boolean | undefined;
582
- array?: boolean | undefined;
583
- error?: string | undefined;
584
- xdefault?: string | null | undefined;
585
- encrypted?: boolean | undefined;
586
- } | {
587
- type: "integer";
588
- key: string;
589
- description?: string | Record<string, string> | null | undefined;
590
- required?: boolean | undefined;
591
- array?: boolean | undefined;
592
- error?: string | undefined;
593
- xdefault?: number | null | undefined;
594
- min?: number | undefined;
595
- max?: number | undefined;
596
- } | {
597
- type: "double";
598
- key: string;
599
- description?: string | Record<string, string> | null | undefined;
600
- required?: boolean | undefined;
601
- array?: boolean | undefined;
602
- error?: string | undefined;
603
- xdefault?: number | null | undefined;
604
- min?: number | undefined;
605
- max?: number | undefined;
606
- } | {
607
- type: "float";
608
- key: string;
609
- description?: string | Record<string, string> | null | undefined;
610
- required?: boolean | undefined;
611
- array?: boolean | undefined;
612
- error?: string | undefined;
613
- xdefault?: number | null | undefined;
614
- min?: number | undefined;
615
- max?: number | undefined;
616
- } | {
617
- type: "boolean";
618
- key: string;
619
- description?: string | Record<string, string> | null | undefined;
620
- required?: boolean | undefined;
621
- array?: boolean | undefined;
622
- error?: string | undefined;
623
- xdefault?: boolean | null | undefined;
624
- } | {
625
- type: "datetime";
626
- key: string;
627
- description?: string | Record<string, string> | null | undefined;
628
- required?: boolean | undefined;
629
- array?: boolean | undefined;
630
- error?: string | undefined;
631
- xdefault?: string | null | undefined;
632
- } | {
633
- type: "email";
634
- key: string;
635
- description?: string | Record<string, string> | null | undefined;
636
- required?: boolean | undefined;
637
- array?: boolean | undefined;
638
- error?: string | undefined;
639
- xdefault?: string | null | undefined;
640
- } | {
641
- type: "ip";
642
- key: string;
643
- description?: string | Record<string, string> | null | undefined;
644
- required?: boolean | undefined;
645
- array?: boolean | undefined;
646
- error?: string | undefined;
647
- xdefault?: string | null | undefined;
648
- } | {
649
- type: "url";
650
- key: string;
651
- description?: string | Record<string, string> | null | undefined;
652
- required?: boolean | undefined;
653
- array?: boolean | undefined;
654
- error?: string | undefined;
655
- xdefault?: string | null | undefined;
656
- } | {
657
- type: "enum";
658
- key: string;
659
- elements: string[];
660
- description?: string | Record<string, string> | null | undefined;
661
- required?: boolean | undefined;
662
- array?: boolean | undefined;
663
- error?: string | undefined;
664
- xdefault?: string | null | undefined;
665
- } | {
666
- type: "relationship";
667
- key: string;
668
- relatedCollection: string;
669
- relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
670
- twoWay: boolean;
671
- twoWayKey: string;
672
- onDelete: "setNull" | "cascade" | "restrict";
673
- side: "parent" | "child";
674
- description?: string | Record<string, string> | null | undefined;
675
- required?: boolean | undefined;
676
- array?: boolean | undefined;
677
- error?: string | undefined;
678
- importMapping?: {
679
- originalIdField: string;
680
- targetField?: string | undefined;
681
- } | undefined;
682
- })[];
683
- $permissions: {
684
- permission: string;
685
- target: string;
686
- }[];
687
- indexes: {
688
- type: "key" | "unique" | "fulltext";
689
- key: string;
690
- attributes: string[];
691
- status?: string | undefined;
692
- error?: string | undefined;
693
- orders?: string[] | undefined;
694
- }[];
695
- importDefs: {
696
- filePath: string;
697
- primaryKeyField: string;
698
- attributeMappings: {
699
- targetKey: string;
700
- oldKey?: string | undefined;
701
- oldKeys?: string[] | undefined;
702
- valueToSet?: any;
703
- fileData?: {
704
- path: string;
705
- name: string;
706
- } | undefined;
707
- converters?: string[] | undefined;
708
- validationActions?: {
709
- params: string[];
710
- action: string;
711
- }[] | undefined;
712
- postImportActions?: {
713
- params: (string | Record<string, any>)[];
714
- action: string;
715
- }[] | undefined;
716
- }[];
717
- type?: "create" | "update" | undefined;
718
- basePath?: string | undefined;
719
- idMappings?: {
720
- sourceField: string;
721
- targetField: string;
722
- targetCollection: string;
723
- fieldToSet?: string | undefined;
724
- targetFieldToMatch?: string | undefined;
725
- }[] | undefined;
726
- createUsers?: boolean | null | undefined;
727
- updateMapping?: {
728
- targetField: string;
729
- originalIdField: string;
730
- } | undefined;
731
- }[];
732
- description?: string | undefined;
733
- $id?: string | undefined;
734
- enabled?: boolean | undefined;
735
- documentSecurity?: boolean | undefined;
736
- databaseId?: string | undefined;
737
- }, {
738
- name: string;
739
- description?: string | undefined;
740
- attributes?: ({
741
- key: string;
742
- type?: "string" | undefined;
743
- format?: string | null | undefined;
744
- description?: string | Record<string, string> | undefined;
745
- required?: boolean | undefined;
746
- array?: boolean | undefined;
747
- error?: string | undefined;
748
- size?: number | undefined;
749
- xdefault?: string | null | undefined;
750
- encrypted?: boolean | undefined;
751
- } | {
752
- key: string;
753
- type?: "integer" | undefined;
754
- description?: string | Record<string, string> | null | undefined;
755
- required?: boolean | undefined;
756
- array?: boolean | undefined;
757
- error?: string | undefined;
758
- xdefault?: number | null | undefined;
759
- min?: number | undefined;
760
- max?: number | undefined;
761
- } | {
762
- key: string;
763
- type?: "double" | undefined;
764
- description?: string | Record<string, string> | null | undefined;
765
- required?: boolean | undefined;
766
- array?: boolean | undefined;
767
- error?: string | undefined;
768
- xdefault?: number | null | undefined;
769
- min?: number | undefined;
770
- max?: number | undefined;
771
- } | {
772
- key: string;
773
- type?: "float" | undefined;
774
- description?: string | Record<string, string> | null | undefined;
775
- required?: boolean | undefined;
776
- array?: boolean | undefined;
777
- error?: string | undefined;
778
- xdefault?: number | null | undefined;
779
- min?: number | undefined;
780
- max?: number | undefined;
781
- } | {
782
- key: string;
783
- type?: "boolean" | undefined;
784
- description?: string | Record<string, string> | null | undefined;
785
- required?: boolean | undefined;
786
- array?: boolean | undefined;
787
- error?: string | undefined;
788
- xdefault?: boolean | null | undefined;
789
- } | {
790
- key: string;
791
- type?: "datetime" | undefined;
792
- description?: string | Record<string, string> | null | undefined;
793
- required?: boolean | undefined;
794
- array?: boolean | undefined;
795
- error?: string | undefined;
796
- xdefault?: string | null | undefined;
797
- } | {
798
- key: string;
799
- type?: "email" | undefined;
800
- description?: string | Record<string, string> | null | undefined;
801
- required?: boolean | undefined;
802
- array?: boolean | undefined;
803
- error?: string | undefined;
804
- xdefault?: string | null | undefined;
805
- } | {
806
- type: "ip";
807
- key: string;
808
- description?: string | Record<string, string> | null | undefined;
809
- required?: boolean | undefined;
810
- array?: boolean | undefined;
811
- error?: string | undefined;
812
- xdefault?: string | null | undefined;
813
- } | {
814
- key: string;
815
- type?: "url" | undefined;
816
- description?: string | Record<string, string> | null | undefined;
817
- required?: boolean | undefined;
818
- array?: boolean | undefined;
819
- error?: string | undefined;
820
- xdefault?: string | null | undefined;
821
- } | {
822
- key: string;
823
- type?: "enum" | undefined;
824
- description?: string | Record<string, string> | null | undefined;
825
- required?: boolean | undefined;
826
- array?: boolean | undefined;
827
- error?: string | undefined;
828
- xdefault?: string | null | undefined;
829
- elements?: string[] | undefined;
830
- } | {
831
- key: string;
832
- relatedCollection: string;
833
- relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
834
- twoWay: boolean;
835
- twoWayKey: string;
836
- side: "parent" | "child";
837
- type?: "relationship" | undefined;
838
- description?: string | Record<string, string> | null | undefined;
839
- required?: boolean | undefined;
840
- array?: boolean | undefined;
841
- error?: string | undefined;
842
- onDelete?: "setNull" | "cascade" | "restrict" | undefined;
843
- importMapping?: {
844
- originalIdField: string;
845
- targetField?: string | undefined;
846
- } | undefined;
847
- })[] | undefined;
848
- $id?: string | undefined;
849
- enabled?: boolean | undefined;
850
- documentSecurity?: boolean | undefined;
851
- $permissions?: {
852
- permission: string;
853
- target: string;
854
- }[] | undefined;
855
- indexes?: {
856
- key: string;
857
- attributes: string[];
858
- type?: "key" | "unique" | "fulltext" | undefined;
859
- status?: string | undefined;
860
- error?: string | undefined;
861
- orders?: string[] | undefined;
862
- }[] | undefined;
863
- importDefs?: {
864
- filePath: string;
865
- attributeMappings: {
866
- targetKey: string;
867
- oldKey?: string | undefined;
868
- oldKeys?: string[] | undefined;
869
- valueToSet?: any;
870
- fileData?: {
871
- path: string;
872
- name: string;
873
- } | undefined;
874
- converters?: string[] | undefined;
875
- validationActions?: {
876
- params: string[];
877
- action: string;
878
- }[] | undefined;
879
- postImportActions?: {
880
- params: (string | Record<string, any>)[];
881
- action: string;
882
- }[] | undefined;
883
- }[];
884
- type?: "create" | "update" | undefined;
885
- basePath?: string | undefined;
886
- primaryKeyField?: string | undefined;
887
- idMappings?: {
888
- sourceField: string;
889
- targetField: string;
890
- targetCollection: string;
891
- fieldToSet?: string | undefined;
892
- targetFieldToMatch?: string | undefined;
893
- }[] | undefined;
894
- createUsers?: boolean | null | undefined;
895
- updateMapping?: {
896
- targetField: string;
897
- originalIdField: string;
898
- } | undefined;
899
- }[] | undefined;
900
- databaseId?: string | undefined;
901
- }>>;
192
+ }, z.core.$strip>>;
902
193
  data: z.ZodArray<z.ZodObject<{
903
194
  rawData: z.ZodAny;
904
195
  finalData: z.ZodAny;
905
196
  context: z.ZodAny;
906
197
  importDef: z.ZodOptional<z.ZodObject<{
907
- type: z.ZodOptional<z.ZodDefault<z.ZodEnum<["create", "update"]>>>;
198
+ type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
199
+ create: "create";
200
+ update: "update";
201
+ }>>>;
908
202
  filePath: z.ZodString;
909
203
  basePath: z.ZodOptional<z.ZodString>;
910
204
  primaryKeyField: z.ZodDefault<z.ZodString>;
@@ -914,676 +208,34 @@ export declare const CollectionImportDataSchema: z.ZodObject<{
914
208
  targetFieldToMatch: z.ZodOptional<z.ZodString>;
915
209
  targetField: z.ZodString;
916
210
  targetCollection: z.ZodString;
917
- }, "strip", z.ZodTypeAny, {
918
- sourceField: string;
919
- targetField: string;
920
- targetCollection: string;
921
- fieldToSet?: string | undefined;
922
- targetFieldToMatch?: string | undefined;
923
- }, {
924
- sourceField: string;
925
- targetField: string;
926
- targetCollection: string;
927
- fieldToSet?: string | undefined;
928
- targetFieldToMatch?: string | undefined;
929
- }>, "many">>;
211
+ }, z.core.$strip>>>;
930
212
  createUsers: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodBoolean>>>;
931
213
  updateMapping: z.ZodOptional<z.ZodObject<{
932
214
  originalIdField: z.ZodString;
933
215
  targetField: z.ZodString;
934
- }, "strip", z.ZodTypeAny, {
935
- targetField: string;
936
- originalIdField: string;
937
- }, {
938
- targetField: string;
939
- originalIdField: string;
940
- }>>;
216
+ }, z.core.$strip>>;
941
217
  attributeMappings: z.ZodArray<z.ZodObject<{
942
218
  oldKey: z.ZodOptional<z.ZodString>;
943
- oldKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
219
+ oldKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
944
220
  targetKey: z.ZodString;
945
221
  valueToSet: z.ZodOptional<z.ZodAny>;
946
222
  fileData: z.ZodOptional<z.ZodObject<{
947
223
  name: z.ZodString;
948
224
  path: z.ZodString;
949
- }, "strip", z.ZodTypeAny, {
950
- path: string;
951
- name: string;
952
- }, {
953
- path: string;
954
- name: string;
955
- }>>;
956
- converters: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
225
+ }, z.core.$strip>>;
226
+ converters: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
957
227
  validationActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
958
228
  action: z.ZodString;
959
- params: z.ZodArray<z.ZodString, "many">;
960
- }, "strip", z.ZodTypeAny, {
961
- params: string[];
962
- action: string;
963
- }, {
964
- params: string[];
965
- action: string;
966
- }>, "many">>>;
229
+ params: z.ZodArray<z.ZodString>;
230
+ }, z.core.$strip>>>>;
967
231
  postImportActions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
968
232
  action: z.ZodString;
969
- params: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
970
- }, "strip", z.ZodTypeAny, {
971
- params: (string | Record<string, any>)[];
972
- action: string;
973
- }, {
974
- params: (string | Record<string, any>)[];
975
- action: string;
976
- }>, "many">>>;
977
- }, "strip", z.ZodTypeAny, {
978
- targetKey: string;
979
- oldKey?: string | undefined;
980
- oldKeys?: string[] | undefined;
981
- valueToSet?: any;
982
- fileData?: {
983
- path: string;
984
- name: string;
985
- } | undefined;
986
- converters?: string[] | undefined;
987
- validationActions?: {
988
- params: string[];
989
- action: string;
990
- }[] | undefined;
991
- postImportActions?: {
992
- params: (string | Record<string, any>)[];
993
- action: string;
994
- }[] | undefined;
995
- }, {
996
- targetKey: string;
997
- oldKey?: string | undefined;
998
- oldKeys?: string[] | undefined;
999
- valueToSet?: any;
1000
- fileData?: {
1001
- path: string;
1002
- name: string;
1003
- } | undefined;
1004
- converters?: string[] | undefined;
1005
- validationActions?: {
1006
- params: string[];
1007
- action: string;
1008
- }[] | undefined;
1009
- postImportActions?: {
1010
- params: (string | Record<string, any>)[];
1011
- action: string;
1012
- }[] | undefined;
1013
- }>, "many">;
1014
- }, "strip", z.ZodTypeAny, {
1015
- filePath: string;
1016
- primaryKeyField: string;
1017
- attributeMappings: {
1018
- targetKey: string;
1019
- oldKey?: string | undefined;
1020
- oldKeys?: string[] | undefined;
1021
- valueToSet?: any;
1022
- fileData?: {
1023
- path: string;
1024
- name: string;
1025
- } | undefined;
1026
- converters?: string[] | undefined;
1027
- validationActions?: {
1028
- params: string[];
1029
- action: string;
1030
- }[] | undefined;
1031
- postImportActions?: {
1032
- params: (string | Record<string, any>)[];
1033
- action: string;
1034
- }[] | undefined;
1035
- }[];
1036
- type?: "create" | "update" | undefined;
1037
- basePath?: string | undefined;
1038
- idMappings?: {
1039
- sourceField: string;
1040
- targetField: string;
1041
- targetCollection: string;
1042
- fieldToSet?: string | undefined;
1043
- targetFieldToMatch?: string | undefined;
1044
- }[] | undefined;
1045
- createUsers?: boolean | null | undefined;
1046
- updateMapping?: {
1047
- targetField: string;
1048
- originalIdField: string;
1049
- } | undefined;
1050
- }, {
1051
- filePath: string;
1052
- attributeMappings: {
1053
- targetKey: string;
1054
- oldKey?: string | undefined;
1055
- oldKeys?: string[] | undefined;
1056
- valueToSet?: any;
1057
- fileData?: {
1058
- path: string;
1059
- name: string;
1060
- } | undefined;
1061
- converters?: string[] | undefined;
1062
- validationActions?: {
1063
- params: string[];
1064
- action: string;
1065
- }[] | undefined;
1066
- postImportActions?: {
1067
- params: (string | Record<string, any>)[];
1068
- action: string;
1069
- }[] | undefined;
1070
- }[];
1071
- type?: "create" | "update" | undefined;
1072
- basePath?: string | undefined;
1073
- primaryKeyField?: string | undefined;
1074
- idMappings?: {
1075
- sourceField: string;
1076
- targetField: string;
1077
- targetCollection: string;
1078
- fieldToSet?: string | undefined;
1079
- targetFieldToMatch?: string | undefined;
1080
- }[] | undefined;
1081
- createUsers?: boolean | null | undefined;
1082
- updateMapping?: {
1083
- targetField: string;
1084
- originalIdField: string;
1085
- } | undefined;
1086
- }>>;
1087
- }, "strip", z.ZodTypeAny, {
1088
- rawData?: any;
1089
- finalData?: any;
1090
- context?: any;
1091
- importDef?: {
1092
- filePath: string;
1093
- primaryKeyField: string;
1094
- attributeMappings: {
1095
- targetKey: string;
1096
- oldKey?: string | undefined;
1097
- oldKeys?: string[] | undefined;
1098
- valueToSet?: any;
1099
- fileData?: {
1100
- path: string;
1101
- name: string;
1102
- } | undefined;
1103
- converters?: string[] | undefined;
1104
- validationActions?: {
1105
- params: string[];
1106
- action: string;
1107
- }[] | undefined;
1108
- postImportActions?: {
1109
- params: (string | Record<string, any>)[];
1110
- action: string;
1111
- }[] | undefined;
1112
- }[];
1113
- type?: "create" | "update" | undefined;
1114
- basePath?: string | undefined;
1115
- idMappings?: {
1116
- sourceField: string;
1117
- targetField: string;
1118
- targetCollection: string;
1119
- fieldToSet?: string | undefined;
1120
- targetFieldToMatch?: string | undefined;
1121
- }[] | undefined;
1122
- createUsers?: boolean | null | undefined;
1123
- updateMapping?: {
1124
- targetField: string;
1125
- originalIdField: string;
1126
- } | undefined;
1127
- } | undefined;
1128
- }, {
1129
- rawData?: any;
1130
- finalData?: any;
1131
- context?: any;
1132
- importDef?: {
1133
- filePath: string;
1134
- attributeMappings: {
1135
- targetKey: string;
1136
- oldKey?: string | undefined;
1137
- oldKeys?: string[] | undefined;
1138
- valueToSet?: any;
1139
- fileData?: {
1140
- path: string;
1141
- name: string;
1142
- } | undefined;
1143
- converters?: string[] | undefined;
1144
- validationActions?: {
1145
- params: string[];
1146
- action: string;
1147
- }[] | undefined;
1148
- postImportActions?: {
1149
- params: (string | Record<string, any>)[];
1150
- action: string;
1151
- }[] | undefined;
1152
- }[];
1153
- type?: "create" | "update" | undefined;
1154
- basePath?: string | undefined;
1155
- primaryKeyField?: string | undefined;
1156
- idMappings?: {
1157
- sourceField: string;
1158
- targetField: string;
1159
- targetCollection: string;
1160
- fieldToSet?: string | undefined;
1161
- targetFieldToMatch?: string | undefined;
1162
- }[] | undefined;
1163
- createUsers?: boolean | null | undefined;
1164
- updateMapping?: {
1165
- targetField: string;
1166
- originalIdField: string;
1167
- } | undefined;
1168
- } | undefined;
1169
- }>, "many">;
1170
- }, "strip", z.ZodTypeAny, {
1171
- data: {
1172
- rawData?: any;
1173
- finalData?: any;
1174
- context?: any;
1175
- importDef?: {
1176
- filePath: string;
1177
- primaryKeyField: string;
1178
- attributeMappings: {
1179
- targetKey: string;
1180
- oldKey?: string | undefined;
1181
- oldKeys?: string[] | undefined;
1182
- valueToSet?: any;
1183
- fileData?: {
1184
- path: string;
1185
- name: string;
1186
- } | undefined;
1187
- converters?: string[] | undefined;
1188
- validationActions?: {
1189
- params: string[];
1190
- action: string;
1191
- }[] | undefined;
1192
- postImportActions?: {
1193
- params: (string | Record<string, any>)[];
1194
- action: string;
1195
- }[] | undefined;
1196
- }[];
1197
- type?: "create" | "update" | undefined;
1198
- basePath?: string | undefined;
1199
- idMappings?: {
1200
- sourceField: string;
1201
- targetField: string;
1202
- targetCollection: string;
1203
- fieldToSet?: string | undefined;
1204
- targetFieldToMatch?: string | undefined;
1205
- }[] | undefined;
1206
- createUsers?: boolean | null | undefined;
1207
- updateMapping?: {
1208
- targetField: string;
1209
- originalIdField: string;
1210
- } | undefined;
1211
- } | undefined;
1212
- }[];
1213
- collection?: {
1214
- name: string;
1215
- attributes: ({
1216
- type: "string";
1217
- key: string;
1218
- size: number;
1219
- format?: string | null | undefined;
1220
- description?: string | Record<string, string> | undefined;
1221
- required?: boolean | undefined;
1222
- array?: boolean | undefined;
1223
- error?: string | undefined;
1224
- xdefault?: string | null | undefined;
1225
- encrypted?: boolean | undefined;
1226
- } | {
1227
- type: "integer";
1228
- key: string;
1229
- description?: string | Record<string, string> | null | undefined;
1230
- required?: boolean | undefined;
1231
- array?: boolean | undefined;
1232
- error?: string | undefined;
1233
- xdefault?: number | null | undefined;
1234
- min?: number | undefined;
1235
- max?: number | undefined;
1236
- } | {
1237
- type: "double";
1238
- key: string;
1239
- description?: string | Record<string, string> | null | undefined;
1240
- required?: boolean | undefined;
1241
- array?: boolean | undefined;
1242
- error?: string | undefined;
1243
- xdefault?: number | null | undefined;
1244
- min?: number | undefined;
1245
- max?: number | undefined;
1246
- } | {
1247
- type: "float";
1248
- key: string;
1249
- description?: string | Record<string, string> | null | undefined;
1250
- required?: boolean | undefined;
1251
- array?: boolean | undefined;
1252
- error?: string | undefined;
1253
- xdefault?: number | null | undefined;
1254
- min?: number | undefined;
1255
- max?: number | undefined;
1256
- } | {
1257
- type: "boolean";
1258
- key: string;
1259
- description?: string | Record<string, string> | null | undefined;
1260
- required?: boolean | undefined;
1261
- array?: boolean | undefined;
1262
- error?: string | undefined;
1263
- xdefault?: boolean | null | undefined;
1264
- } | {
1265
- type: "datetime";
1266
- key: string;
1267
- description?: string | Record<string, string> | null | undefined;
1268
- required?: boolean | undefined;
1269
- array?: boolean | undefined;
1270
- error?: string | undefined;
1271
- xdefault?: string | null | undefined;
1272
- } | {
1273
- type: "email";
1274
- key: string;
1275
- description?: string | Record<string, string> | null | undefined;
1276
- required?: boolean | undefined;
1277
- array?: boolean | undefined;
1278
- error?: string | undefined;
1279
- xdefault?: string | null | undefined;
1280
- } | {
1281
- type: "ip";
1282
- key: string;
1283
- description?: string | Record<string, string> | null | undefined;
1284
- required?: boolean | undefined;
1285
- array?: boolean | undefined;
1286
- error?: string | undefined;
1287
- xdefault?: string | null | undefined;
1288
- } | {
1289
- type: "url";
1290
- key: string;
1291
- description?: string | Record<string, string> | null | undefined;
1292
- required?: boolean | undefined;
1293
- array?: boolean | undefined;
1294
- error?: string | undefined;
1295
- xdefault?: string | null | undefined;
1296
- } | {
1297
- type: "enum";
1298
- key: string;
1299
- elements: string[];
1300
- description?: string | Record<string, string> | null | undefined;
1301
- required?: boolean | undefined;
1302
- array?: boolean | undefined;
1303
- error?: string | undefined;
1304
- xdefault?: string | null | undefined;
1305
- } | {
1306
- type: "relationship";
1307
- key: string;
1308
- relatedCollection: string;
1309
- relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
1310
- twoWay: boolean;
1311
- twoWayKey: string;
1312
- onDelete: "setNull" | "cascade" | "restrict";
1313
- side: "parent" | "child";
1314
- description?: string | Record<string, string> | null | undefined;
1315
- required?: boolean | undefined;
1316
- array?: boolean | undefined;
1317
- error?: string | undefined;
1318
- importMapping?: {
1319
- originalIdField: string;
1320
- targetField?: string | undefined;
1321
- } | undefined;
1322
- })[];
1323
- $permissions: {
1324
- permission: string;
1325
- target: string;
1326
- }[];
1327
- indexes: {
1328
- type: "key" | "unique" | "fulltext";
1329
- key: string;
1330
- attributes: string[];
1331
- status?: string | undefined;
1332
- error?: string | undefined;
1333
- orders?: string[] | undefined;
1334
- }[];
1335
- importDefs: {
1336
- filePath: string;
1337
- primaryKeyField: string;
1338
- attributeMappings: {
1339
- targetKey: string;
1340
- oldKey?: string | undefined;
1341
- oldKeys?: string[] | undefined;
1342
- valueToSet?: any;
1343
- fileData?: {
1344
- path: string;
1345
- name: string;
1346
- } | undefined;
1347
- converters?: string[] | undefined;
1348
- validationActions?: {
1349
- params: string[];
1350
- action: string;
1351
- }[] | undefined;
1352
- postImportActions?: {
1353
- params: (string | Record<string, any>)[];
1354
- action: string;
1355
- }[] | undefined;
1356
- }[];
1357
- type?: "create" | "update" | undefined;
1358
- basePath?: string | undefined;
1359
- idMappings?: {
1360
- sourceField: string;
1361
- targetField: string;
1362
- targetCollection: string;
1363
- fieldToSet?: string | undefined;
1364
- targetFieldToMatch?: string | undefined;
1365
- }[] | undefined;
1366
- createUsers?: boolean | null | undefined;
1367
- updateMapping?: {
1368
- targetField: string;
1369
- originalIdField: string;
1370
- } | undefined;
1371
- }[];
1372
- description?: string | undefined;
1373
- $id?: string | undefined;
1374
- enabled?: boolean | undefined;
1375
- documentSecurity?: boolean | undefined;
1376
- databaseId?: string | undefined;
1377
- } | undefined;
1378
- }, {
1379
- data: {
1380
- rawData?: any;
1381
- finalData?: any;
1382
- context?: any;
1383
- importDef?: {
1384
- filePath: string;
1385
- attributeMappings: {
1386
- targetKey: string;
1387
- oldKey?: string | undefined;
1388
- oldKeys?: string[] | undefined;
1389
- valueToSet?: any;
1390
- fileData?: {
1391
- path: string;
1392
- name: string;
1393
- } | undefined;
1394
- converters?: string[] | undefined;
1395
- validationActions?: {
1396
- params: string[];
1397
- action: string;
1398
- }[] | undefined;
1399
- postImportActions?: {
1400
- params: (string | Record<string, any>)[];
1401
- action: string;
1402
- }[] | undefined;
1403
- }[];
1404
- type?: "create" | "update" | undefined;
1405
- basePath?: string | undefined;
1406
- primaryKeyField?: string | undefined;
1407
- idMappings?: {
1408
- sourceField: string;
1409
- targetField: string;
1410
- targetCollection: string;
1411
- fieldToSet?: string | undefined;
1412
- targetFieldToMatch?: string | undefined;
1413
- }[] | undefined;
1414
- createUsers?: boolean | null | undefined;
1415
- updateMapping?: {
1416
- targetField: string;
1417
- originalIdField: string;
1418
- } | undefined;
1419
- } | undefined;
1420
- }[];
1421
- collection?: {
1422
- name: string;
1423
- description?: string | undefined;
1424
- attributes?: ({
1425
- key: string;
1426
- type?: "string" | undefined;
1427
- format?: string | null | undefined;
1428
- description?: string | Record<string, string> | undefined;
1429
- required?: boolean | undefined;
1430
- array?: boolean | undefined;
1431
- error?: string | undefined;
1432
- size?: number | undefined;
1433
- xdefault?: string | null | undefined;
1434
- encrypted?: boolean | undefined;
1435
- } | {
1436
- key: string;
1437
- type?: "integer" | undefined;
1438
- description?: string | Record<string, string> | null | undefined;
1439
- required?: boolean | undefined;
1440
- array?: boolean | undefined;
1441
- error?: string | undefined;
1442
- xdefault?: number | null | undefined;
1443
- min?: number | undefined;
1444
- max?: number | undefined;
1445
- } | {
1446
- key: string;
1447
- type?: "double" | undefined;
1448
- description?: string | Record<string, string> | null | undefined;
1449
- required?: boolean | undefined;
1450
- array?: boolean | undefined;
1451
- error?: string | undefined;
1452
- xdefault?: number | null | undefined;
1453
- min?: number | undefined;
1454
- max?: number | undefined;
1455
- } | {
1456
- key: string;
1457
- type?: "float" | undefined;
1458
- description?: string | Record<string, string> | null | undefined;
1459
- required?: boolean | undefined;
1460
- array?: boolean | undefined;
1461
- error?: string | undefined;
1462
- xdefault?: number | null | undefined;
1463
- min?: number | undefined;
1464
- max?: number | undefined;
1465
- } | {
1466
- key: string;
1467
- type?: "boolean" | undefined;
1468
- description?: string | Record<string, string> | null | undefined;
1469
- required?: boolean | undefined;
1470
- array?: boolean | undefined;
1471
- error?: string | undefined;
1472
- xdefault?: boolean | null | undefined;
1473
- } | {
1474
- key: string;
1475
- type?: "datetime" | undefined;
1476
- description?: string | Record<string, string> | null | undefined;
1477
- required?: boolean | undefined;
1478
- array?: boolean | undefined;
1479
- error?: string | undefined;
1480
- xdefault?: string | null | undefined;
1481
- } | {
1482
- key: string;
1483
- type?: "email" | undefined;
1484
- description?: string | Record<string, string> | null | undefined;
1485
- required?: boolean | undefined;
1486
- array?: boolean | undefined;
1487
- error?: string | undefined;
1488
- xdefault?: string | null | undefined;
1489
- } | {
1490
- type: "ip";
1491
- key: string;
1492
- description?: string | Record<string, string> | null | undefined;
1493
- required?: boolean | undefined;
1494
- array?: boolean | undefined;
1495
- error?: string | undefined;
1496
- xdefault?: string | null | undefined;
1497
- } | {
1498
- key: string;
1499
- type?: "url" | undefined;
1500
- description?: string | Record<string, string> | null | undefined;
1501
- required?: boolean | undefined;
1502
- array?: boolean | undefined;
1503
- error?: string | undefined;
1504
- xdefault?: string | null | undefined;
1505
- } | {
1506
- key: string;
1507
- type?: "enum" | undefined;
1508
- description?: string | Record<string, string> | null | undefined;
1509
- required?: boolean | undefined;
1510
- array?: boolean | undefined;
1511
- error?: string | undefined;
1512
- xdefault?: string | null | undefined;
1513
- elements?: string[] | undefined;
1514
- } | {
1515
- key: string;
1516
- relatedCollection: string;
1517
- relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
1518
- twoWay: boolean;
1519
- twoWayKey: string;
1520
- side: "parent" | "child";
1521
- type?: "relationship" | undefined;
1522
- description?: string | Record<string, string> | null | undefined;
1523
- required?: boolean | undefined;
1524
- array?: boolean | undefined;
1525
- error?: string | undefined;
1526
- onDelete?: "setNull" | "cascade" | "restrict" | undefined;
1527
- importMapping?: {
1528
- originalIdField: string;
1529
- targetField?: string | undefined;
1530
- } | undefined;
1531
- })[] | undefined;
1532
- $id?: string | undefined;
1533
- enabled?: boolean | undefined;
1534
- documentSecurity?: boolean | undefined;
1535
- $permissions?: {
1536
- permission: string;
1537
- target: string;
1538
- }[] | undefined;
1539
- indexes?: {
1540
- key: string;
1541
- attributes: string[];
1542
- type?: "key" | "unique" | "fulltext" | undefined;
1543
- status?: string | undefined;
1544
- error?: string | undefined;
1545
- orders?: string[] | undefined;
1546
- }[] | undefined;
1547
- importDefs?: {
1548
- filePath: string;
1549
- attributeMappings: {
1550
- targetKey: string;
1551
- oldKey?: string | undefined;
1552
- oldKeys?: string[] | undefined;
1553
- valueToSet?: any;
1554
- fileData?: {
1555
- path: string;
1556
- name: string;
1557
- } | undefined;
1558
- converters?: string[] | undefined;
1559
- validationActions?: {
1560
- params: string[];
1561
- action: string;
1562
- }[] | undefined;
1563
- postImportActions?: {
1564
- params: (string | Record<string, any>)[];
1565
- action: string;
1566
- }[] | undefined;
1567
- }[];
1568
- type?: "create" | "update" | undefined;
1569
- basePath?: string | undefined;
1570
- primaryKeyField?: string | undefined;
1571
- idMappings?: {
1572
- sourceField: string;
1573
- targetField: string;
1574
- targetCollection: string;
1575
- fieldToSet?: string | undefined;
1576
- targetFieldToMatch?: string | undefined;
1577
- }[] | undefined;
1578
- createUsers?: boolean | null | undefined;
1579
- updateMapping?: {
1580
- targetField: string;
1581
- originalIdField: string;
1582
- } | undefined;
1583
- }[] | undefined;
1584
- databaseId?: string | undefined;
1585
- } | undefined;
1586
- }>;
233
+ params: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
234
+ }, z.core.$strip>>>>;
235
+ }, z.core.$strip>>;
236
+ }, z.core.$strip>>;
237
+ }, z.core.$strip>>;
238
+ }, z.core.$strip>;
1587
239
  export type CollectionImportData = z.infer<typeof CollectionImportDataSchema>;
1588
240
  export declare class DataLoader {
1589
241
  private appwriteFolderPath;
@@ -1593,9 +245,9 @@ export declare class DataLoader {
1593
245
  private config;
1594
246
  importMap: Map<string, {
1595
247
  data: {
1596
- rawData?: any;
1597
- finalData?: any;
1598
- context?: any;
248
+ rawData: any;
249
+ finalData: any;
250
+ context: any;
1599
251
  importDef?: {
1600
252
  filePath: string;
1601
253
  primaryKeyField: string;
@@ -1605,17 +257,17 @@ export declare class DataLoader {
1605
257
  oldKeys?: string[] | undefined;
1606
258
  valueToSet?: any;
1607
259
  fileData?: {
1608
- path: string;
1609
260
  name: string;
261
+ path: string;
1610
262
  } | undefined;
1611
263
  converters?: string[] | undefined;
1612
264
  validationActions?: {
1613
- params: string[];
1614
265
  action: string;
266
+ params: string[];
1615
267
  }[] | undefined;
1616
268
  postImportActions?: {
1617
- params: (string | Record<string, any>)[];
1618
269
  action: string;
270
+ params: (string | Record<string, any>)[];
1619
271
  }[] | undefined;
1620
272
  }[];
1621
273
  type?: "create" | "update" | undefined;
@@ -1629,116 +281,105 @@ export declare class DataLoader {
1629
281
  }[] | undefined;
1630
282
  createUsers?: boolean | null | undefined;
1631
283
  updateMapping?: {
1632
- targetField: string;
1633
284
  originalIdField: string;
285
+ targetField: string;
1634
286
  } | undefined;
1635
287
  } | undefined;
1636
288
  }[];
1637
289
  collection?: {
1638
290
  name: string;
1639
291
  attributes: ({
1640
- type: "string";
1641
292
  key: string;
293
+ type: "string";
1642
294
  size: number;
1643
- format?: string | null | undefined;
1644
- description?: string | Record<string, string> | undefined;
295
+ error?: string | undefined;
1645
296
  required?: boolean | undefined;
1646
297
  array?: boolean | undefined;
1647
- error?: string | undefined;
1648
298
  xdefault?: string | null | undefined;
1649
299
  encrypted?: boolean | undefined;
300
+ format?: string | null | undefined;
1650
301
  } | {
1651
- type: "integer";
1652
302
  key: string;
1653
- description?: string | Record<string, string> | null | undefined;
303
+ type: "integer";
304
+ error?: string | undefined;
1654
305
  required?: boolean | undefined;
1655
306
  array?: boolean | undefined;
1656
- error?: string | undefined;
1657
- xdefault?: number | null | undefined;
1658
307
  min?: number | undefined;
1659
308
  max?: number | undefined;
309
+ xdefault?: number | null | undefined;
1660
310
  } | {
1661
- type: "double";
1662
311
  key: string;
1663
- description?: string | Record<string, string> | null | undefined;
312
+ type: "double";
313
+ error?: string | undefined;
1664
314
  required?: boolean | undefined;
1665
315
  array?: boolean | undefined;
1666
- error?: string | undefined;
1667
- xdefault?: number | null | undefined;
1668
316
  min?: number | undefined;
1669
317
  max?: number | undefined;
318
+ xdefault?: number | null | undefined;
1670
319
  } | {
1671
- type: "float";
1672
320
  key: string;
1673
- description?: string | Record<string, string> | null | undefined;
321
+ type: "float";
322
+ error?: string | undefined;
1674
323
  required?: boolean | undefined;
1675
324
  array?: boolean | undefined;
1676
- error?: string | undefined;
1677
- xdefault?: number | null | undefined;
1678
325
  min?: number | undefined;
1679
326
  max?: number | undefined;
327
+ xdefault?: number | null | undefined;
1680
328
  } | {
1681
- type: "boolean";
1682
329
  key: string;
1683
- description?: string | Record<string, string> | null | undefined;
330
+ type: "boolean";
331
+ error?: string | undefined;
1684
332
  required?: boolean | undefined;
1685
333
  array?: boolean | undefined;
1686
- error?: string | undefined;
1687
334
  xdefault?: boolean | null | undefined;
1688
335
  } | {
1689
- type: "datetime";
1690
336
  key: string;
1691
- description?: string | Record<string, string> | null | undefined;
337
+ type: "datetime";
338
+ error?: string | undefined;
1692
339
  required?: boolean | undefined;
1693
340
  array?: boolean | undefined;
1694
- error?: string | undefined;
1695
341
  xdefault?: string | null | undefined;
1696
342
  } | {
1697
- type: "email";
1698
343
  key: string;
1699
- description?: string | Record<string, string> | null | undefined;
344
+ type: "email";
345
+ error?: string | undefined;
1700
346
  required?: boolean | undefined;
1701
347
  array?: boolean | undefined;
1702
- error?: string | undefined;
1703
348
  xdefault?: string | null | undefined;
1704
349
  } | {
1705
- type: "ip";
1706
350
  key: string;
1707
- description?: string | Record<string, string> | null | undefined;
351
+ type: "ip";
352
+ error?: string | undefined;
1708
353
  required?: boolean | undefined;
1709
354
  array?: boolean | undefined;
1710
- error?: string | undefined;
1711
355
  xdefault?: string | null | undefined;
1712
356
  } | {
1713
- type: "url";
1714
357
  key: string;
1715
- description?: string | Record<string, string> | null | undefined;
358
+ type: "url";
359
+ error?: string | undefined;
1716
360
  required?: boolean | undefined;
1717
361
  array?: boolean | undefined;
1718
- error?: string | undefined;
1719
362
  xdefault?: string | null | undefined;
1720
363
  } | {
1721
- type: "enum";
1722
364
  key: string;
365
+ type: "enum";
1723
366
  elements: string[];
1724
- description?: string | Record<string, string> | null | undefined;
367
+ error?: string | undefined;
1725
368
  required?: boolean | undefined;
1726
369
  array?: boolean | undefined;
1727
- error?: string | undefined;
1728
370
  xdefault?: string | null | undefined;
1729
371
  } | {
1730
- type: "relationship";
1731
372
  key: string;
373
+ type: "relationship";
1732
374
  relatedCollection: string;
1733
375
  relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
1734
376
  twoWay: boolean;
1735
377
  twoWayKey: string;
1736
378
  onDelete: "setNull" | "cascade" | "restrict";
1737
379
  side: "parent" | "child";
1738
- description?: string | Record<string, string> | null | undefined;
380
+ error?: string | undefined;
1739
381
  required?: boolean | undefined;
1740
382
  array?: boolean | undefined;
1741
- error?: string | undefined;
1742
383
  importMapping?: {
1743
384
  originalIdField: string;
1744
385
  targetField?: string | undefined;
@@ -1749,8 +390,8 @@ export declare class DataLoader {
1749
390
  target: string;
1750
391
  }[];
1751
392
  indexes: {
1752
- type: "key" | "unique" | "fulltext";
1753
393
  key: string;
394
+ type: "key" | "unique" | "fulltext";
1754
395
  attributes: string[];
1755
396
  status?: string | undefined;
1756
397
  error?: string | undefined;
@@ -1765,17 +406,17 @@ export declare class DataLoader {
1765
406
  oldKeys?: string[] | undefined;
1766
407
  valueToSet?: any;
1767
408
  fileData?: {
1768
- path: string;
1769
409
  name: string;
410
+ path: string;
1770
411
  } | undefined;
1771
412
  converters?: string[] | undefined;
1772
413
  validationActions?: {
1773
- params: string[];
1774
414
  action: string;
415
+ params: string[];
1775
416
  }[] | undefined;
1776
417
  postImportActions?: {
1777
- params: (string | Record<string, any>)[];
1778
418
  action: string;
419
+ params: (string | Record<string, any>)[];
1779
420
  }[] | undefined;
1780
421
  }[];
1781
422
  type?: "create" | "update" | undefined;
@@ -1789,11 +430,10 @@ export declare class DataLoader {
1789
430
  }[] | undefined;
1790
431
  createUsers?: boolean | null | undefined;
1791
432
  updateMapping?: {
1792
- targetField: string;
1793
433
  originalIdField: string;
434
+ targetField: string;
1794
435
  } | undefined;
1795
436
  }[];
1796
- description?: string | undefined;
1797
437
  $id?: string | undefined;
1798
438
  enabled?: boolean | undefined;
1799
439
  documentSecurity?: boolean | undefined;
@@ -1921,17 +561,17 @@ export declare class DataLoader {
1921
561
  oldKeys?: string[] | undefined;
1922
562
  valueToSet?: any;
1923
563
  fileData?: {
1924
- path: string;
1925
564
  name: string;
565
+ path: string;
1926
566
  } | undefined;
1927
567
  converters?: string[] | undefined;
1928
568
  validationActions?: {
1929
- params: string[];
1930
569
  action: string;
570
+ params: string[];
1931
571
  }[] | undefined;
1932
572
  postImportActions?: {
1933
- params: (string | Record<string, any>)[];
1934
573
  action: string;
574
+ params: (string | Record<string, any>)[];
1935
575
  }[] | undefined;
1936
576
  } | {
1937
577
  postImportActions: {
@@ -1943,13 +583,13 @@ export declare class DataLoader {
1943
583
  oldKeys?: string[] | undefined;
1944
584
  valueToSet?: any;
1945
585
  fileData?: {
1946
- path: string;
1947
586
  name: string;
587
+ path: string;
1948
588
  } | undefined;
1949
589
  converters?: string[] | undefined;
1950
590
  validationActions?: {
1951
- params: string[];
1952
591
  action: string;
592
+ params: string[];
1953
593
  }[] | undefined;
1954
594
  })[];
1955
595
  }