appwrite-utils-cli 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +74 -0
- package/dist/migrations/afterImportActions.d.ts +12 -0
- package/dist/migrations/afterImportActions.js +196 -0
- package/dist/migrations/attributes.d.ts +4 -0
- package/dist/migrations/attributes.js +158 -0
- package/dist/migrations/backup.d.ts +621 -0
- package/dist/migrations/backup.js +159 -0
- package/dist/migrations/collections.d.ts +16 -0
- package/dist/migrations/collections.js +207 -0
- package/dist/migrations/converters.d.ts +179 -0
- package/dist/migrations/converters.js +575 -0
- package/dist/migrations/dbHelpers.d.ts +5 -0
- package/dist/migrations/dbHelpers.js +54 -0
- package/dist/migrations/importController.d.ts +44 -0
- package/dist/migrations/importController.js +312 -0
- package/dist/migrations/importDataActions.d.ts +44 -0
- package/dist/migrations/importDataActions.js +219 -0
- package/dist/migrations/indexes.d.ts +4 -0
- package/dist/migrations/indexes.js +18 -0
- package/dist/migrations/logging.d.ts +2 -0
- package/dist/migrations/logging.js +14 -0
- package/dist/migrations/migrationHelper.d.ts +18 -0
- package/dist/migrations/migrationHelper.js +66 -0
- package/dist/migrations/queue.d.ts +13 -0
- package/dist/migrations/queue.js +79 -0
- package/dist/migrations/relationships.d.ts +90 -0
- package/dist/migrations/relationships.js +209 -0
- package/dist/migrations/schema.d.ts +3142 -0
- package/dist/migrations/schema.js +485 -0
- package/dist/migrations/schemaStrings.d.ts +12 -0
- package/dist/migrations/schemaStrings.js +261 -0
- package/dist/migrations/setupDatabase.d.ts +7 -0
- package/dist/migrations/setupDatabase.js +151 -0
- package/dist/migrations/storage.d.ts +8 -0
- package/dist/migrations/storage.js +241 -0
- package/dist/migrations/users.d.ts +11 -0
- package/dist/migrations/users.js +114 -0
- package/dist/migrations/validationRules.d.ts +43 -0
- package/dist/migrations/validationRules.js +42 -0
- package/dist/schemas/authUser.d.ts +62 -0
- package/dist/schemas/authUser.js +17 -0
- package/dist/setup.d.ts +2 -0
- package/dist/setup.js +5 -0
- package/dist/types.d.ts +9 -0
- package/dist/types.js +5 -0
- package/dist/utils/configSchema.json +742 -0
- package/dist/utils/helperFunctions.d.ts +34 -0
- package/dist/utils/helperFunctions.js +72 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/setupFiles.d.ts +2 -0
- package/dist/utils/setupFiles.js +276 -0
- package/dist/utilsController.d.ts +30 -0
- package/dist/utilsController.js +106 -0
- package/package.json +34 -0
- package/src/main.ts +77 -0
- package/src/migrations/afterImportActions.ts +300 -0
- package/src/migrations/attributes.ts +315 -0
- package/src/migrations/backup.ts +189 -0
- package/src/migrations/collections.ts +303 -0
- package/src/migrations/converters.ts +628 -0
- package/src/migrations/dbHelpers.ts +89 -0
- package/src/migrations/importController.ts +509 -0
- package/src/migrations/importDataActions.ts +313 -0
- package/src/migrations/indexes.ts +37 -0
- package/src/migrations/logging.ts +15 -0
- package/src/migrations/migrationHelper.ts +100 -0
- package/src/migrations/queue.ts +119 -0
- package/src/migrations/relationships.ts +336 -0
- package/src/migrations/schema.ts +590 -0
- package/src/migrations/schemaStrings.ts +310 -0
- package/src/migrations/setupDatabase.ts +219 -0
- package/src/migrations/storage.ts +351 -0
- package/src/migrations/users.ts +148 -0
- package/src/migrations/validationRules.ts +63 -0
- package/src/schemas/authUser.ts +23 -0
- package/src/setup.ts +8 -0
- package/src/types.ts +14 -0
- package/src/utils/configSchema.json +742 -0
- package/src/utils/helperFunctions.ts +111 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/setupFiles.ts +295 -0
- package/src/utilsController.ts +173 -0
- package/tsconfig.json +37 -0
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const BackupSchema: z.ZodObject<{
|
|
3
|
+
$id: z.ZodString;
|
|
4
|
+
$createdAt: z.ZodString;
|
|
5
|
+
$updatedAt: z.ZodString;
|
|
6
|
+
database: z.ZodString;
|
|
7
|
+
collections: z.ZodArray<z.ZodString, "many">;
|
|
8
|
+
documents: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
9
|
+
collectionId: z.ZodString;
|
|
10
|
+
data: z.ZodString;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
data: string;
|
|
13
|
+
collectionId: string;
|
|
14
|
+
}, {
|
|
15
|
+
data: string;
|
|
16
|
+
collectionId: string;
|
|
17
|
+
}>, "many">>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
$id: string;
|
|
20
|
+
$createdAt: string;
|
|
21
|
+
$updatedAt: string;
|
|
22
|
+
documents: {
|
|
23
|
+
data: string;
|
|
24
|
+
collectionId: string;
|
|
25
|
+
}[];
|
|
26
|
+
collections: string[];
|
|
27
|
+
database: string;
|
|
28
|
+
}, {
|
|
29
|
+
$id: string;
|
|
30
|
+
$createdAt: string;
|
|
31
|
+
$updatedAt: string;
|
|
32
|
+
collections: string[];
|
|
33
|
+
database: string;
|
|
34
|
+
documents?: {
|
|
35
|
+
data: string;
|
|
36
|
+
collectionId: string;
|
|
37
|
+
}[] | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
export type Backup = z.infer<typeof BackupSchema>;
|
|
40
|
+
export declare const BackupCreateSchema: z.ZodObject<Omit<{
|
|
41
|
+
$id: z.ZodString;
|
|
42
|
+
$createdAt: z.ZodString;
|
|
43
|
+
$updatedAt: z.ZodString;
|
|
44
|
+
database: z.ZodString;
|
|
45
|
+
collections: z.ZodArray<z.ZodString, "many">;
|
|
46
|
+
documents: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
47
|
+
collectionId: z.ZodString;
|
|
48
|
+
data: z.ZodString;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
data: string;
|
|
51
|
+
collectionId: string;
|
|
52
|
+
}, {
|
|
53
|
+
data: string;
|
|
54
|
+
collectionId: string;
|
|
55
|
+
}>, "many">>;
|
|
56
|
+
}, "$id" | "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
|
|
57
|
+
documents: {
|
|
58
|
+
data: string;
|
|
59
|
+
collectionId: string;
|
|
60
|
+
}[];
|
|
61
|
+
collections: string[];
|
|
62
|
+
database: string;
|
|
63
|
+
}, {
|
|
64
|
+
collections: string[];
|
|
65
|
+
database: string;
|
|
66
|
+
documents?: {
|
|
67
|
+
data: string;
|
|
68
|
+
collectionId: string;
|
|
69
|
+
}[] | undefined;
|
|
70
|
+
}>;
|
|
71
|
+
export type BackupCreate = z.infer<typeof BackupCreateSchema>;
|
|
72
|
+
export declare const BatchSchema: z.ZodObject<{
|
|
73
|
+
$id: z.ZodString;
|
|
74
|
+
$createdAt: z.ZodString;
|
|
75
|
+
$updatedAt: z.ZodString;
|
|
76
|
+
data: z.ZodString;
|
|
77
|
+
processed: z.ZodDefault<z.ZodBoolean>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
data: string;
|
|
80
|
+
$id: string;
|
|
81
|
+
$createdAt: string;
|
|
82
|
+
$updatedAt: string;
|
|
83
|
+
processed: boolean;
|
|
84
|
+
}, {
|
|
85
|
+
data: string;
|
|
86
|
+
$id: string;
|
|
87
|
+
$createdAt: string;
|
|
88
|
+
$updatedAt: string;
|
|
89
|
+
processed?: boolean | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
export type Batch = z.infer<typeof BatchSchema>;
|
|
92
|
+
export declare const BatchCreateSchema: z.ZodObject<Omit<{
|
|
93
|
+
$id: z.ZodString;
|
|
94
|
+
$createdAt: z.ZodString;
|
|
95
|
+
$updatedAt: z.ZodString;
|
|
96
|
+
data: z.ZodString;
|
|
97
|
+
processed: z.ZodDefault<z.ZodBoolean>;
|
|
98
|
+
}, "$id" | "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
|
|
99
|
+
data: string;
|
|
100
|
+
processed: boolean;
|
|
101
|
+
}, {
|
|
102
|
+
data: string;
|
|
103
|
+
processed?: boolean | undefined;
|
|
104
|
+
}>;
|
|
105
|
+
export type BatchCreate = z.infer<typeof BatchCreateSchema>;
|
|
106
|
+
export declare const OperationSchema: z.ZodObject<{
|
|
107
|
+
$id: z.ZodString;
|
|
108
|
+
$createdAt: z.ZodString;
|
|
109
|
+
$updatedAt: z.ZodString;
|
|
110
|
+
operationType: z.ZodString;
|
|
111
|
+
collectionId: z.ZodString;
|
|
112
|
+
data: z.ZodAny;
|
|
113
|
+
batches: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
114
|
+
progress: z.ZodNumber;
|
|
115
|
+
total: z.ZodNumber;
|
|
116
|
+
error: z.ZodString;
|
|
117
|
+
status: z.ZodEnum<["pending", "in_progress", "completed", "error"]>;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
error: string;
|
|
120
|
+
status: "error" | "pending" | "in_progress" | "completed";
|
|
121
|
+
$id: string;
|
|
122
|
+
$createdAt: string;
|
|
123
|
+
$updatedAt: string;
|
|
124
|
+
collectionId: string;
|
|
125
|
+
operationType: string;
|
|
126
|
+
progress: number;
|
|
127
|
+
total: number;
|
|
128
|
+
data?: any;
|
|
129
|
+
batches?: string[] | undefined;
|
|
130
|
+
}, {
|
|
131
|
+
error: string;
|
|
132
|
+
status: "error" | "pending" | "in_progress" | "completed";
|
|
133
|
+
$id: string;
|
|
134
|
+
$createdAt: string;
|
|
135
|
+
$updatedAt: string;
|
|
136
|
+
collectionId: string;
|
|
137
|
+
operationType: string;
|
|
138
|
+
progress: number;
|
|
139
|
+
total: number;
|
|
140
|
+
data?: any;
|
|
141
|
+
batches?: string[] | undefined;
|
|
142
|
+
}>;
|
|
143
|
+
export type Operation = z.infer<typeof OperationSchema>;
|
|
144
|
+
export declare const OperationCreateSchema: z.ZodObject<Omit<{
|
|
145
|
+
$id: z.ZodString;
|
|
146
|
+
$createdAt: z.ZodString;
|
|
147
|
+
$updatedAt: z.ZodString;
|
|
148
|
+
operationType: z.ZodString;
|
|
149
|
+
collectionId: z.ZodString;
|
|
150
|
+
data: z.ZodAny;
|
|
151
|
+
batches: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
152
|
+
progress: z.ZodNumber;
|
|
153
|
+
total: z.ZodNumber;
|
|
154
|
+
error: z.ZodString;
|
|
155
|
+
status: z.ZodEnum<["pending", "in_progress", "completed", "error"]>;
|
|
156
|
+
}, "$id" | "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
|
|
157
|
+
error: string;
|
|
158
|
+
status: "error" | "pending" | "in_progress" | "completed";
|
|
159
|
+
collectionId: string;
|
|
160
|
+
operationType: string;
|
|
161
|
+
progress: number;
|
|
162
|
+
total: number;
|
|
163
|
+
data?: any;
|
|
164
|
+
batches?: string[] | undefined;
|
|
165
|
+
}, {
|
|
166
|
+
error: string;
|
|
167
|
+
status: "error" | "pending" | "in_progress" | "completed";
|
|
168
|
+
collectionId: string;
|
|
169
|
+
operationType: string;
|
|
170
|
+
progress: number;
|
|
171
|
+
total: number;
|
|
172
|
+
data?: any;
|
|
173
|
+
batches?: string[] | undefined;
|
|
174
|
+
}>;
|
|
175
|
+
export type OperationCreate = z.infer<typeof OperationCreateSchema>;
|
|
176
|
+
export declare const getMigrationCollectionSchemas: () => {
|
|
177
|
+
CurrentOperations: {
|
|
178
|
+
collection: {
|
|
179
|
+
attributes: ({
|
|
180
|
+
key: string;
|
|
181
|
+
type: "string";
|
|
182
|
+
error: string;
|
|
183
|
+
required: boolean;
|
|
184
|
+
array: boolean;
|
|
185
|
+
size: number;
|
|
186
|
+
xdefault?: string | null | undefined;
|
|
187
|
+
encrypted?: boolean | undefined;
|
|
188
|
+
} | {
|
|
189
|
+
key: string;
|
|
190
|
+
type: "integer";
|
|
191
|
+
error: string;
|
|
192
|
+
required: boolean;
|
|
193
|
+
array: boolean;
|
|
194
|
+
min?: number | undefined;
|
|
195
|
+
max?: number | undefined;
|
|
196
|
+
xdefault?: number | null | undefined;
|
|
197
|
+
} | {
|
|
198
|
+
key: string;
|
|
199
|
+
type: "float";
|
|
200
|
+
error: string;
|
|
201
|
+
required: boolean;
|
|
202
|
+
array: boolean;
|
|
203
|
+
min?: number | undefined;
|
|
204
|
+
max?: number | undefined;
|
|
205
|
+
xdefault?: number | null | undefined;
|
|
206
|
+
} | {
|
|
207
|
+
key: string;
|
|
208
|
+
type: "boolean";
|
|
209
|
+
error: string;
|
|
210
|
+
required: boolean;
|
|
211
|
+
array: boolean;
|
|
212
|
+
xdefault?: boolean | null | undefined;
|
|
213
|
+
} | {
|
|
214
|
+
key: string;
|
|
215
|
+
type: "datetime";
|
|
216
|
+
error: string;
|
|
217
|
+
required: boolean;
|
|
218
|
+
array: boolean;
|
|
219
|
+
xdefault?: string | null | undefined;
|
|
220
|
+
} | {
|
|
221
|
+
key: string;
|
|
222
|
+
type: "email";
|
|
223
|
+
error: string;
|
|
224
|
+
required: boolean;
|
|
225
|
+
array: boolean;
|
|
226
|
+
xdefault?: string | null | undefined;
|
|
227
|
+
} | {
|
|
228
|
+
key: string;
|
|
229
|
+
type: "ip";
|
|
230
|
+
error: string;
|
|
231
|
+
required: boolean;
|
|
232
|
+
array: boolean;
|
|
233
|
+
xdefault?: string | null | undefined;
|
|
234
|
+
} | {
|
|
235
|
+
key: string;
|
|
236
|
+
type: "url";
|
|
237
|
+
error: string;
|
|
238
|
+
required: boolean;
|
|
239
|
+
array: boolean;
|
|
240
|
+
xdefault?: string | null | undefined;
|
|
241
|
+
} | {
|
|
242
|
+
key: string;
|
|
243
|
+
type: "enum";
|
|
244
|
+
error: string;
|
|
245
|
+
required: boolean;
|
|
246
|
+
array: boolean;
|
|
247
|
+
elements: string[];
|
|
248
|
+
xdefault?: string | null | undefined;
|
|
249
|
+
} | {
|
|
250
|
+
key: string;
|
|
251
|
+
type: "relationship";
|
|
252
|
+
error: string;
|
|
253
|
+
required: boolean;
|
|
254
|
+
relatedCollection: string;
|
|
255
|
+
relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
|
|
256
|
+
twoWay: boolean;
|
|
257
|
+
twoWayKey: string;
|
|
258
|
+
onDelete: "setNull" | "cascade" | "restrict";
|
|
259
|
+
side: "parent" | "child";
|
|
260
|
+
array?: boolean | undefined;
|
|
261
|
+
importMapping?: {
|
|
262
|
+
originalIdField: string;
|
|
263
|
+
targetField?: string | undefined;
|
|
264
|
+
} | undefined;
|
|
265
|
+
})[];
|
|
266
|
+
$id: string;
|
|
267
|
+
$permissions: {
|
|
268
|
+
permission: string;
|
|
269
|
+
target: string;
|
|
270
|
+
}[];
|
|
271
|
+
name: string;
|
|
272
|
+
enabled: boolean;
|
|
273
|
+
documentSecurity: boolean;
|
|
274
|
+
indexes: {
|
|
275
|
+
key: string;
|
|
276
|
+
type: "key" | "unique" | "fulltext";
|
|
277
|
+
attributes: string[];
|
|
278
|
+
status?: string | undefined;
|
|
279
|
+
error?: string | undefined;
|
|
280
|
+
orders?: string[] | undefined;
|
|
281
|
+
}[];
|
|
282
|
+
importDefs: {
|
|
283
|
+
filePath: string;
|
|
284
|
+
attributeMappings: {
|
|
285
|
+
targetKey: string;
|
|
286
|
+
converters: string[];
|
|
287
|
+
validationActions: {
|
|
288
|
+
params: string[];
|
|
289
|
+
action: string;
|
|
290
|
+
}[];
|
|
291
|
+
postImportActions: {
|
|
292
|
+
params: (string | Record<string, any>)[];
|
|
293
|
+
action: string;
|
|
294
|
+
}[];
|
|
295
|
+
oldKey?: string | undefined;
|
|
296
|
+
oldKeys?: string[] | undefined;
|
|
297
|
+
fileData?: {
|
|
298
|
+
path: string;
|
|
299
|
+
name: string;
|
|
300
|
+
} | undefined;
|
|
301
|
+
}[];
|
|
302
|
+
type?: "create" | "update" | undefined;
|
|
303
|
+
basePath?: string | undefined;
|
|
304
|
+
updateMapping?: {
|
|
305
|
+
originalIdField: string;
|
|
306
|
+
targetField: string;
|
|
307
|
+
} | undefined;
|
|
308
|
+
}[];
|
|
309
|
+
databaseId?: string | undefined;
|
|
310
|
+
};
|
|
311
|
+
attributes: ({
|
|
312
|
+
key: string;
|
|
313
|
+
type: "string";
|
|
314
|
+
error: string;
|
|
315
|
+
required: boolean;
|
|
316
|
+
array: boolean;
|
|
317
|
+
size: number;
|
|
318
|
+
xdefault?: string | null | undefined;
|
|
319
|
+
encrypted?: boolean | undefined;
|
|
320
|
+
} | {
|
|
321
|
+
key: string;
|
|
322
|
+
type: "integer";
|
|
323
|
+
error: string;
|
|
324
|
+
required: boolean;
|
|
325
|
+
array: boolean;
|
|
326
|
+
min?: number | undefined;
|
|
327
|
+
max?: number | undefined;
|
|
328
|
+
xdefault?: number | null | undefined;
|
|
329
|
+
} | {
|
|
330
|
+
key: string;
|
|
331
|
+
type: "float";
|
|
332
|
+
error: string;
|
|
333
|
+
required: boolean;
|
|
334
|
+
array: boolean;
|
|
335
|
+
min?: number | undefined;
|
|
336
|
+
max?: number | undefined;
|
|
337
|
+
xdefault?: number | null | undefined;
|
|
338
|
+
} | {
|
|
339
|
+
key: string;
|
|
340
|
+
type: "boolean";
|
|
341
|
+
error: string;
|
|
342
|
+
required: boolean;
|
|
343
|
+
array: boolean;
|
|
344
|
+
xdefault?: boolean | null | undefined;
|
|
345
|
+
} | {
|
|
346
|
+
key: string;
|
|
347
|
+
type: "datetime";
|
|
348
|
+
error: string;
|
|
349
|
+
required: boolean;
|
|
350
|
+
array: boolean;
|
|
351
|
+
xdefault?: string | null | undefined;
|
|
352
|
+
} | {
|
|
353
|
+
key: string;
|
|
354
|
+
type: "email";
|
|
355
|
+
error: string;
|
|
356
|
+
required: boolean;
|
|
357
|
+
array: boolean;
|
|
358
|
+
xdefault?: string | null | undefined;
|
|
359
|
+
} | {
|
|
360
|
+
key: string;
|
|
361
|
+
type: "ip";
|
|
362
|
+
error: string;
|
|
363
|
+
required: boolean;
|
|
364
|
+
array: boolean;
|
|
365
|
+
xdefault?: string | null | undefined;
|
|
366
|
+
} | {
|
|
367
|
+
key: string;
|
|
368
|
+
type: "url";
|
|
369
|
+
error: string;
|
|
370
|
+
required: boolean;
|
|
371
|
+
array: boolean;
|
|
372
|
+
xdefault?: string | null | undefined;
|
|
373
|
+
} | {
|
|
374
|
+
key: string;
|
|
375
|
+
type: "enum";
|
|
376
|
+
error: string;
|
|
377
|
+
required: boolean;
|
|
378
|
+
array: boolean;
|
|
379
|
+
elements: string[];
|
|
380
|
+
xdefault?: string | null | undefined;
|
|
381
|
+
} | {
|
|
382
|
+
key: string;
|
|
383
|
+
type: "relationship";
|
|
384
|
+
error: string;
|
|
385
|
+
required: boolean;
|
|
386
|
+
relatedCollection: string;
|
|
387
|
+
relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
|
|
388
|
+
twoWay: boolean;
|
|
389
|
+
twoWayKey: string;
|
|
390
|
+
onDelete: "setNull" | "cascade" | "restrict";
|
|
391
|
+
side: "parent" | "child";
|
|
392
|
+
array?: boolean | undefined;
|
|
393
|
+
importMapping?: {
|
|
394
|
+
originalIdField: string;
|
|
395
|
+
targetField?: string | undefined;
|
|
396
|
+
} | undefined;
|
|
397
|
+
})[];
|
|
398
|
+
};
|
|
399
|
+
Batches: {
|
|
400
|
+
collection: {
|
|
401
|
+
attributes: ({
|
|
402
|
+
key: string;
|
|
403
|
+
type: "string";
|
|
404
|
+
error: string;
|
|
405
|
+
required: boolean;
|
|
406
|
+
array: boolean;
|
|
407
|
+
size: number;
|
|
408
|
+
xdefault?: string | null | undefined;
|
|
409
|
+
encrypted?: boolean | undefined;
|
|
410
|
+
} | {
|
|
411
|
+
key: string;
|
|
412
|
+
type: "integer";
|
|
413
|
+
error: string;
|
|
414
|
+
required: boolean;
|
|
415
|
+
array: boolean;
|
|
416
|
+
min?: number | undefined;
|
|
417
|
+
max?: number | undefined;
|
|
418
|
+
xdefault?: number | null | undefined;
|
|
419
|
+
} | {
|
|
420
|
+
key: string;
|
|
421
|
+
type: "float";
|
|
422
|
+
error: string;
|
|
423
|
+
required: boolean;
|
|
424
|
+
array: boolean;
|
|
425
|
+
min?: number | undefined;
|
|
426
|
+
max?: number | undefined;
|
|
427
|
+
xdefault?: number | null | undefined;
|
|
428
|
+
} | {
|
|
429
|
+
key: string;
|
|
430
|
+
type: "boolean";
|
|
431
|
+
error: string;
|
|
432
|
+
required: boolean;
|
|
433
|
+
array: boolean;
|
|
434
|
+
xdefault?: boolean | null | undefined;
|
|
435
|
+
} | {
|
|
436
|
+
key: string;
|
|
437
|
+
type: "datetime";
|
|
438
|
+
error: string;
|
|
439
|
+
required: boolean;
|
|
440
|
+
array: boolean;
|
|
441
|
+
xdefault?: string | null | undefined;
|
|
442
|
+
} | {
|
|
443
|
+
key: string;
|
|
444
|
+
type: "email";
|
|
445
|
+
error: string;
|
|
446
|
+
required: boolean;
|
|
447
|
+
array: boolean;
|
|
448
|
+
xdefault?: string | null | undefined;
|
|
449
|
+
} | {
|
|
450
|
+
key: string;
|
|
451
|
+
type: "ip";
|
|
452
|
+
error: string;
|
|
453
|
+
required: boolean;
|
|
454
|
+
array: boolean;
|
|
455
|
+
xdefault?: string | null | undefined;
|
|
456
|
+
} | {
|
|
457
|
+
key: string;
|
|
458
|
+
type: "url";
|
|
459
|
+
error: string;
|
|
460
|
+
required: boolean;
|
|
461
|
+
array: boolean;
|
|
462
|
+
xdefault?: string | null | undefined;
|
|
463
|
+
} | {
|
|
464
|
+
key: string;
|
|
465
|
+
type: "enum";
|
|
466
|
+
error: string;
|
|
467
|
+
required: boolean;
|
|
468
|
+
array: boolean;
|
|
469
|
+
elements: string[];
|
|
470
|
+
xdefault?: string | null | undefined;
|
|
471
|
+
} | {
|
|
472
|
+
key: string;
|
|
473
|
+
type: "relationship";
|
|
474
|
+
error: string;
|
|
475
|
+
required: boolean;
|
|
476
|
+
relatedCollection: string;
|
|
477
|
+
relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
|
|
478
|
+
twoWay: boolean;
|
|
479
|
+
twoWayKey: string;
|
|
480
|
+
onDelete: "setNull" | "cascade" | "restrict";
|
|
481
|
+
side: "parent" | "child";
|
|
482
|
+
array?: boolean | undefined;
|
|
483
|
+
importMapping?: {
|
|
484
|
+
originalIdField: string;
|
|
485
|
+
targetField?: string | undefined;
|
|
486
|
+
} | undefined;
|
|
487
|
+
})[];
|
|
488
|
+
$id: string;
|
|
489
|
+
$permissions: {
|
|
490
|
+
permission: string;
|
|
491
|
+
target: string;
|
|
492
|
+
}[];
|
|
493
|
+
name: string;
|
|
494
|
+
enabled: boolean;
|
|
495
|
+
documentSecurity: boolean;
|
|
496
|
+
indexes: {
|
|
497
|
+
key: string;
|
|
498
|
+
type: "key" | "unique" | "fulltext";
|
|
499
|
+
attributes: string[];
|
|
500
|
+
status?: string | undefined;
|
|
501
|
+
error?: string | undefined;
|
|
502
|
+
orders?: string[] | undefined;
|
|
503
|
+
}[];
|
|
504
|
+
importDefs: {
|
|
505
|
+
filePath: string;
|
|
506
|
+
attributeMappings: {
|
|
507
|
+
targetKey: string;
|
|
508
|
+
converters: string[];
|
|
509
|
+
validationActions: {
|
|
510
|
+
params: string[];
|
|
511
|
+
action: string;
|
|
512
|
+
}[];
|
|
513
|
+
postImportActions: {
|
|
514
|
+
params: (string | Record<string, any>)[];
|
|
515
|
+
action: string;
|
|
516
|
+
}[];
|
|
517
|
+
oldKey?: string | undefined;
|
|
518
|
+
oldKeys?: string[] | undefined;
|
|
519
|
+
fileData?: {
|
|
520
|
+
path: string;
|
|
521
|
+
name: string;
|
|
522
|
+
} | undefined;
|
|
523
|
+
}[];
|
|
524
|
+
type?: "create" | "update" | undefined;
|
|
525
|
+
basePath?: string | undefined;
|
|
526
|
+
updateMapping?: {
|
|
527
|
+
originalIdField: string;
|
|
528
|
+
targetField: string;
|
|
529
|
+
} | undefined;
|
|
530
|
+
}[];
|
|
531
|
+
databaseId?: string | undefined;
|
|
532
|
+
};
|
|
533
|
+
attributes: ({
|
|
534
|
+
key: string;
|
|
535
|
+
type: "string";
|
|
536
|
+
error: string;
|
|
537
|
+
required: boolean;
|
|
538
|
+
array: boolean;
|
|
539
|
+
size: number;
|
|
540
|
+
xdefault?: string | null | undefined;
|
|
541
|
+
encrypted?: boolean | undefined;
|
|
542
|
+
} | {
|
|
543
|
+
key: string;
|
|
544
|
+
type: "integer";
|
|
545
|
+
error: string;
|
|
546
|
+
required: boolean;
|
|
547
|
+
array: boolean;
|
|
548
|
+
min?: number | undefined;
|
|
549
|
+
max?: number | undefined;
|
|
550
|
+
xdefault?: number | null | undefined;
|
|
551
|
+
} | {
|
|
552
|
+
key: string;
|
|
553
|
+
type: "float";
|
|
554
|
+
error: string;
|
|
555
|
+
required: boolean;
|
|
556
|
+
array: boolean;
|
|
557
|
+
min?: number | undefined;
|
|
558
|
+
max?: number | undefined;
|
|
559
|
+
xdefault?: number | null | undefined;
|
|
560
|
+
} | {
|
|
561
|
+
key: string;
|
|
562
|
+
type: "boolean";
|
|
563
|
+
error: string;
|
|
564
|
+
required: boolean;
|
|
565
|
+
array: boolean;
|
|
566
|
+
xdefault?: boolean | null | undefined;
|
|
567
|
+
} | {
|
|
568
|
+
key: string;
|
|
569
|
+
type: "datetime";
|
|
570
|
+
error: string;
|
|
571
|
+
required: boolean;
|
|
572
|
+
array: boolean;
|
|
573
|
+
xdefault?: string | null | undefined;
|
|
574
|
+
} | {
|
|
575
|
+
key: string;
|
|
576
|
+
type: "email";
|
|
577
|
+
error: string;
|
|
578
|
+
required: boolean;
|
|
579
|
+
array: boolean;
|
|
580
|
+
xdefault?: string | null | undefined;
|
|
581
|
+
} | {
|
|
582
|
+
key: string;
|
|
583
|
+
type: "ip";
|
|
584
|
+
error: string;
|
|
585
|
+
required: boolean;
|
|
586
|
+
array: boolean;
|
|
587
|
+
xdefault?: string | null | undefined;
|
|
588
|
+
} | {
|
|
589
|
+
key: string;
|
|
590
|
+
type: "url";
|
|
591
|
+
error: string;
|
|
592
|
+
required: boolean;
|
|
593
|
+
array: boolean;
|
|
594
|
+
xdefault?: string | null | undefined;
|
|
595
|
+
} | {
|
|
596
|
+
key: string;
|
|
597
|
+
type: "enum";
|
|
598
|
+
error: string;
|
|
599
|
+
required: boolean;
|
|
600
|
+
array: boolean;
|
|
601
|
+
elements: string[];
|
|
602
|
+
xdefault?: string | null | undefined;
|
|
603
|
+
} | {
|
|
604
|
+
key: string;
|
|
605
|
+
type: "relationship";
|
|
606
|
+
error: string;
|
|
607
|
+
required: boolean;
|
|
608
|
+
relatedCollection: string;
|
|
609
|
+
relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
|
|
610
|
+
twoWay: boolean;
|
|
611
|
+
twoWayKey: string;
|
|
612
|
+
onDelete: "setNull" | "cascade" | "restrict";
|
|
613
|
+
side: "parent" | "child";
|
|
614
|
+
array?: boolean | undefined;
|
|
615
|
+
importMapping?: {
|
|
616
|
+
originalIdField: string;
|
|
617
|
+
targetField?: string | undefined;
|
|
618
|
+
} | undefined;
|
|
619
|
+
})[];
|
|
620
|
+
};
|
|
621
|
+
};
|