@njdamstra/appwrite-utils-cli 1.10.0 → 1.10.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.
@@ -91,6 +91,63 @@ export declare const getMigrationCollectionSchemas: () => {
91
91
  error?: string | undefined;
92
92
  xdefault?: string | null | undefined;
93
93
  encrypt?: boolean | undefined;
94
+ } | {
95
+ key: string;
96
+ required: boolean;
97
+ type: "varchar";
98
+ size: number;
99
+ array?: boolean | undefined;
100
+ format?: string | undefined;
101
+ status?: string | undefined;
102
+ attributes?: string[] | undefined;
103
+ orders?: string[] | undefined;
104
+ $createdAt?: string | undefined;
105
+ $updatedAt?: string | undefined;
106
+ error?: string | undefined;
107
+ xdefault?: string | null | undefined;
108
+ encrypt?: boolean | undefined;
109
+ } | {
110
+ key: string;
111
+ required: boolean;
112
+ type: "text";
113
+ array?: boolean | undefined;
114
+ format?: string | undefined;
115
+ status?: string | undefined;
116
+ attributes?: string[] | undefined;
117
+ orders?: string[] | undefined;
118
+ $createdAt?: string | undefined;
119
+ $updatedAt?: string | undefined;
120
+ error?: string | undefined;
121
+ xdefault?: string | null | undefined;
122
+ encrypt?: boolean | undefined;
123
+ } | {
124
+ key: string;
125
+ required: boolean;
126
+ type: "mediumtext";
127
+ array?: boolean | undefined;
128
+ format?: string | undefined;
129
+ status?: string | undefined;
130
+ attributes?: string[] | undefined;
131
+ orders?: string[] | undefined;
132
+ $createdAt?: string | undefined;
133
+ $updatedAt?: string | undefined;
134
+ error?: string | undefined;
135
+ xdefault?: string | null | undefined;
136
+ encrypt?: boolean | undefined;
137
+ } | {
138
+ key: string;
139
+ required: boolean;
140
+ type: "longtext";
141
+ array?: boolean | undefined;
142
+ format?: string | undefined;
143
+ status?: string | undefined;
144
+ attributes?: string[] | undefined;
145
+ orders?: string[] | undefined;
146
+ $createdAt?: string | undefined;
147
+ $updatedAt?: string | undefined;
148
+ error?: string | undefined;
149
+ xdefault?: string | null | undefined;
150
+ encrypt?: boolean | undefined;
94
151
  } | {
95
152
  key: string;
96
153
  required: boolean;
@@ -215,6 +272,45 @@ export declare const getMigrationCollectionSchemas: () => {
215
272
  $updatedAt?: string | undefined;
216
273
  error?: string | undefined;
217
274
  xdefault?: string | null | undefined;
275
+ } | {
276
+ key: string;
277
+ required: boolean;
278
+ type: "point";
279
+ array?: boolean | undefined;
280
+ format?: string | undefined;
281
+ status?: string | undefined;
282
+ attributes?: string[] | undefined;
283
+ orders?: string[] | undefined;
284
+ $createdAt?: string | undefined;
285
+ $updatedAt?: string | undefined;
286
+ error?: string | undefined;
287
+ xdefault?: number[] | null | undefined;
288
+ } | {
289
+ key: string;
290
+ required: boolean;
291
+ type: "line";
292
+ array?: boolean | undefined;
293
+ format?: string | undefined;
294
+ status?: string | undefined;
295
+ attributes?: string[] | undefined;
296
+ orders?: string[] | undefined;
297
+ $createdAt?: string | undefined;
298
+ $updatedAt?: string | undefined;
299
+ error?: string | undefined;
300
+ xdefault?: number[][] | null | undefined;
301
+ } | {
302
+ key: string;
303
+ required: boolean;
304
+ type: "polygon";
305
+ array?: boolean | undefined;
306
+ format?: string | undefined;
307
+ status?: string | undefined;
308
+ attributes?: string[] | undefined;
309
+ orders?: string[] | undefined;
310
+ $createdAt?: string | undefined;
311
+ $updatedAt?: string | undefined;
312
+ error?: string | undefined;
313
+ xdefault?: number[][][] | null | undefined;
218
314
  } | {
219
315
  key: string;
220
316
  required: boolean;
@@ -308,6 +404,63 @@ export declare const getMigrationCollectionSchemas: () => {
308
404
  error?: string | undefined;
309
405
  xdefault?: string | null | undefined;
310
406
  encrypt?: boolean | undefined;
407
+ } | {
408
+ key: string;
409
+ required: boolean;
410
+ type: "varchar";
411
+ size: number;
412
+ array?: boolean | undefined;
413
+ format?: string | undefined;
414
+ status?: string | undefined;
415
+ attributes?: string[] | undefined;
416
+ orders?: string[] | undefined;
417
+ $createdAt?: string | undefined;
418
+ $updatedAt?: string | undefined;
419
+ error?: string | undefined;
420
+ xdefault?: string | null | undefined;
421
+ encrypt?: boolean | undefined;
422
+ } | {
423
+ key: string;
424
+ required: boolean;
425
+ type: "text";
426
+ array?: boolean | undefined;
427
+ format?: string | undefined;
428
+ status?: string | undefined;
429
+ attributes?: string[] | undefined;
430
+ orders?: string[] | undefined;
431
+ $createdAt?: string | undefined;
432
+ $updatedAt?: string | undefined;
433
+ error?: string | undefined;
434
+ xdefault?: string | null | undefined;
435
+ encrypt?: boolean | undefined;
436
+ } | {
437
+ key: string;
438
+ required: boolean;
439
+ type: "mediumtext";
440
+ array?: boolean | undefined;
441
+ format?: string | undefined;
442
+ status?: string | undefined;
443
+ attributes?: string[] | undefined;
444
+ orders?: string[] | undefined;
445
+ $createdAt?: string | undefined;
446
+ $updatedAt?: string | undefined;
447
+ error?: string | undefined;
448
+ xdefault?: string | null | undefined;
449
+ encrypt?: boolean | undefined;
450
+ } | {
451
+ key: string;
452
+ required: boolean;
453
+ type: "longtext";
454
+ array?: boolean | undefined;
455
+ format?: string | undefined;
456
+ status?: string | undefined;
457
+ attributes?: string[] | undefined;
458
+ orders?: string[] | undefined;
459
+ $createdAt?: string | undefined;
460
+ $updatedAt?: string | undefined;
461
+ error?: string | undefined;
462
+ xdefault?: string | null | undefined;
463
+ encrypt?: boolean | undefined;
311
464
  } | {
312
465
  key: string;
313
466
  required: boolean;
@@ -432,6 +585,45 @@ export declare const getMigrationCollectionSchemas: () => {
432
585
  $updatedAt?: string | undefined;
433
586
  error?: string | undefined;
434
587
  xdefault?: string | null | undefined;
588
+ } | {
589
+ key: string;
590
+ required: boolean;
591
+ type: "point";
592
+ array?: boolean | undefined;
593
+ format?: string | undefined;
594
+ status?: string | undefined;
595
+ attributes?: string[] | undefined;
596
+ orders?: string[] | undefined;
597
+ $createdAt?: string | undefined;
598
+ $updatedAt?: string | undefined;
599
+ error?: string | undefined;
600
+ xdefault?: number[] | null | undefined;
601
+ } | {
602
+ key: string;
603
+ required: boolean;
604
+ type: "line";
605
+ array?: boolean | undefined;
606
+ format?: string | undefined;
607
+ status?: string | undefined;
608
+ attributes?: string[] | undefined;
609
+ orders?: string[] | undefined;
610
+ $createdAt?: string | undefined;
611
+ $updatedAt?: string | undefined;
612
+ error?: string | undefined;
613
+ xdefault?: number[][] | null | undefined;
614
+ } | {
615
+ key: string;
616
+ required: boolean;
617
+ type: "polygon";
618
+ array?: boolean | undefined;
619
+ format?: string | undefined;
620
+ status?: string | undefined;
621
+ attributes?: string[] | undefined;
622
+ orders?: string[] | undefined;
623
+ $createdAt?: string | undefined;
624
+ $updatedAt?: string | undefined;
625
+ error?: string | undefined;
626
+ xdefault?: number[][][] | null | undefined;
435
627
  } | {
436
628
  key: string;
437
629
  required: boolean;
@@ -474,6 +666,63 @@ export declare const getMigrationCollectionSchemas: () => {
474
666
  error?: string | undefined;
475
667
  xdefault?: string | null | undefined;
476
668
  encrypt?: boolean | undefined;
669
+ } | {
670
+ key: string;
671
+ required: boolean;
672
+ type: "varchar";
673
+ size: number;
674
+ array?: boolean | undefined;
675
+ format?: string | undefined;
676
+ status?: string | undefined;
677
+ attributes?: string[] | undefined;
678
+ orders?: string[] | undefined;
679
+ $createdAt?: string | undefined;
680
+ $updatedAt?: string | undefined;
681
+ error?: string | undefined;
682
+ xdefault?: string | null | undefined;
683
+ encrypt?: boolean | undefined;
684
+ } | {
685
+ key: string;
686
+ required: boolean;
687
+ type: "text";
688
+ array?: boolean | undefined;
689
+ format?: string | undefined;
690
+ status?: string | undefined;
691
+ attributes?: string[] | undefined;
692
+ orders?: string[] | undefined;
693
+ $createdAt?: string | undefined;
694
+ $updatedAt?: string | undefined;
695
+ error?: string | undefined;
696
+ xdefault?: string | null | undefined;
697
+ encrypt?: boolean | undefined;
698
+ } | {
699
+ key: string;
700
+ required: boolean;
701
+ type: "mediumtext";
702
+ array?: boolean | undefined;
703
+ format?: string | undefined;
704
+ status?: string | undefined;
705
+ attributes?: string[] | undefined;
706
+ orders?: string[] | undefined;
707
+ $createdAt?: string | undefined;
708
+ $updatedAt?: string | undefined;
709
+ error?: string | undefined;
710
+ xdefault?: string | null | undefined;
711
+ encrypt?: boolean | undefined;
712
+ } | {
713
+ key: string;
714
+ required: boolean;
715
+ type: "longtext";
716
+ array?: boolean | undefined;
717
+ format?: string | undefined;
718
+ status?: string | undefined;
719
+ attributes?: string[] | undefined;
720
+ orders?: string[] | undefined;
721
+ $createdAt?: string | undefined;
722
+ $updatedAt?: string | undefined;
723
+ error?: string | undefined;
724
+ xdefault?: string | null | undefined;
725
+ encrypt?: boolean | undefined;
477
726
  } | {
478
727
  key: string;
479
728
  required: boolean;
@@ -598,6 +847,45 @@ export declare const getMigrationCollectionSchemas: () => {
598
847
  $updatedAt?: string | undefined;
599
848
  error?: string | undefined;
600
849
  xdefault?: string | null | undefined;
850
+ } | {
851
+ key: string;
852
+ required: boolean;
853
+ type: "point";
854
+ array?: boolean | undefined;
855
+ format?: string | undefined;
856
+ status?: string | undefined;
857
+ attributes?: string[] | undefined;
858
+ orders?: string[] | undefined;
859
+ $createdAt?: string | undefined;
860
+ $updatedAt?: string | undefined;
861
+ error?: string | undefined;
862
+ xdefault?: number[] | null | undefined;
863
+ } | {
864
+ key: string;
865
+ required: boolean;
866
+ type: "line";
867
+ array?: boolean | undefined;
868
+ format?: string | undefined;
869
+ status?: string | undefined;
870
+ attributes?: string[] | undefined;
871
+ orders?: string[] | undefined;
872
+ $createdAt?: string | undefined;
873
+ $updatedAt?: string | undefined;
874
+ error?: string | undefined;
875
+ xdefault?: number[][] | null | undefined;
876
+ } | {
877
+ key: string;
878
+ required: boolean;
879
+ type: "polygon";
880
+ array?: boolean | undefined;
881
+ format?: string | undefined;
882
+ status?: string | undefined;
883
+ attributes?: string[] | undefined;
884
+ orders?: string[] | undefined;
885
+ $createdAt?: string | undefined;
886
+ $updatedAt?: string | undefined;
887
+ error?: string | undefined;
888
+ xdefault?: number[][][] | null | undefined;
601
889
  } | {
602
890
  key: string;
603
891
  required: boolean;
@@ -691,6 +979,63 @@ export declare const getMigrationCollectionSchemas: () => {
691
979
  error?: string | undefined;
692
980
  xdefault?: string | null | undefined;
693
981
  encrypt?: boolean | undefined;
982
+ } | {
983
+ key: string;
984
+ required: boolean;
985
+ type: "varchar";
986
+ size: number;
987
+ array?: boolean | undefined;
988
+ format?: string | undefined;
989
+ status?: string | undefined;
990
+ attributes?: string[] | undefined;
991
+ orders?: string[] | undefined;
992
+ $createdAt?: string | undefined;
993
+ $updatedAt?: string | undefined;
994
+ error?: string | undefined;
995
+ xdefault?: string | null | undefined;
996
+ encrypt?: boolean | undefined;
997
+ } | {
998
+ key: string;
999
+ required: boolean;
1000
+ type: "text";
1001
+ array?: boolean | undefined;
1002
+ format?: string | undefined;
1003
+ status?: string | undefined;
1004
+ attributes?: string[] | undefined;
1005
+ orders?: string[] | undefined;
1006
+ $createdAt?: string | undefined;
1007
+ $updatedAt?: string | undefined;
1008
+ error?: string | undefined;
1009
+ xdefault?: string | null | undefined;
1010
+ encrypt?: boolean | undefined;
1011
+ } | {
1012
+ key: string;
1013
+ required: boolean;
1014
+ type: "mediumtext";
1015
+ array?: boolean | undefined;
1016
+ format?: string | undefined;
1017
+ status?: string | undefined;
1018
+ attributes?: string[] | undefined;
1019
+ orders?: string[] | undefined;
1020
+ $createdAt?: string | undefined;
1021
+ $updatedAt?: string | undefined;
1022
+ error?: string | undefined;
1023
+ xdefault?: string | null | undefined;
1024
+ encrypt?: boolean | undefined;
1025
+ } | {
1026
+ key: string;
1027
+ required: boolean;
1028
+ type: "longtext";
1029
+ array?: boolean | undefined;
1030
+ format?: string | undefined;
1031
+ status?: string | undefined;
1032
+ attributes?: string[] | undefined;
1033
+ orders?: string[] | undefined;
1034
+ $createdAt?: string | undefined;
1035
+ $updatedAt?: string | undefined;
1036
+ error?: string | undefined;
1037
+ xdefault?: string | null | undefined;
1038
+ encrypt?: boolean | undefined;
694
1039
  } | {
695
1040
  key: string;
696
1041
  required: boolean;
@@ -815,6 +1160,45 @@ export declare const getMigrationCollectionSchemas: () => {
815
1160
  $updatedAt?: string | undefined;
816
1161
  error?: string | undefined;
817
1162
  xdefault?: string | null | undefined;
1163
+ } | {
1164
+ key: string;
1165
+ required: boolean;
1166
+ type: "point";
1167
+ array?: boolean | undefined;
1168
+ format?: string | undefined;
1169
+ status?: string | undefined;
1170
+ attributes?: string[] | undefined;
1171
+ orders?: string[] | undefined;
1172
+ $createdAt?: string | undefined;
1173
+ $updatedAt?: string | undefined;
1174
+ error?: string | undefined;
1175
+ xdefault?: number[] | null | undefined;
1176
+ } | {
1177
+ key: string;
1178
+ required: boolean;
1179
+ type: "line";
1180
+ array?: boolean | undefined;
1181
+ format?: string | undefined;
1182
+ status?: string | undefined;
1183
+ attributes?: string[] | undefined;
1184
+ orders?: string[] | undefined;
1185
+ $createdAt?: string | undefined;
1186
+ $updatedAt?: string | undefined;
1187
+ error?: string | undefined;
1188
+ xdefault?: number[][] | null | undefined;
1189
+ } | {
1190
+ key: string;
1191
+ required: boolean;
1192
+ type: "polygon";
1193
+ array?: boolean | undefined;
1194
+ format?: string | undefined;
1195
+ status?: string | undefined;
1196
+ attributes?: string[] | undefined;
1197
+ orders?: string[] | undefined;
1198
+ $createdAt?: string | undefined;
1199
+ $updatedAt?: string | undefined;
1200
+ error?: string | undefined;
1201
+ xdefault?: number[][][] | null | undefined;
818
1202
  } | {
819
1203
  key: string;
820
1204
  required: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@njdamstra/appwrite-utils-cli",
3
3
  "description": "Appwrite Utility Functions to help with database management, data conversion, data import, migrations, and much more. Meant to be used as a CLI tool, I do not recommend installing this in frontend environments.",
4
- "version": "1.10.0",
4
+ "version": "1.10.1",
5
5
  "main": "dist/main.js",
6
6
  "type": "module",
7
7
  "repository": {
@@ -39,8 +39,8 @@
39
39
  "@types/inquirer": "^9.0.8",
40
40
  "@types/json-schema": "^7.0.15",
41
41
  "@types/yargs": "^17.0.33",
42
- "@njdamstra/appwrite-utils": "^1.7.0",
43
- "@njdamstra/appwrite-utils-helpers": "^0.1.1",
42
+ "@njdamstra/appwrite-utils": "^1.7.1",
43
+ "@njdamstra/appwrite-utils-helpers": "^0.1.2",
44
44
  "chalk": "^5.4.1",
45
45
  "cli-progress": "^3.12.0",
46
46
  "commander": "^12.1.0",
@@ -53,7 +53,7 @@
53
53
  "jszip": "^3.10.1",
54
54
  "luxon": "^3.6.1",
55
55
  "nanostores": "^0.10.3",
56
- "node-appwrite": "^20.2.1",
56
+ "node-appwrite": "^22.1.2",
57
57
  "p-limit": "^6.2.0",
58
58
  "papaparse": "^5.5.3",
59
59
  "tar": "^7.4.3",
@@ -593,6 +593,74 @@ const createLegacyAttribute = async (
593
593
  attribute.array || false
594
594
  );
595
595
  break;
596
+ case "varchar":
597
+ await db.createVarcharAttribute(
598
+ dbId,
599
+ collectionId,
600
+ attribute.key,
601
+ (attribute as any).size || 255,
602
+ attribute.required || false,
603
+ (attribute as any).xdefault !== undefined && !attribute.required
604
+ ? (attribute as any).xdefault
605
+ : undefined,
606
+ attribute.array || false,
607
+ (attribute as any).encrypt
608
+ );
609
+ break;
610
+ case "text":
611
+ case "mediumtext":
612
+ case "longtext": {
613
+ const createFn = attribute.type === "text"
614
+ ? db.createTextAttribute.bind(db)
615
+ : attribute.type === "mediumtext"
616
+ ? db.createMediumtextAttribute.bind(db)
617
+ : db.createLongtextAttribute.bind(db);
618
+ await createFn(
619
+ dbId,
620
+ collectionId,
621
+ attribute.key,
622
+ attribute.required || false,
623
+ (attribute as any).xdefault !== undefined && !attribute.required
624
+ ? (attribute as any).xdefault
625
+ : undefined,
626
+ attribute.array || false,
627
+ (attribute as any).encrypt
628
+ );
629
+ break;
630
+ }
631
+ case "point":
632
+ await db.createPointAttribute(
633
+ dbId,
634
+ collectionId,
635
+ attribute.key,
636
+ attribute.required || false,
637
+ (attribute as any).xdefault !== undefined && !attribute.required
638
+ ? (attribute as any).xdefault
639
+ : undefined
640
+ );
641
+ break;
642
+ case "line":
643
+ await db.createLineAttribute(
644
+ dbId,
645
+ collectionId,
646
+ attribute.key,
647
+ attribute.required || false,
648
+ (attribute as any).xdefault !== undefined && !attribute.required
649
+ ? (attribute as any).xdefault
650
+ : undefined
651
+ );
652
+ break;
653
+ case "polygon":
654
+ await db.createPolygonAttribute(
655
+ dbId,
656
+ collectionId,
657
+ attribute.key,
658
+ attribute.required || false,
659
+ (attribute as any).xdefault !== undefined && !attribute.required
660
+ ? (attribute as any).xdefault
661
+ : undefined
662
+ );
663
+ break;
596
664
  case "relationship":
597
665
  await db.createRelationshipAttribute(
598
666
  dbId,
@@ -615,6 +683,10 @@ const createLegacyAttribute = async (
615
683
  type: (attribute as any).type,
616
684
  supportedTypes: [
617
685
  "string",
686
+ "varchar",
687
+ "text",
688
+ "mediumtext",
689
+ "longtext",
618
690
  "integer",
619
691
  "double",
620
692
  "float",
@@ -624,6 +696,9 @@ const createLegacyAttribute = async (
624
696
  "ip",
625
697
  "url",
626
698
  "enum",
699
+ "point",
700
+ "line",
701
+ "polygon",
627
702
  "relationship",
628
703
  ],
629
704
  operation: "createLegacyAttribute",
@@ -770,6 +845,70 @@ const updateLegacyAttribute = async (
770
845
  : null
771
846
  );
772
847
  break;
848
+ case "varchar":
849
+ await db.updateVarcharAttribute(
850
+ dbId,
851
+ collectionId,
852
+ attribute.key,
853
+ attribute.required || false,
854
+ !attribute.required && (attribute as any).xdefault !== undefined
855
+ ? (attribute as any).xdefault
856
+ : null,
857
+ (attribute as any).size
858
+ );
859
+ break;
860
+ case "text":
861
+ case "mediumtext":
862
+ case "longtext": {
863
+ const updateFn = attribute.type === "text"
864
+ ? db.updateTextAttribute.bind(db)
865
+ : attribute.type === "mediumtext"
866
+ ? db.updateMediumtextAttribute.bind(db)
867
+ : db.updateLongtextAttribute.bind(db);
868
+ await updateFn(
869
+ dbId,
870
+ collectionId,
871
+ attribute.key,
872
+ attribute.required || false,
873
+ !attribute.required && (attribute as any).xdefault !== undefined
874
+ ? (attribute as any).xdefault
875
+ : null
876
+ );
877
+ break;
878
+ }
879
+ case "point":
880
+ await db.updatePointAttribute(
881
+ dbId,
882
+ collectionId,
883
+ attribute.key,
884
+ attribute.required || false,
885
+ !attribute.required && (attribute as any).xdefault !== undefined
886
+ ? (attribute as any).xdefault
887
+ : null
888
+ );
889
+ break;
890
+ case "line":
891
+ await db.updateLineAttribute(
892
+ dbId,
893
+ collectionId,
894
+ attribute.key,
895
+ attribute.required || false,
896
+ !attribute.required && (attribute as any).xdefault !== undefined
897
+ ? (attribute as any).xdefault
898
+ : null
899
+ );
900
+ break;
901
+ case "polygon":
902
+ await db.updatePolygonAttribute(
903
+ dbId,
904
+ collectionId,
905
+ attribute.key,
906
+ attribute.required || false,
907
+ !attribute.required && (attribute as any).xdefault !== undefined
908
+ ? (attribute as any).xdefault
909
+ : null
910
+ );
911
+ break;
773
912
  case "relationship":
774
913
  await db.updateRelationshipAttribute(
775
914
  dbId,
@@ -1048,6 +1187,14 @@ const getComparableFields = (type: string): string[] => {
1048
1187
  case "string":
1049
1188
  return [...baseFields, "size", "encrypt"];
1050
1189
 
1190
+ case "varchar":
1191
+ return [...baseFields, "size", "encrypt"];
1192
+
1193
+ case "text":
1194
+ case "mediumtext":
1195
+ case "longtext":
1196
+ return [...baseFields, "encrypt"];
1197
+
1051
1198
  case "integer":
1052
1199
  case "double":
1053
1200
  case "float":
@@ -1056,6 +1203,11 @@ const getComparableFields = (type: string): string[] => {
1056
1203
  case "enum":
1057
1204
  return [...baseFields, "elements"];
1058
1205
 
1206
+ case "point":
1207
+ case "line":
1208
+ case "polygon":
1209
+ return baseFields;
1210
+
1059
1211
  case "relationship":
1060
1212
  return [
1061
1213
  ...baseFields,
@@ -1,5 +1,5 @@
1
1
  import { indexSchema, type Index } from "@njdamstra/appwrite-utils";
2
- import { Databases, IndexType, Query, type Models } from "node-appwrite";
2
+ import { Databases, IndexType, OrderBy, Query, type Models } from "node-appwrite";
3
3
  import type { DatabaseAdapter } from "@njdamstra/appwrite-utils-helpers";
4
4
  import { delay, tryAwaitWithRetry, calculateExponentialBackoff, isLegacyDatabases, MessageFormatter } from "@njdamstra/appwrite-utils-helpers";
5
5
 
@@ -327,10 +327,10 @@ export const createOrUpdateIndex = async (
327
327
  index.key,
328
328
  index.type as IndexType,
329
329
  index.attributes,
330
- orders
330
+ orders as OrderBy[]
331
331
  );
332
332
  }
333
-
333
+
334
334
  return newIndex;
335
335
  };
336
336