@appwrite.io/console 8.2.0 → 9.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.
@@ -373,6 +373,7 @@ export declare class Databases {
373
373
  * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
374
374
  * @param {boolean} params.documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
375
375
  * @param {boolean} params.enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
376
+ * @param {boolean} params.purge - When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.
376
377
  * @throws {AppwriteException}
377
378
  * @returns {Promise<Models.Collection>}
378
379
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTable` instead.
@@ -384,6 +385,7 @@ export declare class Databases {
384
385
  permissions?: string[];
385
386
  documentSecurity?: boolean;
386
387
  enabled?: boolean;
388
+ purge?: boolean;
387
389
  }): Promise<Models.Collection>;
388
390
  /**
389
391
  * Update a collection by its unique ID.
@@ -394,11 +396,12 @@ export declare class Databases {
394
396
  * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
395
397
  * @param {boolean} documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
396
398
  * @param {boolean} enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
399
+ * @param {boolean} purge - When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.
397
400
  * @throws {AppwriteException}
398
401
  * @returns {Promise<Models.Collection>}
399
402
  * @deprecated Use the object parameter style method for a better developer experience.
400
403
  */
401
- updateCollection(databaseId: string, collectionId: string, name?: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
404
+ updateCollection(databaseId: string, collectionId: string, name?: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean, purge?: boolean): Promise<Models.Collection>;
402
405
  /**
403
406
  * Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
404
407
  *
@@ -1794,7 +1797,7 @@ export declare class Databases {
1794
1797
  * @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.
1795
1798
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1796
1799
  * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1797
- * @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
1800
+ * @param {number} params.ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).
1798
1801
  * @throws {AppwriteException}
1799
1802
  * @returns {Promise<Models.DocumentList<Document>>}
1800
1803
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
@@ -1815,7 +1818,7 @@ export declare class Databases {
1815
1818
  * @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.
1816
1819
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1817
1820
  * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1818
- * @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
1821
+ * @param {number} ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).
1819
1822
  * @throws {AppwriteException}
1820
1823
  * @returns {Promise<Models.DocumentList<Document>>}
1821
1824
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -204,6 +204,8 @@ export declare class Migrations {
204
204
  */
205
205
  getFirebaseReport(resources: FirebaseMigrationResource[], serviceAccount: string): Promise<Models.MigrationReport>;
206
206
  /**
207
+ * Export documents to a JSON file from your Appwrite database. This endpoint allows you to export documents to a JSON file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.
208
+ *
207
209
  *
208
210
  * @param {string} params.resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.
209
211
  * @param {string} params.filename - The name of the file to be created for the export, excluding the .json extension.
@@ -221,6 +223,8 @@ export declare class Migrations {
221
223
  notify?: boolean;
222
224
  }): Promise<Models.Migration>;
223
225
  /**
226
+ * Export documents to a JSON file from your Appwrite database. This endpoint allows you to export documents to a JSON file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.
227
+ *
224
228
  *
225
229
  * @param {string} resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.
226
230
  * @param {string} filename - The name of the file to be created for the export, excluding the .json extension.
@@ -233,6 +237,8 @@ export declare class Migrations {
233
237
  */
234
238
  createJSONExport(resourceId: string, filename: string, columns?: string[], queries?: string[], notify?: boolean): Promise<Models.Migration>;
235
239
  /**
240
+ * Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.
241
+ *
236
242
  *
237
243
  * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
238
244
  * @param {string} params.fileId - File ID.
@@ -248,6 +254,8 @@ export declare class Migrations {
248
254
  internalFile?: boolean;
249
255
  }): Promise<Models.Migration>;
250
256
  /**
257
+ * Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.
258
+ *
251
259
  *
252
260
  * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
253
261
  * @param {string} fileId - File ID.
@@ -1,6 +1,7 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
3
  import { Platform } from '../enums/platform';
4
+ import { Addon } from '../enums/addon';
4
5
  import { Scopes } from '../enums/scopes';
5
6
  export declare class Organizations {
6
7
  client: Client;
@@ -125,6 +126,144 @@ export declare class Organizations {
125
126
  * @deprecated Use the object parameter style method for a better developer experience.
126
127
  */
127
128
  delete(organizationId: string): Promise<{}>;
129
+ /**
130
+ * List all billing addons for an organization.
131
+ *
132
+ *
133
+ * @param {string} params.organizationId - Organization ID
134
+ * @throws {AppwriteException}
135
+ * @returns {Promise<Models.AddonList>}
136
+ */
137
+ listAddons(params: {
138
+ organizationId: string;
139
+ }): Promise<Models.AddonList>;
140
+ /**
141
+ * List all billing addons for an organization.
142
+ *
143
+ *
144
+ * @param {string} organizationId - Organization ID
145
+ * @throws {AppwriteException}
146
+ * @returns {Promise<Models.AddonList>}
147
+ * @deprecated Use the object parameter style method for a better developer experience.
148
+ */
149
+ listAddons(organizationId: string): Promise<Models.AddonList>;
150
+ /**
151
+ * Create the BAA billing addon for an organization.
152
+ *
153
+ *
154
+ * @param {string} params.organizationId - Organization ID
155
+ * @throws {AppwriteException}
156
+ * @returns {Promise<Models.Addon>}
157
+ */
158
+ createBaaAddon(params: {
159
+ organizationId: string;
160
+ }): Promise<Models.Addon>;
161
+ /**
162
+ * Create the BAA billing addon for an organization.
163
+ *
164
+ *
165
+ * @param {string} organizationId - Organization ID
166
+ * @throws {AppwriteException}
167
+ * @returns {Promise<Models.Addon>}
168
+ * @deprecated Use the object parameter style method for a better developer experience.
169
+ */
170
+ createBaaAddon(organizationId: string): Promise<Models.Addon>;
171
+ /**
172
+ * Get the details of a billing addon for an organization.
173
+ *
174
+ *
175
+ * @param {string} params.organizationId - Organization ID
176
+ * @param {string} params.addonId - Addon ID
177
+ * @throws {AppwriteException}
178
+ * @returns {Promise<Models.Addon>}
179
+ */
180
+ getAddon(params: {
181
+ organizationId: string;
182
+ addonId: string;
183
+ }): Promise<Models.Addon>;
184
+ /**
185
+ * Get the details of a billing addon for an organization.
186
+ *
187
+ *
188
+ * @param {string} organizationId - Organization ID
189
+ * @param {string} addonId - Addon ID
190
+ * @throws {AppwriteException}
191
+ * @returns {Promise<Models.Addon>}
192
+ * @deprecated Use the object parameter style method for a better developer experience.
193
+ */
194
+ getAddon(organizationId: string, addonId: string): Promise<Models.Addon>;
195
+ /**
196
+ * Delete a billing addon for an organization.
197
+ *
198
+ *
199
+ * @param {string} params.organizationId - Organization ID
200
+ * @param {string} params.addonId - Addon ID
201
+ * @throws {AppwriteException}
202
+ * @returns {Promise<{}>}
203
+ */
204
+ deleteAddon(params: {
205
+ organizationId: string;
206
+ addonId: string;
207
+ }): Promise<{}>;
208
+ /**
209
+ * Delete a billing addon for an organization.
210
+ *
211
+ *
212
+ * @param {string} organizationId - Organization ID
213
+ * @param {string} addonId - Addon ID
214
+ * @throws {AppwriteException}
215
+ * @returns {Promise<{}>}
216
+ * @deprecated Use the object parameter style method for a better developer experience.
217
+ */
218
+ deleteAddon(organizationId: string, addonId: string): Promise<{}>;
219
+ /**
220
+ * Confirm payment for a billing addon for an organization.
221
+ *
222
+ *
223
+ * @param {string} params.organizationId - Organization ID
224
+ * @param {string} params.addonId - Addon ID
225
+ * @throws {AppwriteException}
226
+ * @returns {Promise<Models.Addon>}
227
+ */
228
+ confirmAddonPayment(params: {
229
+ organizationId: string;
230
+ addonId: string;
231
+ }): Promise<Models.Addon>;
232
+ /**
233
+ * Confirm payment for a billing addon for an organization.
234
+ *
235
+ *
236
+ * @param {string} organizationId - Organization ID
237
+ * @param {string} addonId - Addon ID
238
+ * @throws {AppwriteException}
239
+ * @returns {Promise<Models.Addon>}
240
+ * @deprecated Use the object parameter style method for a better developer experience.
241
+ */
242
+ confirmAddonPayment(organizationId: string, addonId: string): Promise<Models.Addon>;
243
+ /**
244
+ * Get the price details for a billing addon for an organization.
245
+ *
246
+ *
247
+ * @param {string} params.organizationId - Organization ID
248
+ * @param {Addon} params.addon - Addon key identifier (e.g. baa).
249
+ * @throws {AppwriteException}
250
+ * @returns {Promise<Models.AddonPrice>}
251
+ */
252
+ getAddonPrice(params: {
253
+ organizationId: string;
254
+ addon: Addon;
255
+ }): Promise<Models.AddonPrice>;
256
+ /**
257
+ * Get the price details for a billing addon for an organization.
258
+ *
259
+ *
260
+ * @param {string} organizationId - Organization ID
261
+ * @param {Addon} addon - Addon key identifier (e.g. baa).
262
+ * @throws {AppwriteException}
263
+ * @returns {Promise<Models.AddonPrice>}
264
+ * @deprecated Use the object parameter style method for a better developer experience.
265
+ */
266
+ getAddonPrice(organizationId: string, addon: Addon): Promise<Models.AddonPrice>;
128
267
  /**
129
268
  * Get a list of all aggregations for an organization.
130
269
  *