@appwrite.io/console 15.7.0 → 16.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.
@@ -1283,7 +1283,7 @@ export declare class Account {
1283
1283
  /**
1284
1284
  * Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.
1285
1285
  *
1286
- * @param {string} params.sessionId - Session ID. Use the string 'current' to get the current device session.
1286
+ * @param {string} params.sessionId - Session ID. Use the string 'current' to get the current device session. Defaults to 'current'.
1287
1287
  * @throws {AppwriteException}
1288
1288
  * @returns {Promise<Models.Session>}
1289
1289
  */
@@ -1293,7 +1293,7 @@ export declare class Account {
1293
1293
  /**
1294
1294
  * Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.
1295
1295
  *
1296
- * @param {string} sessionId - Session ID. Use the string 'current' to get the current device session.
1296
+ * @param {string} sessionId - Session ID. Use the string 'current' to get the current device session. Defaults to 'current'.
1297
1297
  * @throws {AppwriteException}
1298
1298
  * @returns {Promise<Models.Session>}
1299
1299
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -1302,7 +1302,7 @@ export declare class Account {
1302
1302
  /**
1303
1303
  * Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.
1304
1304
  *
1305
- * @param {string} params.sessionId - Session ID. Use the string 'current' to update the current device session.
1305
+ * @param {string} params.sessionId - Session ID. Use the string 'current' to update the current device session. Defaults to 'current'.
1306
1306
  * @throws {AppwriteException}
1307
1307
  * @returns {Promise<Models.Session>}
1308
1308
  */
@@ -1312,7 +1312,7 @@ export declare class Account {
1312
1312
  /**
1313
1313
  * Use this endpoint to extend a session's length. Extending a session is useful when session expiry is short. If the session was created using an OAuth provider, this endpoint refreshes the access token from the provider.
1314
1314
  *
1315
- * @param {string} sessionId - Session ID. Use the string 'current' to update the current device session.
1315
+ * @param {string} sessionId - Session ID. Use the string 'current' to update the current device session. Defaults to 'current'.
1316
1316
  * @throws {AppwriteException}
1317
1317
  * @returns {Promise<Models.Session>}
1318
1318
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -1321,7 +1321,7 @@ export declare class Account {
1321
1321
  /**
1322
1322
  * Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.
1323
1323
  *
1324
- * @param {string} params.sessionId - Session ID. Use the string 'current' to delete the current device session.
1324
+ * @param {string} params.sessionId - Session ID. Use the string 'current' to delete the current device session. Defaults to 'current'.
1325
1325
  * @throws {AppwriteException}
1326
1326
  * @returns {Promise<{}>}
1327
1327
  */
@@ -1331,7 +1331,7 @@ export declare class Account {
1331
1331
  /**
1332
1332
  * Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use [Delete Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions) instead.
1333
1333
  *
1334
- * @param {string} sessionId - Session ID. Use the string 'current' to delete the current device session.
1334
+ * @param {string} sessionId - Session ID. Use the string 'current' to delete the current device session. Defaults to 'current'.
1335
1335
  * @throws {AppwriteException}
1336
1336
  * @returns {Promise<{}>}
1337
1337
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -0,0 +1,162 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ export declare class Affiliates {
4
+ client: Client;
5
+ constructor(client: Client);
6
+ /**
7
+ * List affiliate links for the current account.
8
+ *
9
+ *
10
+ * @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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, status
11
+ * @throws {AppwriteException}
12
+ * @returns {Promise<Models.AffiliateLinkList>}
13
+ */
14
+ listLinks(params?: {
15
+ queries?: string[];
16
+ }): Promise<Models.AffiliateLinkList>;
17
+ /**
18
+ * List affiliate links for the current account.
19
+ *
20
+ *
21
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, status
22
+ * @throws {AppwriteException}
23
+ * @returns {Promise<Models.AffiliateLinkList>}
24
+ * @deprecated Use the object parameter style method for a better developer experience.
25
+ */
26
+ listLinks(queries?: string[]): Promise<Models.AffiliateLinkList>;
27
+ /**
28
+ * Create a shareable affiliate link for the current account. Every console user is automatically in the affiliates program.
29
+ *
30
+ *
31
+ * @param {string} params.linkId - Link 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. This ID is the shareable referral code.
32
+ * @param {string} params.name - Link name. Max length: 128 chars.
33
+ * @throws {AppwriteException}
34
+ * @returns {Promise<Models.AffiliateLink>}
35
+ */
36
+ createLink(params: {
37
+ linkId: string;
38
+ name?: string;
39
+ }): Promise<Models.AffiliateLink>;
40
+ /**
41
+ * Create a shareable affiliate link for the current account. Every console user is automatically in the affiliates program.
42
+ *
43
+ *
44
+ * @param {string} linkId - Link 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. This ID is the shareable referral code.
45
+ * @param {string} name - Link name. Max length: 128 chars.
46
+ * @throws {AppwriteException}
47
+ * @returns {Promise<Models.AffiliateLink>}
48
+ * @deprecated Use the object parameter style method for a better developer experience.
49
+ */
50
+ createLink(linkId: string, name?: string): Promise<Models.AffiliateLink>;
51
+ /**
52
+ * Get a single affiliate link owned by the current account.
53
+ *
54
+ *
55
+ * @param {string} params.linkId - Link ID.
56
+ * @throws {AppwriteException}
57
+ * @returns {Promise<Models.AffiliateLink>}
58
+ */
59
+ getLink(params: {
60
+ linkId: string;
61
+ }): Promise<Models.AffiliateLink>;
62
+ /**
63
+ * Get a single affiliate link owned by the current account.
64
+ *
65
+ *
66
+ * @param {string} linkId - Link ID.
67
+ * @throws {AppwriteException}
68
+ * @returns {Promise<Models.AffiliateLink>}
69
+ * @deprecated Use the object parameter style method for a better developer experience.
70
+ */
71
+ getLink(linkId: string): Promise<Models.AffiliateLink>;
72
+ /**
73
+ * Delete an affiliate link owned by the current account. Existing referrals and rewards keep their stored link IDs for history.
74
+ *
75
+ *
76
+ * @param {string} params.linkId - Link ID.
77
+ * @throws {AppwriteException}
78
+ * @returns {Promise<{}>}
79
+ */
80
+ deleteLink(params: {
81
+ linkId: string;
82
+ }): Promise<{}>;
83
+ /**
84
+ * Delete an affiliate link owned by the current account. Existing referrals and rewards keep their stored link IDs for history.
85
+ *
86
+ *
87
+ * @param {string} linkId - Link ID.
88
+ * @throws {AppwriteException}
89
+ * @returns {Promise<{}>}
90
+ * @deprecated Use the object parameter style method for a better developer experience.
91
+ */
92
+ deleteLink(linkId: string): Promise<{}>;
93
+ /**
94
+ * List referrals attributed to the current account's affiliate links. Responses include privacy-safe metadata only (truncated user ID and signup country), never email or name. Referrals are created automatically on signup when the invite cookie is present.
95
+ *
96
+ *
97
+ * @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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referredUserMaskedId, referredUserCountry, status, attributedAt, expiresAt, convertedAt
98
+ * @throws {AppwriteException}
99
+ * @returns {Promise<Models.AffiliateReferralList>}
100
+ */
101
+ listReferrals(params?: {
102
+ queries?: string[];
103
+ }): Promise<Models.AffiliateReferralList>;
104
+ /**
105
+ * List referrals attributed to the current account's affiliate links. Responses include privacy-safe metadata only (truncated user ID and signup country), never email or name. Referrals are created automatically on signup when the invite cookie is present.
106
+ *
107
+ *
108
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referredUserMaskedId, referredUserCountry, status, attributedAt, expiresAt, convertedAt
109
+ * @throws {AppwriteException}
110
+ * @returns {Promise<Models.AffiliateReferralList>}
111
+ * @deprecated Use the object parameter style method for a better developer experience.
112
+ */
113
+ listReferrals(queries?: string[]): Promise<Models.AffiliateReferralList>;
114
+ /**
115
+ * List rewards earned by the current account from affiliate link conversions.
116
+ *
117
+ *
118
+ * @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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referralId, amount, status, teamId, creditId
119
+ * @throws {AppwriteException}
120
+ * @returns {Promise<Models.AffiliateRewardList>}
121
+ */
122
+ listRewards(params?: {
123
+ queries?: string[];
124
+ }): Promise<Models.AffiliateRewardList>;
125
+ /**
126
+ * List rewards earned by the current account from affiliate link conversions.
127
+ *
128
+ *
129
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referralId, amount, status, teamId, creditId
130
+ * @throws {AppwriteException}
131
+ * @returns {Promise<Models.AffiliateRewardList>}
132
+ * @deprecated Use the object parameter style method for a better developer experience.
133
+ */
134
+ listRewards(queries?: string[]): Promise<Models.AffiliateRewardList>;
135
+ /**
136
+ * Claim a pending affiliate reward by setting its status to `claimed`. Creates organization credits for the target organization. The current user must be an owner of that organization.
137
+ *
138
+ *
139
+ * @param {string} params.rewardId - Reward ID
140
+ * @param {string} params.status - New reward status. Use `claimed` to claim the reward as organization credits.
141
+ * @param {string} params.organizationId - Organization ID to apply credits to when claiming.
142
+ * @throws {AppwriteException}
143
+ * @returns {Promise<Models.AffiliateReward>}
144
+ */
145
+ updateReward(params: {
146
+ rewardId: string;
147
+ status: string;
148
+ organizationId: string;
149
+ }): Promise<Models.AffiliateReward>;
150
+ /**
151
+ * Claim a pending affiliate reward by setting its status to `claimed`. Creates organization credits for the target organization. The current user must be an owner of that organization.
152
+ *
153
+ *
154
+ * @param {string} rewardId - Reward ID
155
+ * @param {string} status - New reward status. Use `claimed` to claim the reward as organization credits.
156
+ * @param {string} organizationId - Organization ID to apply credits to when claiming.
157
+ * @throws {AppwriteException}
158
+ * @returns {Promise<Models.AffiliateReward>}
159
+ * @deprecated Use the object parameter style method for a better developer experience.
160
+ */
161
+ updateReward(rewardId: string, status: string, organizationId: string): Promise<Models.AffiliateReward>;
162
+ }
@@ -36,6 +36,7 @@ export declare class DocumentsDB {
36
36
  * @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
37
37
  * @param {string} params.specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.
38
38
  * @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.
39
+ * @param {string} params.syncMode - Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
39
40
  * @throws {AppwriteException}
40
41
  * @returns {Promise<Models.Database>}
41
42
  */
@@ -45,6 +46,7 @@ export declare class DocumentsDB {
45
46
  enabled?: boolean;
46
47
  specification?: string;
47
48
  replicas?: number;
49
+ syncMode?: string;
48
50
  }): Promise<Models.Database>;
49
51
  /**
50
52
  * Create a new Database.
@@ -55,11 +57,12 @@ export declare class DocumentsDB {
55
57
  * @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
56
58
  * @param {string} specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.
57
59
  * @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.
60
+ * @param {string} syncMode - Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
58
61
  * @throws {AppwriteException}
59
62
  * @returns {Promise<Models.Database>}
60
63
  * @deprecated Use the object parameter style method for a better developer experience.
61
64
  */
62
- create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
65
+ create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
63
66
  /**
64
67
  * List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.
65
68
  *
@@ -195,6 +198,7 @@ export declare class DocumentsDB {
195
198
  * @param {boolean} params.enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
196
199
  * @param {string} params.specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
197
200
  * @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
201
+ * @param {string} params.syncMode - Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
198
202
  * @throws {AppwriteException}
199
203
  * @returns {Promise<Models.Database>}
200
204
  */
@@ -204,6 +208,7 @@ export declare class DocumentsDB {
204
208
  enabled?: boolean;
205
209
  specification?: string;
206
210
  replicas?: number;
211
+ syncMode?: string;
207
212
  }): Promise<Models.Database>;
208
213
  /**
209
214
  * Update a database by its unique ID.
@@ -213,11 +218,12 @@ export declare class DocumentsDB {
213
218
  * @param {boolean} enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
214
219
  * @param {string} specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
215
220
  * @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
221
+ * @param {string} syncMode - Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
216
222
  * @throws {AppwriteException}
217
223
  * @returns {Promise<Models.Database>}
218
224
  * @deprecated Use the object parameter style method for a better developer experience.
219
225
  */
220
- update(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
226
+ update(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
221
227
  /**
222
228
  * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
223
229
  *
@@ -0,0 +1,31 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ import { EmbeddingModel } from '../enums/embedding-model';
4
+ export declare class Embeddings {
5
+ client: Client;
6
+ constructor(client: Client);
7
+ /**
8
+ * Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.
9
+ *
10
+ *
11
+ * @param {string[]} params.texts - Array of text to generate embeddings.
12
+ * @param {EmbeddingModel} params.model - The embedding model to use for generating vector embeddings.
13
+ * @throws {AppwriteException}
14
+ * @returns {Promise<Models.EmbeddingList>}
15
+ */
16
+ createTextEmbeddings(params: {
17
+ texts: string[];
18
+ model?: EmbeddingModel;
19
+ }): Promise<Models.EmbeddingList>;
20
+ /**
21
+ * Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.
22
+ *
23
+ *
24
+ * @param {string[]} texts - Array of text to generate embeddings.
25
+ * @param {EmbeddingModel} model - The embedding model to use for generating vector embeddings.
26
+ * @throws {AppwriteException}
27
+ * @returns {Promise<Models.EmbeddingList>}
28
+ * @deprecated Use the object parameter style method for a better developer experience.
29
+ */
30
+ createTextEmbeddings(texts: string[], model?: EmbeddingModel): Promise<Models.EmbeddingList>;
31
+ }
@@ -40,7 +40,6 @@ export declare class Mongo {
40
40
  * @param {boolean} params.storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
41
41
  * @param {number} params.storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
42
42
  * @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
43
- * @param {string} params.api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
44
43
  * @throws {AppwriteException}
45
44
  * @returns {Promise<Models.DedicatedDatabase>}
46
45
  */
@@ -60,7 +59,6 @@ export declare class Mongo {
60
59
  storageAutoscaling?: boolean;
61
60
  storageAutoscalingThresholdPercent?: number;
62
61
  storageAutoscalingMaxGb?: number;
63
- api?: string;
64
62
  }): Promise<Models.DedicatedDatabase>;
65
63
  /**
66
64
  * Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.
@@ -80,12 +78,11 @@ export declare class Mongo {
80
78
  * @param {boolean} storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
81
79
  * @param {number} storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
82
80
  * @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
83
- * @param {string} api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
84
81
  * @throws {AppwriteException}
85
82
  * @returns {Promise<Models.DedicatedDatabase>}
86
83
  * @deprecated Use the object parameter style method for a better developer experience.
87
84
  */
88
- create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, api?: string): Promise<Models.DedicatedDatabase>;
85
+ create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
89
86
  /**
90
87
  * List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.
91
88
  *
@@ -40,7 +40,6 @@ export declare class Mysql {
40
40
  * @param {boolean} params.storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
41
41
  * @param {number} params.storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
42
42
  * @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
43
- * @param {string} params.api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
44
43
  * @throws {AppwriteException}
45
44
  * @returns {Promise<Models.DedicatedDatabase>}
46
45
  */
@@ -60,7 +59,6 @@ export declare class Mysql {
60
59
  storageAutoscaling?: boolean;
61
60
  storageAutoscalingThresholdPercent?: number;
62
61
  storageAutoscalingMaxGb?: number;
63
- api?: string;
64
62
  }): Promise<Models.DedicatedDatabase>;
65
63
  /**
66
64
  * Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.
@@ -80,12 +78,11 @@ export declare class Mysql {
80
78
  * @param {boolean} storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
81
79
  * @param {number} storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
82
80
  * @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
83
- * @param {string} api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
84
81
  * @throws {AppwriteException}
85
82
  * @returns {Promise<Models.DedicatedDatabase>}
86
83
  * @deprecated Use the object parameter style method for a better developer experience.
87
84
  */
88
- create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, api?: string): Promise<Models.DedicatedDatabase>;
85
+ create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
89
86
  /**
90
87
  * List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.
91
88
  *
@@ -737,7 +734,7 @@ export declare class Mysql {
737
734
  *
738
735
  * @param {string} params.databaseId - Database ID.
739
736
  * @param {string} params.mode - Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.
740
- * @param {number} params.maxConnections - Maximum pooled connections.
737
+ * @param {number} params.maxConnections - Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.
741
738
  * @param {number} params.defaultPoolSize - Default pool size per user.
742
739
  * @param {boolean} params.readWriteSplitting - Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.
743
740
  * @param {string} params.poolerCpuRequest - Pooler sidecar CPU request override (Kubernetes quantity, e.g. "250m" or "1"). Leave null for the proportional default (5% of DB CPU, floor 100m).
@@ -763,7 +760,7 @@ export declare class Mysql {
763
760
  *
764
761
  * @param {string} databaseId - Database ID.
765
762
  * @param {string} mode - Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.
766
- * @param {number} maxConnections - Maximum pooled connections.
763
+ * @param {number} maxConnections - Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.
767
764
  * @param {number} defaultPoolSize - Default pool size per user.
768
765
  * @param {boolean} readWriteSplitting - Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.
769
766
  * @param {string} poolerCpuRequest - Pooler sidecar CPU request override (Kubernetes quantity, e.g. "250m" or "1"). Leave null for the proportional default (5% of DB CPU, floor 100m).
@@ -40,7 +40,6 @@ export declare class Postgresql {
40
40
  * @param {boolean} params.storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
41
41
  * @param {number} params.storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
42
42
  * @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
43
- * @param {string} params.api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
44
43
  * @throws {AppwriteException}
45
44
  * @returns {Promise<Models.DedicatedDatabase>}
46
45
  */
@@ -60,7 +59,6 @@ export declare class Postgresql {
60
59
  storageAutoscaling?: boolean;
61
60
  storageAutoscalingThresholdPercent?: number;
62
61
  storageAutoscalingMaxGb?: number;
63
- api?: string;
64
62
  }): Promise<Models.DedicatedDatabase>;
65
63
  /**
66
64
  * Create a new dedicated database with the chosen engine and configuration. Status will be 'provisioning' until the database is ready.
@@ -80,12 +78,11 @@ export declare class Postgresql {
80
78
  * @param {boolean} storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
81
79
  * @param {number} storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
82
80
  * @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
83
- * @param {string} api - Product API that owns this database: tablesdb, documentsdb, or vectorsdb. Omit for a raw database reached directly; its api is its engine. tablesdb/documentsdb/vectorsdb databases are reached only through their product APIs.
84
81
  * @throws {AppwriteException}
85
82
  * @returns {Promise<Models.DedicatedDatabase>}
86
83
  * @deprecated Use the object parameter style method for a better developer experience.
87
84
  */
88
- create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, api?: string): Promise<Models.DedicatedDatabase>;
85
+ create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
89
86
  /**
90
87
  * List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.
91
88
  *
@@ -800,7 +797,7 @@ export declare class Postgresql {
800
797
  *
801
798
  * @param {string} params.databaseId - Database ID.
802
799
  * @param {string} params.mode - Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.
803
- * @param {number} params.maxConnections - Maximum pooled connections.
800
+ * @param {number} params.maxConnections - Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.
804
801
  * @param {number} params.defaultPoolSize - Default pool size per user.
805
802
  * @param {boolean} params.readWriteSplitting - Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.
806
803
  * @param {string} params.poolerCpuRequest - Pooler sidecar CPU request override (Kubernetes quantity, e.g. "250m" or "1"). Leave null for the proportional default (5% of DB CPU, floor 100m).
@@ -826,7 +823,7 @@ export declare class Postgresql {
826
823
  *
827
824
  * @param {string} databaseId - Database ID.
828
825
  * @param {string} mode - Connection pool mode. Allowed values: transaction, session. Transaction mode returns connections to the pool after each transaction; session mode holds connections for the entire session lifetime.
829
- * @param {number} maxConnections - Maximum pooled connections.
826
+ * @param {number} maxConnections - Client-connection ceiling the pooler accepts. Supported on MySQL and MariaDB only; the PostgreSQL pooler has no client cap, so set networkMaxConnections on the database instead.
830
827
  * @param {number} defaultPoolSize - Default pool size per user.
831
828
  * @param {boolean} readWriteSplitting - Route SELECTs to HA replicas, writes and locked reads to the primary. Defaults to true when HA is enabled.
832
829
  * @param {string} poolerCpuRequest - Pooler sidecar CPU request override (Kubernetes quantity, e.g. "250m" or "1"). Leave null for the proportional default (5% of DB CPU, floor 100m).
@@ -2017,7 +2017,7 @@ export declare class Project {
2017
2017
  *
2018
2018
  * Keep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.
2019
2019
  *
2020
- * @param {number} params.total - Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.
2020
+ * @param {number} params.total - Set the password history length per user. Value can be between 1 and 20, or null to disable the limit.
2021
2021
  * @throws {AppwriteException}
2022
2022
  * @returns {Promise<Models.Project>}
2023
2023
  */
@@ -2029,7 +2029,7 @@ export declare class Project {
2029
2029
  *
2030
2030
  * Keep in mind, while password history policy is disabled, the history is not being stored. Enabling the policy will not have any history on existing users, and it will only start to collect and enforce the policy on password changes since the policy is enabled.
2031
2031
  *
2032
- * @param {number} total - Set the password history length per user. Value can be between 1 and 5000, or null to disable the limit.
2032
+ * @param {number} total - Set the password history length per user. Value can be between 1 and 20, or null to disable the limit.
2033
2033
  * @throws {AppwriteException}
2034
2034
  * @returns {Promise<Models.Project>}
2035
2035
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -2107,7 +2107,7 @@ export declare class Project {
2107
2107
  /**
2108
2108
  * Update maximum duration how long sessions created within a project should stay active for.
2109
2109
  *
2110
- * @param {number} params.duration - Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.
2110
+ * @param {number} params.duration - Maximum session length in seconds. Minium allowed value is 60 seconds, and maximum is 1 year, which is 31536000 seconds.
2111
2111
  * @throws {AppwriteException}
2112
2112
  * @returns {Promise<Models.Project>}
2113
2113
  */
@@ -2117,7 +2117,7 @@ export declare class Project {
2117
2117
  /**
2118
2118
  * Update maximum duration how long sessions created within a project should stay active for.
2119
2119
  *
2120
- * @param {number} duration - Maximum session length in seconds. Minium allowed value is 5 second, and maximum is 1 year, which is 31536000 seconds.
2120
+ * @param {number} duration - Maximum session length in seconds. Minium allowed value is 60 seconds, and maximum is 1 year, which is 31536000 seconds.
2121
2121
  * @throws {AppwriteException}
2122
2122
  * @returns {Promise<Models.Project>}
2123
2123
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -2145,26 +2145,26 @@ export declare class Project {
2145
2145
  /**
2146
2146
  * Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.
2147
2147
  *
2148
- * @param {number} params.total - Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.
2148
+ * @param {number} params.total - Set the maximum number of sessions allowed per user. Value can be between 1 and 100.
2149
2149
  * @throws {AppwriteException}
2150
2150
  * @returns {Promise<Models.Project>}
2151
2151
  */
2152
2152
  updateSessionLimitPolicy(params: {
2153
- total?: number;
2153
+ total: number;
2154
2154
  }): Promise<Models.Project>;
2155
2155
  /**
2156
2156
  * Update the maximum number of sessions allowed per user. When the limit is hit, the oldest session will be deleted to make room for new one.
2157
2157
  *
2158
- * @param {number} total - Set the maximum number of sessions allowed per user. Value can be between 1 and 5000, or null to disable the limit.
2158
+ * @param {number} total - Set the maximum number of sessions allowed per user. Value can be between 1 and 100.
2159
2159
  * @throws {AppwriteException}
2160
2160
  * @returns {Promise<Models.Project>}
2161
2161
  * @deprecated Use the object parameter style method for a better developer experience.
2162
2162
  */
2163
- updateSessionLimitPolicy(total?: number): Promise<Models.Project>;
2163
+ updateSessionLimitPolicy(total: number): Promise<Models.Project>;
2164
2164
  /**
2165
2165
  * Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.
2166
2166
  *
2167
- * @param {number} params.total - Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.
2167
+ * @param {number} params.total - Set the maximum number of users allowed in the project. Value can be between 0 and 10000. Use 0 or null to disable the limit.
2168
2168
  * @throws {AppwriteException}
2169
2169
  * @returns {Promise<Models.Project>}
2170
2170
  */
@@ -2174,7 +2174,7 @@ export declare class Project {
2174
2174
  /**
2175
2175
  * Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited.
2176
2176
  *
2177
- * @param {number} total - Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit.
2177
+ * @param {number} total - Set the maximum number of users allowed in the project. Value can be between 0 and 10000. Use 0 or null to disable the limit.
2178
2178
  * @throws {AppwriteException}
2179
2179
  * @returns {Promise<Models.Project>}
2180
2180
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -1,10 +1,40 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
+ import { InvalidationType } from '../enums/invalidation-type';
3
4
  import { StatusCode } from '../enums/status-code';
4
5
  import { ProxyResourceType } from '../enums/proxy-resource-type';
5
6
  export declare class Proxy {
6
7
  client: Client;
7
8
  constructor(client: Client);
9
+ /**
10
+ * Create a new CDN cache invalidation for a domain. Executes a hard purge of cached content.
11
+ *
12
+ * Depending on type, the invalidation purges a single cache tag, a single URL path, or all cached content for the domain.
13
+ *
14
+ * @param {string} params.domain - Domain name.
15
+ * @param {InvalidationType} params.type - Type of reference passed. Allowed values are: tag, path, all
16
+ * @param {string} params.reference - Reference to invalidate. Depending on type this can be: cache tag name (up to 128 characters), URL path (up to 2048 characters). Not required when type is all.
17
+ * @throws {AppwriteException}
18
+ * @returns {Promise<Models.ProxyInvalidation>}
19
+ */
20
+ createInvalidation(params: {
21
+ domain: string;
22
+ type: InvalidationType;
23
+ reference?: string;
24
+ }): Promise<Models.ProxyInvalidation>;
25
+ /**
26
+ * Create a new CDN cache invalidation for a domain. Executes a hard purge of cached content.
27
+ *
28
+ * Depending on type, the invalidation purges a single cache tag, a single URL path, or all cached content for the domain.
29
+ *
30
+ * @param {string} domain - Domain name.
31
+ * @param {InvalidationType} type - Type of reference passed. Allowed values are: tag, path, all
32
+ * @param {string} reference - Reference to invalidate. Depending on type this can be: cache tag name (up to 128 characters), URL path (up to 2048 characters). Not required when type is all.
33
+ * @throws {AppwriteException}
34
+ * @returns {Promise<Models.ProxyInvalidation>}
35
+ * @deprecated Use the object parameter style method for a better developer experience.
36
+ */
37
+ createInvalidation(domain: string, type: InvalidationType, reference?: string): Promise<Models.ProxyInvalidation>;
8
38
  /**
9
39
  * Get a list of all the proxy rules. You can use the query params to filter your results.
10
40
  *
@@ -41,6 +41,7 @@ export declare class TablesDB {
41
41
  * @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
42
42
  * @param {string} params.specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.
43
43
  * @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.
44
+ * @param {string} params.syncMode - Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
44
45
  * @throws {AppwriteException}
45
46
  * @returns {Promise<Models.Database>}
46
47
  */
@@ -50,6 +51,7 @@ export declare class TablesDB {
50
51
  enabled?: boolean;
51
52
  specification?: string;
52
53
  replicas?: number;
54
+ syncMode?: string;
53
55
  }): Promise<Models.Database>;
54
56
  /**
55
57
  * Create a new Database.
@@ -60,11 +62,12 @@ export declare class TablesDB {
60
62
  * @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
61
63
  * @param {string} specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.
62
64
  * @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.
65
+ * @param {string} syncMode - Replication sync mode for the dedicated database backing this database. Requires a dedicated `specification`; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
63
66
  * @throws {AppwriteException}
64
67
  * @returns {Promise<Models.Database>}
65
68
  * @deprecated Use the object parameter style method for a better developer experience.
66
69
  */
67
- create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
70
+ create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
68
71
  /**
69
72
  * List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.
70
73
  *
@@ -222,6 +225,7 @@ export declare class TablesDB {
222
225
  * @param {boolean} params.enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
223
226
  * @param {string} params.specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
224
227
  * @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
228
+ * @param {string} params.syncMode - Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
225
229
  * @throws {AppwriteException}
226
230
  * @returns {Promise<Models.Database>}
227
231
  */
@@ -231,6 +235,7 @@ export declare class TablesDB {
231
235
  enabled?: boolean;
232
236
  specification?: string;
233
237
  replicas?: number;
238
+ syncMode?: string;
234
239
  }): Promise<Models.Database>;
235
240
  /**
236
241
  * Update a database by its unique ID.
@@ -240,11 +245,12 @@ export declare class TablesDB {
240
245
  * @param {boolean} enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
241
246
  * @param {string} specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
242
247
  * @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
248
+ * @param {string} syncMode - Replication sync mode for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification; the mode is only in force once there is at least one replica. Allowed values: async, sync, quorum.
243
249
  * @throws {AppwriteException}
244
250
  * @returns {Promise<Models.Database>}
245
251
  * @deprecated Use the object parameter style method for a better developer experience.
246
252
  */
247
- update(databaseId: string, name?: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
253
+ update(databaseId: string, name?: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
248
254
  /**
249
255
  * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
250
256
  *