@appwrite.io/console 16.1.0 → 18.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 (55) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/sdk.js +1808 -412
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +1805 -413
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +4339 -944
  7. package/package.json +5 -2
  8. package/types/client.d.ts +24 -11
  9. package/types/enums/billing-plan-group.d.ts +2 -1
  10. package/types/enums/build-runtime.d.ts +3 -0
  11. package/types/enums/cache-database.d.ts +1 -2
  12. package/types/enums/conversation-type.d.ts +9 -0
  13. package/types/enums/framework.d.ts +1 -0
  14. package/types/enums/id-token-provider.d.ts +4 -0
  15. package/types/enums/o-auth-2-auth-0-prompt.d.ts +5 -0
  16. package/types/enums/o-auth-2-discord-prompt.d.ts +4 -0
  17. package/types/enums/o-auth-2-github-prompt.d.ts +3 -0
  18. package/types/enums/o-auth-2-kakao-prompt.d.ts +6 -0
  19. package/types/enums/o-auth-2-microsoft-prompt.d.ts +6 -0
  20. package/types/enums/o-auth-2-okta-prompt.d.ts +5 -0
  21. package/types/enums/o-auth-2-salesforce-prompt.d.ts +4 -0
  22. package/types/enums/o-auth-2-zoho-prompt.d.ts +3 -0
  23. package/types/enums/organization-key-scopes.d.ts +2 -4
  24. package/types/enums/project-email-template-id.d.ts +3 -1
  25. package/types/enums/project-key-scopes.d.ts +1 -0
  26. package/types/enums/project-o-auth-2-auth-0-prompt.d.ts +5 -0
  27. package/types/enums/project-o-auth-2-discord-prompt.d.ts +4 -0
  28. package/types/enums/project-o-auth-2-git-hub-prompt.d.ts +3 -0
  29. package/types/enums/project-o-auth-2-kakao-prompt.d.ts +6 -0
  30. package/types/enums/project-o-auth-2-microsoft-prompt.d.ts +6 -0
  31. package/types/enums/project-o-auth-2-okta-prompt.d.ts +5 -0
  32. package/types/enums/project-o-auth-2-salesforce-prompt.d.ts +4 -0
  33. package/types/enums/project-o-auth-2-zoho-prompt.d.ts +3 -0
  34. package/types/enums/project-policy-id.d.ts +1 -0
  35. package/types/enums/query-suggestion-resource.d.ts +1 -3
  36. package/types/enums/runtime.d.ts +3 -0
  37. package/types/index.d.ts +23 -2
  38. package/types/models.d.ts +271 -562
  39. package/types/services/account.d.ts +167 -24
  40. package/types/services/console.d.ts +2 -2
  41. package/types/services/databases.d.ts +4 -4
  42. package/types/services/growth.d.ts +100 -0
  43. package/types/services/manager.d.ts +39 -14
  44. package/types/services/messaging.d.ts +94 -8
  45. package/types/services/organization.d.ts +165 -0
  46. package/types/services/organizations.d.ts +0 -19
  47. package/types/services/project.d.ts +93 -50
  48. package/types/services/projects.d.ts +0 -94
  49. package/types/services/push.d.ts +153 -0
  50. package/types/services/storage.d.ts +4 -4
  51. package/types/services/tables-db.d.ts +37 -37
  52. package/types/services/teams.d.ts +0 -25
  53. package/types/services/users.d.ts +4 -29
  54. package/types/topic.d.ts +34 -0
  55. package/types/enums/project-usage-range.d.ts +0 -4
@@ -42,6 +42,8 @@ export declare class Messaging {
42
42
  * @param {string[]} params.cc - Array of target IDs to be added as CC.
43
43
  * @param {string[]} params.bcc - Array of target IDs to be added as BCC.
44
44
  * @param {string[]} params.attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
45
+ * @param {string} params.replyToEmail - Email address to reply to. If not set, defaults to the sender email address.
46
+ * @param {string} params.replyToName - Name of the reply to recipient. If not set, defaults to the sender name.
45
47
  * @param {boolean} params.draft - Is message a draft
46
48
  * @param {boolean} params.html - Is content of type HTML
47
49
  * @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
@@ -58,6 +60,8 @@ export declare class Messaging {
58
60
  cc?: string[];
59
61
  bcc?: string[];
60
62
  attachments?: string[];
63
+ replyToEmail?: string;
64
+ replyToName?: string;
61
65
  draft?: boolean;
62
66
  html?: boolean;
63
67
  scheduledAt?: string;
@@ -74,6 +78,8 @@ export declare class Messaging {
74
78
  * @param {string[]} cc - Array of target IDs to be added as CC.
75
79
  * @param {string[]} bcc - Array of target IDs to be added as BCC.
76
80
  * @param {string[]} attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
81
+ * @param {string} replyToEmail - Email address to reply to. If not set, defaults to the sender email address.
82
+ * @param {string} replyToName - Name of the reply to recipient. If not set, defaults to the sender name.
77
83
  * @param {boolean} draft - Is message a draft
78
84
  * @param {boolean} html - Is content of type HTML
79
85
  * @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
@@ -81,7 +87,7 @@ export declare class Messaging {
81
87
  * @returns {Promise<Models.Message>}
82
88
  * @deprecated Use the object parameter style method for a better developer experience.
83
89
  */
84
- createEmail(messageId: string, subject: string, content: string, topics?: string[], users?: string[], targets?: string[], cc?: string[], bcc?: string[], attachments?: string[], draft?: boolean, html?: boolean, scheduledAt?: string): Promise<Models.Message>;
90
+ createEmail(messageId: string, subject: string, content: string, topics?: string[], users?: string[], targets?: string[], cc?: string[], bcc?: string[], attachments?: string[], replyToEmail?: string, replyToName?: string, draft?: boolean, html?: boolean, scheduledAt?: string): Promise<Models.Message>;
85
91
  /**
86
92
  * Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
87
93
  *
@@ -96,6 +102,8 @@ export declare class Messaging {
96
102
  * @param {boolean} params.html - Is content of type HTML
97
103
  * @param {string[]} params.cc - Array of target IDs to be added as CC.
98
104
  * @param {string[]} params.bcc - Array of target IDs to be added as BCC.
105
+ * @param {string} params.replyToEmail - Email address to reply to. Pass an empty string to restore the provider or sender default.
106
+ * @param {string} params.replyToName - Name of the reply to recipient. Pass an empty string to restore the provider or sender default.
99
107
  * @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
100
108
  * @param {string[]} params.attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
101
109
  * @throws {AppwriteException}
@@ -112,6 +120,8 @@ export declare class Messaging {
112
120
  html?: boolean;
113
121
  cc?: string[];
114
122
  bcc?: string[];
123
+ replyToEmail?: string;
124
+ replyToName?: string;
115
125
  scheduledAt?: string;
116
126
  attachments?: string[];
117
127
  }): Promise<Models.Message>;
@@ -129,13 +139,15 @@ export declare class Messaging {
129
139
  * @param {boolean} html - Is content of type HTML
130
140
  * @param {string[]} cc - Array of target IDs to be added as CC.
131
141
  * @param {string[]} bcc - Array of target IDs to be added as BCC.
142
+ * @param {string} replyToEmail - Email address to reply to. Pass an empty string to restore the provider or sender default.
143
+ * @param {string} replyToName - Name of the reply to recipient. Pass an empty string to restore the provider or sender default.
132
144
  * @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
133
145
  * @param {string[]} attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
134
146
  * @throws {AppwriteException}
135
147
  * @returns {Promise<Models.Message>}
136
148
  * @deprecated Use the object parameter style method for a better developer experience.
137
149
  */
138
- updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string, draft?: boolean, html?: boolean, cc?: string[], bcc?: string[], scheduledAt?: string, attachments?: string[]): Promise<Models.Message>;
150
+ updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string, draft?: boolean, html?: boolean, cc?: string[], bcc?: string[], replyToEmail?: string, replyToName?: string, scheduledAt?: string, attachments?: string[]): Promise<Models.Message>;
139
151
  /**
140
152
  * Create a new push notification.
141
153
  *
@@ -690,6 +702,68 @@ export declare class Messaging {
690
702
  * @deprecated Use the object parameter style method for a better developer experience.
691
703
  */
692
704
  updateAPNSProvider(providerId: string, name?: string, enabled?: boolean, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, sandbox?: boolean): Promise<Models.Provider>;
705
+ /**
706
+ * Create a new Appwrite push provider.
707
+ *
708
+ * @param {string} params.providerId - Provider 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.
709
+ * @param {string} params.name - Provider name.
710
+ * @param {boolean} params.enabled - Set as enabled.
711
+ * @param {number} params.qos - Default QoS for topics on this provider (0 or 1). Null lets the subscriber choose.
712
+ * @param {number} params.expiry - Default message retention in seconds for offline delivery. Max 7 days (604800).
713
+ * @throws {AppwriteException}
714
+ * @returns {Promise<Models.Provider>}
715
+ */
716
+ createAppwriteProvider(params: {
717
+ providerId: string;
718
+ name: string;
719
+ enabled?: boolean;
720
+ qos?: number;
721
+ expiry?: number;
722
+ }): Promise<Models.Provider>;
723
+ /**
724
+ * Create a new Appwrite push provider.
725
+ *
726
+ * @param {string} providerId - Provider 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.
727
+ * @param {string} name - Provider name.
728
+ * @param {boolean} enabled - Set as enabled.
729
+ * @param {number} qos - Default QoS for topics on this provider (0 or 1). Null lets the subscriber choose.
730
+ * @param {number} expiry - Default message retention in seconds for offline delivery. Max 7 days (604800).
731
+ * @throws {AppwriteException}
732
+ * @returns {Promise<Models.Provider>}
733
+ * @deprecated Use the object parameter style method for a better developer experience.
734
+ */
735
+ createAppwriteProvider(providerId: string, name: string, enabled?: boolean, qos?: number, expiry?: number): Promise<Models.Provider>;
736
+ /**
737
+ * Update an Appwrite push provider by its unique ID.
738
+ *
739
+ * @param {string} params.providerId - Provider ID.
740
+ * @param {string} params.name - Provider name.
741
+ * @param {boolean} params.enabled - Set as enabled.
742
+ * @param {number} params.qos - Default QoS for topics on this provider (0 or 1). Null lets the subscriber choose.
743
+ * @param {number} params.expiry - Default message retention in seconds for offline delivery. Max 7 days (604800).
744
+ * @throws {AppwriteException}
745
+ * @returns {Promise<Models.Provider>}
746
+ */
747
+ updateAppwriteProvider(params: {
748
+ providerId: string;
749
+ name?: string;
750
+ enabled?: boolean;
751
+ qos?: number;
752
+ expiry?: number;
753
+ }): Promise<Models.Provider>;
754
+ /**
755
+ * Update an Appwrite push provider by its unique ID.
756
+ *
757
+ * @param {string} providerId - Provider ID.
758
+ * @param {string} name - Provider name.
759
+ * @param {boolean} enabled - Set as enabled.
760
+ * @param {number} qos - Default QoS for topics on this provider (0 or 1). Null lets the subscriber choose.
761
+ * @param {number} expiry - Default message retention in seconds for offline delivery. Max 7 days (604800).
762
+ * @throws {AppwriteException}
763
+ * @returns {Promise<Models.Provider>}
764
+ * @deprecated Use the object parameter style method for a better developer experience.
765
+ */
766
+ updateAppwriteProvider(providerId: string, name?: string, enabled?: boolean, qos?: number, expiry?: number): Promise<Models.Provider>;
693
767
  /**
694
768
  * Create a new Firebase Cloud Messaging provider.
695
769
  *
@@ -1591,7 +1665,7 @@ export declare class Messaging {
1591
1665
  *
1592
1666
  * @param {string} params.providerId - Provider 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.
1593
1667
  * @param {string} params.name - Provider name.
1594
- * @param {string} params.from - Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
1668
+ * @param {string} params.from - Sender phone number or alphanumeric sender ID. Format phone numbers with a leading '+' and a country code, e.g., +16175551212.
1595
1669
  * @param {string} params.accountSid - Twilio account secret ID.
1596
1670
  * @param {string} params.authToken - Twilio authentication token.
1597
1671
  * @param {boolean} params.enabled - Set as enabled.
@@ -1611,7 +1685,7 @@ export declare class Messaging {
1611
1685
  *
1612
1686
  * @param {string} providerId - Provider 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.
1613
1687
  * @param {string} name - Provider name.
1614
- * @param {string} from - Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
1688
+ * @param {string} from - Sender phone number or alphanumeric sender ID. Format phone numbers with a leading '+' and a country code, e.g., +16175551212.
1615
1689
  * @param {string} accountSid - Twilio account secret ID.
1616
1690
  * @param {string} authToken - Twilio authentication token.
1617
1691
  * @param {boolean} enabled - Set as enabled.
@@ -1628,7 +1702,7 @@ export declare class Messaging {
1628
1702
  * @param {boolean} params.enabled - Set as enabled.
1629
1703
  * @param {string} params.accountSid - Twilio account secret ID.
1630
1704
  * @param {string} params.authToken - Twilio authentication token.
1631
- * @param {string} params.from - Sender number.
1705
+ * @param {string} params.from - Sender phone number or alphanumeric sender ID. Format phone numbers with a leading '+' and a country code, e.g., +16175551212.
1632
1706
  * @throws {AppwriteException}
1633
1707
  * @returns {Promise<Models.Provider>}
1634
1708
  */
@@ -1648,7 +1722,7 @@ export declare class Messaging {
1648
1722
  * @param {boolean} enabled - Set as enabled.
1649
1723
  * @param {string} accountSid - Twilio account secret ID.
1650
1724
  * @param {string} authToken - Twilio authentication token.
1651
- * @param {string} from - Sender number.
1725
+ * @param {string} from - Sender phone number or alphanumeric sender ID. Format phone numbers with a leading '+' and a country code, e.g., +16175551212.
1652
1726
  * @throws {AppwriteException}
1653
1727
  * @returns {Promise<Models.Provider>}
1654
1728
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -1793,6 +1867,8 @@ export declare class Messaging {
1793
1867
  * @param {string} params.topicId - Topic ID. Choose a custom Topic ID or a new Topic ID.
1794
1868
  * @param {string} params.name - Topic Name.
1795
1869
  * @param {string[]} params.subscribe - An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
1870
+ * @param {number} params.qos - MQTT delivery quality of service for this topic. 0 is fire-and-forget (delivered only to clients connected at publish time). 1 persists each message and replays it when a client reconnects without having acknowledged it. Null lets the subscriber choose.
1871
+ * @param {number} params.expiry - Message retention in seconds for offline delivery. Max 7 days (604800).
1796
1872
  * @throws {AppwriteException}
1797
1873
  * @returns {Promise<Models.Topic>}
1798
1874
  */
@@ -1800,6 +1876,8 @@ export declare class Messaging {
1800
1876
  topicId: string;
1801
1877
  name: string;
1802
1878
  subscribe?: string[];
1879
+ qos?: number;
1880
+ expiry?: number;
1803
1881
  }): Promise<Models.Topic>;
1804
1882
  /**
1805
1883
  * Create a new topic.
@@ -1807,11 +1885,13 @@ export declare class Messaging {
1807
1885
  * @param {string} topicId - Topic ID. Choose a custom Topic ID or a new Topic ID.
1808
1886
  * @param {string} name - Topic Name.
1809
1887
  * @param {string[]} subscribe - An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
1888
+ * @param {number} qos - MQTT delivery quality of service for this topic. 0 is fire-and-forget (delivered only to clients connected at publish time). 1 persists each message and replays it when a client reconnects without having acknowledged it. Null lets the subscriber choose.
1889
+ * @param {number} expiry - Message retention in seconds for offline delivery. Max 7 days (604800).
1810
1890
  * @throws {AppwriteException}
1811
1891
  * @returns {Promise<Models.Topic>}
1812
1892
  * @deprecated Use the object parameter style method for a better developer experience.
1813
1893
  */
1814
- createTopic(topicId: string, name: string, subscribe?: string[]): Promise<Models.Topic>;
1894
+ createTopic(topicId: string, name: string, subscribe?: string[], qos?: number, expiry?: number): Promise<Models.Topic>;
1815
1895
  /**
1816
1896
  * Get a topic by its unique ID.
1817
1897
  *
@@ -1840,6 +1920,8 @@ export declare class Messaging {
1840
1920
  * @param {string} params.topicId - Topic ID.
1841
1921
  * @param {string} params.name - Topic Name.
1842
1922
  * @param {string[]} params.subscribe - An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
1923
+ * @param {number} params.qos - MQTT delivery quality of service for this topic. 0 is fire-and-forget (delivered only to clients connected at publish time). 1 persists each message and replays it when a client reconnects without having acknowledged it. Null lets the subscriber choose.
1924
+ * @param {number} params.expiry - Message retention in seconds for offline delivery. Max 7 days (604800).
1843
1925
  * @throws {AppwriteException}
1844
1926
  * @returns {Promise<Models.Topic>}
1845
1927
  */
@@ -1847,6 +1929,8 @@ export declare class Messaging {
1847
1929
  topicId: string;
1848
1930
  name?: string;
1849
1931
  subscribe?: string[];
1932
+ qos?: number;
1933
+ expiry?: number;
1850
1934
  }): Promise<Models.Topic>;
1851
1935
  /**
1852
1936
  * Update a topic by its unique ID.
@@ -1855,11 +1939,13 @@ export declare class Messaging {
1855
1939
  * @param {string} topicId - Topic ID.
1856
1940
  * @param {string} name - Topic Name.
1857
1941
  * @param {string[]} subscribe - An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
1942
+ * @param {number} qos - MQTT delivery quality of service for this topic. 0 is fire-and-forget (delivered only to clients connected at publish time). 1 persists each message and replays it when a client reconnects without having acknowledged it. Null lets the subscriber choose.
1943
+ * @param {number} expiry - Message retention in seconds for offline delivery. Max 7 days (604800).
1858
1944
  * @throws {AppwriteException}
1859
1945
  * @returns {Promise<Models.Topic>}
1860
1946
  * @deprecated Use the object parameter style method for a better developer experience.
1861
1947
  */
1862
- updateTopic(topicId: string, name?: string, subscribe?: string[]): Promise<Models.Topic>;
1948
+ updateTopic(topicId: string, name?: string, subscribe?: string[], qos?: number, expiry?: number): Promise<Models.Topic>;
1863
1949
  /**
1864
1950
  * Delete a topic by its unique ID.
1865
1951
  *
@@ -2,6 +2,7 @@ import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
3
  import { OrganizationKeyScopes } from '../enums/organization-key-scopes';
4
4
  import { Region } from '../enums/region';
5
+ import { ProjectKeyScopes } from '../enums/project-key-scopes';
5
6
  export declare class Organization {
6
7
  client: Client;
7
8
  constructor(client: Client);
@@ -487,4 +488,168 @@ export declare class Organization {
487
488
  * @deprecated Use the object parameter style method for a better developer experience.
488
489
  */
489
490
  deleteProject(projectId: string): Promise<{}>;
491
+ /**
492
+ * Get a list of all API keys of a project in your organization.
493
+ *
494
+ * @param {string} params.projectId - Project unique ID.
495
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes
496
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
497
+ * @throws {AppwriteException}
498
+ * @returns {Promise<Models.KeyList>}
499
+ */
500
+ listProjectKeys(params: {
501
+ projectId: string;
502
+ queries?: string[];
503
+ total?: boolean;
504
+ }): Promise<Models.KeyList>;
505
+ /**
506
+ * Get a list of all API keys of a project in your organization.
507
+ *
508
+ * @param {string} projectId - Project unique ID.
509
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes
510
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
511
+ * @throws {AppwriteException}
512
+ * @returns {Promise<Models.KeyList>}
513
+ * @deprecated Use the object parameter style method for a better developer experience.
514
+ */
515
+ listProjectKeys(projectId: string, queries?: string[], total?: boolean): Promise<Models.KeyList>;
516
+ /**
517
+ * Create a new API key for a project in your organization. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
518
+ *
519
+ * You can also create an ephemeral API key if you need a short-lived key instead.
520
+ *
521
+ * @param {string} params.projectId - Project unique ID.
522
+ * @param {string} params.keyId - Key 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.
523
+ * @param {string} params.name - Key name. Max length: 128 chars.
524
+ * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed.
525
+ * @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.
526
+ * @throws {AppwriteException}
527
+ * @returns {Promise<Models.Key>}
528
+ */
529
+ createProjectKey(params: {
530
+ projectId: string;
531
+ keyId: string;
532
+ name: string;
533
+ scopes: ProjectKeyScopes[];
534
+ expire?: string;
535
+ }): Promise<Models.Key>;
536
+ /**
537
+ * Create a new API key for a project in your organization. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
538
+ *
539
+ * You can also create an ephemeral API key if you need a short-lived key instead.
540
+ *
541
+ * @param {string} projectId - Project unique ID.
542
+ * @param {string} keyId - Key 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.
543
+ * @param {string} name - Key name. Max length: 128 chars.
544
+ * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed.
545
+ * @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.
546
+ * @throws {AppwriteException}
547
+ * @returns {Promise<Models.Key>}
548
+ * @deprecated Use the object parameter style method for a better developer experience.
549
+ */
550
+ createProjectKey(projectId: string, keyId: string, name: string, scopes: ProjectKeyScopes[], expire?: string): Promise<Models.Key>;
551
+ /**
552
+ * Create a new ephemeral API key for a project in your organization. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
553
+ *
554
+ * You can also create a standard API key if you need a longer-lived key instead.
555
+ *
556
+ * @param {string} params.projectId - Project unique ID.
557
+ * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed.
558
+ * @param {number} params.duration - Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.
559
+ * @throws {AppwriteException}
560
+ * @returns {Promise<Models.EphemeralKey>}
561
+ */
562
+ createEphemeralProjectKey(params: {
563
+ projectId: string;
564
+ scopes: ProjectKeyScopes[];
565
+ duration: number;
566
+ }): Promise<Models.EphemeralKey>;
567
+ /**
568
+ * Create a new ephemeral API key for a project in your organization. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
569
+ *
570
+ * You can also create a standard API key if you need a longer-lived key instead.
571
+ *
572
+ * @param {string} projectId - Project unique ID.
573
+ * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed.
574
+ * @param {number} duration - Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.
575
+ * @throws {AppwriteException}
576
+ * @returns {Promise<Models.EphemeralKey>}
577
+ * @deprecated Use the object parameter style method for a better developer experience.
578
+ */
579
+ createEphemeralProjectKey(projectId: string, scopes: ProjectKeyScopes[], duration: number): Promise<Models.EphemeralKey>;
580
+ /**
581
+ * Get a project key by its unique ID.
582
+ *
583
+ * @param {string} params.projectId - Project unique ID.
584
+ * @param {string} params.keyId - Key ID.
585
+ * @throws {AppwriteException}
586
+ * @returns {Promise<Models.Key>}
587
+ */
588
+ getProjectKey(params: {
589
+ projectId: string;
590
+ keyId: string;
591
+ }): Promise<Models.Key>;
592
+ /**
593
+ * Get a project key by its unique ID.
594
+ *
595
+ * @param {string} projectId - Project unique ID.
596
+ * @param {string} keyId - Key ID.
597
+ * @throws {AppwriteException}
598
+ * @returns {Promise<Models.Key>}
599
+ * @deprecated Use the object parameter style method for a better developer experience.
600
+ */
601
+ getProjectKey(projectId: string, keyId: string): Promise<Models.Key>;
602
+ /**
603
+ * Update a project key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
604
+ *
605
+ * @param {string} params.projectId - Project unique ID.
606
+ * @param {string} params.keyId - Key ID.
607
+ * @param {string} params.name - Key name. Max length: 128 chars.
608
+ * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed.
609
+ * @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.
610
+ * @throws {AppwriteException}
611
+ * @returns {Promise<Models.Key>}
612
+ */
613
+ updateProjectKey(params: {
614
+ projectId: string;
615
+ keyId: string;
616
+ name: string;
617
+ scopes: ProjectKeyScopes[];
618
+ expire?: string;
619
+ }): Promise<Models.Key>;
620
+ /**
621
+ * Update a project key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
622
+ *
623
+ * @param {string} projectId - Project unique ID.
624
+ * @param {string} keyId - Key ID.
625
+ * @param {string} name - Key name. Max length: 128 chars.
626
+ * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed.
627
+ * @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.
628
+ * @throws {AppwriteException}
629
+ * @returns {Promise<Models.Key>}
630
+ * @deprecated Use the object parameter style method for a better developer experience.
631
+ */
632
+ updateProjectKey(projectId: string, keyId: string, name: string, scopes: ProjectKeyScopes[], expire?: string): Promise<Models.Key>;
633
+ /**
634
+ * Delete a project key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
635
+ *
636
+ * @param {string} params.projectId - Project unique ID.
637
+ * @param {string} params.keyId - Key ID.
638
+ * @throws {AppwriteException}
639
+ * @returns {Promise<{}>}
640
+ */
641
+ deleteProjectKey(params: {
642
+ projectId: string;
643
+ keyId: string;
644
+ }): Promise<{}>;
645
+ /**
646
+ * Delete a project key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
647
+ *
648
+ * @param {string} projectId - Project unique ID.
649
+ * @param {string} keyId - Key ID.
650
+ * @throws {AppwriteException}
651
+ * @returns {Promise<{}>}
652
+ * @deprecated Use the object parameter style method for a better developer experience.
653
+ */
654
+ deleteProjectKey(projectId: string, keyId: string): Promise<{}>;
490
655
  }
@@ -911,25 +911,6 @@ export declare class Organizations {
911
911
  * @deprecated Use the object parameter style method for a better developer experience.
912
912
  */
913
913
  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>>;
914
- /**
915
- * Cancel the downgrade initiated for an organization.
916
- *
917
- * @param {string} params.organizationId - Organization Unique ID
918
- * @throws {AppwriteException}
919
- * @returns {Promise<Models.Organization<Preferences>>}
920
- */
921
- cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
922
- organizationId: string;
923
- }): Promise<Models.Organization<Preferences>>;
924
- /**
925
- * Cancel the downgrade initiated for an organization.
926
- *
927
- * @param {string} organizationId - Organization Unique ID
928
- * @throws {AppwriteException}
929
- * @returns {Promise<Models.Organization<Preferences>>}
930
- * @deprecated Use the object parameter style method for a better developer experience.
931
- */
932
- cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
933
914
  /**
934
915
  * Create a billing plan estimation for upgrading or downgrading an organization plan.
935
916
  *