@appwrite.io/console 2.1.3 → 2.2.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 (132) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +1564 -187
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +1565 -188
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +1564 -187
  8. package/docs/examples/account/create-key.md +15 -0
  9. package/docs/examples/account/delete-key.md +13 -0
  10. package/docs/examples/account/get-key.md +13 -0
  11. package/docs/examples/account/list-keys.md +13 -0
  12. package/docs/examples/account/update-key.md +16 -0
  13. package/docs/examples/avatars/get-screenshot.md +5 -5
  14. package/docs/examples/backups/create-archive.md +2 -2
  15. package/docs/examples/backups/create-policy.md +2 -2
  16. package/docs/examples/backups/create-restoration.md +2 -2
  17. package/docs/examples/console/{get-regions.md → list-regions.md} +1 -3
  18. package/docs/examples/databases/create-index.md +2 -2
  19. package/docs/examples/databases/create-longtext-attribute.md +18 -0
  20. package/docs/examples/databases/create-mediumtext-attribute.md +18 -0
  21. package/docs/examples/databases/create-text-attribute.md +18 -0
  22. package/docs/examples/databases/create-varchar-attribute.md +19 -0
  23. package/docs/examples/databases/update-collection.md +1 -1
  24. package/docs/examples/databases/update-longtext-attribute.md +18 -0
  25. package/docs/examples/databases/update-mediumtext-attribute.md +18 -0
  26. package/docs/examples/databases/update-text-attribute.md +18 -0
  27. package/docs/examples/databases/update-varchar-attribute.md +19 -0
  28. package/docs/examples/databases/update.md +1 -1
  29. package/docs/examples/functions/create.md +2 -2
  30. package/docs/examples/functions/list-templates.md +3 -3
  31. package/docs/examples/functions/update.md +2 -2
  32. package/docs/examples/migrations/create-appwrite-migration.md +2 -2
  33. package/docs/examples/migrations/create-firebase-migration.md +2 -2
  34. package/docs/examples/migrations/create-n-host-migration.md +2 -2
  35. package/docs/examples/migrations/create-supabase-migration.md +2 -2
  36. package/docs/examples/migrations/get-appwrite-report.md +2 -2
  37. package/docs/examples/migrations/get-firebase-report.md +2 -2
  38. package/docs/examples/migrations/get-n-host-report.md +2 -2
  39. package/docs/examples/migrations/get-supabase-report.md +2 -2
  40. package/docs/examples/organizations/create-key.md +16 -0
  41. package/docs/examples/organizations/create.md +2 -2
  42. package/docs/examples/organizations/delete-key.md +14 -0
  43. package/docs/examples/organizations/estimation-create-organization.md +2 -2
  44. package/docs/examples/organizations/estimation-update-plan.md +2 -2
  45. package/docs/examples/organizations/get-key.md +14 -0
  46. package/docs/examples/organizations/list-keys.md +14 -0
  47. package/docs/examples/organizations/list-regions.md +13 -0
  48. package/docs/examples/organizations/update-key.md +17 -0
  49. package/docs/examples/organizations/update-plan.md +2 -2
  50. package/docs/examples/projects/create-jwt.md +2 -2
  51. package/docs/examples/projects/create-key.md +2 -2
  52. package/docs/examples/projects/update-key.md +2 -2
  53. package/docs/examples/sites/list-templates.md +3 -3
  54. package/docs/examples/tablesdb/create-index.md +2 -2
  55. package/docs/examples/tablesdb/create-longtext-column.md +18 -0
  56. package/docs/examples/tablesdb/create-mediumtext-column.md +18 -0
  57. package/docs/examples/tablesdb/create-text-column.md +18 -0
  58. package/docs/examples/tablesdb/create-varchar-column.md +19 -0
  59. package/docs/examples/tablesdb/update-longtext-column.md +18 -0
  60. package/docs/examples/tablesdb/update-mediumtext-column.md +18 -0
  61. package/docs/examples/tablesdb/update-table.md +1 -1
  62. package/docs/examples/tablesdb/update-text-column.md +18 -0
  63. package/docs/examples/tablesdb/update-varchar-column.md +19 -0
  64. package/docs/examples/tablesdb/update.md +1 -1
  65. package/docs/examples/teams/create-membership.md +2 -2
  66. package/docs/examples/teams/update-membership.md +2 -2
  67. package/package.json +1 -1
  68. package/src/channel.ts +8 -4
  69. package/src/client.ts +3 -28
  70. package/src/enums/browser-permission.ts +22 -0
  71. package/src/enums/deployment-status.ts +1 -0
  72. package/src/enums/frameworks.ts +17 -0
  73. package/src/enums/order-by.ts +4 -0
  74. package/src/enums/resources.ts +13 -0
  75. package/src/enums/roles.ts +7 -0
  76. package/src/enums/runtimes.ts +66 -0
  77. package/src/enums/scopes.ts +65 -0
  78. package/src/enums/services.ts +5 -0
  79. package/src/enums/use-cases.ts +11 -0
  80. package/src/index.ts +9 -1
  81. package/src/models.ts +349 -1
  82. package/src/services/account.ts +364 -56
  83. package/src/services/assistant.ts +1 -1
  84. package/src/services/avatars.ts +17 -16
  85. package/src/services/backups.ts +37 -36
  86. package/src/services/console.ts +11 -42
  87. package/src/services/databases.ts +1060 -280
  88. package/src/services/domains.ts +44 -44
  89. package/src/services/functions.ts +60 -57
  90. package/src/services/graphql.ts +2 -2
  91. package/src/services/health.ts +22 -20
  92. package/src/services/messaging.ts +56 -56
  93. package/src/services/migrations.ts +79 -78
  94. package/src/services/organizations.ts +466 -70
  95. package/src/services/project.ts +5 -5
  96. package/src/services/projects.ts +86 -85
  97. package/src/services/proxy.ts +8 -8
  98. package/src/services/sites.ts +42 -40
  99. package/src/services/storage.ts +16 -16
  100. package/src/services/tables-db.ts +1050 -268
  101. package/src/services/teams.ts +31 -30
  102. package/src/services/tokens.ts +5 -5
  103. package/src/services/users.ts +49 -49
  104. package/src/services/vcs.ts +10 -10
  105. package/types/channel.d.ts +5 -4
  106. package/types/enums/browser-permission.d.ts +22 -0
  107. package/types/enums/deployment-status.d.ts +1 -0
  108. package/types/enums/frameworks.d.ts +17 -0
  109. package/types/enums/order-by.d.ts +4 -0
  110. package/types/enums/resources.d.ts +13 -0
  111. package/types/enums/roles.d.ts +7 -0
  112. package/types/enums/runtimes.d.ts +66 -0
  113. package/types/enums/scopes.d.ts +65 -0
  114. package/types/enums/services.d.ts +5 -0
  115. package/types/enums/use-cases.d.ts +11 -0
  116. package/types/index.d.ts +9 -1
  117. package/types/models.d.ts +341 -1
  118. package/types/services/account.d.ts +111 -0
  119. package/types/services/avatars.d.ts +5 -4
  120. package/types/services/backups.d.ts +13 -12
  121. package/types/services/console.d.ts +1 -13
  122. package/types/services/databases.d.ts +303 -8
  123. package/types/services/functions.d.ts +18 -15
  124. package/types/services/health.d.ts +2 -0
  125. package/types/services/migrations.d.ts +33 -32
  126. package/types/services/organizations.d.ts +161 -17
  127. package/types/services/projects.d.ts +13 -12
  128. package/types/services/sites.d.ts +9 -7
  129. package/types/services/tables-db.d.ts +305 -8
  130. package/types/services/teams.d.ts +9 -8
  131. package/src/enums/billing-plan.ts +0 -17
  132. package/types/enums/billing-plan.d.ts +0 -17
@@ -1,7 +1,7 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
- import { BillingPlan } from '../enums/billing-plan';
4
3
  import { Platform } from '../enums/platform';
4
+ import { Scopes } from '../enums/scopes';
5
5
  export declare class Organizations {
6
6
  client: Client;
7
7
  constructor(client: Client);
@@ -33,7 +33,7 @@ export declare class Organizations {
33
33
  *
34
34
  * @param {string} params.organizationId - Organization ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
35
35
  * @param {string} params.name - Organization name. Max length: 128 chars.
36
- * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
36
+ * @param {string} params.billingPlan - Organization billing plan chosen
37
37
  * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
38
38
  * @param {string} params.billingAddressId - Unique ID of billing address
39
39
  * @param {string[]} params.invites - Additional member invites
@@ -47,7 +47,7 @@ export declare class Organizations {
47
47
  create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
48
48
  organizationId: string;
49
49
  name: string;
50
- billingPlan: BillingPlan;
50
+ billingPlan: string;
51
51
  paymentMethodId?: string;
52
52
  billingAddressId?: string;
53
53
  invites?: string[];
@@ -62,7 +62,7 @@ export declare class Organizations {
62
62
  *
63
63
  * @param {string} organizationId - Organization ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
64
64
  * @param {string} name - Organization name. Max length: 128 chars.
65
- * @param {BillingPlan} billingPlan - Organization billing plan chosen
65
+ * @param {string} billingPlan - Organization billing plan chosen
66
66
  * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
67
67
  * @param {string} billingAddressId - Unique ID of billing address
68
68
  * @param {string[]} invites - Additional member invites
@@ -74,11 +74,11 @@ export declare class Organizations {
74
74
  * @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
75
75
  * @deprecated Use the object parameter style method for a better developer experience.
76
76
  */
77
- create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
77
+ create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
78
78
  /**
79
79
  * Get estimation for creating an organization.
80
80
  *
81
- * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
81
+ * @param {string} params.billingPlan - Organization billing plan chosen
82
82
  * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
83
83
  * @param {string[]} params.invites - Additional member invites
84
84
  * @param {string} params.couponId - Coupon id
@@ -87,7 +87,7 @@ export declare class Organizations {
87
87
  * @returns {Promise<Models.Estimation>}
88
88
  */
89
89
  estimationCreateOrganization(params: {
90
- billingPlan: BillingPlan;
90
+ billingPlan: string;
91
91
  paymentMethodId?: string;
92
92
  invites?: string[];
93
93
  couponId?: string;
@@ -96,7 +96,7 @@ export declare class Organizations {
96
96
  /**
97
97
  * Get estimation for creating an organization.
98
98
  *
99
- * @param {BillingPlan} billingPlan - Organization billing plan chosen
99
+ * @param {string} billingPlan - Organization billing plan chosen
100
100
  * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
101
101
  * @param {string[]} invites - Additional member invites
102
102
  * @param {string} couponId - Coupon id
@@ -105,7 +105,7 @@ export declare class Organizations {
105
105
  * @returns {Promise<Models.Estimation>}
106
106
  * @deprecated Use the object parameter style method for a better developer experience.
107
107
  */
108
- estimationCreateOrganization(billingPlan: BillingPlan, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform): Promise<Models.Estimation>;
108
+ estimationCreateOrganization(billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform): Promise<Models.Estimation>;
109
109
  /**
110
110
  * Delete an organization.
111
111
  *
@@ -395,7 +395,7 @@ export declare class Organizations {
395
395
  * Get estimation for updating the organization plan.
396
396
  *
397
397
  * @param {string} params.organizationId - Organization ID
398
- * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
398
+ * @param {string} params.billingPlan - Organization billing plan chosen
399
399
  * @param {string[]} params.invites - Additional member invites
400
400
  * @param {string} params.couponId - Coupon id
401
401
  * @throws {AppwriteException}
@@ -403,7 +403,7 @@ export declare class Organizations {
403
403
  */
404
404
  estimationUpdatePlan(params: {
405
405
  organizationId: string;
406
- billingPlan: BillingPlan;
406
+ billingPlan: string;
407
407
  invites?: string[];
408
408
  couponId?: string;
409
409
  }): Promise<Models.EstimationUpdatePlan>;
@@ -411,14 +411,14 @@ export declare class Organizations {
411
411
  * Get estimation for updating the organization plan.
412
412
  *
413
413
  * @param {string} organizationId - Organization ID
414
- * @param {BillingPlan} billingPlan - Organization billing plan chosen
414
+ * @param {string} billingPlan - Organization billing plan chosen
415
415
  * @param {string[]} invites - Additional member invites
416
416
  * @param {string} couponId - Coupon id
417
417
  * @throws {AppwriteException}
418
418
  * @returns {Promise<Models.EstimationUpdatePlan>}
419
419
  * @deprecated Use the object parameter style method for a better developer experience.
420
420
  */
421
- estimationUpdatePlan(organizationId: string, billingPlan: BillingPlan, invites?: string[], couponId?: string): Promise<Models.EstimationUpdatePlan>;
421
+ estimationUpdatePlan(organizationId: string, billingPlan: string, invites?: string[], couponId?: string): Promise<Models.EstimationUpdatePlan>;
422
422
  /**
423
423
  * Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.
424
424
  *
@@ -587,6 +587,131 @@ export declare class Organizations {
587
587
  * @deprecated Use the object parameter style method for a better developer experience.
588
588
  */
589
589
  getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
590
+ /**
591
+ * Get a list of all API keys from the current organization.
592
+ *
593
+ * @param {string} params.organizationId - Organization Unique ID
594
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
595
+ * @throws {AppwriteException}
596
+ * @returns {Promise<Models.KeyList>}
597
+ */
598
+ listKeys(params: {
599
+ organizationId: string;
600
+ total?: boolean;
601
+ }): Promise<Models.KeyList>;
602
+ /**
603
+ * Get a list of all API keys from the current organization.
604
+ *
605
+ * @param {string} organizationId - Organization Unique ID
606
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
607
+ * @throws {AppwriteException}
608
+ * @returns {Promise<Models.KeyList>}
609
+ * @deprecated Use the object parameter style method for a better developer experience.
610
+ */
611
+ listKeys(organizationId: string, total?: boolean): Promise<Models.KeyList>;
612
+ /**
613
+ * Create a new organization API key.
614
+ *
615
+ * @param {string} params.organizationId - Organization Unique ID
616
+ * @param {string} params.name - Key name. Max length: 128 chars.
617
+ * @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
618
+ * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
619
+ * @throws {AppwriteException}
620
+ * @returns {Promise<Models.Key>}
621
+ */
622
+ createKey(params: {
623
+ organizationId: string;
624
+ name: string;
625
+ scopes: Scopes[];
626
+ expire?: string;
627
+ }): Promise<Models.Key>;
628
+ /**
629
+ * Create a new organization API key.
630
+ *
631
+ * @param {string} organizationId - Organization Unique ID
632
+ * @param {string} name - Key name. Max length: 128 chars.
633
+ * @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
634
+ * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
635
+ * @throws {AppwriteException}
636
+ * @returns {Promise<Models.Key>}
637
+ * @deprecated Use the object parameter style method for a better developer experience.
638
+ */
639
+ createKey(organizationId: string, name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
640
+ /**
641
+ * Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.
642
+ *
643
+ * @param {string} params.organizationId - Organization Unique ID
644
+ * @param {string} params.keyId - Key unique ID.
645
+ * @throws {AppwriteException}
646
+ * @returns {Promise<Models.Key>}
647
+ */
648
+ getKey(params: {
649
+ organizationId: string;
650
+ keyId: string;
651
+ }): Promise<Models.Key>;
652
+ /**
653
+ * Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.
654
+ *
655
+ * @param {string} organizationId - Organization Unique ID
656
+ * @param {string} keyId - Key unique ID.
657
+ * @throws {AppwriteException}
658
+ * @returns {Promise<Models.Key>}
659
+ * @deprecated Use the object parameter style method for a better developer experience.
660
+ */
661
+ getKey(organizationId: string, keyId: string): Promise<Models.Key>;
662
+ /**
663
+ * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
664
+ *
665
+ * @param {string} params.organizationId - Organization Unique ID
666
+ * @param {string} params.keyId - Key unique ID.
667
+ * @param {string} params.name - Key name. Max length: 128 chars.
668
+ * @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
669
+ * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
670
+ * @throws {AppwriteException}
671
+ * @returns {Promise<Models.Key>}
672
+ */
673
+ updateKey(params: {
674
+ organizationId: string;
675
+ keyId: string;
676
+ name: string;
677
+ scopes: Scopes[];
678
+ expire?: string;
679
+ }): Promise<Models.Key>;
680
+ /**
681
+ * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
682
+ *
683
+ * @param {string} organizationId - Organization Unique ID
684
+ * @param {string} keyId - Key unique ID.
685
+ * @param {string} name - Key name. Max length: 128 chars.
686
+ * @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
687
+ * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
688
+ * @throws {AppwriteException}
689
+ * @returns {Promise<Models.Key>}
690
+ * @deprecated Use the object parameter style method for a better developer experience.
691
+ */
692
+ updateKey(organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
693
+ /**
694
+ * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
695
+ *
696
+ * @param {string} params.organizationId - Organization Unique ID
697
+ * @param {string} params.keyId - Key unique ID.
698
+ * @throws {AppwriteException}
699
+ * @returns {Promise<{}>}
700
+ */
701
+ deleteKey(params: {
702
+ organizationId: string;
703
+ keyId: string;
704
+ }): Promise<{}>;
705
+ /**
706
+ * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
707
+ *
708
+ * @param {string} organizationId - Organization Unique ID
709
+ * @param {string} keyId - Key unique ID.
710
+ * @throws {AppwriteException}
711
+ * @returns {Promise<{}>}
712
+ * @deprecated Use the object parameter style method for a better developer experience.
713
+ */
714
+ deleteKey(organizationId: string, keyId: string): Promise<{}>;
590
715
  /**
591
716
  * Set a organization's default payment method.
592
717
  *
@@ -716,7 +841,7 @@ export declare class Organizations {
716
841
  * Update the billing plan for an organization.
717
842
  *
718
843
  * @param {string} params.organizationId - Organization Unique ID
719
- * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
844
+ * @param {string} params.billingPlan - Organization billing plan chosen
720
845
  * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
721
846
  * @param {string} params.billingAddressId - Unique ID of billing address
722
847
  * @param {string[]} params.invites - Additional member invites
@@ -728,7 +853,7 @@ export declare class Organizations {
728
853
  */
729
854
  updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
730
855
  organizationId: string;
731
- billingPlan: BillingPlan;
856
+ billingPlan: string;
732
857
  paymentMethodId?: string;
733
858
  billingAddressId?: string;
734
859
  invites?: string[];
@@ -740,7 +865,7 @@ export declare class Organizations {
740
865
  * Update the billing plan for an organization.
741
866
  *
742
867
  * @param {string} organizationId - Organization Unique ID
743
- * @param {BillingPlan} billingPlan - Organization billing plan chosen
868
+ * @param {string} billingPlan - Organization billing plan chosen
744
869
  * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
745
870
  * @param {string} billingAddressId - Unique ID of billing address
746
871
  * @param {string[]} invites - Additional member invites
@@ -751,7 +876,7 @@ export declare class Organizations {
751
876
  * @returns {Promise<Models.Organization<Preferences>>}
752
877
  * @deprecated Use the object parameter style method for a better developer experience.
753
878
  */
754
- updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>>;
879
+ updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>>;
755
880
  /**
756
881
  * Cancel the downgrade initiated for an organization.
757
882
  *
@@ -793,6 +918,25 @@ export declare class Organizations {
793
918
  * @deprecated Use the object parameter style method for a better developer experience.
794
919
  */
795
920
  updateProjects<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, projects?: string[]): Promise<Models.Organization<Preferences>>;
921
+ /**
922
+ * Get all available regions for an organization.
923
+ *
924
+ * @param {string} params.organizationId - Team ID.
925
+ * @throws {AppwriteException}
926
+ * @returns {Promise<Models.ConsoleRegionList>}
927
+ */
928
+ listRegions(params: {
929
+ organizationId: string;
930
+ }): Promise<Models.ConsoleRegionList>;
931
+ /**
932
+ * Get all available regions for an organization.
933
+ *
934
+ * @param {string} organizationId - Team ID.
935
+ * @throws {AppwriteException}
936
+ * @returns {Promise<Models.ConsoleRegionList>}
937
+ * @deprecated Use the object parameter style method for a better developer experience.
938
+ */
939
+ listRegions(organizationId: string): Promise<Models.ConsoleRegionList>;
796
940
  /**
797
941
  * Get Scopes
798
942
  *
@@ -3,6 +3,7 @@ import type { Models } from '../models';
3
3
  import { Region } from '../enums/region';
4
4
  import { Api } from '../enums/api';
5
5
  import { AuthMethod } from '../enums/auth-method';
6
+ import { Scopes } from '../enums/scopes';
6
7
  import { OAuthProvider } from '../enums/o-auth-provider';
7
8
  import { PlatformType } from '../enums/platform-type';
8
9
  import { ApiService } from '../enums/api-service';
@@ -652,27 +653,27 @@ export declare class Projects {
652
653
  * Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
653
654
  *
654
655
  * @param {string} params.projectId - Project unique ID.
655
- * @param {string[]} params.scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
656
+ * @param {Scopes[]} params.scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
656
657
  * @param {number} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
657
658
  * @throws {AppwriteException}
658
659
  * @returns {Promise<Models.Jwt>}
659
660
  */
660
661
  createJWT(params: {
661
662
  projectId: string;
662
- scopes: string[];
663
+ scopes: Scopes[];
663
664
  duration?: number;
664
665
  }): Promise<Models.Jwt>;
665
666
  /**
666
667
  * Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
667
668
  *
668
669
  * @param {string} projectId - Project unique ID.
669
- * @param {string[]} scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
670
+ * @param {Scopes[]} scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
670
671
  * @param {number} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
671
672
  * @throws {AppwriteException}
672
673
  * @returns {Promise<Models.Jwt>}
673
674
  * @deprecated Use the object parameter style method for a better developer experience.
674
675
  */
675
- createJWT(projectId: string, scopes: string[], duration?: number): Promise<Models.Jwt>;
676
+ createJWT(projectId: string, scopes: Scopes[], duration?: number): Promise<Models.Jwt>;
676
677
  /**
677
678
  * Get a list of all API keys from the current project.
678
679
  *
@@ -700,7 +701,7 @@ export declare class Projects {
700
701
  *
701
702
  * @param {string} params.projectId - Project unique ID.
702
703
  * @param {string} params.name - Key name. Max length: 128 chars.
703
- * @param {string[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
704
+ * @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
704
705
  * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
705
706
  * @throws {AppwriteException}
706
707
  * @returns {Promise<Models.Key>}
@@ -708,7 +709,7 @@ export declare class Projects {
708
709
  createKey(params: {
709
710
  projectId: string;
710
711
  name: string;
711
- scopes?: string[];
712
+ scopes?: Scopes[];
712
713
  expire?: string;
713
714
  }): Promise<Models.Key>;
714
715
  /**
@@ -716,13 +717,13 @@ export declare class Projects {
716
717
  *
717
718
  * @param {string} projectId - Project unique ID.
718
719
  * @param {string} name - Key name. Max length: 128 chars.
719
- * @param {string[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
720
+ * @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
720
721
  * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
721
722
  * @throws {AppwriteException}
722
723
  * @returns {Promise<Models.Key>}
723
724
  * @deprecated Use the object parameter style method for a better developer experience.
724
725
  */
725
- createKey(projectId: string, name: string, scopes?: string[], expire?: string): Promise<Models.Key>;
726
+ createKey(projectId: string, name: string, scopes?: Scopes[], expire?: string): Promise<Models.Key>;
726
727
  /**
727
728
  * Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.
728
729
  *
@@ -751,7 +752,7 @@ export declare class Projects {
751
752
  * @param {string} params.projectId - Project unique ID.
752
753
  * @param {string} params.keyId - Key unique ID.
753
754
  * @param {string} params.name - Key name. Max length: 128 chars.
754
- * @param {string[]} params.scopes - Key scopes list. Maximum of 100 events are allowed.
755
+ * @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 events are allowed.
755
756
  * @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
756
757
  * @throws {AppwriteException}
757
758
  * @returns {Promise<Models.Key>}
@@ -760,7 +761,7 @@ export declare class Projects {
760
761
  projectId: string;
761
762
  keyId: string;
762
763
  name: string;
763
- scopes?: string[];
764
+ scopes?: Scopes[];
764
765
  expire?: string;
765
766
  }): Promise<Models.Key>;
766
767
  /**
@@ -769,13 +770,13 @@ export declare class Projects {
769
770
  * @param {string} projectId - Project unique ID.
770
771
  * @param {string} keyId - Key unique ID.
771
772
  * @param {string} name - Key name. Max length: 128 chars.
772
- * @param {string[]} scopes - Key scopes list. Maximum of 100 events are allowed.
773
+ * @param {Scopes[]} scopes - Key scopes list. Maximum of 100 events are allowed.
773
774
  * @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
774
775
  * @throws {AppwriteException}
775
776
  * @returns {Promise<Models.Key>}
776
777
  * @deprecated Use the object parameter style method for a better developer experience.
777
778
  */
778
- updateKey(projectId: string, keyId: string, name: string, scopes?: string[], expire?: string): Promise<Models.Key>;
779
+ updateKey(projectId: string, keyId: string, name: string, scopes?: Scopes[], expire?: string): Promise<Models.Key>;
779
780
  /**
780
781
  * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
781
782
  *
@@ -3,6 +3,8 @@ import type { Models } from '../models';
3
3
  import { Framework } from '../enums/framework';
4
4
  import { BuildRuntime } from '../enums/build-runtime';
5
5
  import { Adapter } from '../enums/adapter';
6
+ import { Frameworks } from '../enums/frameworks';
7
+ import { UseCases } from '../enums/use-cases';
6
8
  import { UsageRange } from '../enums/usage-range';
7
9
  import { TemplateReferenceType } from '../enums/template-reference-type';
8
10
  import { VCSReferenceType } from '../enums/vcs-reference-type';
@@ -122,31 +124,31 @@ export declare class Sites {
122
124
  /**
123
125
  * List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
124
126
  *
125
- * @param {string[]} params.frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
126
- * @param {string[]} params.useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
127
+ * @param {Frameworks[]} params.frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
128
+ * @param {UseCases[]} params.useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
127
129
  * @param {number} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
128
130
  * @param {number} params.offset - Offset the list of returned templates. Maximum offset is 5000.
129
131
  * @throws {AppwriteException}
130
132
  * @returns {Promise<Models.TemplateSiteList>}
131
133
  */
132
134
  listTemplates(params?: {
133
- frameworks?: string[];
134
- useCases?: string[];
135
+ frameworks?: Frameworks[];
136
+ useCases?: UseCases[];
135
137
  limit?: number;
136
138
  offset?: number;
137
139
  }): Promise<Models.TemplateSiteList>;
138
140
  /**
139
141
  * List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
140
142
  *
141
- * @param {string[]} frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
142
- * @param {string[]} useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
143
+ * @param {Frameworks[]} frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
144
+ * @param {UseCases[]} useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
143
145
  * @param {number} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
144
146
  * @param {number} offset - Offset the list of returned templates. Maximum offset is 5000.
145
147
  * @throws {AppwriteException}
146
148
  * @returns {Promise<Models.TemplateSiteList>}
147
149
  * @deprecated Use the object parameter style method for a better developer experience.
148
150
  */
149
- listTemplates(frameworks?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateSiteList>;
151
+ listTemplates(frameworks?: Frameworks[], useCases?: UseCases[], limit?: number, offset?: number): Promise<Models.TemplateSiteList>;
150
152
  /**
151
153
  * Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
152
154
  *