@appwrite.io/console 1.5.2 → 1.6.0

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 (53) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/sdk.js +7673 -9723
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +7673 -9723
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +7673 -9723
  7. package/docs/examples/organizations/validate-invoice.md +14 -0
  8. package/package.json +1 -1
  9. package/src/client.ts +21 -4
  10. package/src/enums/o-auth-provider.ts +1 -0
  11. package/src/models.ts +118 -6
  12. package/src/services/account.ts +126 -430
  13. package/src/services/assistant.ts +2 -7
  14. package/src/services/avatars.ts +7 -21
  15. package/src/services/backups.ts +24 -84
  16. package/src/services/console.ts +14 -49
  17. package/src/services/databases.ts +96 -336
  18. package/src/services/functions.ts +55 -192
  19. package/src/services/graphql.ts +4 -14
  20. package/src/services/health.ts +50 -175
  21. package/src/services/locale.ts +16 -56
  22. package/src/services/messaging.ts +92 -322
  23. package/src/services/migrations.ts +24 -84
  24. package/src/services/organizations.ts +86 -196
  25. package/src/services/project.ts +12 -42
  26. package/src/services/projects.ts +92 -322
  27. package/src/services/proxy.ts +10 -35
  28. package/src/services/storage.ts +27 -93
  29. package/src/services/teams.ts +28 -98
  30. package/src/services/users.ts +86 -301
  31. package/src/services/vcs.ts +20 -70
  32. package/types/enums/o-auth-provider.d.ts +1 -0
  33. package/types/models.d.ts +118 -6
  34. package/types/services/account.d.ts +4 -128
  35. package/types/services/assistant.d.ts +0 -2
  36. package/types/services/avatars.d.ts +0 -14
  37. package/types/services/backups.d.ts +0 -24
  38. package/types/services/console.d.ts +0 -14
  39. package/types/services/databases.d.ts +0 -96
  40. package/types/services/functions.d.ts +0 -56
  41. package/types/services/graphql.d.ts +0 -4
  42. package/types/services/health.d.ts +0 -50
  43. package/types/services/locale.d.ts +0 -16
  44. package/types/services/messaging.d.ts +0 -92
  45. package/types/services/migrations.d.ts +0 -24
  46. package/types/services/organizations.d.ts +11 -58
  47. package/types/services/project.d.ts +0 -12
  48. package/types/services/projects.d.ts +0 -92
  49. package/types/services/proxy.d.ts +0 -10
  50. package/types/services/storage.d.ts +0 -30
  51. package/types/services/teams.d.ts +0 -28
  52. package/types/services/users.d.ts +0 -86
  53. package/types/services/vcs.d.ts +0 -20
@@ -11,8 +11,6 @@ export class Organizations {
11
11
  }
12
12
 
13
13
  /**
14
- * List Orgnizations
15
- *
16
14
  * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.
17
15
  *
18
16
  * @param {string[]} queries
@@ -20,7 +18,7 @@ export class Organizations {
20
18
  * @throws {AppwriteException}
21
19
  * @returns {Promise<Models.OrganizationList<Preferences>>}
22
20
  */
23
- async list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.OrganizationList<Preferences>> {
21
+ list<Preferences extends Models.Preferences>(queries?: string[], search?: string): Promise<Models.OrganizationList<Preferences>> {
24
22
  const apiPath = '/organizations';
25
23
  const payload: Payload = {};
26
24
  if (typeof queries !== 'undefined') {
@@ -35,10 +33,7 @@ export class Organizations {
35
33
  'content-type': 'application/json',
36
34
  }
37
35
 
38
- payload['project'] = this.client.config.project;
39
-
40
-
41
- return await this.client.call(
36
+ return this.client.call(
42
37
  'get',
43
38
  uri,
44
39
  apiHeaders,
@@ -46,8 +41,6 @@ export class Organizations {
46
41
  );
47
42
  }
48
43
  /**
49
- * Create Organization
50
- *
51
44
  * Create a new organization.
52
45
 
53
46
  *
@@ -63,7 +56,7 @@ export class Organizations {
63
56
  * @throws {AppwriteException}
64
57
  * @returns {Promise<Models.Organization<Preferences>>}
65
58
  */
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>> {
59
+ 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>> {
67
60
  if (typeof organizationId === 'undefined') {
68
61
  throw new AppwriteException('Missing required parameter: "organizationId"');
69
62
  }
@@ -108,10 +101,7 @@ export class Organizations {
108
101
  'content-type': 'application/json',
109
102
  }
110
103
 
111
- payload['project'] = this.client.config.project;
112
-
113
-
114
- return await this.client.call(
104
+ return this.client.call(
115
105
  'post',
116
106
  uri,
117
107
  apiHeaders,
@@ -119,15 +109,13 @@ export class Organizations {
119
109
  );
120
110
  }
121
111
  /**
122
- * Delete team
123
- *
124
112
  * Delete an organization.
125
113
  *
126
114
  * @param {string} organizationId
127
115
  * @throws {AppwriteException}
128
116
  * @returns {Promise<{}>}
129
117
  */
130
- async delete(organizationId: string): Promise<{}> {
118
+ delete(organizationId: string): Promise<{}> {
131
119
  if (typeof organizationId === 'undefined') {
132
120
  throw new AppwriteException('Missing required parameter: "organizationId"');
133
121
  }
@@ -139,10 +127,7 @@ export class Organizations {
139
127
  'content-type': 'application/json',
140
128
  }
141
129
 
142
- payload['project'] = this.client.config.project;
143
-
144
-
145
- return await this.client.call(
130
+ return this.client.call(
146
131
  'delete',
147
132
  uri,
148
133
  apiHeaders,
@@ -150,8 +135,6 @@ export class Organizations {
150
135
  );
151
136
  }
152
137
  /**
153
- * List aggregations
154
- *
155
138
  * Get a list of all aggregations for an organization.
156
139
  *
157
140
  * @param {string} organizationId
@@ -159,7 +142,7 @@ export class Organizations {
159
142
  * @throws {AppwriteException}
160
143
  * @returns {Promise<Models.AggregationTeamList>}
161
144
  */
162
- async listAggregations(organizationId: string, queries?: string[]): Promise<Models.AggregationTeamList> {
145
+ listAggregations(organizationId: string, queries?: string[]): Promise<Models.AggregationTeamList> {
163
146
  if (typeof organizationId === 'undefined') {
164
147
  throw new AppwriteException('Missing required parameter: "organizationId"');
165
148
  }
@@ -174,10 +157,7 @@ export class Organizations {
174
157
  'content-type': 'application/json',
175
158
  }
176
159
 
177
- payload['project'] = this.client.config.project;
178
-
179
-
180
- return await this.client.call(
160
+ return this.client.call(
181
161
  'get',
182
162
  uri,
183
163
  apiHeaders,
@@ -185,16 +165,14 @@ export class Organizations {
185
165
  );
186
166
  }
187
167
  /**
188
- * Get invoice
189
- *
190
168
  * Get a specific aggregation using it&#039;s aggregation ID.
191
169
  *
192
170
  * @param {string} organizationId
193
171
  * @param {string} aggregationId
194
172
  * @throws {AppwriteException}
195
- * @returns {Promise<Models.Invoice>}
173
+ * @returns {Promise<Models.AggregationTeam>}
196
174
  */
197
- async getAggregation(organizationId: string, aggregationId: string): Promise<Models.Invoice> {
175
+ getAggregation(organizationId: string, aggregationId: string): Promise<Models.AggregationTeam> {
198
176
  if (typeof organizationId === 'undefined') {
199
177
  throw new AppwriteException('Missing required parameter: "organizationId"');
200
178
  }
@@ -209,10 +187,7 @@ export class Organizations {
209
187
  'content-type': 'application/json',
210
188
  }
211
189
 
212
- payload['project'] = this.client.config.project;
213
-
214
-
215
- return await this.client.call(
190
+ return this.client.call(
216
191
  'get',
217
192
  uri,
218
193
  apiHeaders,
@@ -220,8 +195,6 @@ export class Organizations {
220
195
  );
221
196
  }
222
197
  /**
223
- * Set team&#039;s billing address
224
- *
225
198
  * Set a billing address for an organization.
226
199
  *
227
200
  * @param {string} organizationId
@@ -229,7 +202,7 @@ export class Organizations {
229
202
  * @throws {AppwriteException}
230
203
  * @returns {Promise<Models.Organization<Preferences>>}
231
204
  */
232
- async setBillingAddress<Preferences extends Models.Preferences>(organizationId: string, billingAddressId: string): Promise<Models.Organization<Preferences>> {
205
+ setBillingAddress<Preferences extends Models.Preferences>(organizationId: string, billingAddressId: string): Promise<Models.Organization<Preferences>> {
233
206
  if (typeof organizationId === 'undefined') {
234
207
  throw new AppwriteException('Missing required parameter: "organizationId"');
235
208
  }
@@ -247,10 +220,7 @@ export class Organizations {
247
220
  'content-type': 'application/json',
248
221
  }
249
222
 
250
- payload['project'] = this.client.config.project;
251
-
252
-
253
- return await this.client.call(
223
+ return this.client.call(
254
224
  'patch',
255
225
  uri,
256
226
  apiHeaders,
@@ -258,15 +228,13 @@ export class Organizations {
258
228
  );
259
229
  }
260
230
  /**
261
- * Delete team&#039;s billing address
262
- *
263
231
  * Delete a team&#039;s billing address.
264
232
  *
265
233
  * @param {string} organizationId
266
234
  * @throws {AppwriteException}
267
235
  * @returns {Promise<{}>}
268
236
  */
269
- async deleteBillingAddress(organizationId: string): Promise<{}> {
237
+ deleteBillingAddress(organizationId: string): Promise<{}> {
270
238
  if (typeof organizationId === 'undefined') {
271
239
  throw new AppwriteException('Missing required parameter: "organizationId"');
272
240
  }
@@ -278,10 +246,7 @@ export class Organizations {
278
246
  'content-type': 'application/json',
279
247
  }
280
248
 
281
- payload['project'] = this.client.config.project;
282
-
283
-
284
- return await this.client.call(
249
+ return this.client.call(
285
250
  'delete',
286
251
  uri,
287
252
  apiHeaders,
@@ -289,8 +254,6 @@ export class Organizations {
289
254
  );
290
255
  }
291
256
  /**
292
- * Get billing address
293
- *
294
257
  * Get a billing address using it&#039;s ID.
295
258
  *
296
259
  * @param {string} organizationId
@@ -298,7 +261,7 @@ export class Organizations {
298
261
  * @throws {AppwriteException}
299
262
  * @returns {Promise<Models.BillingAddress>}
300
263
  */
301
- async getBillingAddress(organizationId: string, billingAddressId: string): Promise<Models.BillingAddress> {
264
+ getBillingAddress(organizationId: string, billingAddressId: string): Promise<Models.BillingAddress> {
302
265
  if (typeof organizationId === 'undefined') {
303
266
  throw new AppwriteException('Missing required parameter: "organizationId"');
304
267
  }
@@ -313,10 +276,7 @@ export class Organizations {
313
276
  'content-type': 'application/json',
314
277
  }
315
278
 
316
- payload['project'] = this.client.config.project;
317
-
318
-
319
- return await this.client.call(
279
+ return this.client.call(
320
280
  'get',
321
281
  uri,
322
282
  apiHeaders,
@@ -324,8 +284,6 @@ export class Organizations {
324
284
  );
325
285
  }
326
286
  /**
327
- * Set team&#039;s billing email
328
- *
329
287
  * Set the current billing email for the organization.
330
288
  *
331
289
  * @param {string} organizationId
@@ -333,7 +291,7 @@ export class Organizations {
333
291
  * @throws {AppwriteException}
334
292
  * @returns {Promise<Models.Organization<Preferences>>}
335
293
  */
336
- async setBillingEmail<Preferences extends Models.Preferences>(organizationId: string, billingEmail: string): Promise<Models.Organization<Preferences>> {
294
+ setBillingEmail<Preferences extends Models.Preferences>(organizationId: string, billingEmail: string): Promise<Models.Organization<Preferences>> {
337
295
  if (typeof organizationId === 'undefined') {
338
296
  throw new AppwriteException('Missing required parameter: "organizationId"');
339
297
  }
@@ -351,10 +309,7 @@ export class Organizations {
351
309
  'content-type': 'application/json',
352
310
  }
353
311
 
354
- payload['project'] = this.client.config.project;
355
-
356
-
357
- return await this.client.call(
312
+ return this.client.call(
358
313
  'patch',
359
314
  uri,
360
315
  apiHeaders,
@@ -362,8 +317,6 @@ export class Organizations {
362
317
  );
363
318
  }
364
319
  /**
365
- * Update organization budget
366
- *
367
320
  * Update the budget limit for an organization.
368
321
  *
369
322
  * @param {string} organizationId
@@ -372,7 +325,7 @@ export class Organizations {
372
325
  * @throws {AppwriteException}
373
326
  * @returns {Promise<Models.Organization<Preferences>>}
374
327
  */
375
- async updateBudget<Preferences extends Models.Preferences>(organizationId: string, budget: number, alerts?: number[]): Promise<Models.Organization<Preferences>> {
328
+ updateBudget<Preferences extends Models.Preferences>(organizationId: string, budget?: number, alerts?: number[]): Promise<Models.Organization<Preferences>> {
376
329
  if (typeof organizationId === 'undefined') {
377
330
  throw new AppwriteException('Missing required parameter: "organizationId"');
378
331
  }
@@ -393,10 +346,7 @@ export class Organizations {
393
346
  'content-type': 'application/json',
394
347
  }
395
348
 
396
- payload['project'] = this.client.config.project;
397
-
398
-
399
- return await this.client.call(
349
+ return this.client.call(
400
350
  'patch',
401
351
  uri,
402
352
  apiHeaders,
@@ -404,8 +354,6 @@ export class Organizations {
404
354
  );
405
355
  }
406
356
  /**
407
- * List credits
408
- *
409
357
  * List all credits for an organization.
410
358
 
411
359
  *
@@ -414,7 +362,7 @@ export class Organizations {
414
362
  * @throws {AppwriteException}
415
363
  * @returns {Promise<Models.CreditList>}
416
364
  */
417
- async listCredits(organizationId: string, queries?: string[]): Promise<Models.CreditList> {
365
+ listCredits(organizationId: string, queries?: string[]): Promise<Models.CreditList> {
418
366
  if (typeof organizationId === 'undefined') {
419
367
  throw new AppwriteException('Missing required parameter: "organizationId"');
420
368
  }
@@ -429,10 +377,7 @@ export class Organizations {
429
377
  'content-type': 'application/json',
430
378
  }
431
379
 
432
- payload['project'] = this.client.config.project;
433
-
434
-
435
- return await this.client.call(
380
+ return this.client.call(
436
381
  'get',
437
382
  uri,
438
383
  apiHeaders,
@@ -440,8 +385,6 @@ export class Organizations {
440
385
  );
441
386
  }
442
387
  /**
443
- * Add credits from coupon
444
- *
445
388
  * Add credit to an organization using a coupon.
446
389
  *
447
390
  * @param {string} organizationId
@@ -449,7 +392,7 @@ export class Organizations {
449
392
  * @throws {AppwriteException}
450
393
  * @returns {Promise<Models.Credit>}
451
394
  */
452
- async addCredit(organizationId: string, couponId: string): Promise<Models.Credit> {
395
+ addCredit(organizationId: string, couponId: string): Promise<Models.Credit> {
453
396
  if (typeof organizationId === 'undefined') {
454
397
  throw new AppwriteException('Missing required parameter: "organizationId"');
455
398
  }
@@ -467,10 +410,7 @@ export class Organizations {
467
410
  'content-type': 'application/json',
468
411
  }
469
412
 
470
- payload['project'] = this.client.config.project;
471
-
472
-
473
- return await this.client.call(
413
+ return this.client.call(
474
414
  'post',
475
415
  uri,
476
416
  apiHeaders,
@@ -478,8 +418,6 @@ export class Organizations {
478
418
  );
479
419
  }
480
420
  /**
481
- * Get credit details
482
- *
483
421
  * Get credit details.
484
422
  *
485
423
  * @param {string} organizationId
@@ -487,7 +425,7 @@ export class Organizations {
487
425
  * @throws {AppwriteException}
488
426
  * @returns {Promise<Models.Credit>}
489
427
  */
490
- async getCredit(organizationId: string, creditId: string): Promise<Models.Credit> {
428
+ getCredit(organizationId: string, creditId: string): Promise<Models.Credit> {
491
429
  if (typeof organizationId === 'undefined') {
492
430
  throw new AppwriteException('Missing required parameter: "organizationId"');
493
431
  }
@@ -502,10 +440,7 @@ export class Organizations {
502
440
  'content-type': 'application/json',
503
441
  }
504
442
 
505
- payload['project'] = this.client.config.project;
506
-
507
-
508
- return await this.client.call(
443
+ return this.client.call(
509
444
  'get',
510
445
  uri,
511
446
  apiHeaders,
@@ -513,8 +448,6 @@ export class Organizations {
513
448
  );
514
449
  }
515
450
  /**
516
- * List invoices
517
- *
518
451
  * List all invoices for an organization.
519
452
  *
520
453
  * @param {string} organizationId
@@ -522,7 +455,7 @@ export class Organizations {
522
455
  * @throws {AppwriteException}
523
456
  * @returns {Promise<Models.InvoiceList>}
524
457
  */
525
- async listInvoices(organizationId: string, queries?: string[]): Promise<Models.InvoiceList> {
458
+ listInvoices(organizationId: string, queries?: string[]): Promise<Models.InvoiceList> {
526
459
  if (typeof organizationId === 'undefined') {
527
460
  throw new AppwriteException('Missing required parameter: "organizationId"');
528
461
  }
@@ -537,10 +470,7 @@ export class Organizations {
537
470
  'content-type': 'application/json',
538
471
  }
539
472
 
540
- payload['project'] = this.client.config.project;
541
-
542
-
543
- return await this.client.call(
473
+ return this.client.call(
544
474
  'get',
545
475
  uri,
546
476
  apiHeaders,
@@ -548,8 +478,6 @@ export class Organizations {
548
478
  );
549
479
  }
550
480
  /**
551
- * Get invoice
552
- *
553
481
  * Get an invoice by its unique ID.
554
482
  *
555
483
  * @param {string} organizationId
@@ -557,7 +485,7 @@ export class Organizations {
557
485
  * @throws {AppwriteException}
558
486
  * @returns {Promise<Models.Invoice>}
559
487
  */
560
- async getInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice> {
488
+ getInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice> {
561
489
  if (typeof organizationId === 'undefined') {
562
490
  throw new AppwriteException('Missing required parameter: "organizationId"');
563
491
  }
@@ -572,10 +500,7 @@ export class Organizations {
572
500
  'content-type': 'application/json',
573
501
  }
574
502
 
575
- payload['project'] = this.client.config.project;
576
-
577
-
578
- return await this.client.call(
503
+ return this.client.call(
579
504
  'get',
580
505
  uri,
581
506
  apiHeaders,
@@ -583,8 +508,6 @@ export class Organizations {
583
508
  );
584
509
  }
585
510
  /**
586
- * Download invoice in PDF
587
- *
588
511
  * Download invoice in PDF
589
512
  *
590
513
  * @param {string} organizationId
@@ -592,7 +515,7 @@ export class Organizations {
592
515
  * @throws {AppwriteException}
593
516
  * @returns {Promise<Models.PaymentMethod>}
594
517
  */
595
- async getInvoiceDownload(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod> {
518
+ getInvoiceDownload(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod> {
596
519
  if (typeof organizationId === 'undefined') {
597
520
  throw new AppwriteException('Missing required parameter: "organizationId"');
598
521
  }
@@ -607,10 +530,7 @@ export class Organizations {
607
530
  'content-type': 'application/json',
608
531
  }
609
532
 
610
- payload['project'] = this.client.config.project;
611
-
612
-
613
- return await this.client.call(
533
+ return this.client.call(
614
534
  'get',
615
535
  uri,
616
536
  apiHeaders,
@@ -618,8 +538,6 @@ export class Organizations {
618
538
  );
619
539
  }
620
540
  /**
621
- * Initiate payment for failed invoice to pay live from console
622
- *
623
541
  * Initiate payment for failed invoice to pay live from console
624
542
  *
625
543
  * @param {string} organizationId
@@ -628,7 +546,7 @@ export class Organizations {
628
546
  * @throws {AppwriteException}
629
547
  * @returns {Promise<Models.Invoice>}
630
548
  */
631
- async createInvoicePayment(organizationId: string, invoiceId: string, paymentMethodId: string): Promise<Models.Invoice> {
549
+ createInvoicePayment(organizationId: string, invoiceId: string, paymentMethodId: string): Promise<Models.Invoice> {
632
550
  if (typeof organizationId === 'undefined') {
633
551
  throw new AppwriteException('Missing required parameter: "organizationId"');
634
552
  }
@@ -649,10 +567,7 @@ export class Organizations {
649
567
  'content-type': 'application/json',
650
568
  }
651
569
 
652
- payload['project'] = this.client.config.project;
653
-
654
-
655
- return await this.client.call(
570
+ return this.client.call(
656
571
  'post',
657
572
  uri,
658
573
  apiHeaders,
@@ -660,8 +575,36 @@ export class Organizations {
660
575
  );
661
576
  }
662
577
  /**
663
- * View invoice in PDF
578
+ * Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.
664
579
  *
580
+ * @param {string} organizationId
581
+ * @param {string} invoiceId
582
+ * @throws {AppwriteException}
583
+ * @returns {Promise<Models.Invoice>}
584
+ */
585
+ validateInvoice(organizationId: string, invoiceId: string): Promise<Models.Invoice> {
586
+ if (typeof organizationId === 'undefined') {
587
+ throw new AppwriteException('Missing required parameter: "organizationId"');
588
+ }
589
+ if (typeof invoiceId === 'undefined') {
590
+ throw new AppwriteException('Missing required parameter: "invoiceId"');
591
+ }
592
+ const apiPath = '/organizations/{organizationId}/invoices/{invoiceId}/status'.replace('{organizationId}', organizationId).replace('{invoiceId}', invoiceId);
593
+ const payload: Payload = {};
594
+ const uri = new URL(this.client.config.endpoint + apiPath);
595
+
596
+ const apiHeaders: { [header: string]: string } = {
597
+ 'content-type': 'application/json',
598
+ }
599
+
600
+ return this.client.call(
601
+ 'patch',
602
+ uri,
603
+ apiHeaders,
604
+ payload
605
+ );
606
+ }
607
+ /**
665
608
  * View invoice in PDF
666
609
  *
667
610
  * @param {string} organizationId
@@ -669,7 +612,7 @@ export class Organizations {
669
612
  * @throws {AppwriteException}
670
613
  * @returns {Promise<Models.PaymentMethod>}
671
614
  */
672
- async getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod> {
615
+ getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod> {
673
616
  if (typeof organizationId === 'undefined') {
674
617
  throw new AppwriteException('Missing required parameter: "organizationId"');
675
618
  }
@@ -684,10 +627,7 @@ export class Organizations {
684
627
  'content-type': 'application/json',
685
628
  }
686
629
 
687
- payload['project'] = this.client.config.project;
688
-
689
-
690
- return await this.client.call(
630
+ return this.client.call(
691
631
  'get',
692
632
  uri,
693
633
  apiHeaders,
@@ -695,8 +635,6 @@ export class Organizations {
695
635
  );
696
636
  }
697
637
  /**
698
- * Set team&#039;s payment method
699
- *
700
638
  * Set a organization&#039;s default payment method.
701
639
  *
702
640
  * @param {string} organizationId
@@ -704,7 +642,7 @@ export class Organizations {
704
642
  * @throws {AppwriteException}
705
643
  * @returns {Promise<Models.Organization<Preferences>>}
706
644
  */
707
- async setDefaultPaymentMethod<Preferences extends Models.Preferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>> {
645
+ setDefaultPaymentMethod<Preferences extends Models.Preferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>> {
708
646
  if (typeof organizationId === 'undefined') {
709
647
  throw new AppwriteException('Missing required parameter: "organizationId"');
710
648
  }
@@ -722,10 +660,7 @@ export class Organizations {
722
660
  'content-type': 'application/json',
723
661
  }
724
662
 
725
- payload['project'] = this.client.config.project;
726
-
727
-
728
- return await this.client.call(
663
+ return this.client.call(
729
664
  'patch',
730
665
  uri,
731
666
  apiHeaders,
@@ -733,15 +668,13 @@ export class Organizations {
733
668
  );
734
669
  }
735
670
  /**
736
- * Delete team&#039;s default payment method
737
- *
738
671
  * Delete the default payment method for an organization.
739
672
  *
740
673
  * @param {string} organizationId
741
674
  * @throws {AppwriteException}
742
675
  * @returns {Promise<Models.Organization<Preferences>>}
743
676
  */
744
- async deleteDefaultPaymentMethod<Preferences extends Models.Preferences>(organizationId: string): Promise<Models.Organization<Preferences>> {
677
+ deleteDefaultPaymentMethod<Preferences extends Models.Preferences>(organizationId: string): Promise<Models.Organization<Preferences>> {
745
678
  if (typeof organizationId === 'undefined') {
746
679
  throw new AppwriteException('Missing required parameter: "organizationId"');
747
680
  }
@@ -753,10 +686,7 @@ export class Organizations {
753
686
  'content-type': 'application/json',
754
687
  }
755
688
 
756
- payload['project'] = this.client.config.project;
757
-
758
-
759
- return await this.client.call(
689
+ return this.client.call(
760
690
  'delete',
761
691
  uri,
762
692
  apiHeaders,
@@ -764,8 +694,6 @@ export class Organizations {
764
694
  );
765
695
  }
766
696
  /**
767
- * Set team&#039;s backup payment method
768
- *
769
697
  * Set an organization&#039;s backup payment method.
770
698
 
771
699
  *
@@ -774,7 +702,7 @@ export class Organizations {
774
702
  * @throws {AppwriteException}
775
703
  * @returns {Promise<Models.Organization<Preferences>>}
776
704
  */
777
- async setBackupPaymentMethod<Preferences extends Models.Preferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>> {
705
+ setBackupPaymentMethod<Preferences extends Models.Preferences>(organizationId: string, paymentMethodId: string): Promise<Models.Organization<Preferences>> {
778
706
  if (typeof organizationId === 'undefined') {
779
707
  throw new AppwriteException('Missing required parameter: "organizationId"');
780
708
  }
@@ -792,10 +720,7 @@ export class Organizations {
792
720
  'content-type': 'application/json',
793
721
  }
794
722
 
795
- payload['project'] = this.client.config.project;
796
-
797
-
798
- return await this.client.call(
723
+ return this.client.call(
799
724
  'patch',
800
725
  uri,
801
726
  apiHeaders,
@@ -803,15 +728,13 @@ export class Organizations {
803
728
  );
804
729
  }
805
730
  /**
806
- * Delete team&#039;s backup payment method
807
- *
808
731
  * Delete a backup payment method for an organization.
809
732
  *
810
733
  * @param {string} organizationId
811
734
  * @throws {AppwriteException}
812
735
  * @returns {Promise<Models.Organization<Preferences>>}
813
736
  */
814
- async deleteBackupPaymentMethod<Preferences extends Models.Preferences>(organizationId: string): Promise<Models.Organization<Preferences>> {
737
+ deleteBackupPaymentMethod<Preferences extends Models.Preferences>(organizationId: string): Promise<Models.Organization<Preferences>> {
815
738
  if (typeof organizationId === 'undefined') {
816
739
  throw new AppwriteException('Missing required parameter: "organizationId"');
817
740
  }
@@ -823,10 +746,7 @@ export class Organizations {
823
746
  'content-type': 'application/json',
824
747
  }
825
748
 
826
- payload['project'] = this.client.config.project;
827
-
828
-
829
- return await this.client.call(
749
+ return this.client.call(
830
750
  'delete',
831
751
  uri,
832
752
  apiHeaders,
@@ -834,8 +754,6 @@ export class Organizations {
834
754
  );
835
755
  }
836
756
  /**
837
- * Get payment method
838
- *
839
757
  * Get an organization&#039;s payment method using it&#039;s payment method ID.
840
758
  *
841
759
  * @param {string} organizationId
@@ -843,7 +761,7 @@ export class Organizations {
843
761
  * @throws {AppwriteException}
844
762
  * @returns {Promise<Models.PaymentMethod>}
845
763
  */
846
- async getPaymentMethod(organizationId: string, paymentMethodId: string): Promise<Models.PaymentMethod> {
764
+ getPaymentMethod(organizationId: string, paymentMethodId: string): Promise<Models.PaymentMethod> {
847
765
  if (typeof organizationId === 'undefined') {
848
766
  throw new AppwriteException('Missing required parameter: "organizationId"');
849
767
  }
@@ -858,10 +776,7 @@ export class Organizations {
858
776
  'content-type': 'application/json',
859
777
  }
860
778
 
861
- payload['project'] = this.client.config.project;
862
-
863
-
864
- return await this.client.call(
779
+ return this.client.call(
865
780
  'get',
866
781
  uri,
867
782
  apiHeaders,
@@ -869,15 +784,13 @@ export class Organizations {
869
784
  );
870
785
  }
871
786
  /**
872
- * Get organization billing plan details
873
- *
874
787
  * Get the details of the current billing plan for an organization.
875
788
  *
876
789
  * @param {string} organizationId
877
790
  * @throws {AppwriteException}
878
791
  * @returns {Promise<Models.BillingPlan>}
879
792
  */
880
- async getPlan(organizationId: string): Promise<Models.BillingPlan> {
793
+ getPlan(organizationId: string): Promise<Models.BillingPlan> {
881
794
  if (typeof organizationId === 'undefined') {
882
795
  throw new AppwriteException('Missing required parameter: "organizationId"');
883
796
  }
@@ -889,10 +802,7 @@ export class Organizations {
889
802
  'content-type': 'application/json',
890
803
  }
891
804
 
892
- payload['project'] = this.client.config.project;
893
-
894
-
895
- return await this.client.call(
805
+ return this.client.call(
896
806
  'get',
897
807
  uri,
898
808
  apiHeaders,
@@ -900,8 +810,6 @@ export class Organizations {
900
810
  );
901
811
  }
902
812
  /**
903
- * Update organization billing plan
904
- *
905
813
  * Update the billing plan for an organization.
906
814
  *
907
815
  * @param {string} organizationId
@@ -915,7 +823,7 @@ export class Organizations {
915
823
  * @throws {AppwriteException}
916
824
  * @returns {Promise<Models.Organization<Preferences>>}
917
825
  */
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>> {
826
+ 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>> {
919
827
  if (typeof organizationId === 'undefined') {
920
828
  throw new AppwriteException('Missing required parameter: "organizationId"');
921
829
  }
@@ -951,10 +859,7 @@ export class Organizations {
951
859
  'content-type': 'application/json',
952
860
  }
953
861
 
954
- payload['project'] = this.client.config.project;
955
-
956
-
957
- return await this.client.call(
862
+ return this.client.call(
958
863
  'patch',
959
864
  uri,
960
865
  apiHeaders,
@@ -962,15 +867,13 @@ export class Organizations {
962
867
  );
963
868
  }
964
869
  /**
965
- * Get Scopes
966
- *
967
870
  * Get Scopes
968
871
  *
969
872
  * @param {string} organizationId
970
873
  * @throws {AppwriteException}
971
874
  * @returns {Promise<Models.Roles>}
972
875
  */
973
- async getScopes(organizationId: string): Promise<Models.Roles> {
876
+ getScopes(organizationId: string): Promise<Models.Roles> {
974
877
  if (typeof organizationId === 'undefined') {
975
878
  throw new AppwriteException('Missing required parameter: "organizationId"');
976
879
  }
@@ -982,10 +885,7 @@ export class Organizations {
982
885
  'content-type': 'application/json',
983
886
  }
984
887
 
985
- payload['project'] = this.client.config.project;
986
-
987
-
988
- return await this.client.call(
888
+ return this.client.call(
989
889
  'get',
990
890
  uri,
991
891
  apiHeaders,
@@ -993,8 +893,6 @@ export class Organizations {
993
893
  );
994
894
  }
995
895
  /**
996
- * Set team&#039;s tax Id
997
- *
998
896
  * Set an organization&#039;s billing tax ID.
999
897
  *
1000
898
  * @param {string} organizationId
@@ -1002,7 +900,7 @@ export class Organizations {
1002
900
  * @throws {AppwriteException}
1003
901
  * @returns {Promise<Models.Organization<Preferences>>}
1004
902
  */
1005
- async setBillingTaxId<Preferences extends Models.Preferences>(organizationId: string, taxId: string): Promise<Models.Organization<Preferences>> {
903
+ setBillingTaxId<Preferences extends Models.Preferences>(organizationId: string, taxId: string): Promise<Models.Organization<Preferences>> {
1006
904
  if (typeof organizationId === 'undefined') {
1007
905
  throw new AppwriteException('Missing required parameter: "organizationId"');
1008
906
  }
@@ -1020,10 +918,7 @@ export class Organizations {
1020
918
  'content-type': 'application/json',
1021
919
  }
1022
920
 
1023
- payload['project'] = this.client.config.project;
1024
-
1025
-
1026
- return await this.client.call(
921
+ return this.client.call(
1027
922
  'patch',
1028
923
  uri,
1029
924
  apiHeaders,
@@ -1031,8 +926,6 @@ export class Organizations {
1031
926
  );
1032
927
  }
1033
928
  /**
1034
- * Get team&#039;s usage data
1035
- *
1036
929
  * Get the usage data for an organization.
1037
930
  *
1038
931
  * @param {string} organizationId
@@ -1041,7 +934,7 @@ export class Organizations {
1041
934
  * @throws {AppwriteException}
1042
935
  * @returns {Promise<Models.UsageOrganization>}
1043
936
  */
1044
- async getUsage(organizationId: string, startDate?: string, endDate?: string): Promise<Models.UsageOrganization> {
937
+ getUsage(organizationId: string, startDate?: string, endDate?: string): Promise<Models.UsageOrganization> {
1045
938
  if (typeof organizationId === 'undefined') {
1046
939
  throw new AppwriteException('Missing required parameter: "organizationId"');
1047
940
  }
@@ -1059,10 +952,7 @@ export class Organizations {
1059
952
  'content-type': 'application/json',
1060
953
  }
1061
954
 
1062
- payload['project'] = this.client.config.project;
1063
-
1064
-
1065
- return await this.client.call(
955
+ return this.client.call(
1066
956
  'get',
1067
957
  uri,
1068
958
  apiHeaders,