appwrite-utils-cli 0.0.261 → 0.0.263

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 (37) hide show
  1. package/README.md +24 -5
  2. package/dist/main.js +6 -0
  3. package/dist/migrations/afterImportActions.d.ts +3 -1
  4. package/dist/migrations/afterImportActions.js +2 -2
  5. package/dist/migrations/appwriteToX.d.ts +109 -0
  6. package/dist/migrations/appwriteToX.js +88 -0
  7. package/dist/migrations/backup.d.ts +4 -4
  8. package/dist/migrations/converters.js +1 -1
  9. package/dist/migrations/dataLoader.d.ts +19 -18
  10. package/dist/migrations/dataLoader.js +65 -84
  11. package/dist/migrations/databases.d.ts +2 -0
  12. package/dist/migrations/databases.js +23 -0
  13. package/dist/migrations/importController.js +3 -0
  14. package/dist/migrations/importDataActions.d.ts +1 -1
  15. package/dist/migrations/importDataActions.js +1 -1
  16. package/dist/migrations/schema.d.ts +363 -32
  17. package/dist/migrations/schema.js +48 -28
  18. package/dist/migrations/schemaStrings.d.ts +1 -0
  19. package/dist/migrations/schemaStrings.js +10 -0
  20. package/dist/setup.js +0 -0
  21. package/dist/utils/helperFunctions.d.ts +3 -0
  22. package/dist/utils/helperFunctions.js +8 -0
  23. package/dist/utilsController.d.ts +1 -0
  24. package/dist/utilsController.js +7 -0
  25. package/package.json +1 -1
  26. package/src/main.ts +6 -0
  27. package/src/migrations/afterImportActions.ts +2 -2
  28. package/src/migrations/appwriteToX.ts +122 -0
  29. package/src/migrations/converters.ts +2 -2
  30. package/src/migrations/dataLoader.ts +87 -95
  31. package/src/migrations/databases.ts +25 -0
  32. package/src/migrations/importController.ts +3 -0
  33. package/src/migrations/importDataActions.ts +1 -1
  34. package/src/migrations/schema.ts +65 -36
  35. package/src/migrations/schemaStrings.ts +11 -0
  36. package/src/utils/helperFunctions.ts +17 -0
  37. package/src/utilsController.ts +9 -0
@@ -675,6 +675,28 @@ export declare const indexSchema: z.ZodObject<{
675
675
  error?: string | undefined;
676
676
  orders?: string[] | undefined;
677
677
  }>;
678
+ export declare const indexesSchema: z.ZodArray<z.ZodObject<{
679
+ key: z.ZodString;
680
+ type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["key", "unique", "fulltext"]>>>;
681
+ status: z.ZodOptional<z.ZodString>;
682
+ error: z.ZodOptional<z.ZodString>;
683
+ attributes: z.ZodArray<z.ZodString, "many">;
684
+ orders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
685
+ }, "strip", z.ZodTypeAny, {
686
+ key: string;
687
+ type: "key" | "unique" | "fulltext";
688
+ attributes: string[];
689
+ status?: string | undefined;
690
+ error?: string | undefined;
691
+ orders?: string[] | undefined;
692
+ }, {
693
+ key: string;
694
+ attributes: string[];
695
+ type?: "key" | "unique" | "fulltext" | undefined;
696
+ status?: string | undefined;
697
+ error?: string | undefined;
698
+ orders?: string[] | undefined;
699
+ }>, "many">;
678
700
  export type Index = z.infer<typeof indexSchema>;
679
701
  export declare const AttributeMappingsSchema: z.ZodArray<z.ZodObject<{
680
702
  oldKey: z.ZodOptional<z.ZodString>;
@@ -746,6 +768,22 @@ export declare const AttributeMappingsSchema: z.ZodArray<z.ZodObject<{
746
768
  action: string;
747
769
  }[] | undefined;
748
770
  }>, "many">;
771
+ export declare const idMappingSchema: z.ZodArray<z.ZodObject<{
772
+ sourceField: z.ZodString;
773
+ fieldToSet: z.ZodOptional<z.ZodString>;
774
+ targetField: z.ZodString;
775
+ targetCollection: z.ZodString;
776
+ }, "strip", z.ZodTypeAny, {
777
+ targetField: string;
778
+ sourceField: string;
779
+ targetCollection: string;
780
+ fieldToSet?: string | undefined;
781
+ }, {
782
+ targetField: string;
783
+ sourceField: string;
784
+ targetCollection: string;
785
+ fieldToSet?: string | undefined;
786
+ }>, "many">;
749
787
  export declare const importDefSchema: z.ZodObject<{
750
788
  type: z.ZodOptional<z.ZodDefault<z.ZodEnum<["create", "update"]>>>;
751
789
  filePath: z.ZodString;
@@ -1082,8 +1120,302 @@ export declare const importDefSchemas: z.ZodDefault<z.ZodArray<z.ZodObject<{
1082
1120
  targetField: string;
1083
1121
  } | undefined;
1084
1122
  }>, "many">>;
1123
+ export declare const permissionSchema: z.ZodUnion<[z.ZodObject<{
1124
+ permission: z.ZodString;
1125
+ target: z.ZodString;
1126
+ }, "strip", z.ZodTypeAny, {
1127
+ permission: string;
1128
+ target: string;
1129
+ }, {
1130
+ permission: string;
1131
+ target: string;
1132
+ }>, z.ZodEffects<z.ZodString, {
1133
+ permission: string;
1134
+ target: string;
1135
+ }, string>]>;
1136
+ export declare const permissionsSchema: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
1137
+ permission: z.ZodString;
1138
+ target: z.ZodString;
1139
+ }, "strip", z.ZodTypeAny, {
1140
+ permission: string;
1141
+ target: string;
1142
+ }, {
1143
+ permission: string;
1144
+ target: string;
1145
+ }>, z.ZodEffects<z.ZodString, {
1146
+ permission: string;
1147
+ target: string;
1148
+ }, string>]>, "many">>;
1149
+ export declare const attributesSchema: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
1150
+ key: z.ZodString;
1151
+ type: z.ZodDefault<z.ZodLiteral<"string">>;
1152
+ error: z.ZodDefault<z.ZodString>;
1153
+ required: z.ZodDefault<z.ZodBoolean>;
1154
+ array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1155
+ size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1156
+ xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1157
+ encrypted: z.ZodOptional<z.ZodBoolean>;
1158
+ }, "strip", z.ZodTypeAny, {
1159
+ key: string;
1160
+ type: "string";
1161
+ error: string;
1162
+ required: boolean;
1163
+ array: boolean;
1164
+ size: number;
1165
+ xdefault?: string | null | undefined;
1166
+ encrypted?: boolean | undefined;
1167
+ }, {
1168
+ key: string;
1169
+ type?: "string" | undefined;
1170
+ error?: string | undefined;
1171
+ required?: boolean | undefined;
1172
+ array?: boolean | undefined;
1173
+ size?: number | undefined;
1174
+ xdefault?: string | null | undefined;
1175
+ encrypted?: boolean | undefined;
1176
+ }>, z.ZodObject<{
1177
+ key: z.ZodString;
1178
+ type: z.ZodDefault<z.ZodLiteral<"integer">>;
1179
+ error: z.ZodDefault<z.ZodString>;
1180
+ required: z.ZodDefault<z.ZodBoolean>;
1181
+ array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1182
+ min: z.ZodOptional<z.ZodNumber>;
1183
+ max: z.ZodOptional<z.ZodNumber>;
1184
+ xdefault: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1185
+ }, "strip", z.ZodTypeAny, {
1186
+ key: string;
1187
+ type: "integer";
1188
+ error: string;
1189
+ required: boolean;
1190
+ array: boolean;
1191
+ min?: number | undefined;
1192
+ max?: number | undefined;
1193
+ xdefault?: number | null | undefined;
1194
+ }, {
1195
+ key: string;
1196
+ type?: "integer" | undefined;
1197
+ error?: string | undefined;
1198
+ required?: boolean | undefined;
1199
+ array?: boolean | undefined;
1200
+ min?: number | undefined;
1201
+ max?: number | undefined;
1202
+ xdefault?: number | null | undefined;
1203
+ }>]>, z.ZodObject<{
1204
+ key: z.ZodString;
1205
+ type: z.ZodDefault<z.ZodLiteral<"float">>;
1206
+ error: z.ZodDefault<z.ZodString>;
1207
+ required: z.ZodDefault<z.ZodBoolean>;
1208
+ array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1209
+ min: z.ZodOptional<z.ZodNumber>;
1210
+ max: z.ZodOptional<z.ZodNumber>;
1211
+ xdefault: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1212
+ }, "strip", z.ZodTypeAny, {
1213
+ key: string;
1214
+ type: "float";
1215
+ error: string;
1216
+ required: boolean;
1217
+ array: boolean;
1218
+ min?: number | undefined;
1219
+ max?: number | undefined;
1220
+ xdefault?: number | null | undefined;
1221
+ }, {
1222
+ key: string;
1223
+ type?: "float" | undefined;
1224
+ error?: string | undefined;
1225
+ required?: boolean | undefined;
1226
+ array?: boolean | undefined;
1227
+ min?: number | undefined;
1228
+ max?: number | undefined;
1229
+ xdefault?: number | null | undefined;
1230
+ }>]>, z.ZodObject<{
1231
+ key: z.ZodString;
1232
+ type: z.ZodDefault<z.ZodLiteral<"boolean">>;
1233
+ error: z.ZodDefault<z.ZodString>;
1234
+ required: z.ZodDefault<z.ZodBoolean>;
1235
+ array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1236
+ xdefault: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1237
+ }, "strip", z.ZodTypeAny, {
1238
+ key: string;
1239
+ type: "boolean";
1240
+ error: string;
1241
+ required: boolean;
1242
+ array: boolean;
1243
+ xdefault?: boolean | null | undefined;
1244
+ }, {
1245
+ key: string;
1246
+ type?: "boolean" | undefined;
1247
+ error?: string | undefined;
1248
+ required?: boolean | undefined;
1249
+ array?: boolean | undefined;
1250
+ xdefault?: boolean | null | undefined;
1251
+ }>]>, z.ZodObject<{
1252
+ key: z.ZodString;
1253
+ type: z.ZodDefault<z.ZodLiteral<"datetime">>;
1254
+ error: z.ZodDefault<z.ZodString>;
1255
+ required: z.ZodDefault<z.ZodBoolean>;
1256
+ array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1257
+ xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1258
+ }, "strip", z.ZodTypeAny, {
1259
+ key: string;
1260
+ type: "datetime";
1261
+ error: string;
1262
+ required: boolean;
1263
+ array: boolean;
1264
+ xdefault?: string | null | undefined;
1265
+ }, {
1266
+ key: string;
1267
+ type?: "datetime" | undefined;
1268
+ error?: string | undefined;
1269
+ required?: boolean | undefined;
1270
+ array?: boolean | undefined;
1271
+ xdefault?: string | null | undefined;
1272
+ }>]>, z.ZodObject<{
1273
+ key: z.ZodString;
1274
+ type: z.ZodDefault<z.ZodLiteral<"email">>;
1275
+ error: z.ZodDefault<z.ZodString>;
1276
+ required: z.ZodDefault<z.ZodBoolean>;
1277
+ array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1278
+ xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1279
+ }, "strip", z.ZodTypeAny, {
1280
+ key: string;
1281
+ type: "email";
1282
+ error: string;
1283
+ required: boolean;
1284
+ array: boolean;
1285
+ xdefault?: string | null | undefined;
1286
+ }, {
1287
+ key: string;
1288
+ type?: "email" | undefined;
1289
+ error?: string | undefined;
1290
+ required?: boolean | undefined;
1291
+ array?: boolean | undefined;
1292
+ xdefault?: string | null | undefined;
1293
+ }>]>, z.ZodObject<{
1294
+ key: z.ZodString;
1295
+ type: z.ZodLiteral<"ip">;
1296
+ error: z.ZodDefault<z.ZodString>;
1297
+ required: z.ZodDefault<z.ZodBoolean>;
1298
+ array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1299
+ xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1300
+ }, "strip", z.ZodTypeAny, {
1301
+ key: string;
1302
+ type: "ip";
1303
+ error: string;
1304
+ required: boolean;
1305
+ array: boolean;
1306
+ xdefault?: string | null | undefined;
1307
+ }, {
1308
+ key: string;
1309
+ type: "ip";
1310
+ error?: string | undefined;
1311
+ required?: boolean | undefined;
1312
+ array?: boolean | undefined;
1313
+ xdefault?: string | null | undefined;
1314
+ }>]>, z.ZodObject<{
1315
+ key: z.ZodString;
1316
+ type: z.ZodDefault<z.ZodLiteral<"url">>;
1317
+ error: z.ZodDefault<z.ZodString>;
1318
+ required: z.ZodDefault<z.ZodBoolean>;
1319
+ array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1320
+ xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1321
+ }, "strip", z.ZodTypeAny, {
1322
+ key: string;
1323
+ type: "url";
1324
+ error: string;
1325
+ required: boolean;
1326
+ array: boolean;
1327
+ xdefault?: string | null | undefined;
1328
+ }, {
1329
+ key: string;
1330
+ type?: "url" | undefined;
1331
+ error?: string | undefined;
1332
+ required?: boolean | undefined;
1333
+ array?: boolean | undefined;
1334
+ xdefault?: string | null | undefined;
1335
+ }>]>, z.ZodObject<{
1336
+ key: z.ZodString;
1337
+ type: z.ZodDefault<z.ZodLiteral<"enum">>;
1338
+ error: z.ZodDefault<z.ZodString>;
1339
+ required: z.ZodDefault<z.ZodBoolean>;
1340
+ array: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1341
+ elements: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1342
+ xdefault: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1343
+ }, "strip", z.ZodTypeAny, {
1344
+ key: string;
1345
+ type: "enum";
1346
+ error: string;
1347
+ required: boolean;
1348
+ array: boolean;
1349
+ elements: string[];
1350
+ xdefault?: string | null | undefined;
1351
+ }, {
1352
+ key: string;
1353
+ type?: "enum" | undefined;
1354
+ error?: string | undefined;
1355
+ required?: boolean | undefined;
1356
+ array?: boolean | undefined;
1357
+ elements?: string[] | undefined;
1358
+ xdefault?: string | null | undefined;
1359
+ }>]>, z.ZodObject<{
1360
+ key: z.ZodString;
1361
+ type: z.ZodDefault<z.ZodLiteral<"relationship">>;
1362
+ error: z.ZodDefault<z.ZodString>;
1363
+ required: z.ZodDefault<z.ZodBoolean>;
1364
+ array: z.ZodOptional<z.ZodBoolean>;
1365
+ relatedCollection: z.ZodString;
1366
+ relationType: z.ZodEnum<["oneToMany", "manyToOne", "oneToOne", "manyToMany"]>;
1367
+ twoWay: z.ZodBoolean;
1368
+ twoWayKey: z.ZodString;
1369
+ onDelete: z.ZodDefault<z.ZodEnum<["setNull", "cascade", "restrict"]>>;
1370
+ side: z.ZodEnum<["parent", "child"]>;
1371
+ importMapping: z.ZodOptional<z.ZodObject<{
1372
+ originalIdField: z.ZodString;
1373
+ targetField: z.ZodOptional<z.ZodString>;
1374
+ }, "strip", z.ZodTypeAny, {
1375
+ originalIdField: string;
1376
+ targetField?: string | undefined;
1377
+ }, {
1378
+ originalIdField: string;
1379
+ targetField?: string | undefined;
1380
+ }>>;
1381
+ }, "strip", z.ZodTypeAny, {
1382
+ key: string;
1383
+ type: "relationship";
1384
+ error: string;
1385
+ required: boolean;
1386
+ relatedCollection: string;
1387
+ relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
1388
+ twoWay: boolean;
1389
+ twoWayKey: string;
1390
+ onDelete: "setNull" | "cascade" | "restrict";
1391
+ side: "parent" | "child";
1392
+ array?: boolean | undefined;
1393
+ importMapping?: {
1394
+ originalIdField: string;
1395
+ targetField?: string | undefined;
1396
+ } | undefined;
1397
+ }, {
1398
+ key: string;
1399
+ relatedCollection: string;
1400
+ relationType: "oneToMany" | "manyToOne" | "oneToOne" | "manyToMany";
1401
+ twoWay: boolean;
1402
+ twoWayKey: string;
1403
+ side: "parent" | "child";
1404
+ type?: "relationship" | undefined;
1405
+ error?: string | undefined;
1406
+ required?: boolean | undefined;
1407
+ array?: boolean | undefined;
1408
+ onDelete?: "setNull" | "cascade" | "restrict" | undefined;
1409
+ importMapping?: {
1410
+ originalIdField: string;
1411
+ targetField?: string | undefined;
1412
+ } | undefined;
1413
+ }>]>, "many">>;
1085
1414
  export declare const collectionSchema: z.ZodObject<{
1415
+ name: z.ZodString;
1086
1416
  $id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1417
+ enabled: z.ZodDefault<z.ZodBoolean>;
1418
+ documentSecurity: z.ZodDefault<z.ZodBoolean>;
1087
1419
  $createdAt: z.ZodString;
1088
1420
  $updatedAt: z.ZodString;
1089
1421
  $permissions: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -1096,10 +1428,6 @@ export declare const collectionSchema: z.ZodObject<{
1096
1428
  permission: string;
1097
1429
  target: string;
1098
1430
  }>, "many">>;
1099
- databaseId: z.ZodOptional<z.ZodString>;
1100
- name: z.ZodString;
1101
- enabled: z.ZodDefault<z.ZodBoolean>;
1102
- documentSecurity: z.ZodDefault<z.ZodBoolean>;
1103
1431
  attributes: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
1104
1432
  key: z.ZodString;
1105
1433
  type: z.ZodDefault<z.ZodLiteral<"string">>;
@@ -1555,6 +1883,7 @@ export declare const collectionSchema: z.ZodObject<{
1555
1883
  targetField: string;
1556
1884
  } | undefined;
1557
1885
  }>, "many">>;
1886
+ databaseId: z.ZodOptional<z.ZodString>;
1558
1887
  }, "strip", z.ZodTypeAny, {
1559
1888
  attributes: ({
1560
1889
  key: string;
@@ -1645,14 +1974,14 @@ export declare const collectionSchema: z.ZodObject<{
1645
1974
  })[];
1646
1975
  name: string;
1647
1976
  $id: string;
1977
+ enabled: boolean;
1978
+ documentSecurity: boolean;
1648
1979
  $createdAt: string;
1649
1980
  $updatedAt: string;
1650
1981
  $permissions: {
1651
1982
  permission: string;
1652
1983
  target: string;
1653
1984
  }[];
1654
- enabled: boolean;
1655
- documentSecurity: boolean;
1656
1985
  indexes: {
1657
1986
  key: string;
1658
1987
  type: "key" | "unique" | "fulltext";
@@ -1701,13 +2030,12 @@ export declare const collectionSchema: z.ZodObject<{
1701
2030
  $createdAt: string;
1702
2031
  $updatedAt: string;
1703
2032
  $id?: string | undefined;
2033
+ enabled?: boolean | undefined;
2034
+ documentSecurity?: boolean | undefined;
1704
2035
  $permissions?: {
1705
2036
  permission: string;
1706
2037
  target: string;
1707
2038
  }[] | undefined;
1708
- databaseId?: string | undefined;
1709
- enabled?: boolean | undefined;
1710
- documentSecurity?: boolean | undefined;
1711
2039
  attributes?: ({
1712
2040
  key: string;
1713
2041
  type?: "string" | undefined;
@@ -1837,9 +2165,13 @@ export declare const collectionSchema: z.ZodObject<{
1837
2165
  targetField: string;
1838
2166
  } | undefined;
1839
2167
  }[] | undefined;
2168
+ databaseId?: string | undefined;
1840
2169
  }>;
1841
2170
  export declare const CollectionCreateSchema: z.ZodObject<Omit<{
2171
+ name: z.ZodString;
1842
2172
  $id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2173
+ enabled: z.ZodDefault<z.ZodBoolean>;
2174
+ documentSecurity: z.ZodDefault<z.ZodBoolean>;
1843
2175
  $createdAt: z.ZodString;
1844
2176
  $updatedAt: z.ZodString;
1845
2177
  $permissions: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -1852,10 +2184,6 @@ export declare const CollectionCreateSchema: z.ZodObject<Omit<{
1852
2184
  permission: string;
1853
2185
  target: string;
1854
2186
  }>, "many">>;
1855
- databaseId: z.ZodOptional<z.ZodString>;
1856
- name: z.ZodString;
1857
- enabled: z.ZodDefault<z.ZodBoolean>;
1858
- documentSecurity: z.ZodDefault<z.ZodBoolean>;
1859
2187
  attributes: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
1860
2188
  key: z.ZodString;
1861
2189
  type: z.ZodDefault<z.ZodLiteral<"string">>;
@@ -2311,6 +2639,7 @@ export declare const CollectionCreateSchema: z.ZodObject<Omit<{
2311
2639
  targetField: string;
2312
2640
  } | undefined;
2313
2641
  }>, "many">>;
2642
+ databaseId: z.ZodOptional<z.ZodString>;
2314
2643
  }, "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
2315
2644
  attributes: ({
2316
2645
  key: string;
@@ -2401,12 +2730,12 @@ export declare const CollectionCreateSchema: z.ZodObject<Omit<{
2401
2730
  })[];
2402
2731
  name: string;
2403
2732
  $id: string;
2733
+ enabled: boolean;
2734
+ documentSecurity: boolean;
2404
2735
  $permissions: {
2405
2736
  permission: string;
2406
2737
  target: string;
2407
2738
  }[];
2408
- enabled: boolean;
2409
- documentSecurity: boolean;
2410
2739
  indexes: {
2411
2740
  key: string;
2412
2741
  type: "key" | "unique" | "fulltext";
@@ -2540,13 +2869,12 @@ export declare const CollectionCreateSchema: z.ZodObject<Omit<{
2540
2869
  } | undefined;
2541
2870
  })[] | undefined;
2542
2871
  $id?: string | undefined;
2872
+ enabled?: boolean | undefined;
2873
+ documentSecurity?: boolean | undefined;
2543
2874
  $permissions?: {
2544
2875
  permission: string;
2545
2876
  target: string;
2546
2877
  }[] | undefined;
2547
- databaseId?: string | undefined;
2548
- enabled?: boolean | undefined;
2549
- documentSecurity?: boolean | undefined;
2550
2878
  indexes?: {
2551
2879
  key: string;
2552
2880
  attributes: string[];
@@ -2589,6 +2917,7 @@ export declare const CollectionCreateSchema: z.ZodObject<Omit<{
2589
2917
  targetField: string;
2590
2918
  } | undefined;
2591
2919
  }[] | undefined;
2920
+ databaseId?: string | undefined;
2592
2921
  }>;
2593
2922
  export type Collection = z.infer<typeof collectionSchema>;
2594
2923
  export type CollectionCreate = z.infer<typeof CollectionCreateSchema>;
@@ -2617,7 +2946,10 @@ export declare const AppwriteConfigSchema: z.ZodObject<{
2617
2946
  $id: string;
2618
2947
  }>, "many">>;
2619
2948
  collections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<Omit<{
2949
+ name: z.ZodString;
2620
2950
  $id: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2951
+ enabled: z.ZodDefault<z.ZodBoolean>;
2952
+ documentSecurity: z.ZodDefault<z.ZodBoolean>;
2621
2953
  $createdAt: z.ZodString;
2622
2954
  $updatedAt: z.ZodString;
2623
2955
  $permissions: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -2630,10 +2962,6 @@ export declare const AppwriteConfigSchema: z.ZodObject<{
2630
2962
  permission: string;
2631
2963
  target: string;
2632
2964
  }>, "many">>;
2633
- databaseId: z.ZodOptional<z.ZodString>;
2634
- name: z.ZodString;
2635
- enabled: z.ZodDefault<z.ZodBoolean>;
2636
- documentSecurity: z.ZodDefault<z.ZodBoolean>;
2637
2965
  attributes: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
2638
2966
  key: z.ZodString;
2639
2967
  type: z.ZodDefault<z.ZodLiteral<"string">>;
@@ -3089,6 +3417,7 @@ export declare const AppwriteConfigSchema: z.ZodObject<{
3089
3417
  targetField: string;
3090
3418
  } | undefined;
3091
3419
  }>, "many">>;
3420
+ databaseId: z.ZodOptional<z.ZodString>;
3092
3421
  }, "$createdAt" | "$updatedAt">, "strip", z.ZodTypeAny, {
3093
3422
  attributes: ({
3094
3423
  key: string;
@@ -3179,12 +3508,12 @@ export declare const AppwriteConfigSchema: z.ZodObject<{
3179
3508
  })[];
3180
3509
  name: string;
3181
3510
  $id: string;
3511
+ enabled: boolean;
3512
+ documentSecurity: boolean;
3182
3513
  $permissions: {
3183
3514
  permission: string;
3184
3515
  target: string;
3185
3516
  }[];
3186
- enabled: boolean;
3187
- documentSecurity: boolean;
3188
3517
  indexes: {
3189
3518
  key: string;
3190
3519
  type: "key" | "unique" | "fulltext";
@@ -3318,13 +3647,12 @@ export declare const AppwriteConfigSchema: z.ZodObject<{
3318
3647
  } | undefined;
3319
3648
  })[] | undefined;
3320
3649
  $id?: string | undefined;
3650
+ enabled?: boolean | undefined;
3651
+ documentSecurity?: boolean | undefined;
3321
3652
  $permissions?: {
3322
3653
  permission: string;
3323
3654
  target: string;
3324
3655
  }[] | undefined;
3325
- databaseId?: string | undefined;
3326
- enabled?: boolean | undefined;
3327
- documentSecurity?: boolean | undefined;
3328
3656
  indexes?: {
3329
3657
  key: string;
3330
3658
  attributes: string[];
@@ -3367,6 +3695,7 @@ export declare const AppwriteConfigSchema: z.ZodObject<{
3367
3695
  targetField: string;
3368
3696
  } | undefined;
3369
3697
  }[] | undefined;
3698
+ databaseId?: string | undefined;
3370
3699
  }>, "many">>>;
3371
3700
  }, "strip", z.ZodTypeAny, {
3372
3701
  appwriteEndpoint: string;
@@ -3475,12 +3804,12 @@ export declare const AppwriteConfigSchema: z.ZodObject<{
3475
3804
  })[];
3476
3805
  name: string;
3477
3806
  $id: string;
3807
+ enabled: boolean;
3808
+ documentSecurity: boolean;
3478
3809
  $permissions: {
3479
3810
  permission: string;
3480
3811
  target: string;
3481
3812
  }[];
3482
- enabled: boolean;
3483
- documentSecurity: boolean;
3484
3813
  indexes: {
3485
3814
  key: string;
3486
3815
  type: "key" | "unique" | "fulltext";
@@ -3634,13 +3963,12 @@ export declare const AppwriteConfigSchema: z.ZodObject<{
3634
3963
  } | undefined;
3635
3964
  })[] | undefined;
3636
3965
  $id?: string | undefined;
3966
+ enabled?: boolean | undefined;
3967
+ documentSecurity?: boolean | undefined;
3637
3968
  $permissions?: {
3638
3969
  permission: string;
3639
3970
  target: string;
3640
3971
  }[] | undefined;
3641
- databaseId?: string | undefined;
3642
- enabled?: boolean | undefined;
3643
- documentSecurity?: boolean | undefined;
3644
3972
  indexes?: {
3645
3973
  key: string;
3646
3974
  attributes: string[];
@@ -3683,6 +4011,7 @@ export declare const AppwriteConfigSchema: z.ZodObject<{
3683
4011
  targetField: string;
3684
4012
  } | undefined;
3685
4013
  }[] | undefined;
4014
+ databaseId?: string | undefined;
3686
4015
  }[] | undefined;
3687
4016
  }>;
3688
4017
  export type AppwriteConfig = z.infer<typeof AppwriteConfigSchema>;
@@ -3692,6 +4021,8 @@ export type ConfigDatabases = AppwriteConfig["databases"];
3692
4021
  export type ConfigDatabase = ConfigDatabases[number];
3693
4022
  export type ImportDefs = z.infer<typeof importDefSchemas>;
3694
4023
  export type ImportDef = z.infer<typeof importDefSchema>;
4024
+ export type IdMappings = z.infer<typeof idMappingSchema>;
4025
+ export type IdMapping = IdMappings[number];
3695
4026
  export type AttributeMappings = z.infer<typeof AttributeMappingsSchema>;
3696
4027
  export type AttributeMapping = AttributeMappings[number];
3697
4028
  export {};