@appwrite.io/console 3.1.0 → 5.0.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 (83) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +516 -119
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +517 -120
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +516 -119
  8. package/docs/examples/databases/list-documents.md +2 -1
  9. package/docs/examples/domains/confirm-purchase.md +16 -0
  10. package/docs/examples/domains/confirm-transfer-in.md +16 -0
  11. package/docs/examples/domains/create-purchase.md +1 -1
  12. package/docs/examples/domains/create-transfer-in.md +18 -0
  13. package/docs/examples/domains/create-transfer-out.md +16 -0
  14. package/docs/examples/domains/get-transfer-status.md +15 -0
  15. package/docs/examples/functions/create.md +3 -1
  16. package/docs/examples/functions/update.md +3 -1
  17. package/docs/examples/health/get-console-pausing.md +16 -0
  18. package/docs/examples/migrations/create-appwrite-migration.md +2 -2
  19. package/docs/examples/migrations/create-firebase-migration.md +2 -2
  20. package/docs/examples/migrations/create-n-host-migration.md +2 -2
  21. package/docs/examples/migrations/create-supabase-migration.md +2 -2
  22. package/docs/examples/migrations/get-appwrite-report.md +2 -2
  23. package/docs/examples/migrations/get-firebase-report.md +2 -2
  24. package/docs/examples/migrations/get-n-host-report.md +2 -2
  25. package/docs/examples/migrations/get-supabase-report.md +2 -2
  26. package/docs/examples/projects/update-console-access.md +15 -0
  27. package/docs/examples/projects/update-status.md +16 -0
  28. package/docs/examples/sites/create-deployment.md +2 -2
  29. package/docs/examples/sites/create.md +4 -1
  30. package/docs/examples/sites/update.md +4 -1
  31. package/docs/examples/tablesdb/list-rows.md +2 -1
  32. package/package.json +1 -1
  33. package/src/channel.ts +19 -15
  34. package/src/client.ts +5 -1
  35. package/src/enums/appwrite-migration-resource.ts +25 -0
  36. package/src/enums/build-runtime.ts +3 -0
  37. package/src/enums/domain-purchase-payment-status.ts +10 -0
  38. package/src/enums/domain-transfer-status-status.ts +10 -0
  39. package/src/enums/firebase-migration-resource.ts +12 -0
  40. package/src/enums/{resources.ts → n-host-migration-resource.ts} +1 -1
  41. package/src/enums/runtime.ts +3 -0
  42. package/src/enums/runtimes.ts +3 -0
  43. package/src/enums/status.ts +3 -0
  44. package/src/enums/supabase-migration-resource.ts +13 -0
  45. package/src/index.ts +7 -1
  46. package/src/models.ts +209 -7
  47. package/src/services/account.ts +4 -4
  48. package/src/services/databases.ts +100 -93
  49. package/src/services/domains.ts +342 -13
  50. package/src/services/functions.ts +52 -24
  51. package/src/services/health.ts +61 -0
  52. package/src/services/messaging.ts +2 -2
  53. package/src/services/migrations.ts +68 -65
  54. package/src/services/organizations.ts +2 -2
  55. package/src/services/projects.ts +120 -0
  56. package/src/services/sites.ts +96 -57
  57. package/src/services/tables-db.ts +14 -7
  58. package/src/services/teams.ts +4 -4
  59. package/types/channel.d.ts +9 -9
  60. package/types/enums/appwrite-migration-resource.d.ts +25 -0
  61. package/types/enums/build-runtime.d.ts +3 -0
  62. package/types/enums/domain-purchase-payment-status.d.ts +10 -0
  63. package/types/enums/domain-transfer-status-status.d.ts +10 -0
  64. package/types/enums/firebase-migration-resource.d.ts +12 -0
  65. package/types/enums/{resources.d.ts → n-host-migration-resource.d.ts} +1 -1
  66. package/types/enums/runtime.d.ts +3 -0
  67. package/types/enums/runtimes.d.ts +3 -0
  68. package/types/enums/status.d.ts +3 -0
  69. package/types/enums/supabase-migration-resource.d.ts +13 -0
  70. package/types/index.d.ts +7 -1
  71. package/types/models.d.ts +207 -7
  72. package/types/services/account.d.ts +2 -2
  73. package/types/services/databases.d.ts +40 -37
  74. package/types/services/domains.d.ts +117 -4
  75. package/types/services/functions.d.ts +20 -8
  76. package/types/services/health.d.ts +24 -0
  77. package/types/services/messaging.d.ts +2 -2
  78. package/types/services/migrations.d.ts +36 -33
  79. package/types/services/organizations.d.ts +2 -2
  80. package/types/services/projects.d.ts +46 -0
  81. package/types/services/sites.d.ts +30 -12
  82. package/types/services/tables-db.d.ts +4 -1
  83. package/types/services/teams.d.ts +4 -4
@@ -210,7 +210,7 @@ export class Domains {
210
210
  * Create a domain purchase with registrant information.
211
211
  *
212
212
  * @param {string} params.domain - Fully qualified domain name to purchase (for example, example.com).
213
- * @param {string} params.teamId - Team ID that will own the domain.
213
+ * @param {string} params.organizationId - Team ID that will own the domain.
214
214
  * @param {string} params.firstName - Registrant first name used for domain registration.
215
215
  * @param {string} params.lastName - Registrant last name used for domain registration.
216
216
  * @param {string} params.email - Registrant email address for registration and notices.
@@ -223,12 +223,12 @@ export class Domains {
223
223
  * @throws {AppwriteException}
224
224
  * @returns {Promise<Models.Domain>}
225
225
  */
226
- createPurchase(params: { domain: string, teamId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number }): Promise<Models.Domain>;
226
+ createPurchase(params: { domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number }): Promise<Models.Domain>;
227
227
  /**
228
228
  * Create a domain purchase with registrant information.
229
229
  *
230
230
  * @param {string} domain - Fully qualified domain name to purchase (for example, example.com).
231
- * @param {string} teamId - Team ID that will own the domain.
231
+ * @param {string} organizationId - Team ID that will own the domain.
232
232
  * @param {string} firstName - Registrant first name used for domain registration.
233
233
  * @param {string} lastName - Registrant last name used for domain registration.
234
234
  * @param {string} email - Registrant email address for registration and notices.
@@ -242,19 +242,19 @@ export class Domains {
242
242
  * @returns {Promise<Models.Domain>}
243
243
  * @deprecated Use the object parameter style method for a better developer experience.
244
244
  */
245
- createPurchase(domain: string, teamId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number): Promise<Models.Domain>;
245
+ createPurchase(domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number): Promise<Models.Domain>;
246
246
  createPurchase(
247
- paramsOrFirst: { domain: string, teamId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number } | string,
247
+ paramsOrFirst: { domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number } | string,
248
248
  ...rest: [(string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (number)?]
249
249
  ): Promise<Models.Domain> {
250
- let params: { domain: string, teamId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number };
250
+ let params: { domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number };
251
251
 
252
252
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
253
- params = (paramsOrFirst || {}) as { domain: string, teamId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number };
253
+ params = (paramsOrFirst || {}) as { domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number };
254
254
  } else {
255
255
  params = {
256
256
  domain: paramsOrFirst as string,
257
- teamId: rest[0] as string,
257
+ organizationId: rest[0] as string,
258
258
  firstName: rest[1] as string,
259
259
  lastName: rest[2] as string,
260
260
  email: rest[3] as string,
@@ -268,7 +268,7 @@ export class Domains {
268
268
  }
269
269
 
270
270
  const domain = params.domain;
271
- const teamId = params.teamId;
271
+ const organizationId = params.organizationId;
272
272
  const firstName = params.firstName;
273
273
  const lastName = params.lastName;
274
274
  const email = params.email;
@@ -282,8 +282,8 @@ export class Domains {
282
282
  if (typeof domain === 'undefined') {
283
283
  throw new AppwriteException('Missing required parameter: "domain"');
284
284
  }
285
- if (typeof teamId === 'undefined') {
286
- throw new AppwriteException('Missing required parameter: "teamId"');
285
+ if (typeof organizationId === 'undefined') {
286
+ throw new AppwriteException('Missing required parameter: "organizationId"');
287
287
  }
288
288
  if (typeof firstName === 'undefined') {
289
289
  throw new AppwriteException('Missing required parameter: "firstName"');
@@ -309,8 +309,8 @@ export class Domains {
309
309
  if (typeof domain !== 'undefined') {
310
310
  payload['domain'] = domain;
311
311
  }
312
- if (typeof teamId !== 'undefined') {
313
- payload['teamId'] = teamId;
312
+ if (typeof organizationId !== 'undefined') {
313
+ payload['organizationId'] = organizationId;
314
314
  }
315
315
  if (typeof firstName !== 'undefined') {
316
316
  payload['firstName'] = firstName;
@@ -353,6 +353,69 @@ export class Domains {
353
353
  );
354
354
  }
355
355
 
356
+ /**
357
+ * Confirm a domain purchase after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
358
+ *
359
+ * @param {string} params.domainId - Domain ID to confirm purchase for.
360
+ * @param {string} params.organizationId - Team ID that owns the domain.
361
+ * @throws {AppwriteException}
362
+ * @returns {Promise<Models.Domain>}
363
+ */
364
+ confirmPurchase(params: { domainId: string, organizationId: string }): Promise<Models.Domain>;
365
+ /**
366
+ * Confirm a domain purchase after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
367
+ *
368
+ * @param {string} domainId - Domain ID to confirm purchase for.
369
+ * @param {string} organizationId - Team ID that owns the domain.
370
+ * @throws {AppwriteException}
371
+ * @returns {Promise<Models.Domain>}
372
+ * @deprecated Use the object parameter style method for a better developer experience.
373
+ */
374
+ confirmPurchase(domainId: string, organizationId: string): Promise<Models.Domain>;
375
+ confirmPurchase(
376
+ paramsOrFirst: { domainId: string, organizationId: string } | string,
377
+ ...rest: [(string)?]
378
+ ): Promise<Models.Domain> {
379
+ let params: { domainId: string, organizationId: string };
380
+
381
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
382
+ params = (paramsOrFirst || {}) as { domainId: string, organizationId: string };
383
+ } else {
384
+ params = {
385
+ domainId: paramsOrFirst as string,
386
+ organizationId: rest[0] as string
387
+ };
388
+ }
389
+
390
+ const domainId = params.domainId;
391
+ const organizationId = params.organizationId;
392
+
393
+ if (typeof domainId === 'undefined') {
394
+ throw new AppwriteException('Missing required parameter: "domainId"');
395
+ }
396
+ if (typeof organizationId === 'undefined') {
397
+ throw new AppwriteException('Missing required parameter: "organizationId"');
398
+ }
399
+
400
+ const apiPath = '/domains/purchases/{domainId}/confirm'.replace('{domainId}', domainId);
401
+ const payload: Payload = {};
402
+ if (typeof organizationId !== 'undefined') {
403
+ payload['organizationId'] = organizationId;
404
+ }
405
+ const uri = new URL(this.client.config.endpoint + apiPath);
406
+
407
+ const apiHeaders: { [header: string]: string } = {
408
+ 'content-type': 'application/json',
409
+ }
410
+
411
+ return this.client.call(
412
+ 'post',
413
+ uri,
414
+ apiHeaders,
415
+ payload
416
+ );
417
+ }
418
+
356
419
  /**
357
420
  * List domain suggestions.
358
421
  *
@@ -443,6 +506,221 @@ export class Domains {
443
506
  );
444
507
  }
445
508
 
509
+ /**
510
+ * Create a domain transfer in with authorization code and registrant information.
511
+ *
512
+ * @param {string} params.domain - Domain name to transfer in.
513
+ * @param {string} params.organizationId - Organization ID that this domain will belong to.
514
+ * @param {string} params.authCode - Authorization code for the domain transfer.
515
+ * @param {string} params.paymentMethodId - Payment method ID to authorize and capture the transfer.
516
+ * @throws {AppwriteException}
517
+ * @returns {Promise<Models.Domain>}
518
+ */
519
+ createTransferIn(params: { domain: string, organizationId: string, authCode: string, paymentMethodId: string }): Promise<Models.Domain>;
520
+ /**
521
+ * Create a domain transfer in with authorization code and registrant information.
522
+ *
523
+ * @param {string} domain - Domain name to transfer in.
524
+ * @param {string} organizationId - Organization ID that this domain will belong to.
525
+ * @param {string} authCode - Authorization code for the domain transfer.
526
+ * @param {string} paymentMethodId - Payment method ID to authorize and capture the transfer.
527
+ * @throws {AppwriteException}
528
+ * @returns {Promise<Models.Domain>}
529
+ * @deprecated Use the object parameter style method for a better developer experience.
530
+ */
531
+ createTransferIn(domain: string, organizationId: string, authCode: string, paymentMethodId: string): Promise<Models.Domain>;
532
+ createTransferIn(
533
+ paramsOrFirst: { domain: string, organizationId: string, authCode: string, paymentMethodId: string } | string,
534
+ ...rest: [(string)?, (string)?, (string)?]
535
+ ): Promise<Models.Domain> {
536
+ let params: { domain: string, organizationId: string, authCode: string, paymentMethodId: string };
537
+
538
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
539
+ params = (paramsOrFirst || {}) as { domain: string, organizationId: string, authCode: string, paymentMethodId: string };
540
+ } else {
541
+ params = {
542
+ domain: paramsOrFirst as string,
543
+ organizationId: rest[0] as string,
544
+ authCode: rest[1] as string,
545
+ paymentMethodId: rest[2] as string
546
+ };
547
+ }
548
+
549
+ const domain = params.domain;
550
+ const organizationId = params.organizationId;
551
+ const authCode = params.authCode;
552
+ const paymentMethodId = params.paymentMethodId;
553
+
554
+ if (typeof domain === 'undefined') {
555
+ throw new AppwriteException('Missing required parameter: "domain"');
556
+ }
557
+ if (typeof organizationId === 'undefined') {
558
+ throw new AppwriteException('Missing required parameter: "organizationId"');
559
+ }
560
+ if (typeof authCode === 'undefined') {
561
+ throw new AppwriteException('Missing required parameter: "authCode"');
562
+ }
563
+ if (typeof paymentMethodId === 'undefined') {
564
+ throw new AppwriteException('Missing required parameter: "paymentMethodId"');
565
+ }
566
+
567
+ const apiPath = '/domains/transfers/in';
568
+ const payload: Payload = {};
569
+ if (typeof domain !== 'undefined') {
570
+ payload['domain'] = domain;
571
+ }
572
+ if (typeof organizationId !== 'undefined') {
573
+ payload['organizationId'] = organizationId;
574
+ }
575
+ if (typeof authCode !== 'undefined') {
576
+ payload['authCode'] = authCode;
577
+ }
578
+ if (typeof paymentMethodId !== 'undefined') {
579
+ payload['paymentMethodId'] = paymentMethodId;
580
+ }
581
+ const uri = new URL(this.client.config.endpoint + apiPath);
582
+
583
+ const apiHeaders: { [header: string]: string } = {
584
+ 'content-type': 'application/json',
585
+ }
586
+
587
+ return this.client.call(
588
+ 'post',
589
+ uri,
590
+ apiHeaders,
591
+ payload
592
+ );
593
+ }
594
+
595
+ /**
596
+ * Confirm a domain transfer in after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
597
+ *
598
+ * @param {string} params.domainId - Domain ID to confirm transfer for.
599
+ * @param {string} params.organizationId - Team ID that owns the domain.
600
+ * @throws {AppwriteException}
601
+ * @returns {Promise<Models.Domain>}
602
+ */
603
+ confirmTransferIn(params: { domainId: string, organizationId: string }): Promise<Models.Domain>;
604
+ /**
605
+ * Confirm a domain transfer in after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
606
+ *
607
+ * @param {string} domainId - Domain ID to confirm transfer for.
608
+ * @param {string} organizationId - Team ID that owns the domain.
609
+ * @throws {AppwriteException}
610
+ * @returns {Promise<Models.Domain>}
611
+ * @deprecated Use the object parameter style method for a better developer experience.
612
+ */
613
+ confirmTransferIn(domainId: string, organizationId: string): Promise<Models.Domain>;
614
+ confirmTransferIn(
615
+ paramsOrFirst: { domainId: string, organizationId: string } | string,
616
+ ...rest: [(string)?]
617
+ ): Promise<Models.Domain> {
618
+ let params: { domainId: string, organizationId: string };
619
+
620
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
621
+ params = (paramsOrFirst || {}) as { domainId: string, organizationId: string };
622
+ } else {
623
+ params = {
624
+ domainId: paramsOrFirst as string,
625
+ organizationId: rest[0] as string
626
+ };
627
+ }
628
+
629
+ const domainId = params.domainId;
630
+ const organizationId = params.organizationId;
631
+
632
+ if (typeof domainId === 'undefined') {
633
+ throw new AppwriteException('Missing required parameter: "domainId"');
634
+ }
635
+ if (typeof organizationId === 'undefined') {
636
+ throw new AppwriteException('Missing required parameter: "organizationId"');
637
+ }
638
+
639
+ const apiPath = '/domains/transfers/in/{domainId}/confirm'.replace('{domainId}', domainId);
640
+ const payload: Payload = {};
641
+ if (typeof organizationId !== 'undefined') {
642
+ payload['organizationId'] = organizationId;
643
+ }
644
+ const uri = new URL(this.client.config.endpoint + apiPath);
645
+
646
+ const apiHeaders: { [header: string]: string } = {
647
+ 'content-type': 'application/json',
648
+ }
649
+
650
+ return this.client.call(
651
+ 'post',
652
+ uri,
653
+ apiHeaders,
654
+ payload
655
+ );
656
+ }
657
+
658
+ /**
659
+ * Create a domain transfer out and return the authorization code.
660
+ *
661
+ * @param {string} params.domainId - Domain unique ID.
662
+ * @param {string} params.organizationId - Organization ID that this domain belongs to.
663
+ * @throws {AppwriteException}
664
+ * @returns {Promise<Models.DomainTransferOut>}
665
+ */
666
+ createTransferOut(params: { domainId: string, organizationId: string }): Promise<Models.DomainTransferOut>;
667
+ /**
668
+ * Create a domain transfer out and return the authorization code.
669
+ *
670
+ * @param {string} domainId - Domain unique ID.
671
+ * @param {string} organizationId - Organization ID that this domain belongs to.
672
+ * @throws {AppwriteException}
673
+ * @returns {Promise<Models.DomainTransferOut>}
674
+ * @deprecated Use the object parameter style method for a better developer experience.
675
+ */
676
+ createTransferOut(domainId: string, organizationId: string): Promise<Models.DomainTransferOut>;
677
+ createTransferOut(
678
+ paramsOrFirst: { domainId: string, organizationId: string } | string,
679
+ ...rest: [(string)?]
680
+ ): Promise<Models.DomainTransferOut> {
681
+ let params: { domainId: string, organizationId: string };
682
+
683
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
684
+ params = (paramsOrFirst || {}) as { domainId: string, organizationId: string };
685
+ } else {
686
+ params = {
687
+ domainId: paramsOrFirst as string,
688
+ organizationId: rest[0] as string
689
+ };
690
+ }
691
+
692
+ const domainId = params.domainId;
693
+ const organizationId = params.organizationId;
694
+
695
+ if (typeof domainId === 'undefined') {
696
+ throw new AppwriteException('Missing required parameter: "domainId"');
697
+ }
698
+ if (typeof organizationId === 'undefined') {
699
+ throw new AppwriteException('Missing required parameter: "organizationId"');
700
+ }
701
+
702
+ const apiPath = '/domains/transfers/out';
703
+ const payload: Payload = {};
704
+ if (typeof domainId !== 'undefined') {
705
+ payload['domainId'] = domainId;
706
+ }
707
+ if (typeof organizationId !== 'undefined') {
708
+ payload['organizationId'] = organizationId;
709
+ }
710
+ const uri = new URL(this.client.config.endpoint + apiPath);
711
+
712
+ const apiHeaders: { [header: string]: string } = {
713
+ 'content-type': 'application/json',
714
+ }
715
+
716
+ return this.client.call(
717
+ 'post',
718
+ uri,
719
+ apiHeaders,
720
+ payload
721
+ );
722
+ }
723
+
446
724
  /**
447
725
  * Get a domain by its unique ID.
448
726
  *
@@ -3538,6 +3816,57 @@ export class Domains {
3538
3816
  );
3539
3817
  }
3540
3818
 
3819
+ /**
3820
+ * Get the transfer status for a domain.
3821
+ *
3822
+ * @param {string} params.domainId - Domain unique ID.
3823
+ * @throws {AppwriteException}
3824
+ * @returns {Promise<Models.DomainTransferStatus>}
3825
+ */
3826
+ getTransferStatus(params: { domainId: string }): Promise<Models.DomainTransferStatus>;
3827
+ /**
3828
+ * Get the transfer status for a domain.
3829
+ *
3830
+ * @param {string} domainId - Domain unique ID.
3831
+ * @throws {AppwriteException}
3832
+ * @returns {Promise<Models.DomainTransferStatus>}
3833
+ * @deprecated Use the object parameter style method for a better developer experience.
3834
+ */
3835
+ getTransferStatus(domainId: string): Promise<Models.DomainTransferStatus>;
3836
+ getTransferStatus(
3837
+ paramsOrFirst: { domainId: string } | string
3838
+ ): Promise<Models.DomainTransferStatus> {
3839
+ let params: { domainId: string };
3840
+
3841
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
3842
+ params = (paramsOrFirst || {}) as { domainId: string };
3843
+ } else {
3844
+ params = {
3845
+ domainId: paramsOrFirst as string
3846
+ };
3847
+ }
3848
+
3849
+ const domainId = params.domainId;
3850
+
3851
+ if (typeof domainId === 'undefined') {
3852
+ throw new AppwriteException('Missing required parameter: "domainId"');
3853
+ }
3854
+
3855
+ const apiPath = '/domains/{domainId}/transfers/status'.replace('{domainId}', domainId);
3856
+ const payload: Payload = {};
3857
+ const uri = new URL(this.client.config.endpoint + apiPath);
3858
+
3859
+ const apiHeaders: { [header: string]: string } = {
3860
+ }
3861
+
3862
+ return this.client.call(
3863
+ 'get',
3864
+ uri,
3865
+ apiHeaders,
3866
+ payload
3867
+ );
3868
+ }
3869
+
3541
3870
  /**
3542
3871
  * Retrieve the DNS zone file for the given domain. This endpoint will return the DNS
3543
3872
  * zone file in a standardized format that can be used to configure DNS servers.
@@ -105,11 +105,13 @@ export class Functions {
105
105
  * @param {string} params.providerBranch - Production branch for the repo linked to the function.
106
106
  * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
107
107
  * @param {string} params.providerRootDirectory - Path to function code in the linked repo.
108
- * @param {string} params.specification - Runtime specification for the function and builds.
108
+ * @param {string} params.buildSpecification - Build specification for the function deployments.
109
+ * @param {string} params.runtimeSpecification - Runtime specification for the function executions.
110
+ * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
109
111
  * @throws {AppwriteException}
110
112
  * @returns {Promise<Models.Function>}
111
113
  */
112
- create(params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Function>;
114
+ create(params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number }): Promise<Models.Function>;
113
115
  /**
114
116
  * Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
115
117
  *
@@ -130,20 +132,22 @@ export class Functions {
130
132
  * @param {string} providerBranch - Production branch for the repo linked to the function.
131
133
  * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
132
134
  * @param {string} providerRootDirectory - Path to function code in the linked repo.
133
- * @param {string} specification - Runtime specification for the function and builds.
135
+ * @param {string} buildSpecification - Build specification for the function deployments.
136
+ * @param {string} runtimeSpecification - Runtime specification for the function executions.
137
+ * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
134
138
  * @throws {AppwriteException}
135
139
  * @returns {Promise<Models.Function>}
136
140
  * @deprecated Use the object parameter style method for a better developer experience.
137
141
  */
138
- create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
142
+ create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
139
143
  create(
140
- paramsOrFirst: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
141
- ...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (Scopes[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
144
+ paramsOrFirst: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number } | string,
145
+ ...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (Scopes[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?, (string)?, (number)?]
142
146
  ): Promise<Models.Function> {
143
- let params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
147
+ let params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
144
148
 
145
149
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
146
- params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
150
+ params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
147
151
  } else {
148
152
  params = {
149
153
  functionId: paramsOrFirst as string,
@@ -163,7 +167,9 @@ export class Functions {
163
167
  providerBranch: rest[13] as string,
164
168
  providerSilentMode: rest[14] as boolean,
165
169
  providerRootDirectory: rest[15] as string,
166
- specification: rest[16] as string
170
+ buildSpecification: rest[16] as string,
171
+ runtimeSpecification: rest[17] as string,
172
+ deploymentRetention: rest[18] as number
167
173
  };
168
174
  }
169
175
 
@@ -184,7 +190,9 @@ export class Functions {
184
190
  const providerBranch = params.providerBranch;
185
191
  const providerSilentMode = params.providerSilentMode;
186
192
  const providerRootDirectory = params.providerRootDirectory;
187
- const specification = params.specification;
193
+ const buildSpecification = params.buildSpecification;
194
+ const runtimeSpecification = params.runtimeSpecification;
195
+ const deploymentRetention = params.deploymentRetention;
188
196
 
189
197
  if (typeof functionId === 'undefined') {
190
198
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -249,8 +257,14 @@ export class Functions {
249
257
  if (typeof providerRootDirectory !== 'undefined') {
250
258
  payload['providerRootDirectory'] = providerRootDirectory;
251
259
  }
252
- if (typeof specification !== 'undefined') {
253
- payload['specification'] = specification;
260
+ if (typeof buildSpecification !== 'undefined') {
261
+ payload['buildSpecification'] = buildSpecification;
262
+ }
263
+ if (typeof runtimeSpecification !== 'undefined') {
264
+ payload['runtimeSpecification'] = runtimeSpecification;
265
+ }
266
+ if (typeof deploymentRetention !== 'undefined') {
267
+ payload['deploymentRetention'] = deploymentRetention;
254
268
  }
255
269
  const uri = new URL(this.client.config.endpoint + apiPath);
256
270
 
@@ -565,11 +579,13 @@ export class Functions {
565
579
  * @param {string} params.providerBranch - Production branch for the repo linked to the function
566
580
  * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
567
581
  * @param {string} params.providerRootDirectory - Path to function code in the linked repo.
568
- * @param {string} params.specification - Runtime specification for the function and builds.
582
+ * @param {string} params.buildSpecification - Build specification for the function deployments.
583
+ * @param {string} params.runtimeSpecification - Runtime specification for the function executions.
584
+ * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
569
585
  * @throws {AppwriteException}
570
586
  * @returns {Promise<Models.Function>}
571
587
  */
572
- update(params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Function>;
588
+ update(params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number }): Promise<Models.Function>;
573
589
  /**
574
590
  * Update function by its unique ID.
575
591
  *
@@ -590,20 +606,22 @@ export class Functions {
590
606
  * @param {string} providerBranch - Production branch for the repo linked to the function
591
607
  * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
592
608
  * @param {string} providerRootDirectory - Path to function code in the linked repo.
593
- * @param {string} specification - Runtime specification for the function and builds.
609
+ * @param {string} buildSpecification - Build specification for the function deployments.
610
+ * @param {string} runtimeSpecification - Runtime specification for the function executions.
611
+ * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
594
612
  * @throws {AppwriteException}
595
613
  * @returns {Promise<Models.Function>}
596
614
  * @deprecated Use the object parameter style method for a better developer experience.
597
615
  */
598
- update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
616
+ update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
599
617
  update(
600
- paramsOrFirst: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
601
- ...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (Scopes[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
618
+ paramsOrFirst: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number } | string,
619
+ ...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (Scopes[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?, (string)?, (number)?]
602
620
  ): Promise<Models.Function> {
603
- let params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
621
+ let params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
604
622
 
605
623
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
606
- params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
624
+ params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
607
625
  } else {
608
626
  params = {
609
627
  functionId: paramsOrFirst as string,
@@ -623,7 +641,9 @@ export class Functions {
623
641
  providerBranch: rest[13] as string,
624
642
  providerSilentMode: rest[14] as boolean,
625
643
  providerRootDirectory: rest[15] as string,
626
- specification: rest[16] as string
644
+ buildSpecification: rest[16] as string,
645
+ runtimeSpecification: rest[17] as string,
646
+ deploymentRetention: rest[18] as number
627
647
  };
628
648
  }
629
649
 
@@ -644,7 +664,9 @@ export class Functions {
644
664
  const providerBranch = params.providerBranch;
645
665
  const providerSilentMode = params.providerSilentMode;
646
666
  const providerRootDirectory = params.providerRootDirectory;
647
- const specification = params.specification;
667
+ const buildSpecification = params.buildSpecification;
668
+ const runtimeSpecification = params.runtimeSpecification;
669
+ const deploymentRetention = params.deploymentRetention;
648
670
 
649
671
  if (typeof functionId === 'undefined') {
650
672
  throw new AppwriteException('Missing required parameter: "functionId"');
@@ -703,8 +725,14 @@ export class Functions {
703
725
  if (typeof providerRootDirectory !== 'undefined') {
704
726
  payload['providerRootDirectory'] = providerRootDirectory;
705
727
  }
706
- if (typeof specification !== 'undefined') {
707
- payload['specification'] = specification;
728
+ if (typeof buildSpecification !== 'undefined') {
729
+ payload['buildSpecification'] = buildSpecification;
730
+ }
731
+ if (typeof runtimeSpecification !== 'undefined') {
732
+ payload['runtimeSpecification'] = runtimeSpecification;
733
+ }
734
+ if (typeof deploymentRetention !== 'undefined') {
735
+ payload['deploymentRetention'] = deploymentRetention;
708
736
  }
709
737
  const uri = new URL(this.client.config.endpoint + apiPath);
710
738