appwrite-utils-cli 1.7.8 → 1.7.9

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