@appwrite.io/console 1.5.0 → 1.5.2

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 (47) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/sdk.js +474 -97
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +474 -97
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +474 -97
  7. package/docs/examples/databases/update-float-attribute.md +2 -2
  8. package/docs/examples/databases/update-integer-attribute.md +2 -2
  9. package/docs/examples/health/{get-queue-usage-count.md → get-queue-stats-resources.md} +1 -1
  10. package/docs/examples/health/{get-queue-usage-dump.md → get-queue-stats-usage-dump.md} +1 -1
  11. package/docs/examples/organizations/create.md +5 -1
  12. package/docs/examples/organizations/update-plan.md +5 -1
  13. package/package.json +1 -1
  14. package/src/client.ts +5 -3
  15. package/src/enums/credit-card.ts +1 -0
  16. package/src/enums/name.ts +3 -2
  17. package/src/enums/runtime.ts +3 -0
  18. package/src/models.ts +134 -1
  19. package/src/services/account.ts +122 -0
  20. package/src/services/assistant.ts +2 -0
  21. package/src/services/avatars.ts +7 -42
  22. package/src/services/backups.ts +24 -0
  23. package/src/services/console.ts +14 -0
  24. package/src/services/databases.ts +101 -16
  25. package/src/services/functions.ts +55 -6
  26. package/src/services/graphql.ts +4 -0
  27. package/src/services/health.ts +59 -34
  28. package/src/services/locale.ts +16 -0
  29. package/src/services/messaging.ts +95 -3
  30. package/src/services/migrations.ts +24 -0
  31. package/src/services/organizations.ts +90 -2
  32. package/src/services/project.ts +12 -0
  33. package/src/services/projects.ts +92 -0
  34. package/src/services/proxy.ts +10 -0
  35. package/src/services/storage.ts +27 -18
  36. package/src/services/teams.ts +28 -0
  37. package/src/services/users.ts +86 -0
  38. package/src/services/vcs.ts +20 -0
  39. package/types/enums/credit-card.d.ts +2 -1
  40. package/types/enums/name.d.ts +3 -2
  41. package/types/enums/runtime.d.ts +3 -0
  42. package/types/models.d.ts +134 -1
  43. package/types/services/databases.d.ts +5 -4
  44. package/types/services/health.d.ts +7 -16
  45. package/types/services/messaging.d.ts +3 -3
  46. package/types/services/organizations.d.ts +10 -2
  47. package/docs/examples/health/get-queue.md +0 -11
@@ -35,6 +35,8 @@ export class Organizations {
35
35
  'content-type': 'application/json',
36
36
  }
37
37
 
38
+ payload['project'] = this.client.config.project;
39
+
38
40
 
39
41
  return await this.client.call(
40
42
  'get',
@@ -54,10 +56,14 @@ export class Organizations {
54
56
  * @param {BillingPlan} billingPlan
55
57
  * @param {string} paymentMethodId
56
58
  * @param {string} billingAddressId
59
+ * @param {string[]} invites
60
+ * @param {string} couponId
61
+ * @param {string} taxId
62
+ * @param {number} budget
57
63
  * @throws {AppwriteException}
58
64
  * @returns {Promise<Models.Organization<Preferences>>}
59
65
  */
60
- async create<Preferences extends Models.Preferences>(organizationId: string, name: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string): Promise<Models.Organization<Preferences>> {
66
+ async create<Preferences extends Models.Preferences>(organizationId: string, name: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>> {
61
67
  if (typeof organizationId === 'undefined') {
62
68
  throw new AppwriteException('Missing required parameter: "organizationId"');
63
69
  }
@@ -84,12 +90,26 @@ export class Organizations {
84
90
  if (typeof billingAddressId !== 'undefined') {
85
91
  payload['billingAddressId'] = billingAddressId;
86
92
  }
93
+ if (typeof invites !== 'undefined') {
94
+ payload['invites'] = invites;
95
+ }
96
+ if (typeof couponId !== 'undefined') {
97
+ payload['couponId'] = couponId;
98
+ }
99
+ if (typeof taxId !== 'undefined') {
100
+ payload['taxId'] = taxId;
101
+ }
102
+ if (typeof budget !== 'undefined') {
103
+ payload['budget'] = budget;
104
+ }
87
105
  const uri = new URL(this.client.config.endpoint + apiPath);
88
106
 
89
107
  const apiHeaders: { [header: string]: string } = {
90
108
  'content-type': 'application/json',
91
109
  }
92
110
 
111
+ payload['project'] = this.client.config.project;
112
+
93
113
 
94
114
  return await this.client.call(
95
115
  'post',
@@ -119,6 +139,8 @@ export class Organizations {
119
139
  'content-type': 'application/json',
120
140
  }
121
141
 
142
+ payload['project'] = this.client.config.project;
143
+
122
144
 
123
145
  return await this.client.call(
124
146
  'delete',
@@ -152,6 +174,8 @@ export class Organizations {
152
174
  'content-type': 'application/json',
153
175
  }
154
176
 
177
+ payload['project'] = this.client.config.project;
178
+
155
179
 
156
180
  return await this.client.call(
157
181
  'get',
@@ -185,6 +209,8 @@ export class Organizations {
185
209
  'content-type': 'application/json',
186
210
  }
187
211
 
212
+ payload['project'] = this.client.config.project;
213
+
188
214
 
189
215
  return await this.client.call(
190
216
  'get',
@@ -221,6 +247,8 @@ export class Organizations {
221
247
  'content-type': 'application/json',
222
248
  }
223
249
 
250
+ payload['project'] = this.client.config.project;
251
+
224
252
 
225
253
  return await this.client.call(
226
254
  'patch',
@@ -250,6 +278,8 @@ export class Organizations {
250
278
  'content-type': 'application/json',
251
279
  }
252
280
 
281
+ payload['project'] = this.client.config.project;
282
+
253
283
 
254
284
  return await this.client.call(
255
285
  'delete',
@@ -283,6 +313,8 @@ export class Organizations {
283
313
  'content-type': 'application/json',
284
314
  }
285
315
 
316
+ payload['project'] = this.client.config.project;
317
+
286
318
 
287
319
  return await this.client.call(
288
320
  'get',
@@ -319,6 +351,8 @@ export class Organizations {
319
351
  'content-type': 'application/json',
320
352
  }
321
353
 
354
+ payload['project'] = this.client.config.project;
355
+
322
356
 
323
357
  return await this.client.call(
324
358
  'patch',
@@ -359,6 +393,8 @@ export class Organizations {
359
393
  'content-type': 'application/json',
360
394
  }
361
395
 
396
+ payload['project'] = this.client.config.project;
397
+
362
398
 
363
399
  return await this.client.call(
364
400
  'patch',
@@ -393,6 +429,8 @@ export class Organizations {
393
429
  'content-type': 'application/json',
394
430
  }
395
431
 
432
+ payload['project'] = this.client.config.project;
433
+
396
434
 
397
435
  return await this.client.call(
398
436
  'get',
@@ -429,6 +467,8 @@ export class Organizations {
429
467
  'content-type': 'application/json',
430
468
  }
431
469
 
470
+ payload['project'] = this.client.config.project;
471
+
432
472
 
433
473
  return await this.client.call(
434
474
  'post',
@@ -462,6 +502,8 @@ export class Organizations {
462
502
  'content-type': 'application/json',
463
503
  }
464
504
 
505
+ payload['project'] = this.client.config.project;
506
+
465
507
 
466
508
  return await this.client.call(
467
509
  'get',
@@ -495,6 +537,8 @@ export class Organizations {
495
537
  'content-type': 'application/json',
496
538
  }
497
539
 
540
+ payload['project'] = this.client.config.project;
541
+
498
542
 
499
543
  return await this.client.call(
500
544
  'get',
@@ -528,6 +572,8 @@ export class Organizations {
528
572
  'content-type': 'application/json',
529
573
  }
530
574
 
575
+ payload['project'] = this.client.config.project;
576
+
531
577
 
532
578
  return await this.client.call(
533
579
  'get',
@@ -561,6 +607,8 @@ export class Organizations {
561
607
  'content-type': 'application/json',
562
608
  }
563
609
 
610
+ payload['project'] = this.client.config.project;
611
+
564
612
 
565
613
  return await this.client.call(
566
614
  'get',
@@ -601,6 +649,8 @@ export class Organizations {
601
649
  'content-type': 'application/json',
602
650
  }
603
651
 
652
+ payload['project'] = this.client.config.project;
653
+
604
654
 
605
655
  return await this.client.call(
606
656
  'post',
@@ -634,6 +684,8 @@ export class Organizations {
634
684
  'content-type': 'application/json',
635
685
  }
636
686
 
687
+ payload['project'] = this.client.config.project;
688
+
637
689
 
638
690
  return await this.client.call(
639
691
  'get',
@@ -670,6 +722,8 @@ export class Organizations {
670
722
  'content-type': 'application/json',
671
723
  }
672
724
 
725
+ payload['project'] = this.client.config.project;
726
+
673
727
 
674
728
  return await this.client.call(
675
729
  'patch',
@@ -699,6 +753,8 @@ export class Organizations {
699
753
  'content-type': 'application/json',
700
754
  }
701
755
 
756
+ payload['project'] = this.client.config.project;
757
+
702
758
 
703
759
  return await this.client.call(
704
760
  'delete',
@@ -736,6 +792,8 @@ export class Organizations {
736
792
  'content-type': 'application/json',
737
793
  }
738
794
 
795
+ payload['project'] = this.client.config.project;
796
+
739
797
 
740
798
  return await this.client.call(
741
799
  'patch',
@@ -765,6 +823,8 @@ export class Organizations {
765
823
  'content-type': 'application/json',
766
824
  }
767
825
 
826
+ payload['project'] = this.client.config.project;
827
+
768
828
 
769
829
  return await this.client.call(
770
830
  'delete',
@@ -798,6 +858,8 @@ export class Organizations {
798
858
  'content-type': 'application/json',
799
859
  }
800
860
 
861
+ payload['project'] = this.client.config.project;
862
+
801
863
 
802
864
  return await this.client.call(
803
865
  'get',
@@ -827,6 +889,8 @@ export class Organizations {
827
889
  'content-type': 'application/json',
828
890
  }
829
891
 
892
+ payload['project'] = this.client.config.project;
893
+
830
894
 
831
895
  return await this.client.call(
832
896
  'get',
@@ -844,10 +908,14 @@ export class Organizations {
844
908
  * @param {BillingPlan} billingPlan
845
909
  * @param {string} paymentMethodId
846
910
  * @param {string} billingAddressId
911
+ * @param {string[]} invites
912
+ * @param {string} couponId
913
+ * @param {string} taxId
914
+ * @param {number} budget
847
915
  * @throws {AppwriteException}
848
916
  * @returns {Promise<Models.Organization<Preferences>>}
849
917
  */
850
- async updatePlan<Preferences extends Models.Preferences>(organizationId: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string): Promise<Models.Organization<Preferences>> {
918
+ async updatePlan<Preferences extends Models.Preferences>(organizationId: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>> {
851
919
  if (typeof organizationId === 'undefined') {
852
920
  throw new AppwriteException('Missing required parameter: "organizationId"');
853
921
  }
@@ -865,12 +933,26 @@ export class Organizations {
865
933
  if (typeof billingAddressId !== 'undefined') {
866
934
  payload['billingAddressId'] = billingAddressId;
867
935
  }
936
+ if (typeof invites !== 'undefined') {
937
+ payload['invites'] = invites;
938
+ }
939
+ if (typeof couponId !== 'undefined') {
940
+ payload['couponId'] = couponId;
941
+ }
942
+ if (typeof taxId !== 'undefined') {
943
+ payload['taxId'] = taxId;
944
+ }
945
+ if (typeof budget !== 'undefined') {
946
+ payload['budget'] = budget;
947
+ }
868
948
  const uri = new URL(this.client.config.endpoint + apiPath);
869
949
 
870
950
  const apiHeaders: { [header: string]: string } = {
871
951
  'content-type': 'application/json',
872
952
  }
873
953
 
954
+ payload['project'] = this.client.config.project;
955
+
874
956
 
875
957
  return await this.client.call(
876
958
  'patch',
@@ -900,6 +982,8 @@ export class Organizations {
900
982
  'content-type': 'application/json',
901
983
  }
902
984
 
985
+ payload['project'] = this.client.config.project;
986
+
903
987
 
904
988
  return await this.client.call(
905
989
  'get',
@@ -936,6 +1020,8 @@ export class Organizations {
936
1020
  'content-type': 'application/json',
937
1021
  }
938
1022
 
1023
+ payload['project'] = this.client.config.project;
1024
+
939
1025
 
940
1026
  return await this.client.call(
941
1027
  'patch',
@@ -973,6 +1059,8 @@ export class Organizations {
973
1059
  'content-type': 'application/json',
974
1060
  }
975
1061
 
1062
+ payload['project'] = this.client.config.project;
1063
+
976
1064
 
977
1065
  return await this.client.call(
978
1066
  'get',
@@ -45,6 +45,8 @@ export class Project {
45
45
  'content-type': 'application/json',
46
46
  }
47
47
 
48
+ payload['project'] = this.client.config.project;
49
+
48
50
 
49
51
  return await this.client.call(
50
52
  'get',
@@ -70,6 +72,8 @@ export class Project {
70
72
  'content-type': 'application/json',
71
73
  }
72
74
 
75
+ payload['project'] = this.client.config.project;
76
+
73
77
 
74
78
  return await this.client.call(
75
79
  'get',
@@ -109,6 +113,8 @@ export class Project {
109
113
  'content-type': 'application/json',
110
114
  }
111
115
 
116
+ payload['project'] = this.client.config.project;
117
+
112
118
 
113
119
  return await this.client.call(
114
120
  'post',
@@ -138,6 +144,8 @@ export class Project {
138
144
  'content-type': 'application/json',
139
145
  }
140
146
 
147
+ payload['project'] = this.client.config.project;
148
+
141
149
 
142
150
  return await this.client.call(
143
151
  'get',
@@ -178,6 +186,8 @@ export class Project {
178
186
  'content-type': 'application/json',
179
187
  }
180
188
 
189
+ payload['project'] = this.client.config.project;
190
+
181
191
 
182
192
  return await this.client.call(
183
193
  'put',
@@ -207,6 +217,8 @@ export class Project {
207
217
  'content-type': 'application/json',
208
218
  }
209
219
 
220
+ payload['project'] = this.client.config.project;
221
+
210
222
 
211
223
  return await this.client.call(
212
224
  'delete',