From 90edd6585d9b1f42d6fac86f397a3d6e0ea5e8be Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 20 Oct 2026 20:39:46 +1300 Subject: [PATCH 1/2] chore: update Node.js SDK to 31.0.0 --- CHANGELOG.md | 14 + docs/examples/account/list-memberships.md | 15 + docs/examples/activities/list-events.md | 1 + docs/examples/backups/list-archives.md | 1 + docs/examples/backups/list-policies.md | 1 + docs/examples/backups/list-restorations.md | 1 + .../databases/create-big-int-attribute.md | 1 + .../databases/create-boolean-attribute.md | 1 + docs/examples/databases/create-collection.md | 1 + .../databases/create-datetime-attribute.md | 1 + .../databases/create-email-attribute.md | 1 + .../databases/create-enum-attribute.md | 1 + .../databases/create-float-attribute.md | 1 + docs/examples/databases/create-index.md | 1 + .../databases/create-integer-attribute.md | 1 + .../examples/databases/create-ip-attribute.md | 1 + .../databases/create-line-attribute.md | 1 + .../databases/create-longtext-attribute.md | 1 + .../databases/create-mediumtext-attribute.md | 1 + .../databases/create-point-attribute.md | 1 + .../databases/create-polygon-attribute.md | 1 + docs/examples/databases/create-query.md | 19 + .../create-relationship-attribute.md | 1 + .../databases/create-string-attribute.md | 1 + .../databases/create-text-attribute.md | 1 + .../databases/create-url-attribute.md | 1 + .../databases/create-varchar-attribute.md | 1 + docs/examples/databases/create.md | 1 + .../databases/update-big-int-attribute.md | 1 + .../databases/update-boolean-attribute.md | 1 + docs/examples/databases/update-collection.md | 1 + .../databases/update-datetime-attribute.md | 1 + .../databases/update-email-attribute.md | 1 + .../databases/update-enum-attribute.md | 1 + .../databases/update-float-attribute.md | 1 + .../databases/update-integer-attribute.md | 1 + .../examples/databases/update-ip-attribute.md | 1 + .../databases/update-line-attribute.md | 1 + .../databases/update-longtext-attribute.md | 1 + .../databases/update-mediumtext-attribute.md | 1 + .../databases/update-point-attribute.md | 1 + .../databases/update-polygon-attribute.md | 1 + .../update-relationship-attribute.md | 1 + .../databases/update-string-attribute.md | 1 + .../databases/update-text-attribute.md | 1 + .../databases/update-url-attribute.md | 1 + .../databases/update-varchar-attribute.md | 1 + docs/examples/databases/update.md | 1 + .../examples/documentsdb/create-collection.md | 1 + docs/examples/documentsdb/create-index.md | 1 + docs/examples/documentsdb/create-query.md | 19 + docs/examples/documentsdb/create.md | 1 + .../examples/documentsdb/update-collection.md | 1 + docs/examples/documentsdb/update.md | 1 + docs/examples/domains/list-records.md | 1 + docs/examples/domains/list.md | 1 + docs/examples/functions/create-variable.md | 1 + docs/examples/functions/create.md | 1 + docs/examples/functions/update-variable.md | 1 + docs/examples/functions/update.md | 1 + docs/examples/messaging/create-email.md | 1 + docs/examples/messaging/create-topic.md | 1 + docs/examples/messaging/update-email.md | 1 + docs/examples/messaging/update-topic.md | 1 + docs/examples/mongo/list-backup-policies.md | 1 + docs/examples/mongo/list-backups.md | 1 + docs/examples/mongo/list.md | 1 + docs/examples/mysql/list-backup-policies.md | 1 + docs/examples/mysql/list-backups.md | 1 + docs/examples/mysql/list.md | 1 + .../organization/update-project-key.md | 1 + .../postgresql/list-backup-policies.md | 1 + docs/examples/postgresql/list-backups.md | 1 + docs/examples/postgresql/list.md | 1 + docs/examples/project/create-variable.md | 1 + docs/examples/project/update-key.md | 1 + .../update-password-dictionary-policy.md | 1 + .../update-password-personal-data-policy.md | 1 + docs/examples/project/update-variable.md | 1 + docs/examples/sites/create-variable.md | 1 + docs/examples/sites/create.md | 1 + docs/examples/sites/update-variable.md | 1 + docs/examples/sites/update.md | 1 + docs/examples/storage/create-bucket.md | 1 + docs/examples/storage/update-bucket.md | 1 + .../tablesdb/create-big-int-column.md | 1 + .../tablesdb/create-boolean-column.md | 1 + .../tablesdb/create-datetime-column.md | 1 + docs/examples/tablesdb/create-email-column.md | 1 + docs/examples/tablesdb/create-enum-column.md | 1 + docs/examples/tablesdb/create-float-column.md | 1 + docs/examples/tablesdb/create-index.md | 1 + .../tablesdb/create-integer-column.md | 1 + docs/examples/tablesdb/create-ip-column.md | 1 + docs/examples/tablesdb/create-line-column.md | 1 + .../tablesdb/create-longtext-column.md | 1 + .../tablesdb/create-mediumtext-column.md | 1 + docs/examples/tablesdb/create-point-column.md | 1 + .../tablesdb/create-polygon-column.md | 1 + docs/examples/tablesdb/create-query.md | 19 + .../tablesdb/create-relationship-column.md | 1 + .../examples/tablesdb/create-string-column.md | 1 + docs/examples/tablesdb/create-table.md | 1 + docs/examples/tablesdb/create-text-column.md | 1 + docs/examples/tablesdb/create-url-column.md | 1 + .../tablesdb/create-varchar-column.md | 1 + docs/examples/tablesdb/create.md | 1 + .../tablesdb/update-big-int-column.md | 1 + .../tablesdb/update-boolean-column.md | 1 + .../tablesdb/update-datetime-column.md | 1 + docs/examples/tablesdb/update-email-column.md | 1 + docs/examples/tablesdb/update-enum-column.md | 1 + docs/examples/tablesdb/update-float-column.md | 1 + .../tablesdb/update-integer-column.md | 1 + docs/examples/tablesdb/update-ip-column.md | 1 + docs/examples/tablesdb/update-line-column.md | 1 + .../tablesdb/update-longtext-column.md | 1 + .../tablesdb/update-mediumtext-column.md | 1 + docs/examples/tablesdb/update-point-column.md | 1 + .../tablesdb/update-polygon-column.md | 1 + .../tablesdb/update-relationship-column.md | 1 + .../examples/tablesdb/update-string-column.md | 1 + docs/examples/tablesdb/update-table.md | 1 + docs/examples/tablesdb/update-text-column.md | 1 + docs/examples/tablesdb/update-url-column.md | 1 + .../tablesdb/update-varchar-column.md | 1 + docs/examples/tablesdb/update.md | 1 + docs/examples/vectorsdb/create-collection.md | 1 + docs/examples/vectorsdb/create-index.md | 1 + docs/examples/vectorsdb/create.md | 1 + docs/examples/vectorsdb/update-collection.md | 1 + docs/examples/vectorsdb/update.md | 1 + docs/examples/webhooks/create.md | 1 + docs/examples/webhooks/update.md | 1 + package-lock.json | 319 +++---- package.json | 5 +- src/client.ts | 4 +- src/models.ts | 220 +++++ src/query.ts | 14 +- src/services/account.ts | 115 +++ src/services/activities.ts | 25 +- src/services/backups.ts | 75 +- src/services/databases.ts | 838 +++++++++++++++++- src/services/documents-db.ts | 276 +++++- src/services/domains.ts | 39 +- src/services/functions.ts | 69 +- src/services/messaging.ts | 63 +- src/services/mongo.ts | 61 +- src/services/mysql.ts | 61 +- src/services/organization.ts | 24 +- src/services/postgresql.ts | 61 +- src/services/project.ts | 118 ++- src/services/sites.ts | 67 +- src/services/storage.ts | 30 + src/services/tables-db.ts | 823 ++++++++++++++++- src/services/vectors-db.ts | 109 ++- src/services/webhooks.ts | 31 + test/query.test.js | 17 + test/services/account.test.js | 13 + test/services/databases.test.js | 61 ++ test/services/documents-d-b.test.js | 24 + test/services/functions.test.js | 7 + test/services/messaging.test.js | 3 + test/services/organization.test.js | 3 + test/services/project.test.js | 6 + test/services/sites.test.js | 7 + test/services/storage.test.js | 3 + test/services/tables-d-b.test.js | 61 ++ test/services/vectors-d-b.test.js | 8 + test/services/webhooks.test.js | 4 + 170 files changed, 3584 insertions(+), 295 deletions(-) create mode 100644 docs/examples/account/list-memberships.md create mode 100644 docs/examples/databases/create-query.md create mode 100644 docs/examples/documentsdb/create-query.md create mode 100644 docs/examples/tablesdb/create-query.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 27c2f13..40724c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Change Log +## 31.0.0 + +* Breaking: positional `tablesDB`, `documentsDB` and `vectorsDB` `create` and `update` take `description` before `specification` +* Breaking: positional `functions.update` takes `description` before `emailEnabled` +* Added: `createQuery` on `databases`, `documentsDB` and `tablesDB` to send list queries in the request body +* Added: `account.listMemberships` +* Added: optional `description` on create and update for databases, collections, tables, attributes, columns, indexes, buckets, functions, sites, variables, topics, webhooks and keys +* Added: `description` on the matching models +* Added: `total` on list methods in `activities`, `backups`, `domains`, `mongo`, `mysql` and `postgresql` +* Added: `emails` on `messaging.createEmail` and `messaging.updateEmail` +* Added: `denyList` on `project.updatePasswordDictionaryPolicy`, `updatePasswordPersonalDataPolicy` and their policy models +* Added: `BillingPlan.functionsAllowCron` +* Updated: `package.json` declares `engines.node` `>=20.0.0` + ## 30.0.1 * Breaking: requests send `X-Appwrite-Response-Format: 2.5.0`; responses follow the 2.5 shapes diff --git a/docs/examples/account/list-memberships.md b/docs/examples/account/list-memberships.md new file mode 100644 index 0000000..15c8ed7 --- /dev/null +++ b/docs/examples/account/list-memberships.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listMemberships({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/docs/examples/activities/list-events.md b/docs/examples/activities/list-events.md index 97f14e3..28aad51 100644 --- a/docs/examples/activities/list-events.md +++ b/docs/examples/activities/list-events.md @@ -10,5 +10,6 @@ const activities = new sdk.Activities(client); const result = await activities.listEvents({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/backups/list-archives.md b/docs/examples/backups/list-archives.md index 4e4ff60..9f6c68a 100644 --- a/docs/examples/backups/list-archives.md +++ b/docs/examples/backups/list-archives.md @@ -10,5 +10,6 @@ const backups = new sdk.Backups(client); const result = await backups.listArchives({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/backups/list-policies.md b/docs/examples/backups/list-policies.md index 322024b..4e29bbd 100644 --- a/docs/examples/backups/list-policies.md +++ b/docs/examples/backups/list-policies.md @@ -10,5 +10,6 @@ const backups = new sdk.Backups(client); const result = await backups.listPolicies({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/backups/list-restorations.md b/docs/examples/backups/list-restorations.md index 5ea7e0a..86c802d 100644 --- a/docs/examples/backups/list-restorations.md +++ b/docs/examples/backups/list-restorations.md @@ -10,5 +10,6 @@ const backups = new sdk.Backups(client); const result = await backups.listRestorations({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/databases/create-big-int-attribute.md b/docs/examples/databases/create-big-int-attribute.md index f52034e..2305886 100644 --- a/docs/examples/databases/create-big-int-attribute.md +++ b/docs/examples/databases/create-big-int-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createBigIntAttribute({ max: 1000000, // optional xdefault: 0, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md index 88aac35..58bd8a6 100644 --- a/docs/examples/databases/create-boolean-attribute.md +++ b/docs/examples/databases/create-boolean-attribute.md @@ -15,5 +15,6 @@ const result = await databases.createBooleanAttribute({ required: false, xdefault: false, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-collection.md b/docs/examples/databases/create-collection.md index 8eda415..996d34d 100644 --- a/docs/examples/databases/create-collection.md +++ b/docs/examples/databases/create-collection.md @@ -17,5 +17,6 @@ const result = await databases.createCollection({ enabled: false, // optional attributes: [], // optional indexes: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md index 0a90cbc..6a57679 100644 --- a/docs/examples/databases/create-datetime-attribute.md +++ b/docs/examples/databases/create-datetime-attribute.md @@ -15,5 +15,6 @@ const result = await databases.createDatetimeAttribute({ required: false, xdefault: '2020-10-15T06:38:00.000+00:00', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md index 0f2f7ac..3f823f8 100644 --- a/docs/examples/databases/create-email-attribute.md +++ b/docs/examples/databases/create-email-attribute.md @@ -15,5 +15,6 @@ const result = await databases.createEmailAttribute({ required: false, xdefault: 'email@example.com', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md index fddf585..c78cf77 100644 --- a/docs/examples/databases/create-enum-attribute.md +++ b/docs/examples/databases/create-enum-attribute.md @@ -16,5 +16,6 @@ const result = await databases.createEnumAttribute({ required: false, xdefault: 'active', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md index ebf6ef5..a894a79 100644 --- a/docs/examples/databases/create-float-attribute.md +++ b/docs/examples/databases/create-float-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createFloatAttribute({ max: 100, // optional xdefault: 10.5, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-index.md b/docs/examples/databases/create-index.md index ae24378..932e497 100644 --- a/docs/examples/databases/create-index.md +++ b/docs/examples/databases/create-index.md @@ -16,5 +16,6 @@ const result = await databases.createIndex({ attributes: ['username'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md index b9f5654..8eda692 100644 --- a/docs/examples/databases/create-integer-attribute.md +++ b/docs/examples/databases/create-integer-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createIntegerAttribute({ max: 100, // optional xdefault: 10, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md index edcee67..5dd3679 100644 --- a/docs/examples/databases/create-ip-attribute.md +++ b/docs/examples/databases/create-ip-attribute.md @@ -15,5 +15,6 @@ const result = await databases.createIpAttribute({ required: false, xdefault: '192.0.2.0', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-line-attribute.md b/docs/examples/databases/create-line-attribute.md index 01ae03e..986bf35 100644 --- a/docs/examples/databases/create-line-attribute.md +++ b/docs/examples/databases/create-line-attribute.md @@ -18,5 +18,6 @@ const result = await databases.createLineAttribute({ [3, 4], [5, 6], ], // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-longtext-attribute.md b/docs/examples/databases/create-longtext-attribute.md index 6685fde..cff4734 100644 --- a/docs/examples/databases/create-longtext-attribute.md +++ b/docs/examples/databases/create-longtext-attribute.md @@ -16,5 +16,6 @@ const result = await databases.createLongtextAttribute({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-mediumtext-attribute.md b/docs/examples/databases/create-mediumtext-attribute.md index ed950b4..096c96f 100644 --- a/docs/examples/databases/create-mediumtext-attribute.md +++ b/docs/examples/databases/create-mediumtext-attribute.md @@ -16,5 +16,6 @@ const result = await databases.createMediumtextAttribute({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-point-attribute.md b/docs/examples/databases/create-point-attribute.md index 6825bfe..6ccc21e 100644 --- a/docs/examples/databases/create-point-attribute.md +++ b/docs/examples/databases/create-point-attribute.md @@ -14,5 +14,6 @@ const result = await databases.createPointAttribute({ key: '', required: false, xdefault: [1, 2], // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-polygon-attribute.md b/docs/examples/databases/create-polygon-attribute.md index c155e13..f5033c2 100644 --- a/docs/examples/databases/create-polygon-attribute.md +++ b/docs/examples/databases/create-polygon-attribute.md @@ -21,5 +21,6 @@ const result = await databases.createPolygonAttribute({ [1, 2], ], ], // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-query.md b/docs/examples/databases/create-query.md new file mode 100644 index 0000000..756c698 --- /dev/null +++ b/docs/examples/databases/create-query.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.createQuery({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/docs/examples/databases/create-relationship-attribute.md b/docs/examples/databases/create-relationship-attribute.md index 4d79cf4..31e7772 100644 --- a/docs/examples/databases/create-relationship-attribute.md +++ b/docs/examples/databases/create-relationship-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createRelationshipAttribute({ key: '', // optional twoWayKey: '', // optional onDelete: sdk.RelationMutate.Cascade, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md index 187afaf..9eb11c3 100644 --- a/docs/examples/databases/create-string-attribute.md +++ b/docs/examples/databases/create-string-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createStringAttribute({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-text-attribute.md b/docs/examples/databases/create-text-attribute.md index 3dec73c..ed3c3d7 100644 --- a/docs/examples/databases/create-text-attribute.md +++ b/docs/examples/databases/create-text-attribute.md @@ -16,5 +16,6 @@ const result = await databases.createTextAttribute({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md index 41c5db9..30e2f38 100644 --- a/docs/examples/databases/create-url-attribute.md +++ b/docs/examples/databases/create-url-attribute.md @@ -15,5 +15,6 @@ const result = await databases.createUrlAttribute({ required: false, xdefault: 'https://example.com', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-varchar-attribute.md b/docs/examples/databases/create-varchar-attribute.md index ce55e84..ce17b28 100644 --- a/docs/examples/databases/create-varchar-attribute.md +++ b/docs/examples/databases/create-varchar-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createVarcharAttribute({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index ce42a13..bd78657 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -12,5 +12,6 @@ const result = await databases.create({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-big-int-attribute.md b/docs/examples/databases/update-big-int-attribute.md index 7603578..567320d 100644 --- a/docs/examples/databases/update-big-int-attribute.md +++ b/docs/examples/databases/update-big-int-attribute.md @@ -17,5 +17,6 @@ const result = await databases.updateBigIntAttribute({ min: 0, // optional max: 1000000, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index 5184217..169977b 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateBooleanAttribute({ required: false, xdefault: false, newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-collection.md b/docs/examples/databases/update-collection.md index d33ce0b..6743646 100644 --- a/docs/examples/databases/update-collection.md +++ b/docs/examples/databases/update-collection.md @@ -16,5 +16,6 @@ const result = await databases.updateCollection({ documentSecurity: false, // optional enabled: false, // optional purge: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index f3bb80e..5d8807a 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateDatetimeAttribute({ required: false, xdefault: '2020-10-15T06:38:00.000+00:00', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index 69658e2..7540123 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateEmailAttribute({ required: false, xdefault: 'email@example.com', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index 2463223..3c6bd8b 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -16,5 +16,6 @@ const result = await databases.updateEnumAttribute({ required: false, xdefault: 'active', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index 63af3be..3e1295a 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -17,5 +17,6 @@ const result = await databases.updateFloatAttribute({ min: 0, // optional max: 100, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index 14a16a9..8373826 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -17,5 +17,6 @@ const result = await databases.updateIntegerAttribute({ min: 0, // optional max: 100, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index 1ece665..02abb70 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateIpAttribute({ required: false, xdefault: '192.0.2.0', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-line-attribute.md b/docs/examples/databases/update-line-attribute.md index bd36689..638cce9 100644 --- a/docs/examples/databases/update-line-attribute.md +++ b/docs/examples/databases/update-line-attribute.md @@ -19,5 +19,6 @@ const result = await databases.updateLineAttribute({ [5, 6], ], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-longtext-attribute.md b/docs/examples/databases/update-longtext-attribute.md index 97d3c28..cbfb17d 100644 --- a/docs/examples/databases/update-longtext-attribute.md +++ b/docs/examples/databases/update-longtext-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateLongtextAttribute({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-mediumtext-attribute.md b/docs/examples/databases/update-mediumtext-attribute.md index 5398f71..299a834 100644 --- a/docs/examples/databases/update-mediumtext-attribute.md +++ b/docs/examples/databases/update-mediumtext-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateMediumtextAttribute({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-point-attribute.md b/docs/examples/databases/update-point-attribute.md index 1c64a2c..eee38d2 100644 --- a/docs/examples/databases/update-point-attribute.md +++ b/docs/examples/databases/update-point-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updatePointAttribute({ required: false, xdefault: [1, 2], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-polygon-attribute.md b/docs/examples/databases/update-polygon-attribute.md index 9cff577..7842b77 100644 --- a/docs/examples/databases/update-polygon-attribute.md +++ b/docs/examples/databases/update-polygon-attribute.md @@ -22,5 +22,6 @@ const result = await databases.updatePolygonAttribute({ ], ], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index 50710f8..305fda1 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -14,5 +14,6 @@ const result = await databases.updateRelationshipAttribute({ key: '', onDelete: sdk.RelationMutate.Cascade, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index 75f269c..6543174 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -16,5 +16,6 @@ const result = await databases.updateStringAttribute({ xdefault: 'Hello World', size: 1, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-text-attribute.md b/docs/examples/databases/update-text-attribute.md index 0075135..a3107c9 100644 --- a/docs/examples/databases/update-text-attribute.md +++ b/docs/examples/databases/update-text-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateTextAttribute({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index 96c6953..eff8d8f 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateUrlAttribute({ required: false, xdefault: 'https://example.com', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-varchar-attribute.md b/docs/examples/databases/update-varchar-attribute.md index 1a2ad8c..1bd4a07 100644 --- a/docs/examples/databases/update-varchar-attribute.md +++ b/docs/examples/databases/update-varchar-attribute.md @@ -16,5 +16,6 @@ const result = await databases.updateVarcharAttribute({ xdefault: 'Hello World', size: 1, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update.md b/docs/examples/databases/update.md index 6ae2bc1..8640fc1 100644 --- a/docs/examples/databases/update.md +++ b/docs/examples/databases/update.md @@ -12,5 +12,6 @@ const result = await databases.update({ databaseId: '', name: '', // optional enabled: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/documentsdb/create-collection.md b/docs/examples/documentsdb/create-collection.md index 5915ae9..8d0fe98 100644 --- a/docs/examples/documentsdb/create-collection.md +++ b/docs/examples/documentsdb/create-collection.md @@ -17,5 +17,6 @@ const result = await documentsDB.createCollection({ enabled: false, // optional attributes: [], // optional indexes: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/documentsdb/create-index.md b/docs/examples/documentsdb/create-index.md index 40035ea..e437154 100644 --- a/docs/examples/documentsdb/create-index.md +++ b/docs/examples/documentsdb/create-index.md @@ -16,5 +16,6 @@ const result = await documentsDB.createIndex({ attributes: ['username'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/documentsdb/create-query.md b/docs/examples/documentsdb/create-query.md new file mode 100644 index 0000000..8a108fe --- /dev/null +++ b/docs/examples/documentsdb/create-query.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createQuery({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/docs/examples/documentsdb/create.md b/docs/examples/documentsdb/create.md index cb0806b..2477afb 100644 --- a/docs/examples/documentsdb/create.md +++ b/docs/examples/documentsdb/create.md @@ -12,6 +12,7 @@ const result = await documentsDB.create({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/documentsdb/update-collection.md b/docs/examples/documentsdb/update-collection.md index beb1cd3..1ead3a2 100644 --- a/docs/examples/documentsdb/update-collection.md +++ b/docs/examples/documentsdb/update-collection.md @@ -16,5 +16,6 @@ const result = await documentsDB.updateCollection({ documentSecurity: false, // optional enabled: false, // optional purge: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/documentsdb/update.md b/docs/examples/documentsdb/update.md index 1e3c22a..3833e9b 100644 --- a/docs/examples/documentsdb/update.md +++ b/docs/examples/documentsdb/update.md @@ -12,6 +12,7 @@ const result = await documentsDB.update({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/domains/list-records.md b/docs/examples/domains/list-records.md index 5cbab51..8a03b71 100644 --- a/docs/examples/domains/list-records.md +++ b/docs/examples/domains/list-records.md @@ -11,5 +11,6 @@ const domains = new sdk.Domains(client); const result = await domains.listRecords({ domainId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/domains/list.md b/docs/examples/domains/list.md index 8974554..408bcb9 100644 --- a/docs/examples/domains/list.md +++ b/docs/examples/domains/list.md @@ -11,5 +11,6 @@ const domains = new sdk.Domains(client); const result = await domains.list({ queries: [], // optional search: '', // optional + total: false, // optional }); ``` diff --git a/docs/examples/functions/create-variable.md b/docs/examples/functions/create-variable.md index e6ffd3d..c409984 100644 --- a/docs/examples/functions/create-variable.md +++ b/docs/examples/functions/create-variable.md @@ -14,5 +14,6 @@ const result = await functions.createVariable({ key: '', value: '', secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/functions/create.md b/docs/examples/functions/create.md index c20e342..ffd07dd 100644 --- a/docs/examples/functions/create.md +++ b/docs/examples/functions/create.md @@ -32,5 +32,6 @@ const result = await functions.create({ runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional interval: 0, // optional + description: '', // optional }); ``` diff --git a/docs/examples/functions/update-variable.md b/docs/examples/functions/update-variable.md index 61b9662..9237c8b 100644 --- a/docs/examples/functions/update-variable.md +++ b/docs/examples/functions/update-variable.md @@ -14,5 +14,6 @@ const result = await functions.updateVariable({ key: '', // optional value: '', // optional secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/functions/update.md b/docs/examples/functions/update.md index a9c4c9d..94f9e7b 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -32,6 +32,7 @@ const result = await functions.update({ runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional interval: 0, // optional + description: '', // optional emailEnabled: false, // optional }); ``` diff --git a/docs/examples/messaging/create-email.md b/docs/examples/messaging/create-email.md index 256234c..7900428 100644 --- a/docs/examples/messaging/create-email.md +++ b/docs/examples/messaging/create-email.md @@ -23,5 +23,6 @@ const result = await messaging.createEmail({ scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional replyToEmail: 'email@example.com', // optional replyToName: '', // optional + emails: [], // optional }); ``` diff --git a/docs/examples/messaging/create-topic.md b/docs/examples/messaging/create-topic.md index 0a4b292..587ef03 100644 --- a/docs/examples/messaging/create-topic.md +++ b/docs/examples/messaging/create-topic.md @@ -14,5 +14,6 @@ const result = await messaging.createTopic({ subscribe: ['any'], // optional qos: 0, // optional expiry: 0, // optional + description: '', // optional }); ``` diff --git a/docs/examples/messaging/update-email.md b/docs/examples/messaging/update-email.md index 0fc7a9a..7a93611 100644 --- a/docs/examples/messaging/update-email.md +++ b/docs/examples/messaging/update-email.md @@ -23,5 +23,6 @@ const result = await messaging.updateEmail({ attachments: [], // optional replyToEmail: 'email@example.com', // optional replyToName: '', // optional + emails: [], // optional }); ``` diff --git a/docs/examples/messaging/update-topic.md b/docs/examples/messaging/update-topic.md index 292b3b6..e355dd1 100644 --- a/docs/examples/messaging/update-topic.md +++ b/docs/examples/messaging/update-topic.md @@ -14,5 +14,6 @@ const result = await messaging.updateTopic({ subscribe: ['any'], // optional qos: 0, // optional expiry: 0, // optional + description: '', // optional }); ``` diff --git a/docs/examples/mongo/list-backup-policies.md b/docs/examples/mongo/list-backup-policies.md index d40381e..e2b3d7d 100644 --- a/docs/examples/mongo/list-backup-policies.md +++ b/docs/examples/mongo/list-backup-policies.md @@ -11,5 +11,6 @@ const mongo = new sdk.Mongo(client); const result = await mongo.listBackupPolicies({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/mongo/list-backups.md b/docs/examples/mongo/list-backups.md index 2041759..ba31dcc 100644 --- a/docs/examples/mongo/list-backups.md +++ b/docs/examples/mongo/list-backups.md @@ -11,5 +11,6 @@ const mongo = new sdk.Mongo(client); const result = await mongo.listBackups({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/mongo/list.md b/docs/examples/mongo/list.md index ee7406b..e4f1dbd 100644 --- a/docs/examples/mongo/list.md +++ b/docs/examples/mongo/list.md @@ -10,5 +10,6 @@ const mongo = new sdk.Mongo(client); const result = await mongo.list({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/mysql/list-backup-policies.md b/docs/examples/mysql/list-backup-policies.md index 4b3127a..76bfe62 100644 --- a/docs/examples/mysql/list-backup-policies.md +++ b/docs/examples/mysql/list-backup-policies.md @@ -11,5 +11,6 @@ const mysql = new sdk.Mysql(client); const result = await mysql.listBackupPolicies({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/mysql/list-backups.md b/docs/examples/mysql/list-backups.md index c88356e..07482ca 100644 --- a/docs/examples/mysql/list-backups.md +++ b/docs/examples/mysql/list-backups.md @@ -11,5 +11,6 @@ const mysql = new sdk.Mysql(client); const result = await mysql.listBackups({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/mysql/list.md b/docs/examples/mysql/list.md index 11907b7..77b5a85 100644 --- a/docs/examples/mysql/list.md +++ b/docs/examples/mysql/list.md @@ -10,5 +10,6 @@ const mysql = new sdk.Mysql(client); const result = await mysql.list({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/organization/update-project-key.md b/docs/examples/organization/update-project-key.md index 07440b6..d2a1f88 100644 --- a/docs/examples/organization/update-project-key.md +++ b/docs/examples/organization/update-project-key.md @@ -14,5 +14,6 @@ const result = await organization.updateProjectKey({ name: '', scopes: [sdk.ProjectKeyScopes.UsersRead], expire: '2020-10-15T06:38:00.000+00:00', // optional + description: '', // optional }); ``` diff --git a/docs/examples/postgresql/list-backup-policies.md b/docs/examples/postgresql/list-backup-policies.md index 281577f..10bab29 100644 --- a/docs/examples/postgresql/list-backup-policies.md +++ b/docs/examples/postgresql/list-backup-policies.md @@ -11,5 +11,6 @@ const postgresql = new sdk.Postgresql(client); const result = await postgresql.listBackupPolicies({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/postgresql/list-backups.md b/docs/examples/postgresql/list-backups.md index 183fd59..364b7b7 100644 --- a/docs/examples/postgresql/list-backups.md +++ b/docs/examples/postgresql/list-backups.md @@ -11,5 +11,6 @@ const postgresql = new sdk.Postgresql(client); const result = await postgresql.listBackups({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/postgresql/list.md b/docs/examples/postgresql/list.md index 4a6597b..ab260a3 100644 --- a/docs/examples/postgresql/list.md +++ b/docs/examples/postgresql/list.md @@ -10,5 +10,6 @@ const postgresql = new sdk.Postgresql(client); const result = await postgresql.list({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/project/create-variable.md b/docs/examples/project/create-variable.md index 3f06a9e..84c214c 100644 --- a/docs/examples/project/create-variable.md +++ b/docs/examples/project/create-variable.md @@ -13,5 +13,6 @@ const result = await project.createVariable({ key: '', value: '', secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/project/update-key.md b/docs/examples/project/update-key.md index 81c77a7..b164d78 100644 --- a/docs/examples/project/update-key.md +++ b/docs/examples/project/update-key.md @@ -13,5 +13,6 @@ const result = await project.updateKey({ name: '', scopes: [sdk.ProjectKeyScopes.UsersRead], expire: '2020-10-15T06:38:00.000+00:00', // optional + description: '', // optional }); ``` diff --git a/docs/examples/project/update-password-dictionary-policy.md b/docs/examples/project/update-password-dictionary-policy.md index 859aa6e..c572f0e 100644 --- a/docs/examples/project/update-password-dictionary-policy.md +++ b/docs/examples/project/update-password-dictionary-policy.md @@ -10,5 +10,6 @@ const project = new sdk.Project(client); const result = await project.updatePasswordDictionaryPolicy({ enabled: false, + denyList: [], // optional }); ``` diff --git a/docs/examples/project/update-password-personal-data-policy.md b/docs/examples/project/update-password-personal-data-policy.md index b0669c5..097bb71 100644 --- a/docs/examples/project/update-password-personal-data-policy.md +++ b/docs/examples/project/update-password-personal-data-policy.md @@ -10,5 +10,6 @@ const project = new sdk.Project(client); const result = await project.updatePasswordPersonalDataPolicy({ enabled: false, + denyList: [], // optional }); ``` diff --git a/docs/examples/project/update-variable.md b/docs/examples/project/update-variable.md index b53da55..ccc2574 100644 --- a/docs/examples/project/update-variable.md +++ b/docs/examples/project/update-variable.md @@ -13,5 +13,6 @@ const result = await project.updateVariable({ key: '', // optional value: '', // optional secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/sites/create-variable.md b/docs/examples/sites/create-variable.md index b6acc61..f7df704 100644 --- a/docs/examples/sites/create-variable.md +++ b/docs/examples/sites/create-variable.md @@ -14,5 +14,6 @@ const result = await sites.createVariable({ key: '', value: '', secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/sites/create.md b/docs/examples/sites/create.md index 686e737..142d9fe 100644 --- a/docs/examples/sites/create.md +++ b/docs/examples/sites/create.md @@ -33,5 +33,6 @@ const result = await sites.create({ runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional scopes: [sdk.ProjectKeyScopes.ProjectRead], // optional + description: '', // optional }); ``` diff --git a/docs/examples/sites/update-variable.md b/docs/examples/sites/update-variable.md index d489347..16b9476 100644 --- a/docs/examples/sites/update-variable.md +++ b/docs/examples/sites/update-variable.md @@ -14,5 +14,6 @@ const result = await sites.updateVariable({ key: '', // optional value: '', // optional secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/sites/update.md b/docs/examples/sites/update.md index 932cf00..2f577ca 100644 --- a/docs/examples/sites/update.md +++ b/docs/examples/sites/update.md @@ -33,5 +33,6 @@ const result = await sites.update({ runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional scopes: [sdk.ProjectKeyScopes.ProjectRead], // optional + description: '', // optional }); ``` diff --git a/docs/examples/storage/create-bucket.md b/docs/examples/storage/create-bucket.md index fe16a23..1d85f0f 100644 --- a/docs/examples/storage/create-bucket.md +++ b/docs/examples/storage/create-bucket.md @@ -20,5 +20,6 @@ const result = await storage.createBucket({ encryption: false, // optional antivirus: false, // optional transformations: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/storage/update-bucket.md b/docs/examples/storage/update-bucket.md index baddf9c..1770c1f 100644 --- a/docs/examples/storage/update-bucket.md +++ b/docs/examples/storage/update-bucket.md @@ -20,5 +20,6 @@ const result = await storage.updateBucket({ encryption: false, // optional antivirus: false, // optional transformations: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-big-int-column.md b/docs/examples/tablesdb/create-big-int-column.md index 914c27a..486976b 100644 --- a/docs/examples/tablesdb/create-big-int-column.md +++ b/docs/examples/tablesdb/create-big-int-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createBigIntColumn({ max: 1000000, // optional xdefault: 0, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md index c8c8955..5740530 100644 --- a/docs/examples/tablesdb/create-boolean-column.md +++ b/docs/examples/tablesdb/create-boolean-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.createBooleanColumn({ required: false, xdefault: false, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md index 7c0d259..aedb58b 100644 --- a/docs/examples/tablesdb/create-datetime-column.md +++ b/docs/examples/tablesdb/create-datetime-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.createDatetimeColumn({ required: false, xdefault: '2020-10-15T06:38:00.000+00:00', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md index 9577598..3abee73 100644 --- a/docs/examples/tablesdb/create-email-column.md +++ b/docs/examples/tablesdb/create-email-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.createEmailColumn({ required: false, xdefault: 'email@example.com', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md index d3b878a..c4b8e8c 100644 --- a/docs/examples/tablesdb/create-enum-column.md +++ b/docs/examples/tablesdb/create-enum-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.createEnumColumn({ required: false, xdefault: 'active', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md index 5a284be..3c439dd 100644 --- a/docs/examples/tablesdb/create-float-column.md +++ b/docs/examples/tablesdb/create-float-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createFloatColumn({ max: 100, // optional xdefault: 10.5, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-index.md b/docs/examples/tablesdb/create-index.md index 5a90943..158a764 100644 --- a/docs/examples/tablesdb/create-index.md +++ b/docs/examples/tablesdb/create-index.md @@ -16,5 +16,6 @@ const result = await tablesDB.createIndex({ columns: ['username'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md index a7d37f7..079e770 100644 --- a/docs/examples/tablesdb/create-integer-column.md +++ b/docs/examples/tablesdb/create-integer-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createIntegerColumn({ max: 100, // optional xdefault: 10, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md index b6be4f1..c59393e 100644 --- a/docs/examples/tablesdb/create-ip-column.md +++ b/docs/examples/tablesdb/create-ip-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.createIpColumn({ required: false, xdefault: '192.0.2.0', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-line-column.md b/docs/examples/tablesdb/create-line-column.md index f23523e..c2d6a90 100644 --- a/docs/examples/tablesdb/create-line-column.md +++ b/docs/examples/tablesdb/create-line-column.md @@ -18,5 +18,6 @@ const result = await tablesDB.createLineColumn({ [3, 4], [5, 6], ], // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-longtext-column.md b/docs/examples/tablesdb/create-longtext-column.md index 04dde8e..404db1e 100644 --- a/docs/examples/tablesdb/create-longtext-column.md +++ b/docs/examples/tablesdb/create-longtext-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.createLongtextColumn({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-mediumtext-column.md b/docs/examples/tablesdb/create-mediumtext-column.md index 5c9ec6d..3da424f 100644 --- a/docs/examples/tablesdb/create-mediumtext-column.md +++ b/docs/examples/tablesdb/create-mediumtext-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.createMediumtextColumn({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-point-column.md b/docs/examples/tablesdb/create-point-column.md index 9783951..ef3ddf6 100644 --- a/docs/examples/tablesdb/create-point-column.md +++ b/docs/examples/tablesdb/create-point-column.md @@ -14,5 +14,6 @@ const result = await tablesDB.createPointColumn({ key: '', required: false, xdefault: [1, 2], // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-polygon-column.md b/docs/examples/tablesdb/create-polygon-column.md index 71f1406..f917af6 100644 --- a/docs/examples/tablesdb/create-polygon-column.md +++ b/docs/examples/tablesdb/create-polygon-column.md @@ -21,5 +21,6 @@ const result = await tablesDB.createPolygonColumn({ [1, 2], ], ], // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-query.md b/docs/examples/tablesdb/create-query.md new file mode 100644 index 0000000..8ce61a5 --- /dev/null +++ b/docs/examples/tablesdb/create-query.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createQuery({ + databaseId: '', + tableId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/docs/examples/tablesdb/create-relationship-column.md b/docs/examples/tablesdb/create-relationship-column.md index 0f40996..ccc85b0 100644 --- a/docs/examples/tablesdb/create-relationship-column.md +++ b/docs/examples/tablesdb/create-relationship-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createRelationshipColumn({ key: '', // optional twoWayKey: '', // optional onDelete: sdk.RelationMutate.Cascade, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md index 217c050..fd3d1e4 100644 --- a/docs/examples/tablesdb/create-string-column.md +++ b/docs/examples/tablesdb/create-string-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createStringColumn({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-table.md b/docs/examples/tablesdb/create-table.md index cd898df..e633543 100644 --- a/docs/examples/tablesdb/create-table.md +++ b/docs/examples/tablesdb/create-table.md @@ -17,5 +17,6 @@ const result = await tablesDB.createTable({ enabled: false, // optional columns: [], // optional indexes: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-text-column.md b/docs/examples/tablesdb/create-text-column.md index 4ac2fe7..792496a 100644 --- a/docs/examples/tablesdb/create-text-column.md +++ b/docs/examples/tablesdb/create-text-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.createTextColumn({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md index ba037a6..60fa6a4 100644 --- a/docs/examples/tablesdb/create-url-column.md +++ b/docs/examples/tablesdb/create-url-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.createUrlColumn({ required: false, xdefault: 'https://example.com', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-varchar-column.md b/docs/examples/tablesdb/create-varchar-column.md index 3c3ae8a..53a46ce 100644 --- a/docs/examples/tablesdb/create-varchar-column.md +++ b/docs/examples/tablesdb/create-varchar-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createVarcharColumn({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index c7b4759..62bd6cb 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -12,6 +12,7 @@ const result = await tablesDB.create({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/tablesdb/update-big-int-column.md b/docs/examples/tablesdb/update-big-int-column.md index 51ba71a..2ad914c 100644 --- a/docs/examples/tablesdb/update-big-int-column.md +++ b/docs/examples/tablesdb/update-big-int-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.updateBigIntColumn({ min: 0, // optional max: 1000000, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md index 0f292d0..febd32c 100644 --- a/docs/examples/tablesdb/update-boolean-column.md +++ b/docs/examples/tablesdb/update-boolean-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateBooleanColumn({ required: false, xdefault: false, newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md index 162f2f7..09e7136 100644 --- a/docs/examples/tablesdb/update-datetime-column.md +++ b/docs/examples/tablesdb/update-datetime-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateDatetimeColumn({ required: false, xdefault: '2020-10-15T06:38:00.000+00:00', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md index 4c4f1e8..08458f1 100644 --- a/docs/examples/tablesdb/update-email-column.md +++ b/docs/examples/tablesdb/update-email-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateEmailColumn({ required: false, xdefault: 'email@example.com', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md index 0b1bf8d..32519c0 100644 --- a/docs/examples/tablesdb/update-enum-column.md +++ b/docs/examples/tablesdb/update-enum-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.updateEnumColumn({ required: false, xdefault: 'active', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md index ee1f80a..fd8de80 100644 --- a/docs/examples/tablesdb/update-float-column.md +++ b/docs/examples/tablesdb/update-float-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.updateFloatColumn({ min: 0, // optional max: 100, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md index 16284f3..6b1466d 100644 --- a/docs/examples/tablesdb/update-integer-column.md +++ b/docs/examples/tablesdb/update-integer-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.updateIntegerColumn({ min: 0, // optional max: 100, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md index 99b0a3c..6be2420 100644 --- a/docs/examples/tablesdb/update-ip-column.md +++ b/docs/examples/tablesdb/update-ip-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateIpColumn({ required: false, xdefault: '192.0.2.0', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-line-column.md b/docs/examples/tablesdb/update-line-column.md index f1d3573..bb3bd83 100644 --- a/docs/examples/tablesdb/update-line-column.md +++ b/docs/examples/tablesdb/update-line-column.md @@ -19,5 +19,6 @@ const result = await tablesDB.updateLineColumn({ [5, 6], ], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-longtext-column.md b/docs/examples/tablesdb/update-longtext-column.md index e103593..c32c2e5 100644 --- a/docs/examples/tablesdb/update-longtext-column.md +++ b/docs/examples/tablesdb/update-longtext-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateLongtextColumn({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-mediumtext-column.md b/docs/examples/tablesdb/update-mediumtext-column.md index 3292151..1c3cec9 100644 --- a/docs/examples/tablesdb/update-mediumtext-column.md +++ b/docs/examples/tablesdb/update-mediumtext-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateMediumtextColumn({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-point-column.md b/docs/examples/tablesdb/update-point-column.md index d5ec472..d428cec 100644 --- a/docs/examples/tablesdb/update-point-column.md +++ b/docs/examples/tablesdb/update-point-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updatePointColumn({ required: false, xdefault: [1, 2], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-polygon-column.md b/docs/examples/tablesdb/update-polygon-column.md index 41b65bf..68dfd43 100644 --- a/docs/examples/tablesdb/update-polygon-column.md +++ b/docs/examples/tablesdb/update-polygon-column.md @@ -22,5 +22,6 @@ const result = await tablesDB.updatePolygonColumn({ ], ], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-relationship-column.md b/docs/examples/tablesdb/update-relationship-column.md index 88b17f1..b193a94 100644 --- a/docs/examples/tablesdb/update-relationship-column.md +++ b/docs/examples/tablesdb/update-relationship-column.md @@ -14,5 +14,6 @@ const result = await tablesDB.updateRelationshipColumn({ key: '', onDelete: sdk.RelationMutate.Cascade, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md index 368d97c..b42e2ec 100644 --- a/docs/examples/tablesdb/update-string-column.md +++ b/docs/examples/tablesdb/update-string-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.updateStringColumn({ xdefault: 'Hello World', size: 1, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-table.md b/docs/examples/tablesdb/update-table.md index dd37e42..e747a82 100644 --- a/docs/examples/tablesdb/update-table.md +++ b/docs/examples/tablesdb/update-table.md @@ -16,5 +16,6 @@ const result = await tablesDB.updateTable({ rowSecurity: false, // optional enabled: false, // optional purge: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-text-column.md b/docs/examples/tablesdb/update-text-column.md index 4a132e6..7a2b834 100644 --- a/docs/examples/tablesdb/update-text-column.md +++ b/docs/examples/tablesdb/update-text-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateTextColumn({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md index 72f285c..d85c91e 100644 --- a/docs/examples/tablesdb/update-url-column.md +++ b/docs/examples/tablesdb/update-url-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateUrlColumn({ required: false, xdefault: 'https://example.com', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-varchar-column.md b/docs/examples/tablesdb/update-varchar-column.md index e2e7714..4819d31 100644 --- a/docs/examples/tablesdb/update-varchar-column.md +++ b/docs/examples/tablesdb/update-varchar-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.updateVarcharColumn({ xdefault: 'Hello World', size: 1, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update.md b/docs/examples/tablesdb/update.md index 2eb0647..3b39ec6 100644 --- a/docs/examples/tablesdb/update.md +++ b/docs/examples/tablesdb/update.md @@ -12,6 +12,7 @@ const result = await tablesDB.update({ databaseId: '', name: '', // optional enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/vectorsdb/create-collection.md b/docs/examples/vectorsdb/create-collection.md index fa1be7a..d464829 100644 --- a/docs/examples/vectorsdb/create-collection.md +++ b/docs/examples/vectorsdb/create-collection.md @@ -16,5 +16,6 @@ const result = await vectorsDB.createCollection({ permissions: [sdk.Permission.read(sdk.Role.any())], // optional documentSecurity: false, // optional enabled: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/vectorsdb/create-index.md b/docs/examples/vectorsdb/create-index.md index 583faee..ed86563 100644 --- a/docs/examples/vectorsdb/create-index.md +++ b/docs/examples/vectorsdb/create-index.md @@ -16,5 +16,6 @@ const result = await vectorsDB.createIndex({ attributes: ['embeddings'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/vectorsdb/create.md b/docs/examples/vectorsdb/create.md index 8fbd31d..28f27f1 100644 --- a/docs/examples/vectorsdb/create.md +++ b/docs/examples/vectorsdb/create.md @@ -12,6 +12,7 @@ const result = await vectorsDB.create({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/vectorsdb/update-collection.md b/docs/examples/vectorsdb/update-collection.md index f1ca760..de2a631 100644 --- a/docs/examples/vectorsdb/update-collection.md +++ b/docs/examples/vectorsdb/update-collection.md @@ -16,5 +16,6 @@ const result = await vectorsDB.updateCollection({ permissions: [sdk.Permission.read(sdk.Role.any())], // optional documentSecurity: false, // optional enabled: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/vectorsdb/update.md b/docs/examples/vectorsdb/update.md index 09108e7..bc4cef6 100644 --- a/docs/examples/vectorsdb/update.md +++ b/docs/examples/vectorsdb/update.md @@ -12,6 +12,7 @@ const result = await vectorsDB.update({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/webhooks/create.md b/docs/examples/webhooks/create.md index c56e892..eb6d627 100644 --- a/docs/examples/webhooks/create.md +++ b/docs/examples/webhooks/create.md @@ -18,5 +18,6 @@ const result = await webhooks.create({ authUsername: '', // optional authPassword: 'password', // optional secret: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/webhooks/update.md b/docs/examples/webhooks/update.md index 283cf78..789229a 100644 --- a/docs/examples/webhooks/update.md +++ b/docs/examples/webhooks/update.md @@ -17,5 +17,6 @@ const result = await webhooks.update({ tls: false, // optional authUsername: '', // optional authPassword: 'password', // optional + description: '', // optional }); ``` diff --git a/package-lock.json b/package-lock.json index dc39f37..b0abf32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "node-appwrite", - "version": "30.0.1", + "version": "31.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "node-appwrite", - "version": "30.0.1", + "version": "31.0.0", "license": "BSD-3-Clause", "dependencies": { "json-bigint": "1.0.0", @@ -26,6 +26,9 @@ "typescript": "5.9.3", "typescript-eslint": "8.70.0" }, + "engines": { + "node": ">=20.0.0" + }, "overrides": { "esbuild": "^0.28.1", "js-yaml": "^4.2.0", @@ -205,14 +208,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", - "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.10.tgz", + "integrity": "sha512-EMCx3AGZ3WfAl6ht7AyQoPm2Lh+BGYEMdc4Q6Hf7uSCDOZFuLq44qNwL+iaim8VlyYhRAo4X43+weadK8ZB4Yg==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.29.7", - "@babel/types": "^7.29.7" + "@babel/types": "^7.29.8" }, "engines": { "node": ">=6.9.0" @@ -489,16 +492,16 @@ } }, "node_modules/@babel/traverse": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.8.tgz", - "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==", + "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.10.tgz", + "integrity": "sha512-B3lYAs2nkKskbgQ1nfy8Ma9ao9Q1rntTAQHrzzyDuj+TSO+X3le6PfWwqDvodsb+OumE10eMFfuMCTQSQ5iuIQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.8", "@babel/helper-globals": "^7.29.7", - "@babel/parser": "^7.29.8", + "@babel/parser": "^7.29.9", "@babel/template": "^7.29.7", "@babel/types": "^7.29.8", "debug": "^4.3.1" @@ -1595,9 +1598,9 @@ }, "node_modules/@jest/react-is-19": { "name": "react-is", - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.0.tgz", - "integrity": "sha512-UpMYezM4v5/18F28aC66AEsjXIgE02kyEMH6yLdgLXu/UTfa1Ntwck/nNLrbqJsEXW7gPb0coNO9FQse9WTovA==", + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.1.tgz", + "integrity": "sha512-RRieF6IyxQBkcK6pP8xOHprLTPW6QjRkbGdImtqNme+/hYVwCZkLQLdlZGOhUqXwkS9IEynaGvPJtv6XB/cz0Q==", "dev": true, "license": "MIT" }, @@ -1861,9 +1864,9 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.4.tgz", - "integrity": "sha512-AJxoUD2/15ESHbvpcyjU274nsAPLuOtPHCk0vKJM5pj//Fg/B1FXNWjPnXTT9PymCYYiHo4zPj0ZomXBKhoy7g==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.5.tgz", + "integrity": "sha512-HshSvXzmBxNzqejd3k/KemgQ3hdREUYFRRrgxOZ+gPljDIsO2SDZrVZMd4Z/HsxudQbE62OVyVFE8z9BCurfjA==", "dev": true, "license": "MIT", "optional": true, @@ -2212,9 +2215,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.5.tgz", - "integrity": "sha512-J25QJU+B78T4FhhBsNpLJyVWOi31mwtpcMwywHmOKH65Q9IWGA81gPj+dnwlhU8wktVriYE+tFAaQgrnJRzAZg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.64.10.tgz", + "integrity": "sha512-oJ9ZfVIZjSjts0ZIYA48+5T0vurE5fQfX/Liad2U52Y6EN99x/OCdjGGuKMDP6jSk2i2lY6jwwA3X0drEc4PBg==", "cpu": [ "arm" ], @@ -2226,9 +2229,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.5.tgz", - "integrity": "sha512-LDopB3zuZM5Ux9TT2luNEBJW/tYbGU2g1d+VpKk6I+gSKDb+/7sYE6M225gRQt4RbMX6MSwMsVR/phdjVUgRLg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.64.10.tgz", + "integrity": "sha512-LylBINgYYwgHNz8OMCy5+Y0w/LEgRYE0PcAIZfEuTuLNMf0S40GSLX6SFwqZsBLplS7RIHHy4zOAbl8Y5cQEvg==", "cpu": [ "arm64" ], @@ -2240,9 +2243,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.5.tgz", - "integrity": "sha512-wlJEERGfeuHeBavCL2qVnNacOK43NDoZM4sjkeRPymd04OAE9T1zBqDJgmZ+CIsPTYKwdzpUC8vmOw84dwY4Tg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.64.10.tgz", + "integrity": "sha512-vbuT3VT1GBI2fAOoUJUrsHVoOg9nbrFXTM7e3DSnb9PYf4n6jZCN8v4Vo8O6x4u5B67+/c803b8BtCZe2nIeqA==", "cpu": [ "arm64" ], @@ -2254,9 +2257,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.5.tgz", - "integrity": "sha512-4nJJGg5jbo2wwPP4JP+LfEBA3bvP8rU9CLuhp7jWvq9sxEyhjQFTFdrqi+/dHEin/pd8jpT0vcehIpnZtmEdcQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.64.10.tgz", + "integrity": "sha512-qYUp/qYvM3T4cF+VWalPl+przBUESILxi+qZ1m1MVRHpg06vS+jHaxXubjCaRpXjLJPDFdXzOZ0FABDghHOhNQ==", "cpu": [ "x64" ], @@ -2268,9 +2271,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.5.tgz", - "integrity": "sha512-DrZbyCDF1hneuO6jRbvZ2D7+PIBM6yIwYnJpg2vIk58T+wuFpiaGZrfUr59lDWw45bg+IrpTGLPiNi/Fk4w3Cg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.64.10.tgz", + "integrity": "sha512-v9NRQG+JztbP4DP/0yuhSyDcEJk047lYbqeNnqIgbXITcVDjGDS7OpkW5nadSY3tJ7MY8W1qIMMqP4Q3Q8BDjQ==", "cpu": [ "arm64" ], @@ -2282,9 +2285,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.5.tgz", - "integrity": "sha512-gqfUVMJMB3mehqywxp6hTBFfgtMQykZY19+cfiaYP0toIJLb/1DZRJHVkQQGP13W4TAwfZDWeg1qBcheTRioXQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.64.10.tgz", + "integrity": "sha512-CHc9LBHdxhn6/NXfb9IegXCWoz5VlvcDOx9QrzZ9q+XYhFlfzwymSWJjOlZcEMMtC1zgMV7qxDe6U18AI1SG0A==", "cpu": [ "x64" ], @@ -2296,9 +2299,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.5.tgz", - "integrity": "sha512-CFmhpvAwzSaWMlN3VN7UtmoTihlZNzoP0juQib5TQRnYUyDV8dXeWOp29sobWAT6gXl/hQgAClLlEiYozQG3OQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.64.10.tgz", + "integrity": "sha512-ble2WR7kWfzZFJUd3ODMGCJn1XDszptfRC0QvWc0h9/EA6MxnrQ1mvbjPZifEdgHyfHhDrwWeKeJONDITcrHSg==", "cpu": [ "arm" ], @@ -2313,9 +2316,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.5.tgz", - "integrity": "sha512-Uc9H8eXCOayV6JLTH5bXKMId6qbhNHa818/BgYjm4jrlq3vZquC9cqyvHBw17xy5Mnj5f+I3gFK5JcEf3hSqrw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.64.10.tgz", + "integrity": "sha512-DMCYegihxBMKvLpODdk4OsvIgxtHTi+Oddf1Pm3d6wMVNjcBiG2pqyXjMPy55HgG1gCdEFr9VfhB1CmvuKn1lw==", "cpu": [ "arm" ], @@ -2330,9 +2333,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.5.tgz", - "integrity": "sha512-VcPr/szv/1BFw112Kt//fxulXt/JPqzzidU84iW68L2DdjnOO8QFUv2zTSYBEPHD6movBD4z+bbr5y60GYM7Jw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.64.10.tgz", + "integrity": "sha512-HQ6HuVH9TmhvPWIas7MA/KeAROgdwqH3REpUU6hZq47NW7m1b1QCrHgM+M3+N/B8DfMt88x1/z79ppRc9RflCQ==", "cpu": [ "arm64" ], @@ -2347,9 +2350,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.5.tgz", - "integrity": "sha512-BnxtJ5/91BrIHYIkGrmjz/lbMhqEHt1dPFqIxIFR+jPn0xVc/oUSCtIT089zfp5ufwGDlYz2UC+Fe1SRBpYFbQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.64.10.tgz", + "integrity": "sha512-avBhxba1DdctX0kxKkN3JWdTSg72QsxSn6FdfhZ9MkL3TTYDOXqxY1GqbC7VNttlgviK7tCe2No5btfRkFgeIg==", "cpu": [ "arm64" ], @@ -2364,9 +2367,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.5.tgz", - "integrity": "sha512-LrYcHZwF+fAMNKHYTOQ5osWM4AZF7YF6D+XtsjDyEvljtt11twc+zHVXBLNEjxVSUnKYsOhvVz4Z213eW02COQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.64.10.tgz", + "integrity": "sha512-UtQMex7fiXq0W/GqcWRpy6XKqUbXgQeGKB+Bd5rJngmHzpI+3kjwpWFLAhKg02onFsIMSh+Zx0zp9JIMQ7/05A==", "cpu": [ "loong64" ], @@ -2381,9 +2384,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.5.tgz", - "integrity": "sha512-nj7QKQePAAUpCpJHtg0pR0W/b92A9NO17JS3BAQmHDn/yhmkir2p8llrKY9TOhleKIaSzy1JhxS3T9FVld6coA==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.64.10.tgz", + "integrity": "sha512-0Aum2pUsCSuOopi6oka+nR1DTj/nfvc1xjL979lvh6kXUjNa30TCX7sKFjyMsrX7bK3bNVs0FsJwQcE2HCWX1Q==", "cpu": [ "loong64" ], @@ -2398,9 +2401,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.5.tgz", - "integrity": "sha512-5ylkX6dWMeBKge9nTU+Rxfb+ZfaCIJ9lRqIFaK0eAMcWp7OJbYnLveLgXmm0VrvuLKb8qIK+mHyH0qu88RM+iA==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.64.10.tgz", + "integrity": "sha512-4dgsouKal3qfMFORgtNigLPt7K3HXiO6jTr7+nFJv1GWu1OkZx0kvQIXbK4sjrIGnaLBk0s80eQCQ9hPIelLrw==", "cpu": [ "ppc64" ], @@ -2415,9 +2418,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.5.tgz", - "integrity": "sha512-oHK4ZHYFDKjZviK34I+NwgfbGxgI7ztrNxj2hPTSSNFgeq1a/lEd7dHV2fdGAuTH4Iym3RHJg+vAbWaWG4B7Zg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.64.10.tgz", + "integrity": "sha512-d7NE89try3jisYzBD7J9M5iwfgcrXYC4dwHEjQ3HIWBftvwch1U/cy3iZ26SthtUOyClKiu7iqYiFjQEwiOlqQ==", "cpu": [ "ppc64" ], @@ -2432,9 +2435,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.5.tgz", - "integrity": "sha512-UcetmHZ6XOXuUByiKZyQmb55ZPr0LABr3Ec/HB9wKZn6CEAFWZkE+hsJErJ9hbPBC7nI0dKuELx7CoV6IM7TMg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.64.10.tgz", + "integrity": "sha512-dqB5ChSBp91JWXxpCKAS5ZVAE38esKQvdfyqANm0lF5JPiQrXnYwgG3oVBQmuNRcQ1WHkA3j5qYLsrl2CtfhCA==", "cpu": [ "riscv64" ], @@ -2449,9 +2452,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.5.tgz", - "integrity": "sha512-C5CmDPQBtvjVo8cgQsBs+w6WB0JLkiixhgi6hVLV11hERWdn/p0XcPU2OUcZzac9BPOFq7SbaHFa8r3SWEysCQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.64.10.tgz", + "integrity": "sha512-7GMf3vbQQslorWLmfsbi5fdt9RVnglk205XpOMFvW6UY5jE5oJc6JLieQJPHtsYlZ2EO0PtC06nY9Hz/IG8guw==", "cpu": [ "riscv64" ], @@ -2466,9 +2469,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.5.tgz", - "integrity": "sha512-lHVQHJFKsuuxLMi3MQO9XVL8Tje3JR82CzB+QDKC5NWBcsIWuwsn9uIM5e3lBhI+fF1/s63qnyYqsg65+8rV/w==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.64.10.tgz", + "integrity": "sha512-tuKbkB23DKc5LG+irPSUnZZztRHqC3CNmyxeWloueBteHB+i+1HkRCMzAE41lseLDlarybeLhqfibFitKOxKMg==", "cpu": [ "s390x" ], @@ -2483,9 +2486,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.5.tgz", - "integrity": "sha512-3W9bTFcQNJn71cSJVM9RKIiZOy8DO/XLDii8Uv/Pm6WKqDRj7JV3ZfuXIEfyuy5LXpIzAbB/1M4Ukp9GKNa7nA==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.64.10.tgz", + "integrity": "sha512-ntHtQOMw7oIshHRF1swV3vyBw+beQt9PeZ04O3D32EeDZUMoHMJuZKp4/fDllH/+xogeK0GUCONVfjjKusqKLg==", "cpu": [ "x64" ], @@ -2500,9 +2503,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.5.tgz", - "integrity": "sha512-VDC7rRJlee/scpki96GZ27Omf6yU87s1YXwVTpjE5841faVlDYYT565rgfmoR1U0sqL7z5ivQSDjcsF6VRXyBA==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.64.10.tgz", + "integrity": "sha512-Dlh8q8r145aYgh+N3gNIG1dz35Fz/FCxe5hs/43orDsffjP8S1P4Xz5I4FpSJsDS4LpQw1QmswZkQlUbkCldjQ==", "cpu": [ "x64" ], @@ -2517,9 +2520,9 @@ ] }, "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.5.tgz", - "integrity": "sha512-z86Ok2p4pTdv5xqCKZsTooO7yBEiaJR/HzU3Wx8RmWsPoLppnMKROhJusQob8B3IE1ghC343kUW9rC2r+Wf3ig==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.64.10.tgz", + "integrity": "sha512-VBJhHWz/55u45CWFv9OmfSRDgJDVENESgFxSAn13gIKJpTuFJbP4/7ymMZhDfeKFx1zGn1XBsLnNB7Ryy71qww==", "cpu": [ "x64" ], @@ -2531,9 +2534,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.5.tgz", - "integrity": "sha512-IzQmj+xXwQFGhMAMKMQVXkMwMZN3TqkJgAE0nSsqvVwWWciP4AIPMmWRqOQ2GfX7TUDZr+xqGFcBS36CRPGw0g==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.64.10.tgz", + "integrity": "sha512-Vjcazg+EEzUfIz+LcaxS6YtbQHo+sv0sCD+5VbwhY504bCKNW4OOreVgKq61pHT2esRQ/+AXYVPStDwxSvAOdw==", "cpu": [ "arm64" ], @@ -2545,9 +2548,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.5.tgz", - "integrity": "sha512-F6qpTaPc9bwBH85kjy0/BLmLSW1uv7AoOXCoRIkg2arlgCYlWYcAbiMkvZuAcaWk9TpCRG//okznLAqLGshkMw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.64.10.tgz", + "integrity": "sha512-jJAaP4El+HWxYkM0jeJghASaFgfnluY0FRHhyHXxU6STs/nBhKMIxIMDrJEFg2ftKz6orX9WAo4diVan5NugNA==", "cpu": [ "arm64" ], @@ -2559,9 +2562,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.5.tgz", - "integrity": "sha512-igoDsTFhhwECBeGbUuLeIk7t8Y1apa+cs6mDWpx2EZ0ch7oEQgzHbFUXN9euoHekCAQzXdXApAGkV6jznS7tWw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.64.10.tgz", + "integrity": "sha512-bXXdRUfRx9PaHCToKt8R/7wjDV6Tbk/hmSHK0uQBKmD3rj4jkuYndct8uGX77ZuZsePrVkQbWUgPR2jJhCTMpQ==", "cpu": [ "ia32" ], @@ -2573,9 +2576,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.5.tgz", - "integrity": "sha512-U3teMeMbXFmaM5D+OTJpsOXd+wV/qftIeYF9kBKL4v73641qyJmoXFtA28DQLsnmlyayEsTe72xpLHrArq6vHw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.64.10.tgz", + "integrity": "sha512-57Idx+VkEOQeG6Ys6sZOBFT7FfbeyxGv9A3k1m+Lf/z2SwqT40rNWbAINzjPHSMoCCBvY7Fnb9RGZWQin/HHAw==", "cpu": [ "x64" ], @@ -2587,9 +2590,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.5.tgz", - "integrity": "sha512-ypfC34F3RKXvCXBglGqGMsUSMKlgwd1HX9AOAlx9RoZZ6GaI42YHVeKpzg3JG+wpBUJYTG+NNZhqbDWL8tBZkw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.64.10.tgz", + "integrity": "sha512-vrvuasIpm/xf+BpZbzgirku0WnrQZMAc+H2Ai26jzqBxYEmQQE4DdJb7h8erkJMfRRipx0ma2Cty8jJwUm9ocQ==", "cpu": [ "x64" ], @@ -2802,9 +2805,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.10.tgz", - "integrity": "sha512-HpbUakT7xp5miBUywCHf36ZEuAJNklBJDDsGpUIjMzOSmM8ELSfA9Sa/QDPeNeqeoN31u+UTCkL4klCOVvRm4Q==", + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.12.tgz", + "integrity": "sha512-/8UvqAPU9DGTI9k4mxtf49U37Isfwr8Uts96+SBHIkFxPJnHS0Ew4f00sM4Scd8V8EjM0jUNtVDdv1kPdt35lg==", "dev": true, "license": "MIT", "engines": { @@ -3366,9 +3369,9 @@ ] }, "node_modules/acorn": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", - "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz", + "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==", "dev": true, "license": "MIT", "bin": { @@ -3598,9 +3601,9 @@ } }, "node_modules/baseline-browser-mapping": { - "version": "2.11.26", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.26.tgz", - "integrity": "sha512-GLQdD3y6UF8iVuMJl5fHgE4jdn/ua7n+toKfLgNlg3BqQtOZjpy68T8Tup8/wGWZCDlm7KMg7tPb4MPn7oN0TQ==", + "version": "2.11.29", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.29.tgz", + "integrity": "sha512-YeesxhUmR4h5y5V8KF8iBCqJb8YFrBJ++XBTeGcWIaQOYXGN19JM0FoiOjAhwuDoln8owMgXcWBmgHtYSkky2w==", "dev": true, "license": "Apache-2.0", "bin": { @@ -3667,11 +3670,11 @@ } }, "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.2.tgz", + "integrity": "sha512-V2o8YS2EhrKMO9AumnkK0ynynfFlsajpYupwq7S46H5mhcanwxDkNTw3K67wPIcKTH1ffkA4vhMOtAc7gRmPZw==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { "node-int64": "^0.4.0" } @@ -3737,9 +3740,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001814", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001814.tgz", - "integrity": "sha512-/Uaf1lAzr59XcMpW0o96WoEfr+VXK2OX4U9AgFoiSHsVJ4HppnIFUjtYzsyDH2+tgANaQb2/oxYGwCPapN1FpA==", + "version": "1.0.30001816", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001816.tgz", + "integrity": "sha512-+8Yx7BXCoqk6IF8yTicjfUR6D/ldJzdlsodlEOiOSPmhK844WIgk67/zIQaGAOxNkZyyvBlrRFnLvqKIoqbAFw==", "dev": true, "funding": [ { @@ -3817,9 +3820,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.1.tgz", - "integrity": "sha512-Ca8swihM+/4yKecYHY52kgJd300hi2lADU/a1RxNTRe+RJ9jvqQlESpbz9DnG9mowez8qwXHB8qYdIUw9e+F5Q==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.3.0.tgz", + "integrity": "sha512-lmNyBzi6iYiqyrExTctfmjd8tInx+dHu9PBomTfH5RXS53c27JMFJgzNv5TyAnm3PgGf+MLy0+Ws41/HlVxdKQ==", "dev": true, "license": "MIT" }, @@ -4003,9 +4006,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.442", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.442.tgz", - "integrity": "sha512-najZYZ3+ZpjN1z3VOsrBiv5ej18vQgfV2lvEmxWzfmKrk4bdm3Owseyud4yGU6DfFn9pyunoAHDDyM4KmP78Ew==", + "version": "1.5.459", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.459.tgz", + "integrity": "sha512-4SC9HHSFjO/liAhifpdOL5hG9b4BP7/5G3y3UPZVO8trlAXr1CaUEEJL0gWK3kOcYcZrOA5rkwG45Gra/lTIgg==", "dev": true, "license": "ISC" }, @@ -4351,13 +4354,13 @@ "license": "MIT" }, "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.4.tgz", + "integrity": "sha512-tGQtaoYisPDriJBN0mT5yZSyNETnJGA1gTYxaVRAE5KUO3LI9kPUc9WIu8JXcxaIci+faIKlzXqXyPgrmubtBQ==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "bser": "2.1.1" + "bser": "2.1.2" } }, "node_modules/fdir": { @@ -5538,9 +5541,9 @@ } }, "node_modules/lilconfig": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", - "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.4.tgz", + "integrity": "sha512-zJZyBmQhArDRefuWTypZxwDpFDIYmrj8ypSBvwGD5P13Y95s6DjzKgu4DVdGbeQa5PDEsAOCAPNk4X+QOR006w==", "dev": true, "license": "MIT", "engines": { @@ -5745,9 +5748,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.57", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.57.tgz", - "integrity": "sha512-kQK9LGGFiHtrWiNhZtA7Qbw17AQz+dmsEKODRIVTXA9+e5MS/2gZEBhYJt13GrAz5/IOZKddH/0Z3TP/Zgo+yw==", + "version": "2.0.59", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.59.tgz", + "integrity": "sha512-5qr2okC4ItAI0hG5SaV0HoYMpnM/Y6+Oqr7AmPYy/2uEoGvS+GbSKLeRxSS1uAdu59yz0ouzcuXievSgg///WA==", "dev": true, "license": "MIT", "engines": { @@ -6247,9 +6250,9 @@ } }, "node_modules/rollup": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.5.tgz", - "integrity": "sha512-KRWwmNLlPw5M7HcdYfm15oBv9n9LPtjzpzCIxS/phwqvPyxHSoKX6Y2YU3pxSPfy0CLquVgsx/j/hBi6OvH1Nw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.64.10.tgz", + "integrity": "sha512-8N52YH1B5JzBP+B1rkcBERG7rfRTGAM0RmUpyd76yyRfTljuG452GCNbVm6MPzs1+gXBha6Rw5/oHRFohOpfDg==", "dev": true, "license": "MIT", "dependencies": { @@ -6264,31 +6267,31 @@ }, "optionalDependencies": { "@napi-rs/lzma-linux-x64-gnu": "1.5.1", - "@rollup/rollup-android-arm-eabi": "4.63.5", - "@rollup/rollup-android-arm64": "4.63.5", - "@rollup/rollup-darwin-arm64": "4.63.5", - "@rollup/rollup-darwin-x64": "4.63.5", - "@rollup/rollup-freebsd-arm64": "4.63.5", - "@rollup/rollup-freebsd-x64": "4.63.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.63.5", - "@rollup/rollup-linux-arm-musleabihf": "4.63.5", - "@rollup/rollup-linux-arm64-gnu": "4.63.5", - "@rollup/rollup-linux-arm64-musl": "4.63.5", - "@rollup/rollup-linux-loong64-gnu": "4.63.5", - "@rollup/rollup-linux-loong64-musl": "4.63.5", - "@rollup/rollup-linux-ppc64-gnu": "4.63.5", - "@rollup/rollup-linux-ppc64-musl": "4.63.5", - "@rollup/rollup-linux-riscv64-gnu": "4.63.5", - "@rollup/rollup-linux-riscv64-musl": "4.63.5", - "@rollup/rollup-linux-s390x-gnu": "4.63.5", - "@rollup/rollup-linux-x64-gnu": "4.63.5", - "@rollup/rollup-linux-x64-musl": "4.63.5", - "@rollup/rollup-openbsd-x64": "4.63.5", - "@rollup/rollup-openharmony-arm64": "4.63.5", - "@rollup/rollup-win32-arm64-msvc": "4.63.5", - "@rollup/rollup-win32-ia32-msvc": "4.63.5", - "@rollup/rollup-win32-x64-gnu": "4.63.5", - "@rollup/rollup-win32-x64-msvc": "4.63.5", + "@rollup/rollup-android-arm-eabi": "4.64.10", + "@rollup/rollup-android-arm64": "4.64.10", + "@rollup/rollup-darwin-arm64": "4.64.10", + "@rollup/rollup-darwin-x64": "4.64.10", + "@rollup/rollup-freebsd-arm64": "4.64.10", + "@rollup/rollup-freebsd-x64": "4.64.10", + "@rollup/rollup-linux-arm-gnueabihf": "4.64.10", + "@rollup/rollup-linux-arm-musleabihf": "4.64.10", + "@rollup/rollup-linux-arm64-gnu": "4.64.10", + "@rollup/rollup-linux-arm64-musl": "4.64.10", + "@rollup/rollup-linux-loong64-gnu": "4.64.10", + "@rollup/rollup-linux-loong64-musl": "4.64.10", + "@rollup/rollup-linux-ppc64-gnu": "4.64.10", + "@rollup/rollup-linux-ppc64-musl": "4.64.10", + "@rollup/rollup-linux-riscv64-gnu": "4.64.10", + "@rollup/rollup-linux-riscv64-musl": "4.64.10", + "@rollup/rollup-linux-s390x-gnu": "4.64.10", + "@rollup/rollup-linux-x64-gnu": "4.64.10", + "@rollup/rollup-linux-x64-musl": "4.64.10", + "@rollup/rollup-openbsd-x64": "4.64.10", + "@rollup/rollup-openharmony-arm64": "4.64.10", + "@rollup/rollup-win32-arm64-msvc": "4.64.10", + "@rollup/rollup-win32-ia32-msvc": "4.64.10", + "@rollup/rollup-win32-x64-gnu": "4.64.10", + "@rollup/rollup-win32-x64-msvc": "4.64.10", "fsevents": "~2.3.2" } }, @@ -6828,9 +6831,9 @@ "license": "MIT" }, "node_modules/undici": { - "version": "6.29.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.0.tgz", - "integrity": "sha512-R+RODBqp6i2pPflGdq+xIOUkl+RNfGgHwoinecKu/JCuf2uO06cOKoDbI2P7Dn6KcswdKwrczbU6IYJ6K8X+wg==", + "version": "6.29.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz", + "integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==", "license": "MIT", "engines": { "node": ">=18.17" @@ -6882,9 +6885,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.3.tgz", - "integrity": "sha512-pJ2sYawQS0R/WI928Gj5GlPhTGzbMelq0+4INtSYNDV9ErKJcX6xjGWkoG/VnB3dpUm00zALaqkrUD77pO5TDQ==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", + "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==", "dev": true, "funding": [ { diff --git a/package.json b/package.json index 08ac31b..2293f5e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "node-appwrite", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API", - "version": "30.0.1", + "version": "31.0.0", "license": "BSD-3-Clause", "main": "dist/index.js", "type": "commonjs", @@ -15,6 +15,9 @@ "lint:fix": "eslint --fix .", "analyse": "tsc --noEmit" }, + "engines": { + "node": ">=20.0.0" + }, "exports": { ".": { "import": { diff --git a/src/client.ts b/src/client.ts index 70e8538..88e1131 100644 --- a/src/client.ts +++ b/src/client.ts @@ -154,7 +154,7 @@ class AppwriteException extends Error { } function getUserAgent() { - let ua = 'AppwriteNodeJSSDK/30.0.1'; + let ua = 'AppwriteNodeJSSDK/31.0.0'; // `process` is a global in Node.js, but not fully available in all runtimes. const platform: string[] = []; @@ -215,7 +215,7 @@ class Client { 'x-sdk-name': 'Node.js', 'x-sdk-platform': 'server', 'x-sdk-language': 'nodejs', - 'x-sdk-version': '30.0.1', + 'x-sdk-version': '31.0.0', 'user-agent': getUserAgent(), 'X-Appwrite-Response-Format': '2.5.0', }; diff --git a/src/models.ts b/src/models.ts index afb50ff..185c9a7 100644 --- a/src/models.ts +++ b/src/models.ts @@ -729,6 +729,10 @@ export namespace Models { * Database name. */ name: string; + /** + * Optional description for the database. + */ + description: string; /** * Database creation date in ISO 8601 format. */ @@ -833,6 +837,10 @@ export namespace Models { * Collection name. */ name: string; + /** + * Optional description for the collection. + */ + description: string; /** * Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys. */ @@ -919,6 +927,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -969,6 +981,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1019,6 +1035,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1069,6 +1089,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1119,6 +1143,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1161,6 +1189,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1207,6 +1239,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1257,6 +1293,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1303,6 +1343,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1349,6 +1393,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1395,6 +1443,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1457,6 +1509,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1499,6 +1555,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1541,6 +1601,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1583,6 +1647,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1633,6 +1701,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1679,6 +1751,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1725,6 +1801,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1791,6 +1871,10 @@ export namespace Models { * Collection name. */ name: string; + /** + * Optional description for the collection. + */ + description: string; /** * Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys. */ @@ -1829,6 +1913,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1867,6 +1955,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1929,6 +2021,10 @@ export namespace Models { * Table name. */ name: string; + /** + * Optional description for the table. + */ + description: string; /** * Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys. */ @@ -2015,6 +2111,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2065,6 +2165,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2115,6 +2219,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2165,6 +2273,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2215,6 +2327,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2257,6 +2373,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2303,6 +2423,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2353,6 +2477,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2399,6 +2527,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2445,6 +2577,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2491,6 +2627,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2553,6 +2693,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2595,6 +2739,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2637,6 +2785,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2679,6 +2831,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2729,6 +2885,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2775,6 +2935,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2821,6 +2985,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2879,6 +3047,10 @@ export namespace Models { * Index key. */ key: string; + /** + * Optional description for the index. + */ + description: string; /** * Index type. */ @@ -2925,6 +3097,10 @@ export namespace Models { * Index Key. */ key: string; + /** + * Optional description for the index. + */ + description: string; /** * Index type. */ @@ -3813,6 +3989,10 @@ export namespace Models { * Bucket name. */ name: string; + /** + * Optional description for the bucket. + */ + description: string; /** * Bucket enabled. */ @@ -3999,6 +4179,10 @@ export namespace Models { * Site name. */ name: string; + /** + * Optional description for the site. + */ + description: string; /** * Site enabled. */ @@ -4149,6 +4333,10 @@ export namespace Models { * Function name. */ name: string; + /** + * Optional description for the function. + */ + description: string; /** * Function enabled. */ @@ -4813,6 +5001,10 @@ export namespace Models { * Webhook name. */ name: string; + /** + * Optional description for the webhook. + */ + description: string; /** * Webhook URL endpoint. */ @@ -4871,6 +5063,10 @@ export namespace Models { * Key name. */ name: string; + /** + * Optional description for the key. + */ + description: string; /** * Key expiration date in ISO 8601 format. */ @@ -4913,6 +5109,10 @@ export namespace Models { * Key name. */ name: string; + /** + * Optional description for the key. + */ + description: string; /** * Key expiration date in ISO 8601 format. */ @@ -6185,6 +6385,10 @@ export namespace Models { * Whether password dictionary policy is enabled. */ enabled: boolean; + /** + * Custom passwords blocked by case-sensitive equality when enabled. + */ + denyList: string[]; }; /** @@ -6243,6 +6447,10 @@ export namespace Models { * Whether password personal data policy is enabled. */ enabled: boolean; + /** + * Custom terms blocked by case-insensitive substring matching when enabled. + */ + denyList: string[]; }; /** @@ -6683,6 +6891,10 @@ export namespace Models { * Variable key. */ key: string; + /** + * Optional description for the variable. + */ + description: string; /** * Variable value. */ @@ -7257,6 +7469,10 @@ export namespace Models { * The name of the topic. */ name: string; + /** + * Optional description for the topic. + */ + description: string; /** * Total count of email subscribers subscribed to the topic. */ @@ -8185,6 +8401,10 @@ export namespace Models { * Shortest function schedule interval allowed, in minutes. 0 allows every interval. */ functionsIntervalMinimum: number; + /** + * Does the plan allow cron function schedules or only intervals. + */ + functionsAllowCron: boolean; /** * Does the plan support encrypted string attributes or not. */ diff --git a/src/query.ts b/src/query.ts index ca0b350..f25c491 100644 --- a/src/query.ts +++ b/src/query.ts @@ -726,7 +726,7 @@ export class Query { alias !== '' ? alias : undefined, ).toString(); - /** Standard deviation of `attribute`, optionally aliased. */ + /** Population standard deviation of `attribute` (the same as stddevPop), optionally aliased. */ static stddev = (attribute: string, alias: string = ''): string => new Query( 'stddev', @@ -750,7 +750,7 @@ export class Query { alias !== '' ? alias : undefined, ).toString(); - /** Variance of `attribute`, optionally aliased. */ + /** Population variance of `attribute` (the same as varPop), optionally aliased. */ static variance = (attribute: string, alias: string = ''): string => new Query( 'variance', @@ -824,7 +824,7 @@ export class Query { new Query('on', undefined, [left, operator, right]).toString(); /** - * Inner join. `table` is the joined collection/table ID. + * Inner join. `table` is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ static join = ( table: string, @@ -842,7 +842,7 @@ export class Query { alias, ); - /** Left join. `table` is the joined collection/table ID. */ + /** Left join. `table` is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ static leftJoin = ( table: string, leftOrAliasOrOn: string | string[], @@ -859,7 +859,7 @@ export class Query { alias, ); - /** Right join. `table` is the joined collection/table ID. */ + /** Right join. `table` is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ static rightJoin = ( table: string, leftOrAliasOrOn: string | string[], @@ -876,7 +876,7 @@ export class Query { alias, ); - /** Full outer join. `table` is the joined collection/table ID. */ + /** Full outer join. `table` is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ static fullOuterJoin = ( table: string, leftOrAliasOrOn: string | string[], @@ -893,7 +893,7 @@ export class Query { alias, ); - /** Cross join. `table` is the joined collection/table ID. */ + /** Cross join. `table` is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ static crossJoin = (table: string, alias: string = ''): string => new Query( 'crossJoin', diff --git a/src/services/account.ts b/src/services/account.ts index 8c05720..c922d06 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -1027,6 +1027,111 @@ export class Account { return this.client.call('delete', uri, apiHeaders, apiPayload); } + /** + * Get the team memberships of the currently logged in user. + * + * @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: userId, teamId, invited, joined, confirm, roles + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + */ + listMemberships(params?: { + queries?: string[]; + total?: boolean; + }): Promise; + /** + * Get the team memberships of the currently logged in user. + * + * @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: userId, teamId, invited, joined, confirm, roles + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listMemberships( + queries?: string[], + total?: boolean, + ): Promise; + listMemberships( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] + ): Promise { + let params: { queries?: string[]; total?: boolean }; + + if ( + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; + } else { + params = { + queries: paramsOrFirst as string[], + total: rest[0] as boolean, + }; + } + + const queries = params.queries; + const total = params.total; + const apiPath = '/account/memberships'; + const apiPayload: Payload = {}; + if (typeof queries !== 'undefined') { + apiPayload['queries'] = queries; + } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + const request = this.client.call('get', uri, apiHeaders, apiPayload); + const defaults = { + root: 'membershipList', + models: { + membershipList: { + defaults: { + total: 0, + memberships: [], + }, + properties: { + memberships: { + items: 'membership', + }, + }, + }, + membership: { + defaults: { + $id: '', + $createdAt: '', + $updatedAt: '', + userId: '', + userName: '', + userEmail: '', + userPhone: '', + teamId: '', + teamName: '', + invited: '', + joined: '', + confirm: false, + mfa: false, + userAccessedAt: '', + roles: [], + }, + }, + }, + }; + + return request.then((response) => applyDefaults(response, defaults)); + } + /** * Enable or disable MFA on an account. * @@ -3325,6 +3430,9 @@ export class Account { * * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * + * The new password must satisfy the project's enabled password policies, including custom deny lists. Dictionary entries match the entire password case-sensitively; personal-data terms match substrings case-insensitively. Personal-data validation runs after token verification against the recovered user's ID, name, email, and phone, closing the previous recovery gap for profile-based checks. A rejected password leaves the existing credentials unchanged and the recovery token usable. + * + * * @param {string} params.userId - User ID. * @param {string} params.secret - Valid reset token. * @param {string} params.password - New user password. Must be between 8 and 256 chars. @@ -3341,6 +3449,9 @@ export class Account { * * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * + * The new password must satisfy the project's enabled password policies, including custom deny lists. Dictionary entries match the entire password case-sensitively; personal-data terms match substrings case-insensitively. Personal-data validation runs after token verification against the recovered user's ID, name, email, and phone, closing the previous recovery gap for profile-based checks. A rejected password leaves the existing credentials unchanged and the recovery token usable. + * + * * @param {string} userId - User ID. * @param {string} secret - Valid reset token. * @param {string} password - New user password. Must be between 8 and 256 chars. @@ -3525,6 +3636,8 @@ export class Account { /** * Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https://appwrite.io/docs/references/cloud/client-web/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated. * + * The new password must satisfy the project's enabled password policies, including custom deny lists. Dictionary entries match the entire password case-sensitively; personal-data terms match substrings case-insensitively. Personal-data validation runs after token verification against the recovered user's ID, name, email, and phone, closing the previous recovery gap for profile-based checks. A rejected password leaves the existing credentials unchanged and the recovery token usable. + * * * @param {string} params.userId - User ID. * @param {string} params.secret - Valid recovery OTP code. @@ -3540,6 +3653,8 @@ export class Account { /** * Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https://appwrite.io/docs/references/cloud/client-web/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated. * + * The new password must satisfy the project's enabled password policies, including custom deny lists. Dictionary entries match the entire password case-sensitively; personal-data terms match substrings case-insensitively. Personal-data validation runs after token verification against the recovered user's ID, name, email, and phone, closing the previous recovery gap for profile-based checks. A rejected password leaves the existing credentials unchanged and the recovery token usable. + * * * @param {string} userId - User ID. * @param {string} secret - Valid recovery OTP code. diff --git a/src/services/activities.ts b/src/services/activities.ts index d082ca4..1d6e746 100644 --- a/src/services/activities.ts +++ b/src/services/activities.ts @@ -17,45 +17,60 @@ export class Activities { * List all events for selected filters. * * @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 attributes such as userId, teamId, etc. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listEvents(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all events for selected filters. * * @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 attributes such as userId, teamId, etc. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listEvents(queries?: string[]): Promise; listEvents( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + listEvents( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/activities/events'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/backups.ts b/src/services/backups.ts index d8dfb94..2e8c358 100644 --- a/src/services/backups.ts +++ b/src/services/backups.ts @@ -18,45 +18,60 @@ export class Backups { * List all archives for a project. * * @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. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listArchives(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all archives for a project. * * @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. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listArchives(queries?: string[]): Promise; listArchives( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + listArchives( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/backups/archives'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -324,45 +339,60 @@ export class Backups { * List all policies for a project. * * @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. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listPolicies(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all policies for a project. * * @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. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listPolicies(queries?: string[]): Promise; listPolicies( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + listPolicies( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/backups/policies'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1015,45 +1045,60 @@ export class Backups { * List all backup restorations for a project. * * @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. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listRestorations(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all backup restorations for a project. * * @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. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listRestorations(queries?: string[]): Promise; listRestorations( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + listRestorations( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/backups/restorations'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/databases.ts b/src/services/databases.ts index 0b2d328..a66fd5c 100644 --- a/src/services/databases.ts +++ b/src/services/databases.ts @@ -113,6 +113,7 @@ export class Databases { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -166,6 +167,7 @@ export class Databases { * @param {string} params.databaseId - Unique 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. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string} params.description - Optional description for the database. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.create` instead. @@ -174,6 +176,7 @@ export class Databases { databaseId: string; name: string; enabled?: boolean; + description?: string; }): Promise; /** * Create a new Database. @@ -182,6 +185,7 @@ export class Databases { * @param {string} databaseId - Unique 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. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string} description - Optional description for the database. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -190,13 +194,25 @@ export class Databases { databaseId: string, name: string, enabled?: boolean, + description?: string, ): Promise; create( paramsOrFirst: - { databaseId: string; name: string; enabled?: boolean } | string, - ...rest: [string?, boolean?] + | { + databaseId: string; + name: string; + enabled?: boolean; + description?: string; + } + | string, + ...rest: [string?, boolean?, string?] ): Promise { - let params: { databaseId: string; name: string; enabled?: boolean }; + let params: { + databaseId: string; + name: string; + enabled?: boolean; + description?: string; + }; if ( paramsOrFirst && @@ -207,18 +223,21 @@ export class Databases { databaseId: string; name: string; enabled?: boolean; + description?: string; }; } else { params = { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, + description: rest[2] as string, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; if (typeof databaseId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -238,6 +257,9 @@ export class Databases { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -254,6 +276,7 @@ export class Databases { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -860,6 +883,7 @@ export class Databases { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -912,6 +936,7 @@ export class Databases { * @param {string} params.databaseId - Database ID. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string | null} params.description - Optional description for the database. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.update` instead. @@ -920,6 +945,7 @@ export class Databases { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; }): Promise; /** * Update a database by its unique ID. @@ -927,6 +953,7 @@ export class Databases { * @param {string} databaseId - Database ID. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string | null} description - Optional description for the database. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -935,13 +962,25 @@ export class Databases { databaseId: string, name?: string, enabled?: boolean, + description?: string | null, ): Promise; update( paramsOrFirst: - { databaseId: string; name?: string; enabled?: boolean } | string, - ...rest: [string?, boolean?] + | { + databaseId: string; + name?: string; + enabled?: boolean; + description?: string | null; + } + | string, + ...rest: [string?, boolean?, (string | null)?] ): Promise { - let params: { databaseId: string; name?: string; enabled?: boolean }; + let params: { + databaseId: string; + name?: string; + enabled?: boolean; + description?: string | null; + }; if ( paramsOrFirst && @@ -952,18 +991,21 @@ export class Databases { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; }; } else { params = { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, + description: rest[2] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -980,6 +1022,9 @@ export class Databases { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -996,6 +1041,7 @@ export class Databases { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -1222,6 +1268,7 @@ export class Databases { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1241,6 +1288,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1264,6 +1312,7 @@ export class Databases { * @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. * @param {object[]} params.attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTable` instead. @@ -1277,6 +1326,7 @@ export class Databases { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }): Promise; /** * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. @@ -1289,6 +1339,7 @@ export class Databases { * @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. * @param {object[]} attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1302,6 +1353,7 @@ export class Databases { enabled?: boolean, attributes?: object[], indexes?: object[], + description?: string, ): Promise; createCollection( paramsOrFirst: @@ -1314,6 +1366,7 @@ export class Databases { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; } | string, ...rest: [ @@ -1324,6 +1377,7 @@ export class Databases { boolean?, object[]?, object[]?, + string?, ] ): Promise { let params: { @@ -1335,6 +1389,7 @@ export class Databases { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }; if ( @@ -1351,6 +1406,7 @@ export class Databases { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }; } else { params = { @@ -1362,6 +1418,7 @@ export class Databases { enabled: rest[4] as boolean, attributes: rest[5] as object[], indexes: rest[6] as object[], + description: rest[7] as string, }; } @@ -1373,6 +1430,7 @@ export class Databases { const enabled = params.enabled; const attributes = params.attributes; const indexes = params.indexes; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1412,6 +1470,9 @@ export class Databases { if (typeof indexes !== 'undefined') { apiPayload['indexes'] = indexes; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1432,6 +1493,7 @@ export class Databases { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1451,6 +1513,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1549,6 +1612,7 @@ export class Databases { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1568,6 +1632,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1590,6 +1655,7 @@ export class Databases { * @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). * @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. * @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. + * @param {string | null} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTable` instead. @@ -1602,6 +1668,7 @@ export class Databases { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }): Promise; /** * Update a collection by its unique ID. @@ -1613,6 +1680,7 @@ export class Databases { * @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). * @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. * @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. + * @param {string | null} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1625,6 +1693,7 @@ export class Databases { documentSecurity?: boolean, enabled?: boolean, purge?: boolean, + description?: string | null, ): Promise; updateCollection( paramsOrFirst: @@ -1636,6 +1705,7 @@ export class Databases { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; } | string, ...rest: [ @@ -1645,6 +1715,7 @@ export class Databases { boolean?, boolean?, boolean?, + (string | null)?, ] ): Promise { let params: { @@ -1655,6 +1726,7 @@ export class Databases { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; if ( @@ -1670,6 +1742,7 @@ export class Databases { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; } else { params = { @@ -1680,6 +1753,7 @@ export class Databases { documentSecurity: rest[3] as boolean, enabled: rest[4] as boolean, purge: rest[5] as boolean, + description: rest[6] as string | null, }; } @@ -1690,6 +1764,7 @@ export class Databases { const documentSecurity = params.documentSecurity; const enabled = params.enabled; const purge = params.purge; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1722,6 +1797,9 @@ export class Databases { if (typeof purge !== 'undefined') { apiPayload['purge'] = purge; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1742,6 +1820,7 @@ export class Databases { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1761,6 +1840,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1983,6 +2063,7 @@ export class Databases { * @param {number | bigint | null} params.max - Maximum value * @param {number | bigint | null} params.xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createBigIntColumn` instead. @@ -1996,6 +2077,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }): Promise; /** * Create a bigint attribute. Optionally, minimum and maximum values can be provided. @@ -2009,6 +2091,7 @@ export class Databases { * @param {number | bigint | null} max - Maximum value * @param {number | bigint | null} xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2022,6 +2105,7 @@ export class Databases { max?: number | bigint | null, xdefault?: number | bigint | null, array?: boolean, + description?: string, ): Promise; createBigIntAttribute( paramsOrFirst: @@ -2034,6 +2118,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -2044,6 +2129,7 @@ export class Databases { (number | bigint | null)?, (number | bigint | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -2055,6 +2141,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; if ( @@ -2071,6 +2158,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; } else { params = { @@ -2082,6 +2170,7 @@ export class Databases { max: rest[4] as number | bigint | null, xdefault: rest[5] as number | bigint | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -2093,6 +2182,7 @@ export class Databases { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2137,6 +2227,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2152,6 +2245,7 @@ export class Databases { attributeBigint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -2177,6 +2271,7 @@ export class Databases { * @param {number | bigint | null} params.min - Minimum value * @param {number | bigint | null} params.max - Maximum value * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateBigIntColumn` instead. @@ -2190,6 +2285,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a bigint attribute. Changing the `default` value will not update already existing documents. @@ -2203,6 +2299,7 @@ export class Databases { * @param {number | bigint | null} min - Minimum value * @param {number | bigint | null} max - Maximum value * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2216,6 +2313,7 @@ export class Databases { min?: number | bigint | null, max?: number | bigint | null, newKey?: string | null, + description?: string | null, ): Promise; updateBigIntAttribute( paramsOrFirst: @@ -2228,6 +2326,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -2238,6 +2337,7 @@ export class Databases { (number | bigint | null)?, (number | bigint | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -2249,6 +2349,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; if ( @@ -2265,6 +2366,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -2276,6 +2378,7 @@ export class Databases { min: rest[4] as number | bigint | null, max: rest[5] as number | bigint | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -2287,6 +2390,7 @@ export class Databases { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2334,6 +2438,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2349,6 +2456,7 @@ export class Databases { attributeBigint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -2372,6 +2480,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {boolean | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createBooleanColumn` instead. @@ -2383,6 +2492,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }): Promise; /** * Create a boolean attribute. @@ -2394,6 +2504,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {boolean | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2405,6 +2516,7 @@ export class Databases { required: boolean, xdefault?: boolean | null, array?: boolean, + description?: string, ): Promise; createBooleanAttribute( paramsOrFirst: @@ -2415,9 +2527,17 @@ export class Databases { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (boolean | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (boolean | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -2426,6 +2546,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }; if ( @@ -2440,6 +2561,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }; } else { params = { @@ -2449,6 +2571,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as boolean | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -2458,6 +2581,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2496,6 +2620,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2511,6 +2638,7 @@ export class Databases { attributeBoolean: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -2533,6 +2661,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {boolean | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New attribute key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateBooleanColumn` instead. @@ -2544,6 +2673,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a boolean attribute. Changing the `default` value will not update already existing documents. @@ -2554,6 +2684,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {boolean | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New attribute key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2565,6 +2696,7 @@ export class Databases { required: boolean, xdefault?: boolean | null, newKey?: string | null, + description?: string | null, ): Promise; updateBooleanAttribute( paramsOrFirst: @@ -2575,6 +2707,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -2583,6 +2716,7 @@ export class Databases { boolean?, (boolean | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -2592,6 +2726,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }; if ( @@ -2606,6 +2741,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -2615,6 +2751,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as boolean | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -2624,6 +2761,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2665,6 +2803,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2680,6 +2821,7 @@ export class Databases { attributeBoolean: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -2702,6 +2844,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createDatetimeColumn` instead. @@ -2713,6 +2856,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create a date time attribute according to the ISO 8601 standard. @@ -2723,6 +2867,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2734,6 +2879,7 @@ export class Databases { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createDatetimeAttribute( paramsOrFirst: @@ -2744,9 +2890,17 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -2755,6 +2909,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -2769,6 +2924,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -2778,6 +2934,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -2787,6 +2944,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2825,6 +2983,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2840,6 +3001,7 @@ export class Databases { attributeDatetime: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -2862,6 +3024,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New attribute key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateDatetimeColumn` instead. @@ -2873,6 +3036,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a date time attribute. Changing the `default` value will not update already existing documents. @@ -2883,6 +3047,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New attribute key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2894,6 +3059,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateDatetimeAttribute( paramsOrFirst: @@ -2904,6 +3070,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -2912,6 +3079,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -2921,6 +3089,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -2935,6 +3104,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -2944,6 +3114,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -2953,6 +3124,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2994,6 +3166,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3009,6 +3184,7 @@ export class Databases { attributeDatetime: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3032,6 +3208,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEmailColumn` instead. @@ -3043,6 +3220,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create an email attribute. @@ -3054,6 +3232,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3065,6 +3244,7 @@ export class Databases { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createEmailAttribute( paramsOrFirst: @@ -3075,9 +3255,17 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -3086,6 +3274,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -3100,6 +3289,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -3109,6 +3299,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -3118,6 +3309,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3156,6 +3348,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3171,6 +3366,7 @@ export class Databases { attributeEmail: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3195,6 +3391,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateEmailColumn` instead. @@ -3206,6 +3403,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an email attribute. Changing the `default` value will not update already existing documents. @@ -3217,6 +3415,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3228,6 +3427,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateEmailAttribute( paramsOrFirst: @@ -3238,6 +3438,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -3246,6 +3447,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3255,6 +3457,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -3269,6 +3472,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -3278,6 +3482,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -3287,6 +3492,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3328,6 +3534,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3343,6 +3552,7 @@ export class Databases { attributeEmail: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3368,6 +3578,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEnumColumn` instead. @@ -3380,6 +3591,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. @@ -3392,6 +3604,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3404,6 +3617,7 @@ export class Databases { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createEnumAttribute( paramsOrFirst: @@ -3415,6 +3629,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -3424,6 +3639,7 @@ export class Databases { boolean?, (string | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -3434,6 +3650,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -3449,6 +3666,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -3459,6 +3677,7 @@ export class Databases { required: rest[3] as boolean, xdefault: rest[4] as string | null, array: rest[5] as boolean, + description: rest[6] as string, }; } @@ -3469,6 +3688,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3515,6 +3735,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3530,6 +3753,7 @@ export class Databases { attributeEnum: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3556,6 +3780,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateEnumColumn` instead. @@ -3568,6 +3793,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an enum attribute. Changing the `default` value will not update already existing documents. @@ -3580,6 +3806,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3592,6 +3819,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateEnumAttribute( paramsOrFirst: @@ -3603,6 +3831,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -3612,6 +3841,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3622,6 +3852,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -3637,6 +3868,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -3647,6 +3879,7 @@ export class Databases { required: rest[3] as boolean, xdefault: rest[4] as string | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -3657,6 +3890,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3706,6 +3940,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3721,6 +3958,7 @@ export class Databases { attributeEnum: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3748,6 +3986,7 @@ export class Databases { * @param {number | null} params.max - Maximum value. * @param {number | null} params.xdefault - Default value. Cannot be set when required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createFloatColumn` instead. @@ -3761,6 +4000,7 @@ export class Databases { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }): Promise; /** * Create a float attribute. Optionally, minimum and maximum values can be provided. @@ -3774,6 +4014,7 @@ export class Databases { * @param {number | null} max - Maximum value. * @param {number | null} xdefault - Default value. Cannot be set when required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3787,6 +4028,7 @@ export class Databases { max?: number | null, xdefault?: number | null, array?: boolean, + description?: string, ): Promise; createFloatAttribute( paramsOrFirst: @@ -3799,6 +4041,7 @@ export class Databases { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -3809,6 +4052,7 @@ export class Databases { (number | null)?, (number | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -3820,6 +4064,7 @@ export class Databases { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }; if ( @@ -3836,6 +4081,7 @@ export class Databases { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }; } else { params = { @@ -3847,6 +4093,7 @@ export class Databases { max: rest[4] as number | null, xdefault: rest[5] as number | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -3858,6 +4105,7 @@ export class Databases { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3902,6 +4150,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3917,6 +4168,7 @@ export class Databases { attributeFloat: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3942,6 +4194,7 @@ export class Databases { * @param {number | null} params.min - Minimum value. * @param {number | null} params.max - Maximum value. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateFloatColumn` instead. @@ -3955,6 +4208,7 @@ export class Databases { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a float attribute. Changing the `default` value will not update already existing documents. @@ -3968,6 +4222,7 @@ export class Databases { * @param {number | null} min - Minimum value. * @param {number | null} max - Maximum value. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3981,6 +4236,7 @@ export class Databases { min?: number | null, max?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateFloatAttribute( paramsOrFirst: @@ -3993,6 +4249,7 @@ export class Databases { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -4003,6 +4260,7 @@ export class Databases { (number | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -4014,6 +4272,7 @@ export class Databases { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -4030,6 +4289,7 @@ export class Databases { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -4041,6 +4301,7 @@ export class Databases { min: rest[4] as number | null, max: rest[5] as number | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -4052,6 +4313,7 @@ export class Databases { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4099,6 +4361,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4114,6 +4379,7 @@ export class Databases { attributeFloat: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4139,6 +4405,7 @@ export class Databases { * @param {number | bigint | null} params.max - Maximum value * @param {number | bigint | null} params.xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIntegerColumn` instead. @@ -4152,6 +4419,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }): Promise; /** * Create an integer attribute. Optionally, minimum and maximum values can be provided. @@ -4165,6 +4433,7 @@ export class Databases { * @param {number | bigint | null} max - Maximum value * @param {number | bigint | null} xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4178,6 +4447,7 @@ export class Databases { max?: number | bigint | null, xdefault?: number | bigint | null, array?: boolean, + description?: string, ): Promise; createIntegerAttribute( paramsOrFirst: @@ -4190,6 +4460,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -4200,6 +4471,7 @@ export class Databases { (number | bigint | null)?, (number | bigint | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -4211,6 +4483,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; if ( @@ -4227,6 +4500,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; } else { params = { @@ -4238,6 +4512,7 @@ export class Databases { max: rest[4] as number | bigint | null, xdefault: rest[5] as number | bigint | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -4249,6 +4524,7 @@ export class Databases { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4293,6 +4569,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4308,6 +4587,7 @@ export class Databases { attributeInteger: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4333,6 +4613,7 @@ export class Databases { * @param {number | bigint | null} params.min - Minimum value * @param {number | bigint | null} params.max - Maximum value * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateIntegerColumn` instead. @@ -4346,6 +4627,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an integer attribute. Changing the `default` value will not update already existing documents. @@ -4359,6 +4641,7 @@ export class Databases { * @param {number | bigint | null} min - Minimum value * @param {number | bigint | null} max - Maximum value * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4372,6 +4655,7 @@ export class Databases { min?: number | bigint | null, max?: number | bigint | null, newKey?: string | null, + description?: string | null, ): Promise; updateIntegerAttribute( paramsOrFirst: @@ -4384,6 +4668,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -4394,6 +4679,7 @@ export class Databases { (number | bigint | null)?, (number | bigint | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -4405,6 +4691,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; if ( @@ -4421,6 +4708,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -4432,6 +4720,7 @@ export class Databases { min: rest[4] as number | bigint | null, max: rest[5] as number | bigint | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -4443,6 +4732,7 @@ export class Databases { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4490,6 +4780,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4505,6 +4798,7 @@ export class Databases { attributeInteger: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4528,6 +4822,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIpColumn` instead. @@ -4539,6 +4834,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create IP address attribute. @@ -4550,6 +4846,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4561,6 +4858,7 @@ export class Databases { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createIpAttribute( paramsOrFirst: @@ -4571,9 +4869,17 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -4582,6 +4888,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -4596,6 +4903,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -4605,6 +4913,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -4614,6 +4923,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4652,6 +4962,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4667,6 +4980,7 @@ export class Databases { attributeIp: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4691,6 +5005,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateIpColumn` instead. @@ -4702,6 +5017,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an ip attribute. Changing the `default` value will not update already existing documents. @@ -4713,6 +5029,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4724,6 +5041,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateIpAttribute( paramsOrFirst: @@ -4734,6 +5052,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -4742,6 +5061,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -4751,6 +5071,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -4765,6 +5086,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -4774,6 +5096,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -4783,6 +5106,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4824,6 +5148,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4839,6 +5166,7 @@ export class Databases { attributeIp: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4861,6 +5189,7 @@ export class Databases { * @param {string} params.key - Attribute Key. * @param {boolean} params.required - Is attribute required? * @param {any[][] | null} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLineColumn` instead. @@ -4871,6 +5200,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }): Promise; /** * Create a geometric line attribute. @@ -4880,6 +5210,7 @@ export class Databases { * @param {string} key - Attribute Key. * @param {boolean} required - Is attribute required? * @param {any[][] | null} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4890,6 +5221,7 @@ export class Databases { key: string, required: boolean, xdefault?: any[][] | null, + description?: string, ): Promise; createLineAttribute( paramsOrFirst: @@ -4899,9 +5231,10 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (any[][] | null)?] + ...rest: [string?, string?, boolean?, (any[][] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -4909,6 +5242,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; if ( @@ -4922,6 +5256,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; } else { params = { @@ -4930,6 +5265,7 @@ export class Databases { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, + description: rest[4] as string, }; } @@ -4938,6 +5274,7 @@ export class Databases { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4973,6 +5310,9 @@ export class Databases { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4988,6 +5328,7 @@ export class Databases { attributeLine: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5010,6 +5351,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {any[][] | null} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. * @param {string | null} params.newKey - New attribute key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateLineColumn` instead. @@ -5021,6 +5363,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a line attribute. Changing the `default` value will not update already existing documents. @@ -5031,6 +5374,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {any[][] | null} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. * @param {string | null} newKey - New attribute key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5042,6 +5386,7 @@ export class Databases { required: boolean, xdefault?: any[][] | null, newKey?: string | null, + description?: string | null, ): Promise; updateLineAttribute( paramsOrFirst: @@ -5052,6 +5397,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5060,6 +5406,7 @@ export class Databases { boolean?, (any[][] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5069,6 +5416,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5083,6 +5431,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5092,6 +5441,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -5101,6 +5451,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5137,6 +5488,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5152,6 +5506,7 @@ export class Databases { attributeLine: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5176,6 +5531,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLongtextColumn` instead. @@ -5188,6 +5544,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a longtext attribute. @@ -5200,6 +5557,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5212,6 +5570,7 @@ export class Databases { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createLongtextAttribute( paramsOrFirst: @@ -5223,6 +5582,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -5232,6 +5592,7 @@ export class Databases { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -5242,6 +5603,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -5257,6 +5619,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -5267,6 +5630,7 @@ export class Databases { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -5277,6 +5641,7 @@ export class Databases { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5318,6 +5683,9 @@ export class Databases { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5333,6 +5701,7 @@ export class Databases { attributeLongtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5356,6 +5725,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateLongtextColumn` instead. @@ -5367,6 +5737,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a longtext attribute. Changing the `default` value will not update already existing documents. @@ -5378,6 +5749,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5389,6 +5761,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateLongtextAttribute( paramsOrFirst: @@ -5399,6 +5772,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5407,6 +5781,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5416,6 +5791,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5430,6 +5806,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5439,6 +5816,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -5448,6 +5826,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5489,6 +5868,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5504,6 +5886,7 @@ export class Databases { attributeLongtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5528,6 +5911,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createMediumtextColumn` instead. @@ -5540,6 +5924,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a mediumtext attribute. @@ -5552,6 +5937,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5564,6 +5950,7 @@ export class Databases { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createMediumtextAttribute( paramsOrFirst: @@ -5575,6 +5962,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -5584,6 +5972,7 @@ export class Databases { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -5594,6 +5983,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -5609,6 +5999,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -5619,6 +6010,7 @@ export class Databases { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -5629,6 +6021,7 @@ export class Databases { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5670,6 +6063,9 @@ export class Databases { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5685,6 +6081,7 @@ export class Databases { attributeMediumtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5708,6 +6105,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateMediumtextColumn` instead. @@ -5719,6 +6117,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a mediumtext attribute. Changing the `default` value will not update already existing documents. @@ -5730,6 +6129,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5741,6 +6141,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateMediumtextAttribute( paramsOrFirst: @@ -5751,6 +6152,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5759,6 +6161,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5768,6 +6171,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5782,6 +6186,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5791,6 +6196,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -5800,6 +6206,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5841,6 +6248,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5856,6 +6266,7 @@ export class Databases { attributeMediumtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5877,6 +6288,7 @@ export class Databases { * @param {string} params.key - Attribute Key. * @param {boolean} params.required - Is attribute required? * @param {number[] | null} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPointColumn` instead. @@ -5887,6 +6299,7 @@ export class Databases { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }): Promise; /** * Create a geometric point attribute. @@ -5896,6 +6309,7 @@ export class Databases { * @param {string} key - Attribute Key. * @param {boolean} required - Is attribute required? * @param {number[] | null} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5906,6 +6320,7 @@ export class Databases { key: string, required: boolean, xdefault?: number[] | null, + description?: string, ): Promise; createPointAttribute( paramsOrFirst: @@ -5915,9 +6330,10 @@ export class Databases { key: string; required: boolean; xdefault?: number[] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (number[] | null)?] + ...rest: [string?, string?, boolean?, (number[] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -5925,6 +6341,7 @@ export class Databases { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }; if ( @@ -5938,6 +6355,7 @@ export class Databases { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }; } else { params = { @@ -5946,6 +6364,7 @@ export class Databases { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as number[] | null, + description: rest[4] as string, }; } @@ -5954,6 +6373,7 @@ export class Databases { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5989,6 +6409,9 @@ export class Databases { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6004,6 +6427,7 @@ export class Databases { attributePoint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6026,6 +6450,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {number[] | null} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. * @param {string | null} params.newKey - New attribute key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePointColumn` instead. @@ -6037,6 +6462,7 @@ export class Databases { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a point attribute. Changing the `default` value will not update already existing documents. @@ -6047,6 +6473,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {number[] | null} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. * @param {string | null} newKey - New attribute key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6058,6 +6485,7 @@ export class Databases { required: boolean, xdefault?: number[] | null, newKey?: string | null, + description?: string | null, ): Promise; updatePointAttribute( paramsOrFirst: @@ -6068,6 +6496,7 @@ export class Databases { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -6076,6 +6505,7 @@ export class Databases { boolean?, (number[] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -6085,6 +6515,7 @@ export class Databases { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -6099,6 +6530,7 @@ export class Databases { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6108,6 +6540,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as number[] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -6117,6 +6550,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6153,6 +6587,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6168,6 +6605,7 @@ export class Databases { attributePoint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6189,6 +6627,7 @@ export class Databases { * @param {string} params.key - Attribute Key. * @param {boolean} params.required - Is attribute required? * @param {any[][] | null} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPolygonColumn` instead. @@ -6199,6 +6638,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }): Promise; /** * Create a geometric polygon attribute. @@ -6208,6 +6648,7 @@ export class Databases { * @param {string} key - Attribute Key. * @param {boolean} required - Is attribute required? * @param {any[][] | null} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6218,6 +6659,7 @@ export class Databases { key: string, required: boolean, xdefault?: any[][] | null, + description?: string, ): Promise; createPolygonAttribute( paramsOrFirst: @@ -6227,9 +6669,10 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (any[][] | null)?] + ...rest: [string?, string?, boolean?, (any[][] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -6237,6 +6680,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; if ( @@ -6250,6 +6694,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; } else { params = { @@ -6258,6 +6703,7 @@ export class Databases { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, + description: rest[4] as string, }; } @@ -6266,6 +6712,7 @@ export class Databases { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6301,6 +6748,9 @@ export class Databases { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6316,6 +6766,7 @@ export class Databases { attributePolygon: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6338,6 +6789,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {any[][] | null} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. * @param {string | null} params.newKey - New attribute key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePolygonColumn` instead. @@ -6349,6 +6801,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a polygon attribute. Changing the `default` value will not update already existing documents. @@ -6359,6 +6812,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {any[][] | null} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. * @param {string | null} newKey - New attribute key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6370,6 +6824,7 @@ export class Databases { required: boolean, xdefault?: any[][] | null, newKey?: string | null, + description?: string | null, ): Promise; updatePolygonAttribute( paramsOrFirst: @@ -6380,6 +6835,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -6388,6 +6844,7 @@ export class Databases { boolean?, (any[][] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -6397,6 +6854,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -6411,6 +6869,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6420,6 +6879,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -6429,6 +6889,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6465,6 +6926,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6480,6 +6944,7 @@ export class Databases { attributePolygon: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6505,6 +6970,7 @@ export class Databases { * @param {string | null} params.key - Attribute Key. * @param {string | null} params.twoWayKey - Two Way Attribute Key. * @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRelationshipColumn` instead. @@ -6518,6 +6984,7 @@ export class Databases { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }): Promise; /** * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). @@ -6531,6 +6998,7 @@ export class Databases { * @param {string | null} key - Attribute Key. * @param {string | null} twoWayKey - Two Way Attribute Key. * @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6544,6 +7012,7 @@ export class Databases { key?: string | null, twoWayKey?: string | null, onDelete?: RelationMutate, + description?: string, ): Promise; createRelationshipAttribute( paramsOrFirst: @@ -6556,6 +7025,7 @@ export class Databases { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; } | string, ...rest: [ @@ -6566,6 +7036,7 @@ export class Databases { (string | null)?, (string | null)?, RelationMutate?, + string?, ] ): Promise { let params: { @@ -6577,6 +7048,7 @@ export class Databases { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }; if ( @@ -6593,6 +7065,7 @@ export class Databases { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }; } else { params = { @@ -6604,6 +7077,7 @@ export class Databases { key: rest[4] as string | null, twoWayKey: rest[5] as string | null, onDelete: rest[6] as RelationMutate, + description: rest[7] as string, }; } @@ -6615,6 +7089,7 @@ export class Databases { const key = params.key; const twoWayKey = params.twoWayKey; const onDelete = params.onDelete; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6659,6 +7134,9 @@ export class Databases { if (typeof onDelete !== 'undefined') { apiPayload['onDelete'] = onDelete; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6674,6 +7152,7 @@ export class Databases { attributeRelationship: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6701,6 +7180,7 @@ export class Databases { * @param {string} params.key - Attribute Key. * @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead. @@ -6711,6 +7191,7 @@ export class Databases { key: string; onDelete?: RelationMutate; newKey?: string | null; + description?: string | null; }): Promise; /** * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). @@ -6721,6 +7202,7 @@ export class Databases { * @param {string} key - Attribute Key. * @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6731,6 +7213,7 @@ export class Databases { key: string, onDelete?: RelationMutate, newKey?: string | null, + description?: string | null, ): Promise; updateRelationshipAttribute( paramsOrFirst: @@ -6740,9 +7223,16 @@ export class Databases { key: string; onDelete?: RelationMutate; newKey?: string | null; + description?: string | null; } | string, - ...rest: [string?, string?, RelationMutate?, (string | null)?] + ...rest: [ + string?, + string?, + RelationMutate?, + (string | null)?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; @@ -6750,6 +7240,7 @@ export class Databases { key: string; onDelete?: RelationMutate; newKey?: string | null; + description?: string | null; }; if ( @@ -6763,6 +7254,7 @@ export class Databases { key: string; onDelete?: RelationMutate; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6771,6 +7263,7 @@ export class Databases { key: rest[1] as string, onDelete: rest[2] as RelationMutate, newKey: rest[3] as string | null, + description: rest[4] as string | null, }; } @@ -6779,6 +7272,7 @@ export class Databases { const key = params.key; const onDelete = params.onDelete; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6807,6 +7301,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6822,6 +7319,7 @@ export class Databases { attributeRelationship: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6852,6 +7350,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead. @@ -6865,6 +7364,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a string attribute. @@ -6878,6 +7378,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6891,6 +7392,7 @@ export class Databases { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createStringAttribute( paramsOrFirst: @@ -6903,6 +7405,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -6913,6 +7416,7 @@ export class Databases { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -6924,6 +7428,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -6940,6 +7445,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -6951,6 +7457,7 @@ export class Databases { xdefault: rest[4] as string | null, array: rest[5] as boolean, encrypt: rest[6] as boolean, + description: rest[7] as string, }; } @@ -6962,6 +7469,7 @@ export class Databases { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7009,6 +7517,9 @@ export class Databases { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7024,6 +7535,7 @@ export class Databases { attributeString: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7049,6 +7561,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {number | null} params.size - Maximum size of the string attribute. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateStringColumn` instead. @@ -7061,6 +7574,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a string attribute. Changing the `default` value will not update already existing documents. @@ -7073,6 +7587,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {number | null} size - Maximum size of the string attribute. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7085,6 +7600,7 @@ export class Databases { xdefault?: string | null, size?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateStringAttribute( paramsOrFirst: @@ -7096,6 +7612,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -7105,6 +7622,7 @@ export class Databases { (string | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -7115,6 +7633,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7130,6 +7649,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7140,6 +7660,7 @@ export class Databases { xdefault: rest[3] as string | null, size: rest[4] as number | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -7150,6 +7671,7 @@ export class Databases { const xdefault = params.xdefault; const size = params.size; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7194,6 +7716,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7209,6 +7734,7 @@ export class Databases { attributeString: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7234,6 +7760,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTextColumn` instead. @@ -7246,6 +7773,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a text attribute. @@ -7258,6 +7786,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7270,6 +7799,7 @@ export class Databases { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createTextAttribute( paramsOrFirst: @@ -7281,6 +7811,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -7290,6 +7821,7 @@ export class Databases { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -7300,6 +7832,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -7315,6 +7848,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -7325,6 +7859,7 @@ export class Databases { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -7335,6 +7870,7 @@ export class Databases { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7376,6 +7912,9 @@ export class Databases { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7391,6 +7930,7 @@ export class Databases { attributeText: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7414,6 +7954,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTextColumn` instead. @@ -7425,6 +7966,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a text attribute. Changing the `default` value will not update already existing documents. @@ -7436,6 +7978,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7447,6 +7990,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateTextAttribute( paramsOrFirst: @@ -7457,6 +8001,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -7465,6 +8010,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -7474,6 +8020,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7488,6 +8035,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7497,6 +8045,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -7506,6 +8055,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7547,6 +8097,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7562,6 +8115,7 @@ export class Databases { attributeText: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7585,6 +8139,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createUrlColumn` instead. @@ -7596,6 +8151,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create a URL attribute. @@ -7607,6 +8163,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7618,6 +8175,7 @@ export class Databases { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createUrlAttribute( paramsOrFirst: @@ -7628,9 +8186,17 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -7639,6 +8205,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -7653,6 +8220,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -7662,6 +8230,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -7671,6 +8240,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7709,6 +8279,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7724,6 +8297,7 @@ export class Databases { attributeUrl: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7748,6 +8322,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateUrlColumn` instead. @@ -7759,6 +8334,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an url attribute. Changing the `default` value will not update already existing documents. @@ -7770,6 +8346,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7781,6 +8358,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateUrlAttribute( paramsOrFirst: @@ -7791,6 +8369,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -7799,6 +8378,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -7808,6 +8388,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7822,6 +8403,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7831,6 +8413,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -7840,6 +8423,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7881,6 +8465,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7896,6 +8483,7 @@ export class Databases { attributeUrl: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7922,6 +8510,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createVarcharColumn` instead. @@ -7935,6 +8524,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a varchar attribute. @@ -7948,6 +8538,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7961,6 +8552,7 @@ export class Databases { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createVarcharAttribute( paramsOrFirst: @@ -7973,6 +8565,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -7983,6 +8576,7 @@ export class Databases { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -7994,6 +8588,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -8010,6 +8605,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -8021,6 +8617,7 @@ export class Databases { xdefault: rest[4] as string | null, array: rest[5] as boolean, encrypt: rest[6] as boolean, + description: rest[7] as string, }; } @@ -8032,6 +8629,7 @@ export class Databases { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8079,6 +8677,9 @@ export class Databases { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8094,6 +8695,7 @@ export class Databases { attributeVarchar: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8119,6 +8721,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {number | null} params.size - Maximum size of the varchar attribute. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateVarcharColumn` instead. @@ -8131,6 +8734,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a varchar attribute. Changing the `default` value will not update already existing documents. @@ -8143,6 +8747,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {number | null} size - Maximum size of the varchar attribute. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8155,6 +8760,7 @@ export class Databases { xdefault?: string | null, size?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateVarcharAttribute( paramsOrFirst: @@ -8166,6 +8772,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -8175,6 +8782,7 @@ export class Databases { (string | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -8185,6 +8793,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -8200,6 +8809,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -8210,6 +8820,7 @@ export class Databases { xdefault: rest[3] as string | null, size: rest[4] as number | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -8220,6 +8831,7 @@ export class Databases { const xdefault = params.xdefault; const size = params.size; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8264,6 +8876,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8279,6 +8894,7 @@ export class Databases { attributeVarchar: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8534,12 +9150,14 @@ export class Databases { /** * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. * + * Documents returned by aggregate, groupBy or distinct queries hold only the attributes they select, group or aggregate, typed as a document types them, with a joined attribute named by its join alias (`alias.attribute`). They have no `$id`, `$sequence`, `$createdAt`, `$updatedAt`, `$permissions`, `$databaseId` or `$collectionId` unless they select or group it, and neither does a right or full join document that no document of this collection matched. + * * @param {string} params.databaseId - Database ID. * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @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. * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction. * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. - * @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). + * @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. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). * @throws {AppwriteException} * @returns {Promise>} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead. @@ -8557,12 +9175,14 @@ export class Databases { /** * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. * + * Documents returned by aggregate, groupBy or distinct queries hold only the attributes they select, group or aggregate, typed as a document types them, with a joined attribute named by its join alias (`alias.attribute`). They have no `$id`, `$sequence`, `$createdAt`, `$updatedAt`, `$permissions`, `$databaseId` or `$collectionId` unless they select or group it, and neither does a right or full join document that no document of this collection matched. + * * @param {string} databaseId - Database ID. * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @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. * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction. * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. - * @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). + * @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. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. @@ -9476,6 +10096,174 @@ export class Databases { return request.then((response) => applyDefaults(response, defaults)); } + /** + * Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @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. + * @param {string | null} params.transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @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. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createQuery` instead. + */ + createQuery< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }): Promise>; + /** + * Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @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. + * @param {string | null} transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @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. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createQuery( + databaseId: string, + collectionId: string, + queries?: string[], + transactionId?: string | null, + total?: boolean, + ttl?: number, + ): Promise>; + createQuery( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + } + | string, + ...rest: [string?, string[]?, (string | null)?, boolean?, number?] + ): Promise> { + let params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + queries: rest[1] as string[], + transactionId: rest[2] as string | null, + total: rest[3] as boolean, + ttl: rest[4] as number, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const queries = params.queries; + const transactionId = params.transactionId; + const total = params.total; + const ttl = params.ttl; + if (typeof databaseId === 'undefined' || databaseId === '') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined' || collectionId === '') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + const apiPath = + '/databases/{databaseId}/collections/{collectionId}/documents/query' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); + const apiPayload: Payload = {}; + if (typeof queries !== 'undefined') { + apiPayload['queries'] = queries; + } + if (typeof transactionId !== 'undefined') { + apiPayload['transactionId'] = transactionId; + } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } + if (typeof ttl !== 'undefined') { + apiPayload['ttl'] = ttl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + const request = this.client.call('post', uri, apiHeaders, apiPayload); + const defaults = { + root: 'documentList', + models: { + documentList: { + defaults: { + total: 0, + documents: [], + }, + properties: { + documents: { + items: 'document', + }, + }, + }, + document: { + defaults: { + $id: '', + $sequence: '', + $collectionId: '', + $databaseId: '', + $createdAt: '', + $updatedAt: '', + $permissions: [], + }, + }, + }, + }; + + return request.then((response) => applyDefaults(response, defaults)); + } + /** * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. * @@ -10613,6 +11401,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -10636,6 +11425,7 @@ export class Databases { * @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} params.orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} params.lengths - Length of index. Maximum of 100 + * @param {string} params.description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIndex` instead. @@ -10648,6 +11438,7 @@ export class Databases { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }): Promise; /** * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. @@ -10660,6 +11451,7 @@ export class Databases { * @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} lengths - Length of index. Maximum of 100 + * @param {string} description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -10672,6 +11464,7 @@ export class Databases { attributes: string[], orders?: OrderBy[], lengths?: number[], + description?: string, ): Promise; createIndex( paramsOrFirst: @@ -10683,6 +11476,7 @@ export class Databases { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; } | string, ...rest: [ @@ -10692,6 +11486,7 @@ export class Databases { string[]?, OrderBy[]?, number[]?, + string?, ] ): Promise { let params: { @@ -10702,6 +11497,7 @@ export class Databases { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; if ( @@ -10717,6 +11513,7 @@ export class Databases { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; } else { params = { @@ -10727,6 +11524,7 @@ export class Databases { attributes: rest[3] as string[], orders: rest[4] as OrderBy[], lengths: rest[5] as number[], + description: rest[6] as string, }; } @@ -10737,6 +11535,7 @@ export class Databases { const attributes = params.attributes; const orders = params.orders; const lengths = params.lengths; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -10781,6 +11580,9 @@ export class Databases { if (typeof lengths !== 'undefined') { apiPayload['lengths'] = lengths; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -10799,6 +11601,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -10908,6 +11711,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], diff --git a/src/services/documents-db.ts b/src/services/documents-db.ts index 8d1f7f6..8a7a39b 100644 --- a/src/services/documents-db.ts +++ b/src/services/documents-db.ts @@ -96,6 +96,7 @@ export class DocumentsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -149,6 +150,7 @@ export class DocumentsDB { * @param {string} params.databaseId - Unique 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. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string} params.description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -159,6 +161,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -170,6 +173,7 @@ export class DocumentsDB { * @param {string} databaseId - Unique 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. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string} description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -181,6 +185,7 @@ export class DocumentsDB { databaseId: string, name: string, enabled?: boolean, + description?: string, specification?: string, replicas?: number, syncMode?: string | null, @@ -191,17 +196,26 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; } | string, - ...rest: [string?, boolean?, string?, number?, (string | null)?] + ...rest: [ + string?, + boolean?, + string?, + string?, + number?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -216,6 +230,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -225,15 +240,17 @@ export class DocumentsDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string, - replicas: rest[3] as number, - syncMode: rest[4] as string | null, + description: rest[2] as string, + specification: rest[3] as string, + replicas: rest[4] as number, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -256,6 +273,9 @@ export class DocumentsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -281,6 +301,7 @@ export class DocumentsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -934,6 +955,7 @@ export class DocumentsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -986,6 +1008,7 @@ export class DocumentsDB { * @param {string} params.databaseId - Database ID. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string | null} params.description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -996,6 +1019,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1006,6 +1030,7 @@ export class DocumentsDB { * @param {string} databaseId - Database ID. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string | null} description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -1017,6 +1042,7 @@ export class DocumentsDB { databaseId: string, name: string, enabled?: boolean, + description?: string | null, specification?: string | null, replicas?: number | null, syncMode?: string | null, @@ -1027,6 +1053,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1036,6 +1063,7 @@ export class DocumentsDB { string?, boolean?, (string | null)?, + (string | null)?, (number | null)?, (string | null)?, ] @@ -1044,6 +1072,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1058,6 +1087,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1067,15 +1097,17 @@ export class DocumentsDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string | null, - replicas: rest[3] as number | null, - syncMode: rest[4] as string | null, + description: rest[2] as string | null, + specification: rest[3] as string | null, + replicas: rest[4] as number | null, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -1098,6 +1130,9 @@ export class DocumentsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -1123,6 +1158,7 @@ export class DocumentsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -1347,6 +1383,7 @@ export class DocumentsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1366,6 +1403,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1389,6 +1427,7 @@ export class DocumentsDB { * @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. * @param {object[]} params.attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} */ @@ -1401,6 +1440,7 @@ export class DocumentsDB { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }): Promise; /** * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. @@ -1413,6 +1453,7 @@ export class DocumentsDB { * @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. * @param {object[]} attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1426,6 +1467,7 @@ export class DocumentsDB { enabled?: boolean, attributes?: object[], indexes?: object[], + description?: string, ): Promise; createCollection( paramsOrFirst: @@ -1438,6 +1480,7 @@ export class DocumentsDB { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; } | string, ...rest: [ @@ -1448,6 +1491,7 @@ export class DocumentsDB { boolean?, object[]?, object[]?, + string?, ] ): Promise { let params: { @@ -1459,6 +1503,7 @@ export class DocumentsDB { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }; if ( @@ -1475,6 +1520,7 @@ export class DocumentsDB { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }; } else { params = { @@ -1486,6 +1532,7 @@ export class DocumentsDB { enabled: rest[4] as boolean, attributes: rest[5] as object[], indexes: rest[6] as object[], + description: rest[7] as string, }; } @@ -1497,6 +1544,7 @@ export class DocumentsDB { const enabled = params.enabled; const attributes = params.attributes; const indexes = params.indexes; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1536,6 +1584,9 @@ export class DocumentsDB { if (typeof indexes !== 'undefined') { apiPayload['indexes'] = indexes; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1556,6 +1607,7 @@ export class DocumentsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1575,6 +1627,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1672,6 +1725,7 @@ export class DocumentsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1691,6 +1745,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1713,6 +1768,7 @@ export class DocumentsDB { * @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). * @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. * @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. + * @param {string | null} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} */ @@ -1724,6 +1780,7 @@ export class DocumentsDB { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }): Promise; /** * Update a collection by its unique ID. @@ -1735,6 +1792,7 @@ export class DocumentsDB { * @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). * @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. * @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. + * @param {string | null} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1747,6 +1805,7 @@ export class DocumentsDB { documentSecurity?: boolean, enabled?: boolean, purge?: boolean, + description?: string | null, ): Promise; updateCollection( paramsOrFirst: @@ -1758,9 +1817,18 @@ export class DocumentsDB { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; } | string, - ...rest: [string?, string?, string[]?, boolean?, boolean?, boolean?] + ...rest: [ + string?, + string?, + string[]?, + boolean?, + boolean?, + boolean?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; @@ -1770,6 +1838,7 @@ export class DocumentsDB { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; if ( @@ -1785,6 +1854,7 @@ export class DocumentsDB { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; } else { params = { @@ -1795,6 +1865,7 @@ export class DocumentsDB { documentSecurity: rest[3] as boolean, enabled: rest[4] as boolean, purge: rest[5] as boolean, + description: rest[6] as string | null, }; } @@ -1805,6 +1876,7 @@ export class DocumentsDB { const documentSecurity = params.documentSecurity; const enabled = params.enabled; const purge = params.purge; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1840,6 +1912,9 @@ export class DocumentsDB { if (typeof purge !== 'undefined') { apiPayload['purge'] = purge; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1860,6 +1935,7 @@ export class DocumentsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1879,6 +1955,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -2904,6 +2981,173 @@ export class DocumentsDB { return request.then((response) => applyDefaults(response, defaults)); } + /** + * Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @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. + * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + */ + createQuery< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }): Promise>; + /** + * Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @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. + * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createQuery( + databaseId: string, + collectionId: string, + queries?: string[], + transactionId?: string, + total?: boolean, + ttl?: number, + ): Promise>; + createQuery( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + } + | string, + ...rest: [string?, string[]?, string?, boolean?, number?] + ): Promise> { + let params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + queries: rest[1] as string[], + transactionId: rest[2] as string, + total: rest[3] as boolean, + ttl: rest[4] as number, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const queries = params.queries; + const transactionId = params.transactionId; + const total = params.total; + const ttl = params.ttl; + if (typeof databaseId === 'undefined' || databaseId === '') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined' || collectionId === '') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + const apiPath = + '/documentsdb/{databaseId}/collections/{collectionId}/documents/query' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); + const apiPayload: Payload = {}; + if (typeof queries !== 'undefined') { + apiPayload['queries'] = queries; + } + if (typeof transactionId !== 'undefined') { + apiPayload['transactionId'] = transactionId; + } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } + if (typeof ttl !== 'undefined') { + apiPayload['ttl'] = ttl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + const request = this.client.call('post', uri, apiHeaders, apiPayload); + const defaults = { + root: 'documentList', + models: { + documentList: { + defaults: { + total: 0, + documents: [], + }, + properties: { + documents: { + items: 'document', + }, + }, + }, + document: { + defaults: { + $id: '', + $sequence: '', + $collectionId: '', + $databaseId: '', + $createdAt: '', + $updatedAt: '', + $permissions: [], + }, + }, + }, + }; + + return request.then((response) => applyDefaults(response, defaults)); + } + /** * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. * @@ -4020,6 +4264,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -4043,6 +4288,7 @@ export class DocumentsDB { * @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} params.orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} params.lengths - Length of index. Maximum of 100 + * @param {string} params.description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} */ @@ -4054,6 +4300,7 @@ export class DocumentsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }): Promise; /** * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. @@ -4066,6 +4313,7 @@ export class DocumentsDB { * @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} lengths - Length of index. Maximum of 100 + * @param {string} description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4078,6 +4326,7 @@ export class DocumentsDB { attributes: string[], orders?: OrderBy[], lengths?: number[], + description?: string, ): Promise; createIndex( paramsOrFirst: @@ -4089,6 +4338,7 @@ export class DocumentsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; } | string, ...rest: [ @@ -4098,6 +4348,7 @@ export class DocumentsDB { string[]?, OrderBy[]?, number[]?, + string?, ] ): Promise { let params: { @@ -4108,6 +4359,7 @@ export class DocumentsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; if ( @@ -4123,6 +4375,7 @@ export class DocumentsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; } else { params = { @@ -4133,6 +4386,7 @@ export class DocumentsDB { attributes: rest[3] as string[], orders: rest[4] as OrderBy[], lengths: rest[5] as number[], + description: rest[6] as string, }; } @@ -4143,6 +4397,7 @@ export class DocumentsDB { const attributes = params.attributes; const orders = params.orders; const lengths = params.lengths; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4187,6 +4442,9 @@ export class DocumentsDB { if (typeof lengths !== 'undefined') { apiPayload['lengths'] = lengths; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4205,6 +4463,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -4313,6 +4572,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], diff --git a/src/services/domains.ts b/src/services/domains.ts index 12834f0..696f81e 100644 --- a/src/services/domains.ts +++ b/src/services/domains.ts @@ -19,28 +19,36 @@ export class Domains { * * @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 attributes such as domain name, teamInternalId, expiration, etc. * @param {string} params.search - Search term to filter your list results. Max length: 256 chars. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ list(params?: { queries?: string[]; search?: string; + total?: boolean; }): Promise; /** * List all domains registered for this project. This endpoint supports pagination. * * @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 attributes such as domain name, teamInternalId, expiration, etc. * @param {string} search - Search term to filter your list results. Max length: 256 chars. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - list(queries?: string[], search?: string): Promise; list( - paramsOrFirst?: { queries?: string[]; search?: string } | string[], - ...rest: [string?] + queries?: string[], + search?: string, + total?: boolean, + ): Promise; + list( + paramsOrFirst?: + { queries?: string[]; search?: string; total?: boolean } | string[], + ...rest: [string?, boolean?] ): Promise { - let params: { queries?: string[]; search?: string }; + let params: { queries?: string[]; search?: string; total?: boolean }; if ( (typeof paramsOrFirst === 'undefined' && rest.length === 0) || @@ -51,16 +59,19 @@ export class Domains { params = (paramsOrFirst || {}) as { queries?: string[]; search?: string; + total?: boolean; }; } else { params = { queries: paramsOrFirst as string[], search: rest[0] as string, + total: rest[1] as boolean, }; } const queries = params.queries; const search = params.search; + const total = params.total; const apiPath = '/domains'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { @@ -69,6 +80,9 @@ export class Domains { if (typeof search !== 'undefined') { apiPayload['search'] = search; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1966,12 +1980,14 @@ export class Domains { * * @param {string} params.domainId - Domain unique ID. * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. You may filter on attributes such as type, name, value, etc. Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listRecords(params: { domainId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List DNS records for a given domain. You can use this endpoint to list all the DNS records @@ -1979,6 +1995,7 @@ export class Domains { * * @param {string} domainId - Domain unique ID. * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. You may filter on attributes such as type, name, value, etc. Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1986,12 +2003,14 @@ export class Domains { listRecords( domainId: string, queries?: string[], + total?: boolean, ): Promise; listRecords( - paramsOrFirst: { domainId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + { domainId: string; queries?: string[]; total?: boolean } | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { domainId: string; queries?: string[] }; + let params: { domainId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -2001,16 +2020,19 @@ export class Domains { params = (paramsOrFirst || {}) as { domainId: string; queries?: string[]; + total?: boolean; }; } else { params = { domainId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const domainId = params.domainId; const queries = params.queries; + const total = params.total; if (typeof domainId === 'undefined' || domainId === '') { throw new AppwriteException( 'Missing required parameter: "domainId"', @@ -2024,6 +2046,9 @@ export class Domains { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/functions.ts b/src/services/functions.ts index 75e54d4..ecbe01c 100644 --- a/src/services/functions.ts +++ b/src/services/functions.ts @@ -119,6 +119,7 @@ export class Functions { $updatedAt: '', execute: [], name: '', + description: '', enabled: true, live: true, logging: true, @@ -160,6 +161,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -198,6 +200,7 @@ export class Functions { * @param {string} params.runtimeSpecification - Runtime specification for the function executions. * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {number} params.interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. + * @param {string} params.description - Optional description for the function. * @throws {AppwriteException} * @returns {Promise} */ @@ -225,6 +228,7 @@ export class Functions { runtimeSpecification?: string; deploymentRetention?: number; interval?: number; + description?: string; }): Promise; /** * Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API. @@ -252,6 +256,7 @@ export class Functions { * @param {string} runtimeSpecification - Runtime specification for the function executions. * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {number} interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. + * @param {string} description - Optional description for the function. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -280,6 +285,7 @@ export class Functions { runtimeSpecification?: string, deploymentRetention?: number, interval?: number, + description?: string, ): Promise; create( paramsOrFirst: @@ -307,6 +313,7 @@ export class Functions { runtimeSpecification?: string; deploymentRetention?: number; interval?: number; + description?: string; } | string, ...rest: [ @@ -332,6 +339,7 @@ export class Functions { string?, number?, number?, + string?, ] ): Promise { let params: { @@ -358,6 +366,7 @@ export class Functions { runtimeSpecification?: string; deploymentRetention?: number; interval?: number; + description?: string; }; if ( @@ -389,6 +398,7 @@ export class Functions { runtimeSpecification?: string; deploymentRetention?: number; interval?: number; + description?: string; }; } else { params = { @@ -415,6 +425,7 @@ export class Functions { runtimeSpecification: rest[19] as string, deploymentRetention: rest[20] as number, interval: rest[21] as number, + description: rest[22] as string, }; } @@ -441,6 +452,7 @@ export class Functions { const runtimeSpecification = params.runtimeSpecification; const deploymentRetention = params.deploymentRetention; const interval = params.interval; + const description = params.description; if (typeof functionId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "functionId"', @@ -525,6 +537,9 @@ export class Functions { if (typeof interval !== 'undefined') { apiPayload['interval'] = interval; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -544,6 +559,7 @@ export class Functions { $updatedAt: '', execute: [], name: '', + description: '', enabled: true, live: true, logging: true, @@ -585,6 +601,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -835,6 +852,7 @@ export class Functions { $updatedAt: '', execute: [], name: '', + description: '', enabled: true, live: true, logging: true, @@ -876,6 +894,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -914,6 +933,7 @@ export class Functions { * @param {string | null} params.runtimeSpecification - Runtime specification for the function executions. * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {number | null} params.interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. When omitted, the current interval is kept unless schedule is set. + * @param {string | null} params.description - Optional description for the function. * @param {boolean | null} params.emailEnabled - Enable inbound email triggering for this function. When false or omitted on create, SMTP recipients are rejected. Opt-in; default is off. * @throws {AppwriteException} * @returns {Promise} @@ -942,6 +962,7 @@ export class Functions { runtimeSpecification?: string | null; deploymentRetention?: number; interval?: number | null; + description?: string | null; emailEnabled?: boolean | null; }): Promise; /** @@ -970,6 +991,7 @@ export class Functions { * @param {string | null} runtimeSpecification - Runtime specification for the function executions. * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {number | null} interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. When omitted, the current interval is kept unless schedule is set. + * @param {string | null} description - Optional description for the function. * @param {boolean | null} emailEnabled - Enable inbound email triggering for this function. When false or omitted on create, SMTP recipients are rejected. Opt-in; default is off. * @throws {AppwriteException} * @returns {Promise} @@ -999,6 +1021,7 @@ export class Functions { runtimeSpecification?: string | null, deploymentRetention?: number, interval?: number | null, + description?: string | null, emailEnabled?: boolean | null, ): Promise; update( @@ -1027,6 +1050,7 @@ export class Functions { runtimeSpecification?: string | null; deploymentRetention?: number; interval?: number | null; + description?: string | null; emailEnabled?: boolean | null; } | string, @@ -1053,6 +1077,7 @@ export class Functions { (string | null)?, number?, (number | null)?, + (string | null)?, (boolean | null)?, ] ): Promise { @@ -1080,6 +1105,7 @@ export class Functions { runtimeSpecification?: string | null; deploymentRetention?: number; interval?: number | null; + description?: string | null; emailEnabled?: boolean | null; }; @@ -1112,6 +1138,7 @@ export class Functions { runtimeSpecification?: string | null; deploymentRetention?: number; interval?: number | null; + description?: string | null; emailEnabled?: boolean | null; }; } else { @@ -1139,7 +1166,8 @@ export class Functions { runtimeSpecification: rest[19] as string | null, deploymentRetention: rest[20] as number, interval: rest[21] as number | null, - emailEnabled: rest[22] as boolean | null, + description: rest[22] as string | null, + emailEnabled: rest[23] as boolean | null, }; } @@ -1166,6 +1194,7 @@ export class Functions { const runtimeSpecification = params.runtimeSpecification; const deploymentRetention = params.deploymentRetention; const interval = params.interval; + const description = params.description; const emailEnabled = params.emailEnabled; if (typeof functionId === 'undefined' || functionId === '') { throw new AppwriteException( @@ -1246,6 +1275,9 @@ export class Functions { if (typeof interval !== 'undefined') { apiPayload['interval'] = interval; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof emailEnabled !== 'undefined') { apiPayload['emailEnabled'] = emailEnabled; } @@ -1268,6 +1300,7 @@ export class Functions { $updatedAt: '', execute: [], name: '', + description: '', enabled: true, live: true, logging: true, @@ -1309,6 +1342,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -1461,6 +1495,7 @@ export class Functions { $updatedAt: '', execute: [], name: '', + description: '', enabled: true, live: true, logging: true, @@ -1502,6 +1537,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3343,6 +3379,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3363,6 +3400,7 @@ export class Functions { * @param {string} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} params.value - Variable value. Max length: 8192 chars. * @param {boolean} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime. + * @param {string} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -3372,6 +3410,7 @@ export class Functions { key: string; value: string; secret?: boolean; + description?: string; }): Promise; /** * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables. @@ -3381,6 +3420,7 @@ export class Functions { * @param {string} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} value - Variable value. Max length: 8192 chars. * @param {boolean} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime. + * @param {string} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3391,6 +3431,7 @@ export class Functions { key: string, value: string, secret?: boolean, + description?: string, ): Promise; createVariable( paramsOrFirst: @@ -3400,9 +3441,10 @@ export class Functions { key: string; value: string; secret?: boolean; + description?: string; } | string, - ...rest: [string?, string?, string?, boolean?] + ...rest: [string?, string?, string?, boolean?, string?] ): Promise { let params: { functionId: string; @@ -3410,6 +3452,7 @@ export class Functions { key: string; value: string; secret?: boolean; + description?: string; }; if ( @@ -3423,6 +3466,7 @@ export class Functions { key: string; value: string; secret?: boolean; + description?: string; }; } else { params = { @@ -3431,6 +3475,7 @@ export class Functions { key: rest[1] as string, value: rest[2] as string, secret: rest[3] as boolean, + description: rest[4] as string, }; } @@ -3439,6 +3484,7 @@ export class Functions { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof functionId === 'undefined' || functionId === '') { throw new AppwriteException( 'Missing required parameter: "functionId"', @@ -3472,6 +3518,9 @@ export class Functions { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3490,6 +3539,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3582,6 +3632,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3602,6 +3653,7 @@ export class Functions { * @param {string | null} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} params.value - Variable value. Max length: 8192 chars. * @param {boolean | null} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime. + * @param {string | null} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -3611,6 +3663,7 @@ export class Functions { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }): Promise; /** * Update variable by its unique ID. @@ -3620,6 +3673,7 @@ export class Functions { * @param {string | null} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} value - Variable value. Max length: 8192 chars. * @param {boolean | null} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime. + * @param {string | null} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3630,6 +3684,7 @@ export class Functions { key?: string | null, value?: string | null, secret?: boolean | null, + description?: string | null, ): Promise; updateVariable( paramsOrFirst: @@ -3639,6 +3694,7 @@ export class Functions { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; } | string, ...rest: [ @@ -3646,6 +3702,7 @@ export class Functions { (string | null)?, (string | null)?, (boolean | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3654,6 +3711,7 @@ export class Functions { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; if ( @@ -3667,6 +3725,7 @@ export class Functions { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; } else { params = { @@ -3675,6 +3734,7 @@ export class Functions { key: rest[1] as string | null, value: rest[2] as string | null, secret: rest[3] as boolean | null, + description: rest[4] as string | null, }; } @@ -3683,6 +3743,7 @@ export class Functions { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof functionId === 'undefined' || functionId === '') { throw new AppwriteException( 'Missing required parameter: "functionId"', @@ -3706,6 +3767,9 @@ export class Functions { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3724,6 +3788,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', diff --git a/src/services/messaging.ts b/src/services/messaging.ts index 4ea6d8c..7532156 100644 --- a/src/services/messaging.ts +++ b/src/services/messaging.ts @@ -143,6 +143,7 @@ export class Messaging { * @param {string | null} 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. * @param {string} params.replyToEmail - Email address to reply to. If not set, defaults to the sender email address. * @param {string} params.replyToName - Name of the reply to recipient. If not set, defaults to the sender name. + * @param {string[]} params.emails - List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Appwrite user, target, or topic. * @throws {AppwriteException} * @returns {Promise} */ @@ -161,6 +162,7 @@ export class Messaging { scheduledAt?: string | null; replyToEmail?: string; replyToName?: string; + emails?: string[]; }): Promise; /** * Create a new email message. @@ -179,6 +181,7 @@ export class Messaging { * @param {string | null} 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. * @param {string} replyToEmail - Email address to reply to. If not set, defaults to the sender email address. * @param {string} replyToName - Name of the reply to recipient. If not set, defaults to the sender name. + * @param {string[]} emails - List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Appwrite user, target, or topic. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -198,6 +201,7 @@ export class Messaging { scheduledAt?: string | null, replyToEmail?: string, replyToName?: string, + emails?: string[], ): Promise; createEmail( paramsOrFirst: @@ -216,6 +220,7 @@ export class Messaging { scheduledAt?: string | null; replyToEmail?: string; replyToName?: string; + emails?: string[]; } | string, ...rest: [ @@ -232,6 +237,7 @@ export class Messaging { (string | null)?, string?, string?, + string[]?, ] ): Promise { let params: { @@ -249,6 +255,7 @@ export class Messaging { scheduledAt?: string | null; replyToEmail?: string; replyToName?: string; + emails?: string[]; }; if ( @@ -271,6 +278,7 @@ export class Messaging { scheduledAt?: string | null; replyToEmail?: string; replyToName?: string; + emails?: string[]; }; } else { params = { @@ -288,6 +296,7 @@ export class Messaging { scheduledAt: rest[10] as string | null, replyToEmail: rest[11] as string, replyToName: rest[12] as string, + emails: rest[13] as string[], }; } @@ -305,6 +314,7 @@ export class Messaging { const scheduledAt = params.scheduledAt; const replyToEmail = params.replyToEmail; const replyToName = params.replyToName; + const emails = params.emails; if (typeof messageId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "messageId"', @@ -364,6 +374,9 @@ export class Messaging { if (typeof replyToName !== 'undefined') { apiPayload['replyToName'] = replyToName; } + if (typeof emails !== 'undefined') { + apiPayload['emails'] = emails; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -414,6 +427,7 @@ export class Messaging { * @param {string[] | null} params.attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :. * @param {string | null} params.replyToEmail - Email address to reply to. Pass an empty string to restore the provider or sender default. * @param {string | null} params.replyToName - Name of the reply to recipient. Pass an empty string to restore the provider or sender default. + * @param {string[] | null} params.emails - List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Appwrite user, target, or topic. * @throws {AppwriteException} * @returns {Promise} */ @@ -432,6 +446,7 @@ export class Messaging { attachments?: string[] | null; replyToEmail?: string | null; replyToName?: string | null; + emails?: string[] | null; }): Promise; /** * 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. @@ -451,6 +466,7 @@ export class Messaging { * @param {string[] | null} attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :. * @param {string | null} replyToEmail - Email address to reply to. Pass an empty string to restore the provider or sender default. * @param {string | null} replyToName - Name of the reply to recipient. Pass an empty string to restore the provider or sender default. + * @param {string[] | null} emails - List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Appwrite user, target, or topic. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -470,6 +486,7 @@ export class Messaging { attachments?: string[] | null, replyToEmail?: string | null, replyToName?: string | null, + emails?: string[] | null, ): Promise; updateEmail( paramsOrFirst: @@ -488,6 +505,7 @@ export class Messaging { attachments?: string[] | null; replyToEmail?: string | null; replyToName?: string | null; + emails?: string[] | null; } | string, ...rest: [ @@ -504,6 +522,7 @@ export class Messaging { (string[] | null)?, (string | null)?, (string | null)?, + (string[] | null)?, ] ): Promise { let params: { @@ -521,6 +540,7 @@ export class Messaging { attachments?: string[] | null; replyToEmail?: string | null; replyToName?: string | null; + emails?: string[] | null; }; if ( @@ -543,6 +563,7 @@ export class Messaging { attachments?: string[] | null; replyToEmail?: string | null; replyToName?: string | null; + emails?: string[] | null; }; } else { params = { @@ -560,6 +581,7 @@ export class Messaging { attachments: rest[10] as string[] | null, replyToEmail: rest[11] as string | null, replyToName: rest[12] as string | null, + emails: rest[13] as string[] | null, }; } @@ -577,6 +599,7 @@ export class Messaging { const attachments = params.attachments; const replyToEmail = params.replyToEmail; const replyToName = params.replyToName; + const emails = params.emails; if (typeof messageId === 'undefined' || messageId === '') { throw new AppwriteException( 'Missing required parameter: "messageId"', @@ -626,6 +649,9 @@ export class Messaging { if (typeof replyToName !== 'undefined') { apiPayload['replyToName'] = replyToName; } + if (typeof emails !== 'undefined') { + apiPayload['emails'] = emails; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8225,6 +8251,7 @@ export class Messaging { $createdAt: '', $updatedAt: '', name: '', + description: '', emailTotal: 0, smsTotal: 0, pushTotal: 0, @@ -8245,6 +8272,7 @@ export class Messaging { * @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. * @param {number | null} 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. * @param {number | null} params.expiry - Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project's enabled Appwrite providers, or the 7-day ledger window if none sets one. + * @param {string} params.description - Optional description for the topic. * @throws {AppwriteException} * @returns {Promise} */ @@ -8254,6 +8282,7 @@ export class Messaging { subscribe?: string[]; qos?: number | null; expiry?: number | null; + description?: string; }): Promise; /** * Create a new topic. @@ -8263,6 +8292,7 @@ export class Messaging { * @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. * @param {number | null} 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. * @param {number | null} expiry - Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project's enabled Appwrite providers, or the 7-day ledger window if none sets one. + * @param {string} description - Optional description for the topic. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8273,6 +8303,7 @@ export class Messaging { subscribe?: string[], qos?: number | null, expiry?: number | null, + description?: string, ): Promise; createTopic( paramsOrFirst: @@ -8282,9 +8313,16 @@ export class Messaging { subscribe?: string[]; qos?: number | null; expiry?: number | null; + description?: string; } | string, - ...rest: [string?, string[]?, (number | null)?, (number | null)?] + ...rest: [ + string?, + string[]?, + (number | null)?, + (number | null)?, + string?, + ] ): Promise { let params: { topicId: string; @@ -8292,6 +8330,7 @@ export class Messaging { subscribe?: string[]; qos?: number | null; expiry?: number | null; + description?: string; }; if ( @@ -8305,6 +8344,7 @@ export class Messaging { subscribe?: string[]; qos?: number | null; expiry?: number | null; + description?: string; }; } else { params = { @@ -8313,6 +8353,7 @@ export class Messaging { subscribe: rest[1] as string[], qos: rest[2] as number | null, expiry: rest[3] as number | null, + description: rest[4] as string, }; } @@ -8321,6 +8362,7 @@ export class Messaging { const subscribe = params.subscribe; const qos = params.qos; const expiry = params.expiry; + const description = params.description; if (typeof topicId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "topicId"', @@ -8346,6 +8388,9 @@ export class Messaging { if (typeof expiry !== 'undefined') { apiPayload['expiry'] = expiry; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8364,6 +8409,7 @@ export class Messaging { $createdAt: '', $updatedAt: '', name: '', + description: '', emailTotal: 0, smsTotal: 0, pushTotal: 0, @@ -8440,6 +8486,7 @@ export class Messaging { $createdAt: '', $updatedAt: '', name: '', + description: '', emailTotal: 0, smsTotal: 0, pushTotal: 0, @@ -8461,6 +8508,7 @@ export class Messaging { * @param {string[] | null} 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. * @param {number | null} 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. * @param {number | null} params.expiry - Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project's enabled Appwrite providers, or the 7-day ledger window if none sets one. + * @param {string | null} params.description - Optional description for the topic. * @throws {AppwriteException} * @returns {Promise} */ @@ -8470,6 +8518,7 @@ export class Messaging { subscribe?: string[] | null; qos?: number | null; expiry?: number | null; + description?: string | null; }): Promise; /** * Update a topic by its unique ID. @@ -8480,6 +8529,7 @@ export class Messaging { * @param {string[] | null} 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. * @param {number | null} 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. * @param {number | null} expiry - Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project's enabled Appwrite providers, or the 7-day ledger window if none sets one. + * @param {string | null} description - Optional description for the topic. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8490,6 +8540,7 @@ export class Messaging { subscribe?: string[] | null, qos?: number | null, expiry?: number | null, + description?: string | null, ): Promise; updateTopic( paramsOrFirst: @@ -8499,6 +8550,7 @@ export class Messaging { subscribe?: string[] | null; qos?: number | null; expiry?: number | null; + description?: string | null; } | string, ...rest: [ @@ -8506,6 +8558,7 @@ export class Messaging { (string[] | null)?, (number | null)?, (number | null)?, + (string | null)?, ] ): Promise { let params: { @@ -8514,6 +8567,7 @@ export class Messaging { subscribe?: string[] | null; qos?: number | null; expiry?: number | null; + description?: string | null; }; if ( @@ -8527,6 +8581,7 @@ export class Messaging { subscribe?: string[] | null; qos?: number | null; expiry?: number | null; + description?: string | null; }; } else { params = { @@ -8535,6 +8590,7 @@ export class Messaging { subscribe: rest[1] as string[] | null, qos: rest[2] as number | null, expiry: rest[3] as number | null, + description: rest[4] as string | null, }; } @@ -8543,6 +8599,7 @@ export class Messaging { const subscribe = params.subscribe; const qos = params.qos; const expiry = params.expiry; + const description = params.description; if (typeof topicId === 'undefined' || topicId === '') { throw new AppwriteException( 'Missing required parameter: "topicId"', @@ -8565,6 +8622,9 @@ export class Messaging { if (typeof expiry !== 'undefined') { apiPayload['expiry'] = expiry; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8583,6 +8643,7 @@ export class Messaging { $createdAt: '', $updatedAt: '', name: '', + description: '', emailTotal: 0, smsTotal: 0, pushTotal: 0, diff --git a/src/services/mongo.ts b/src/services/mongo.ts index 169782c..25e0b07 100644 --- a/src/services/mongo.ts +++ b/src/services/mongo.ts @@ -17,45 +17,60 @@ export class Mongo { * List all dedicated databases. Results support pagination. * * @param {string[]} params.queries - Array of query strings. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ list(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all dedicated databases. Results support pagination. * * @param {string[]} queries - Array of query strings. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - list(queries?: string[]): Promise; list( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + list( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/mongo'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1047,18 +1062,21 @@ export class Mongo { * * @param {string} params.databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackups(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List all backups for a dedicated database. Results can be filtered by status and type. * * @param {string} databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1066,12 +1084,15 @@ export class Mongo { listBackups( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackups( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1081,16 +1102,19 @@ export class Mongo { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1104,6 +1128,9 @@ export class Mongo { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1249,18 +1276,21 @@ export class Mongo { * * @param {string} params.databaseId - Database ID. * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackupPolicies(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List scheduled backup policies for a dedicated database. * * @param {string} databaseId - Database ID. * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1268,12 +1298,15 @@ export class Mongo { listBackupPolicies( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackupPolicies( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1283,16 +1316,19 @@ export class Mongo { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1306,6 +1342,9 @@ export class Mongo { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/mysql.ts b/src/services/mysql.ts index 13e7de1..3fd0d8e 100644 --- a/src/services/mysql.ts +++ b/src/services/mysql.ts @@ -17,45 +17,60 @@ export class Mysql { * List all dedicated databases. Results support pagination. * * @param {string[]} params.queries - Array of query strings. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ list(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all dedicated databases. Results support pagination. * * @param {string[]} queries - Array of query strings. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - list(queries?: string[]): Promise; list( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + list( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/mysql'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1047,18 +1062,21 @@ export class Mysql { * * @param {string} params.databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackups(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List all backups for a dedicated database. Results can be filtered by status and type. * * @param {string} databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1066,12 +1084,15 @@ export class Mysql { listBackups( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackups( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1081,16 +1102,19 @@ export class Mysql { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1104,6 +1128,9 @@ export class Mysql { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1249,18 +1276,21 @@ export class Mysql { * * @param {string} params.databaseId - Database ID. * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackupPolicies(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List scheduled backup policies for a dedicated database. * * @param {string} databaseId - Database ID. * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1268,12 +1298,15 @@ export class Mysql { listBackupPolicies( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackupPolicies( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1283,16 +1316,19 @@ export class Mysql { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1306,6 +1342,9 @@ export class Mysql { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/organization.ts b/src/services/organization.ts index 37dffa7..adca165 100644 --- a/src/services/organization.ts +++ b/src/services/organization.ts @@ -1848,6 +1848,7 @@ export class Organization { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -1974,6 +1975,7 @@ export class Organization { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -2062,6 +2064,7 @@ export class Organization { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -2083,6 +2086,7 @@ export class Organization { * @param {string} params.name - Key name. Max length: 128 chars. * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string | null} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. + * @param {string | null} params.description - Optional description for the key. * @throws {AppwriteException} * @returns {Promise} */ @@ -2092,6 +2096,7 @@ export class Organization { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }): Promise; /** * Update a project key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. @@ -2101,6 +2106,7 @@ export class Organization { * @param {string} name - Key name. Max length: 128 chars. * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string | null} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. + * @param {string | null} description - Optional description for the key. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2111,6 +2117,7 @@ export class Organization { name: string, scopes: ProjectKeyScopes[], expire?: string | null, + description?: string | null, ): Promise; updateProjectKey( paramsOrFirst: @@ -2120,9 +2127,16 @@ export class Organization { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; } | string, - ...rest: [string?, string?, ProjectKeyScopes[]?, (string | null)?] + ...rest: [ + string?, + string?, + ProjectKeyScopes[]?, + (string | null)?, + (string | null)?, + ] ): Promise { let params: { projectId: string; @@ -2130,6 +2144,7 @@ export class Organization { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }; if ( @@ -2143,6 +2158,7 @@ export class Organization { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }; } else { params = { @@ -2151,6 +2167,7 @@ export class Organization { name: rest[1] as string, scopes: rest[2] as ProjectKeyScopes[], expire: rest[3] as string | null, + description: rest[4] as string | null, }; } @@ -2159,6 +2176,7 @@ export class Organization { const name = params.name; const scopes = params.scopes; const expire = params.expire; + const description = params.description; if (typeof projectId === 'undefined' || projectId === '') { throw new AppwriteException( 'Missing required parameter: "projectId"', @@ -2186,6 +2204,9 @@ export class Organization { if (typeof expire !== 'undefined') { apiPayload['expire'] = expire; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2204,6 +2225,7 @@ export class Organization { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', diff --git a/src/services/postgresql.ts b/src/services/postgresql.ts index aafaf2d..af7490f 100644 --- a/src/services/postgresql.ts +++ b/src/services/postgresql.ts @@ -17,45 +17,60 @@ export class Postgresql { * List all dedicated databases. Results support pagination. * * @param {string[]} params.queries - Array of query strings. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ list(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all dedicated databases. Results support pagination. * * @param {string[]} queries - Array of query strings. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - list(queries?: string[]): Promise; list( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + list( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/postgresql'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1047,18 +1062,21 @@ export class Postgresql { * * @param {string} params.databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackups(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List all backups for a dedicated database. Results can be filtered by status and type. * * @param {string} databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1066,12 +1084,15 @@ export class Postgresql { listBackups( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackups( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1081,16 +1102,19 @@ export class Postgresql { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1104,6 +1128,9 @@ export class Postgresql { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1249,18 +1276,21 @@ export class Postgresql { * * @param {string} params.databaseId - Database ID. * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackupPolicies(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List scheduled backup policies for a dedicated database. * * @param {string} databaseId - Database ID. * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1268,12 +1298,15 @@ export class Postgresql { listBackupPolicies( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackupPolicies( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1283,16 +1316,19 @@ export class Postgresql { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1306,6 +1342,9 @@ export class Postgresql { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/project.ts b/src/services/project.ts index 6e554ab..2695bec 100644 --- a/src/services/project.ts +++ b/src/services/project.ts @@ -1021,6 +1021,7 @@ export class Project { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -1124,6 +1125,7 @@ export class Project { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -1195,6 +1197,7 @@ export class Project { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -1215,6 +1218,7 @@ export class Project { * @param {string} params.name - Key name. Max length: 128 chars. * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string | null} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. + * @param {string | null} params.description - Optional description for the key. * @throws {AppwriteException} * @returns {Promise} */ @@ -1223,6 +1227,7 @@ export class Project { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }): Promise; /** * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. @@ -1231,6 +1236,7 @@ export class Project { * @param {string} name - Key name. Max length: 128 chars. * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string | null} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. + * @param {string | null} description - Optional description for the key. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1240,6 +1246,7 @@ export class Project { name: string, scopes: ProjectKeyScopes[], expire?: string | null, + description?: string | null, ): Promise; updateKey( paramsOrFirst: @@ -1248,15 +1255,22 @@ export class Project { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; } | string, - ...rest: [string?, ProjectKeyScopes[]?, (string | null)?] + ...rest: [ + string?, + ProjectKeyScopes[]?, + (string | null)?, + (string | null)?, + ] ): Promise { let params: { keyId: string; name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }; if ( @@ -1269,6 +1283,7 @@ export class Project { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }; } else { params = { @@ -1276,6 +1291,7 @@ export class Project { name: rest[0] as string, scopes: rest[1] as ProjectKeyScopes[], expire: rest[2] as string | null, + description: rest[3] as string | null, }; } @@ -1283,6 +1299,7 @@ export class Project { const name = params.name; const scopes = params.scopes; const expire = params.expire; + const description = params.description; if (typeof keyId === 'undefined' || keyId === '') { throw new AppwriteException('Missing required parameter: "keyId"'); } @@ -1306,6 +1323,9 @@ export class Project { if (typeof expire !== 'undefined') { apiPayload['expire'] = expire; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1324,6 +1344,7 @@ export class Project { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -10606,40 +10627,57 @@ export class Project { /** * Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary. * + * Custom denyList entries use case-sensitive equality and apply only while this policy is enabled. Omit denyList or pass null to preserve it, pass an array to replace it, or pass [] to clear it. Entries are stored without trimming or deduplication. Existing passwords remain valid for sign-in and password confirmation. The combined serialized project authentication configuration must fit within 16,384 characters, even when each list meets its entry limits. + * * @param {boolean} params.enabled - Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid. + * @param {string[] | null} params.denyList - Custom blocked values using case-sensitive equality. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters. * @throws {AppwriteException} * @returns {Promise} */ updatePasswordDictionaryPolicy(params: { enabled: boolean; + denyList?: string[] | null; }): Promise; /** * Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary. * + * Custom denyList entries use case-sensitive equality and apply only while this policy is enabled. Omit denyList or pass null to preserve it, pass an array to replace it, or pass [] to clear it. Entries are stored without trimming or deduplication. Existing passwords remain valid for sign-in and password confirmation. The combined serialized project authentication configuration must fit within 16,384 characters, even when each list meets its entry limits. + * * @param {boolean} enabled - Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid. + * @param {string[] | null} denyList - Custom blocked values using case-sensitive equality. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePasswordDictionaryPolicy(enabled: boolean): Promise; updatePasswordDictionaryPolicy( - paramsOrFirst: { enabled: boolean } | boolean, + enabled: boolean, + denyList?: string[] | null, + ): Promise; + updatePasswordDictionaryPolicy( + paramsOrFirst: + { enabled: boolean; denyList?: string[] | null } | boolean, + ...rest: [(string[] | null)?] ): Promise { - let params: { enabled: boolean }; + let params: { enabled: boolean; denyList?: string[] | null }; if ( paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) ) { - params = (paramsOrFirst || {}) as { enabled: boolean }; + params = (paramsOrFirst || {}) as { + enabled: boolean; + denyList?: string[] | null; + }; } else { params = { enabled: paramsOrFirst as boolean, + denyList: rest[0] as string[] | null, }; } const enabled = params.enabled; + const denyList = params.denyList; if (typeof enabled === 'undefined') { throw new AppwriteException( 'Missing required parameter: "enabled"', @@ -10650,6 +10688,9 @@ export class Project { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof denyList !== 'undefined') { + apiPayload['denyList'] = denyList; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -10872,40 +10913,59 @@ export class Project { /** * Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number. * + * Custom denyList entries use case-insensitive substring matching and apply only while this policy is enabled. Omit denyList or pass null to preserve it, pass an array to replace it, or pass [] to clear it. Entries are stored without trimming or deduplication. Existing passwords remain valid for sign-in and password confirmation. The combined serialized project authentication configuration must fit within 16,384 characters, even when each list meets its entry limits. + * Password recovery also checks the recovered user profile, closing the previous gap in profile-based personal-data validation. + * * @param {boolean} params.enabled - Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid. + * @param {string[] | null} params.denyList - Custom blocked values using case-insensitive substring matching. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters. * @throws {AppwriteException} * @returns {Promise} */ updatePasswordPersonalDataPolicy(params: { enabled: boolean; + denyList?: string[] | null; }): Promise; /** * Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number. * + * Custom denyList entries use case-insensitive substring matching and apply only while this policy is enabled. Omit denyList or pass null to preserve it, pass an array to replace it, or pass [] to clear it. Entries are stored without trimming or deduplication. Existing passwords remain valid for sign-in and password confirmation. The combined serialized project authentication configuration must fit within 16,384 characters, even when each list meets its entry limits. + * Password recovery also checks the recovered user profile, closing the previous gap in profile-based personal-data validation. + * * @param {boolean} enabled - Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid. + * @param {string[] | null} denyList - Custom blocked values using case-insensitive substring matching. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePasswordPersonalDataPolicy(enabled: boolean): Promise; updatePasswordPersonalDataPolicy( - paramsOrFirst: { enabled: boolean } | boolean, + enabled: boolean, + denyList?: string[] | null, + ): Promise; + updatePasswordPersonalDataPolicy( + paramsOrFirst: + { enabled: boolean; denyList?: string[] | null } | boolean, + ...rest: [(string[] | null)?] ): Promise { - let params: { enabled: boolean }; + let params: { enabled: boolean; denyList?: string[] | null }; if ( paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) ) { - params = (paramsOrFirst || {}) as { enabled: boolean }; + params = (paramsOrFirst || {}) as { + enabled: boolean; + denyList?: string[] | null; + }; } else { params = { enabled: paramsOrFirst as boolean, + denyList: rest[0] as string[] | null, }; } const enabled = params.enabled; + const denyList = params.denyList; if (typeof enabled === 'undefined') { throw new AppwriteException( 'Missing required parameter: "enabled"', @@ -10916,6 +10976,9 @@ export class Project { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof denyList !== 'undefined') { + apiPayload['denyList'] = denyList; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -13296,6 +13359,7 @@ export class Project { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -13315,6 +13379,7 @@ export class Project { * @param {string} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} params.value - Variable value. Max length: 8192 chars. * @param {boolean} params.secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime. + * @param {string} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -13323,6 +13388,7 @@ export class Project { key: string; value: string; secret?: boolean; + description?: string; }): Promise; /** * Create a new project environment variable. These variables can be accessed by all functions and sites in the project. @@ -13331,6 +13397,7 @@ export class Project { * @param {string} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} value - Variable value. Max length: 8192 chars. * @param {boolean} secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime. + * @param {string} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -13340,6 +13407,7 @@ export class Project { key: string, value: string, secret?: boolean, + description?: string, ): Promise; createVariable( paramsOrFirst: @@ -13348,15 +13416,17 @@ export class Project { key: string; value: string; secret?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?] + ...rest: [string?, string?, boolean?, string?] ): Promise { let params: { variableId: string; key: string; value: string; secret?: boolean; + description?: string; }; if ( @@ -13369,6 +13439,7 @@ export class Project { key: string; value: string; secret?: boolean; + description?: string; }; } else { params = { @@ -13376,6 +13447,7 @@ export class Project { key: rest[0] as string, value: rest[1] as string, secret: rest[2] as boolean, + description: rest[3] as string, }; } @@ -13383,6 +13455,7 @@ export class Project { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof variableId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "variableId"', @@ -13408,6 +13481,9 @@ export class Project { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -13426,6 +13502,7 @@ export class Project { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -13500,6 +13577,7 @@ export class Project { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -13519,6 +13597,7 @@ export class Project { * @param {string | null} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} params.value - Variable value. Max length: 8192 chars. * @param {boolean | null} params.secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime. + * @param {string | null} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -13527,6 +13606,7 @@ export class Project { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }): Promise; /** * Update variable by its unique ID. @@ -13535,6 +13615,7 @@ export class Project { * @param {string | null} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} value - Variable value. Max length: 8192 chars. * @param {boolean | null} secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime. + * @param {string | null} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -13544,6 +13625,7 @@ export class Project { key?: string | null, value?: string | null, secret?: boolean | null, + description?: string | null, ): Promise; updateVariable( paramsOrFirst: @@ -13552,15 +13634,22 @@ export class Project { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; } | string, - ...rest: [(string | null)?, (string | null)?, (boolean | null)?] + ...rest: [ + (string | null)?, + (string | null)?, + (boolean | null)?, + (string | null)?, + ] ): Promise { let params: { variableId: string; key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; if ( @@ -13573,6 +13662,7 @@ export class Project { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; } else { params = { @@ -13580,6 +13670,7 @@ export class Project { key: rest[0] as string | null, value: rest[1] as string | null, secret: rest[2] as boolean | null, + description: rest[3] as string | null, }; } @@ -13587,6 +13678,7 @@ export class Project { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof variableId === 'undefined' || variableId === '') { throw new AppwriteException( 'Missing required parameter: "variableId"', @@ -13606,6 +13698,9 @@ export class Project { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -13624,6 +13719,7 @@ export class Project { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', diff --git a/src/services/sites.ts b/src/services/sites.ts index 2424cc0..7823ef8 100644 --- a/src/services/sites.ts +++ b/src/services/sites.ts @@ -119,6 +119,7 @@ export class Sites { $createdAt: '', $updatedAt: '', name: '', + description: '', enabled: true, live: true, logging: true, @@ -161,6 +162,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -200,6 +202,7 @@ export class Sites { * @param {string} params.runtimeSpecification - Runtime specification for the SSR executions. * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {ProjectKeyScopes[]} params.scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed. + * @param {string} params.description - Optional description for the site. * @throws {AppwriteException} * @returns {Promise} */ @@ -228,6 +231,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[]; + description?: string; }): Promise; /** * Create a new site. @@ -256,6 +260,7 @@ export class Sites { * @param {string} runtimeSpecification - Runtime specification for the SSR executions. * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {ProjectKeyScopes[]} scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed. + * @param {string} description - Optional description for the site. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -285,6 +290,7 @@ export class Sites { runtimeSpecification?: string, deploymentRetention?: number, scopes?: ProjectKeyScopes[], + description?: string, ): Promise; create( paramsOrFirst: @@ -313,6 +319,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[]; + description?: string; } | string, ...rest: [ @@ -339,6 +346,7 @@ export class Sites { string?, number?, ProjectKeyScopes[]?, + string?, ] ): Promise { let params: { @@ -366,6 +374,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[]; + description?: string; }; if ( @@ -398,6 +407,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[]; + description?: string; }; } else { params = { @@ -425,6 +435,7 @@ export class Sites { runtimeSpecification: rest[20] as string, deploymentRetention: rest[21] as number, scopes: rest[22] as ProjectKeyScopes[], + description: rest[23] as string, }; } @@ -452,6 +463,7 @@ export class Sites { const runtimeSpecification = params.runtimeSpecification; const deploymentRetention = params.deploymentRetention; const scopes = params.scopes; + const description = params.description; if (typeof siteId === 'undefined') { throw new AppwriteException('Missing required parameter: "siteId"'); } @@ -542,6 +554,9 @@ export class Sites { if (typeof scopes !== 'undefined') { apiPayload['scopes'] = scopes; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -560,6 +575,7 @@ export class Sites { $createdAt: '', $updatedAt: '', name: '', + description: '', enabled: true, live: true, logging: true, @@ -602,6 +618,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -857,6 +874,7 @@ export class Sites { $createdAt: '', $updatedAt: '', name: '', + description: '', enabled: true, live: true, logging: true, @@ -899,6 +917,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -938,6 +957,7 @@ export class Sites { * @param {string} params.runtimeSpecification - Runtime specification for the SSR executions. * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {ProjectKeyScopes[] | null} params.scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed. + * @param {string | null} params.description - Optional description for the site. * @throws {AppwriteException} * @returns {Promise} */ @@ -966,6 +986,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[] | null; + description?: string | null; }): Promise; /** * Update site by its unique ID. @@ -994,6 +1015,7 @@ export class Sites { * @param {string} runtimeSpecification - Runtime specification for the SSR executions. * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {ProjectKeyScopes[] | null} scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed. + * @param {string | null} description - Optional description for the site. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1023,6 +1045,7 @@ export class Sites { runtimeSpecification?: string, deploymentRetention?: number, scopes?: ProjectKeyScopes[] | null, + description?: string | null, ): Promise; update( paramsOrFirst: @@ -1051,6 +1074,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[] | null; + description?: string | null; } | string, ...rest: [ @@ -1077,6 +1101,7 @@ export class Sites { string?, number?, (ProjectKeyScopes[] | null)?, + (string | null)?, ] ): Promise { let params: { @@ -1104,6 +1129,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[] | null; + description?: string | null; }; if ( @@ -1136,6 +1162,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[] | null; + description?: string | null; }; } else { params = { @@ -1163,6 +1190,7 @@ export class Sites { runtimeSpecification: rest[20] as string, deploymentRetention: rest[21] as number, scopes: rest[22] as ProjectKeyScopes[] | null, + description: rest[23] as string | null, }; } @@ -1190,6 +1218,7 @@ export class Sites { const runtimeSpecification = params.runtimeSpecification; const deploymentRetention = params.deploymentRetention; const scopes = params.scopes; + const description = params.description; if (typeof siteId === 'undefined' || siteId === '') { throw new AppwriteException('Missing required parameter: "siteId"'); } @@ -1275,6 +1304,9 @@ export class Sites { if (typeof scopes !== 'undefined') { apiPayload['scopes'] = scopes; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1293,6 +1325,7 @@ export class Sites { $createdAt: '', $updatedAt: '', name: '', + description: '', enabled: true, live: true, logging: true, @@ -1335,6 +1368,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -1482,6 +1516,7 @@ export class Sites { $createdAt: '', $updatedAt: '', name: '', + description: '', enabled: true, live: true, logging: true, @@ -1524,6 +1559,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3114,6 +3150,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3134,6 +3171,7 @@ export class Sites { * @param {string} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} params.value - Variable value. Max length: 8192 chars. * @param {boolean} params.secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime. + * @param {string} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -3143,6 +3181,7 @@ export class Sites { key: string; value: string; secret?: boolean; + description?: string; }): Promise; /** * Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables. @@ -3152,6 +3191,7 @@ export class Sites { * @param {string} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} value - Variable value. Max length: 8192 chars. * @param {boolean} secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime. + * @param {string} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3162,6 +3202,7 @@ export class Sites { key: string, value: string, secret?: boolean, + description?: string, ): Promise; createVariable( paramsOrFirst: @@ -3171,9 +3212,10 @@ export class Sites { key: string; value: string; secret?: boolean; + description?: string; } | string, - ...rest: [string?, string?, string?, boolean?] + ...rest: [string?, string?, string?, boolean?, string?] ): Promise { let params: { siteId: string; @@ -3181,6 +3223,7 @@ export class Sites { key: string; value: string; secret?: boolean; + description?: string; }; if ( @@ -3194,6 +3237,7 @@ export class Sites { key: string; value: string; secret?: boolean; + description?: string; }; } else { params = { @@ -3202,6 +3246,7 @@ export class Sites { key: rest[1] as string, value: rest[2] as string, secret: rest[3] as boolean, + description: rest[4] as string, }; } @@ -3210,6 +3255,7 @@ export class Sites { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof siteId === 'undefined' || siteId === '') { throw new AppwriteException('Missing required parameter: "siteId"'); } @@ -3241,6 +3287,9 @@ export class Sites { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3259,6 +3308,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3346,6 +3396,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3366,6 +3417,7 @@ export class Sites { * @param {string | null} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} params.value - Variable value. Max length: 8192 chars. * @param {boolean | null} params.secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime. + * @param {string | null} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -3375,6 +3427,7 @@ export class Sites { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }): Promise; /** * Update variable by its unique ID. @@ -3384,6 +3437,7 @@ export class Sites { * @param {string | null} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} value - Variable value. Max length: 8192 chars. * @param {boolean | null} secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime. + * @param {string | null} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3394,6 +3448,7 @@ export class Sites { key?: string | null, value?: string | null, secret?: boolean | null, + description?: string | null, ): Promise; updateVariable( paramsOrFirst: @@ -3403,6 +3458,7 @@ export class Sites { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; } | string, ...rest: [ @@ -3410,6 +3466,7 @@ export class Sites { (string | null)?, (string | null)?, (boolean | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3418,6 +3475,7 @@ export class Sites { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; if ( @@ -3431,6 +3489,7 @@ export class Sites { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; } else { params = { @@ -3439,6 +3498,7 @@ export class Sites { key: rest[1] as string | null, value: rest[2] as string | null, secret: rest[3] as boolean | null, + description: rest[4] as string | null, }; } @@ -3447,6 +3507,7 @@ export class Sites { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof siteId === 'undefined' || siteId === '') { throw new AppwriteException('Missing required parameter: "siteId"'); } @@ -3468,6 +3529,9 @@ export class Sites { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3486,6 +3550,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', diff --git a/src/services/storage.ts b/src/services/storage.ts index d810652..8251cf0 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -117,6 +117,7 @@ export class Storage { $permissions: [], fileSecurity: false, name: '', + description: '', enabled: true, maximumFileSize: 0, allowedFileExtensions: [], @@ -147,6 +148,7 @@ export class Storage { * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled * @param {boolean} params.transformations - Are image transformations enabled? + * @param {string} params.description - Optional description for the bucket. * @throws {AppwriteException} * @returns {Promise} */ @@ -162,6 +164,7 @@ export class Storage { encryption?: boolean; antivirus?: boolean; transformations?: boolean; + description?: string; }): Promise; /** * Create a new storage bucket. @@ -177,6 +180,7 @@ export class Storage { * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled * @param {boolean} transformations - Are image transformations enabled? + * @param {string} description - Optional description for the bucket. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -193,6 +197,7 @@ export class Storage { encryption?: boolean, antivirus?: boolean, transformations?: boolean, + description?: string, ): Promise; createBucket( paramsOrFirst: @@ -208,6 +213,7 @@ export class Storage { encryption?: boolean; antivirus?: boolean; transformations?: boolean; + description?: string; } | string, ...rest: [ @@ -221,6 +227,7 @@ export class Storage { boolean?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -235,6 +242,7 @@ export class Storage { encryption?: boolean; antivirus?: boolean; transformations?: boolean; + description?: string; }; if ( @@ -254,6 +262,7 @@ export class Storage { encryption?: boolean; antivirus?: boolean; transformations?: boolean; + description?: string; }; } else { params = { @@ -268,6 +277,7 @@ export class Storage { encryption: rest[7] as boolean, antivirus: rest[8] as boolean, transformations: rest[9] as boolean, + description: rest[10] as string, }; } @@ -282,6 +292,7 @@ export class Storage { const encryption = params.encryption; const antivirus = params.antivirus; const transformations = params.transformations; + const description = params.description; if (typeof bucketId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "bucketId"', @@ -325,6 +336,9 @@ export class Storage { if (typeof transformations !== 'undefined') { apiPayload['transformations'] = transformations; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -345,6 +359,7 @@ export class Storage { $permissions: [], fileSecurity: false, name: '', + description: '', enabled: true, maximumFileSize: 0, allowedFileExtensions: [], @@ -425,6 +440,7 @@ export class Storage { $permissions: [], fileSecurity: false, name: '', + description: '', enabled: true, maximumFileSize: 0, allowedFileExtensions: [], @@ -455,6 +471,7 @@ export class Storage { * @param {boolean | null} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled * @param {boolean} params.transformations - Are image transformations enabled? + * @param {string | null} params.description - Optional description for the bucket. * @throws {AppwriteException} * @returns {Promise} */ @@ -470,6 +487,7 @@ export class Storage { encryption?: boolean | null; antivirus?: boolean; transformations?: boolean; + description?: string | null; }): Promise; /** * Update a storage bucket by its unique ID. @@ -485,6 +503,7 @@ export class Storage { * @param {boolean | null} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled * @param {boolean} transformations - Are image transformations enabled? + * @param {string | null} description - Optional description for the bucket. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -501,6 +520,7 @@ export class Storage { encryption?: boolean | null, antivirus?: boolean, transformations?: boolean, + description?: string | null, ): Promise; updateBucket( paramsOrFirst: @@ -516,6 +536,7 @@ export class Storage { encryption?: boolean | null; antivirus?: boolean; transformations?: boolean; + description?: string | null; } | string, ...rest: [ @@ -529,6 +550,7 @@ export class Storage { (boolean | null)?, boolean?, boolean?, + (string | null)?, ] ): Promise { let params: { @@ -543,6 +565,7 @@ export class Storage { encryption?: boolean | null; antivirus?: boolean; transformations?: boolean; + description?: string | null; }; if ( @@ -562,6 +585,7 @@ export class Storage { encryption?: boolean | null; antivirus?: boolean; transformations?: boolean; + description?: string | null; }; } else { params = { @@ -576,6 +600,7 @@ export class Storage { encryption: rest[7] as boolean | null, antivirus: rest[8] as boolean, transformations: rest[9] as boolean, + description: rest[10] as string | null, }; } @@ -590,6 +615,7 @@ export class Storage { const encryption = params.encryption; const antivirus = params.antivirus; const transformations = params.transformations; + const description = params.description; if (typeof bucketId === 'undefined' || bucketId === '') { throw new AppwriteException( 'Missing required parameter: "bucketId"', @@ -633,6 +659,9 @@ export class Storage { if (typeof transformations !== 'undefined') { apiPayload['transformations'] = transformations; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -653,6 +682,7 @@ export class Storage { $permissions: [], fileSecurity: false, name: '', + description: '', enabled: true, maximumFileSize: 0, allowedFileExtensions: [], diff --git a/src/services/tables-db.ts b/src/services/tables-db.ts index adb947d..8a35df1 100644 --- a/src/services/tables-db.ts +++ b/src/services/tables-db.ts @@ -112,6 +112,7 @@ export class TablesDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -165,6 +166,7 @@ export class TablesDB { * @param {string} params.databaseId - Unique 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. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string} params.description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -175,6 +177,7 @@ export class TablesDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -186,6 +189,7 @@ export class TablesDB { * @param {string} databaseId - Unique 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. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string} description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -197,6 +201,7 @@ export class TablesDB { databaseId: string, name: string, enabled?: boolean, + description?: string, specification?: string, replicas?: number, syncMode?: string | null, @@ -207,17 +212,26 @@ export class TablesDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; } | string, - ...rest: [string?, boolean?, string?, number?, (string | null)?] + ...rest: [ + string?, + boolean?, + string?, + string?, + number?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -232,6 +246,7 @@ export class TablesDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -241,15 +256,17 @@ export class TablesDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string, - replicas: rest[3] as number, - syncMode: rest[4] as string | null, + description: rest[2] as string, + specification: rest[3] as string, + replicas: rest[4] as number, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -272,6 +289,9 @@ export class TablesDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -297,6 +317,7 @@ export class TablesDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -950,6 +971,7 @@ export class TablesDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -1002,6 +1024,7 @@ export class TablesDB { * @param {string} params.databaseId - Database ID. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string | null} params.description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -1012,6 +1035,7 @@ export class TablesDB { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1022,6 +1046,7 @@ export class TablesDB { * @param {string} databaseId - Database ID. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string | null} description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -1033,6 +1058,7 @@ export class TablesDB { databaseId: string, name?: string, enabled?: boolean, + description?: string | null, specification?: string | null, replicas?: number | null, syncMode?: string | null, @@ -1043,6 +1069,7 @@ export class TablesDB { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1052,6 +1079,7 @@ export class TablesDB { string?, boolean?, (string | null)?, + (string | null)?, (number | null)?, (string | null)?, ] @@ -1060,6 +1088,7 @@ export class TablesDB { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1074,6 +1103,7 @@ export class TablesDB { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1083,15 +1113,17 @@ export class TablesDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string | null, - replicas: rest[3] as number | null, - syncMode: rest[4] as string | null, + description: rest[2] as string | null, + specification: rest[3] as string | null, + replicas: rest[4] as number | null, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -1111,6 +1143,9 @@ export class TablesDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -1136,6 +1171,7 @@ export class TablesDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -2310,6 +2346,7 @@ export class TablesDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, rowSecurity: false, columns: [], @@ -2329,6 +2366,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -2353,6 +2391,7 @@ export class TablesDB { * @param {boolean} params.enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @param {object[]} params.columns - Array of column definitions to create. Each column should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} params.description - Optional description for the table. * @throws {AppwriteException} * @returns {Promise} */ @@ -2365,6 +2404,7 @@ export class TablesDB { enabled?: boolean; columns?: object[]; indexes?: object[]; + description?: string; }): Promise; /** * Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console. @@ -2377,6 +2417,7 @@ export class TablesDB { * @param {boolean} enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @param {object[]} columns - Array of column definitions to create. Each column should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} description - Optional description for the table. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2390,6 +2431,7 @@ export class TablesDB { enabled?: boolean, columns?: object[], indexes?: object[], + description?: string, ): Promise; createTable( paramsOrFirst: @@ -2402,6 +2444,7 @@ export class TablesDB { enabled?: boolean; columns?: object[]; indexes?: object[]; + description?: string; } | string, ...rest: [ @@ -2412,6 +2455,7 @@ export class TablesDB { boolean?, object[]?, object[]?, + string?, ] ): Promise { let params: { @@ -2423,6 +2467,7 @@ export class TablesDB { enabled?: boolean; columns?: object[]; indexes?: object[]; + description?: string; }; if ( @@ -2439,6 +2484,7 @@ export class TablesDB { enabled?: boolean; columns?: object[]; indexes?: object[]; + description?: string; }; } else { params = { @@ -2450,6 +2496,7 @@ export class TablesDB { enabled: rest[4] as boolean, columns: rest[5] as object[], indexes: rest[6] as object[], + description: rest[7] as string, }; } @@ -2461,6 +2508,7 @@ export class TablesDB { const enabled = params.enabled; const columns = params.columns; const indexes = params.indexes; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2500,6 +2548,9 @@ export class TablesDB { if (typeof indexes !== 'undefined') { apiPayload['indexes'] = indexes; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2520,6 +2571,7 @@ export class TablesDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, rowSecurity: false, columns: [], @@ -2539,6 +2591,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -2631,6 +2684,7 @@ export class TablesDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, rowSecurity: false, columns: [], @@ -2650,6 +2704,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -2673,6 +2728,7 @@ export class TablesDB { * @param {boolean} params.rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} params.enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @param {boolean} params.purge - When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire. + * @param {string | null} params.description - Optional description for the table. * @throws {AppwriteException} * @returns {Promise} */ @@ -2684,6 +2740,7 @@ export class TablesDB { rowSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }): Promise; /** * Update a table by its unique ID. @@ -2695,6 +2752,7 @@ export class TablesDB { * @param {boolean} rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @param {boolean} purge - When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire. + * @param {string | null} description - Optional description for the table. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2707,6 +2765,7 @@ export class TablesDB { rowSecurity?: boolean, enabled?: boolean, purge?: boolean, + description?: string | null, ): Promise; updateTable( paramsOrFirst: @@ -2718,6 +2777,7 @@ export class TablesDB { rowSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; } | string, ...rest: [ @@ -2727,6 +2787,7 @@ export class TablesDB { boolean?, boolean?, boolean?, + (string | null)?, ] ): Promise { let params: { @@ -2737,6 +2798,7 @@ export class TablesDB { rowSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; if ( @@ -2752,6 +2814,7 @@ export class TablesDB { rowSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; } else { params = { @@ -2762,6 +2825,7 @@ export class TablesDB { rowSecurity: rest[3] as boolean, enabled: rest[4] as boolean, purge: rest[5] as boolean, + description: rest[6] as string | null, }; } @@ -2772,6 +2836,7 @@ export class TablesDB { const rowSecurity = params.rowSecurity; const enabled = params.enabled; const purge = params.purge; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2801,6 +2866,9 @@ export class TablesDB { if (typeof purge !== 'undefined') { apiPayload['purge'] = purge; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2821,6 +2889,7 @@ export class TablesDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, rowSecurity: false, columns: [], @@ -2840,6 +2909,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -3051,6 +3121,7 @@ export class TablesDB { * @param {number | bigint | null} params.max - Maximum value * @param {number | bigint | null} params.xdefault - Default value. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3063,6 +3134,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }): Promise; /** * Create a bigint column. Optionally, minimum and maximum values can be provided. @@ -3076,6 +3148,7 @@ export class TablesDB { * @param {number | bigint | null} max - Maximum value * @param {number | bigint | null} xdefault - Default value. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3089,6 +3162,7 @@ export class TablesDB { max?: number | bigint | null, xdefault?: number | bigint | null, array?: boolean, + description?: string, ): Promise; createBigIntColumn( paramsOrFirst: @@ -3101,6 +3175,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -3111,6 +3186,7 @@ export class TablesDB { (number | bigint | null)?, (number | bigint | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -3122,6 +3198,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; if ( @@ -3138,6 +3215,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; } else { params = { @@ -3149,6 +3227,7 @@ export class TablesDB { max: rest[4] as number | bigint | null, xdefault: rest[5] as number | bigint | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -3160,6 +3239,7 @@ export class TablesDB { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3200,6 +3280,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3215,6 +3298,7 @@ export class TablesDB { columnBigint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3240,6 +3324,7 @@ export class TablesDB { * @param {number | bigint | null} params.min - Minimum value * @param {number | bigint | null} params.max - Maximum value * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3252,6 +3337,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a bigint column. Changing the `default` value will not update already existing rows. @@ -3265,6 +3351,7 @@ export class TablesDB { * @param {number | bigint | null} min - Minimum value * @param {number | bigint | null} max - Maximum value * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3278,6 +3365,7 @@ export class TablesDB { min?: number | bigint | null, max?: number | bigint | null, newKey?: string | null, + description?: string | null, ): Promise; updateBigIntColumn( paramsOrFirst: @@ -3290,6 +3378,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -3300,6 +3389,7 @@ export class TablesDB { (number | bigint | null)?, (number | bigint | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3311,6 +3401,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; if ( @@ -3327,6 +3418,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -3338,6 +3430,7 @@ export class TablesDB { min: rest[4] as number | bigint | null, max: rest[5] as number | bigint | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -3349,6 +3442,7 @@ export class TablesDB { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3393,6 +3487,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3408,6 +3505,7 @@ export class TablesDB { columnBigint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3431,6 +3529,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {boolean | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3441,6 +3540,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }): Promise; /** * Create a boolean column. @@ -3452,6 +3552,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {boolean | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3463,6 +3564,7 @@ export class TablesDB { required: boolean, xdefault?: boolean | null, array?: boolean, + description?: string, ): Promise; createBooleanColumn( paramsOrFirst: @@ -3473,9 +3575,17 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (boolean | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (boolean | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -3484,6 +3594,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }; if ( @@ -3498,6 +3609,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }; } else { params = { @@ -3507,6 +3619,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as boolean | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -3516,6 +3629,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3551,6 +3665,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3566,6 +3683,7 @@ export class TablesDB { columnBoolean: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3588,6 +3706,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {boolean | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3598,6 +3717,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a boolean column. Changing the `default` value will not update already existing rows. @@ -3608,6 +3728,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {boolean | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3619,6 +3740,7 @@ export class TablesDB { required: boolean, xdefault?: boolean | null, newKey?: string | null, + description?: string | null, ): Promise; updateBooleanColumn( paramsOrFirst: @@ -3629,6 +3751,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -3637,6 +3760,7 @@ export class TablesDB { boolean?, (boolean | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3646,6 +3770,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }; if ( @@ -3660,6 +3785,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -3669,6 +3795,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as boolean | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -3678,6 +3805,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3716,6 +3844,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3731,6 +3862,7 @@ export class TablesDB { columnBoolean: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3753,6 +3885,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3763,6 +3896,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create a date time column according to the ISO 8601 standard. @@ -3773,6 +3907,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3784,6 +3919,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createDatetimeColumn( paramsOrFirst: @@ -3794,9 +3930,17 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -3805,6 +3949,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -3819,6 +3964,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -3828,6 +3974,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -3837,6 +3984,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3872,6 +4020,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3887,6 +4038,7 @@ export class TablesDB { columnDatetime: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3909,6 +4061,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3919,6 +4072,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a date time column. Changing the `default` value will not update already existing rows. @@ -3929,6 +4083,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3940,6 +4095,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateDatetimeColumn( paramsOrFirst: @@ -3950,6 +4106,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -3958,6 +4115,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3967,6 +4125,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -3981,6 +4140,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -3990,6 +4150,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -3999,6 +4160,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4037,6 +4199,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4052,6 +4217,7 @@ export class TablesDB { columnDatetime: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4075,6 +4241,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4085,6 +4252,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create an email column. @@ -4096,6 +4264,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4107,6 +4276,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createEmailColumn( paramsOrFirst: @@ -4117,9 +4287,17 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -4128,6 +4306,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -4142,6 +4321,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -4151,6 +4331,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -4160,6 +4341,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4194,6 +4376,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4209,6 +4394,7 @@ export class TablesDB { columnEmail: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4233,6 +4419,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4243,6 +4430,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an email column. Changing the `default` value will not update already existing rows. @@ -4254,6 +4442,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4265,6 +4454,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateEmailColumn( paramsOrFirst: @@ -4275,6 +4465,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -4283,6 +4474,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -4292,6 +4484,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -4306,6 +4499,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -4315,6 +4509,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -4324,6 +4519,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4362,6 +4558,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4377,6 +4576,7 @@ export class TablesDB { columnEmail: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4401,6 +4601,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4412,6 +4613,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. @@ -4423,6 +4625,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4435,6 +4638,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createEnumColumn( paramsOrFirst: @@ -4446,6 +4650,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -4455,6 +4660,7 @@ export class TablesDB { boolean?, (string | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -4465,6 +4671,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -4480,6 +4687,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -4490,6 +4698,7 @@ export class TablesDB { required: rest[3] as boolean, xdefault: rest[4] as string | null, array: rest[5] as boolean, + description: rest[6] as string, }; } @@ -4500,6 +4709,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4542,6 +4752,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4557,6 +4770,7 @@ export class TablesDB { columnEnum: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4583,6 +4797,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4594,6 +4809,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an enum column. Changing the `default` value will not update already existing rows. @@ -4606,6 +4822,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4618,6 +4835,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateEnumColumn( paramsOrFirst: @@ -4629,6 +4847,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -4638,6 +4857,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -4648,6 +4868,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -4663,6 +4884,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -4673,6 +4895,7 @@ export class TablesDB { required: rest[3] as boolean, xdefault: rest[4] as string | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -4683,6 +4906,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4729,6 +4953,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4744,6 +4971,7 @@ export class TablesDB { columnEnum: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4771,6 +4999,7 @@ export class TablesDB { * @param {number | null} params.max - Maximum value * @param {number | null} params.xdefault - Default value. Cannot be set when required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4783,6 +5012,7 @@ export class TablesDB { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }): Promise; /** * Create a float column. Optionally, minimum and maximum values can be provided. @@ -4796,6 +5026,7 @@ export class TablesDB { * @param {number | null} max - Maximum value * @param {number | null} xdefault - Default value. Cannot be set when required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4809,6 +5040,7 @@ export class TablesDB { max?: number | null, xdefault?: number | null, array?: boolean, + description?: string, ): Promise; createFloatColumn( paramsOrFirst: @@ -4821,6 +5053,7 @@ export class TablesDB { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -4831,6 +5064,7 @@ export class TablesDB { (number | null)?, (number | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -4842,6 +5076,7 @@ export class TablesDB { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }; if ( @@ -4858,6 +5093,7 @@ export class TablesDB { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }; } else { params = { @@ -4869,6 +5105,7 @@ export class TablesDB { max: rest[4] as number | null, xdefault: rest[5] as number | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -4880,6 +5117,7 @@ export class TablesDB { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4920,6 +5158,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4935,6 +5176,7 @@ export class TablesDB { columnFloat: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4960,6 +5202,7 @@ export class TablesDB { * @param {number | null} params.min - Minimum value * @param {number | null} params.max - Maximum value * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4972,6 +5215,7 @@ export class TablesDB { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a float column. Changing the `default` value will not update already existing rows. @@ -4985,6 +5229,7 @@ export class TablesDB { * @param {number | null} min - Minimum value * @param {number | null} max - Maximum value * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4998,6 +5243,7 @@ export class TablesDB { min?: number | null, max?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateFloatColumn( paramsOrFirst: @@ -5010,6 +5256,7 @@ export class TablesDB { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5020,6 +5267,7 @@ export class TablesDB { (number | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5031,6 +5279,7 @@ export class TablesDB { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5047,6 +5296,7 @@ export class TablesDB { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5058,6 +5308,7 @@ export class TablesDB { min: rest[4] as number | null, max: rest[5] as number | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -5069,6 +5320,7 @@ export class TablesDB { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5113,6 +5365,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5128,6 +5383,7 @@ export class TablesDB { columnFloat: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5153,6 +5409,7 @@ export class TablesDB { * @param {number | bigint | null} params.max - Maximum value * @param {number | bigint | null} params.xdefault - Default value. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -5165,6 +5422,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }): Promise; /** * Create an integer column. Optionally, minimum and maximum values can be provided. @@ -5178,6 +5436,7 @@ export class TablesDB { * @param {number | bigint | null} max - Maximum value * @param {number | bigint | null} xdefault - Default value. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5191,6 +5450,7 @@ export class TablesDB { max?: number | bigint | null, xdefault?: number | bigint | null, array?: boolean, + description?: string, ): Promise; createIntegerColumn( paramsOrFirst: @@ -5203,6 +5463,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -5213,6 +5474,7 @@ export class TablesDB { (number | bigint | null)?, (number | bigint | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -5224,6 +5486,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; if ( @@ -5240,6 +5503,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; } else { params = { @@ -5251,6 +5515,7 @@ export class TablesDB { max: rest[4] as number | bigint | null, xdefault: rest[5] as number | bigint | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -5262,6 +5527,7 @@ export class TablesDB { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5303,6 +5569,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5318,6 +5587,7 @@ export class TablesDB { columnInteger: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5343,6 +5613,7 @@ export class TablesDB { * @param {number | bigint | null} params.min - Minimum value * @param {number | bigint | null} params.max - Maximum value * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -5355,6 +5626,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an integer column. Changing the `default` value will not update already existing rows. @@ -5368,6 +5640,7 @@ export class TablesDB { * @param {number | bigint | null} min - Minimum value * @param {number | bigint | null} max - Maximum value * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5381,6 +5654,7 @@ export class TablesDB { min?: number | bigint | null, max?: number | bigint | null, newKey?: string | null, + description?: string | null, ): Promise; updateIntegerColumn( paramsOrFirst: @@ -5393,6 +5667,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5403,6 +5678,7 @@ export class TablesDB { (number | bigint | null)?, (number | bigint | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5414,6 +5690,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5430,6 +5707,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5441,6 +5719,7 @@ export class TablesDB { min: rest[4] as number | bigint | null, max: rest[5] as number | bigint | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -5452,6 +5731,7 @@ export class TablesDB { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5496,6 +5776,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5511,6 +5794,7 @@ export class TablesDB { columnInteger: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5534,6 +5818,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -5544,6 +5829,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create IP address column. @@ -5555,6 +5841,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5566,6 +5853,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createIpColumn( paramsOrFirst: @@ -5576,9 +5864,17 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -5587,6 +5883,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -5601,6 +5898,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -5610,6 +5908,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -5619,6 +5918,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5653,6 +5953,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5668,6 +5971,7 @@ export class TablesDB { columnIp: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5692,6 +5996,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -5702,6 +6007,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an ip column. Changing the `default` value will not update already existing rows. @@ -5713,6 +6019,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5724,6 +6031,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateIpColumn( paramsOrFirst: @@ -5734,6 +6042,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5742,6 +6051,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5751,6 +6061,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5765,6 +6076,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5774,6 +6086,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -5783,6 +6096,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5821,6 +6135,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5836,6 +6153,7 @@ export class TablesDB { columnIp: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5858,6 +6176,7 @@ export class TablesDB { * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {any[][] | null} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -5867,6 +6186,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }): Promise; /** * Create a geometric line column. @@ -5876,6 +6196,7 @@ export class TablesDB { * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {any[][] | null} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5886,6 +6207,7 @@ export class TablesDB { key: string, required: boolean, xdefault?: any[][] | null, + description?: string, ): Promise; createLineColumn( paramsOrFirst: @@ -5895,9 +6217,10 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (any[][] | null)?] + ...rest: [string?, string?, boolean?, (any[][] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -5905,6 +6228,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; if ( @@ -5918,6 +6242,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; } else { params = { @@ -5926,6 +6251,7 @@ export class TablesDB { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, + description: rest[4] as string, }; } @@ -5934,6 +6260,7 @@ export class TablesDB { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5965,6 +6292,9 @@ export class TablesDB { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5980,6 +6310,7 @@ export class TablesDB { columnLine: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6002,6 +6333,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {any[][] | null} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6012,6 +6344,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a line column. Changing the `default` value will not update already existing rows. @@ -6022,6 +6355,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {any[][] | null} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6033,6 +6367,7 @@ export class TablesDB { required: boolean, xdefault?: any[][] | null, newKey?: string | null, + description?: string | null, ): Promise; updateLineColumn( paramsOrFirst: @@ -6043,6 +6378,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -6051,6 +6387,7 @@ export class TablesDB { boolean?, (any[][] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -6060,6 +6397,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -6074,6 +6412,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6083,6 +6422,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -6092,6 +6432,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6125,6 +6466,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6140,6 +6484,7 @@ export class TablesDB { columnLine: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6164,6 +6509,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6175,6 +6521,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a longtext column. @@ -6187,6 +6534,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6199,6 +6547,7 @@ export class TablesDB { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createLongtextColumn( paramsOrFirst: @@ -6210,6 +6559,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -6219,6 +6569,7 @@ export class TablesDB { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -6229,6 +6580,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -6244,6 +6596,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -6254,6 +6607,7 @@ export class TablesDB { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -6264,6 +6618,7 @@ export class TablesDB { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6302,6 +6657,9 @@ export class TablesDB { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6317,6 +6675,7 @@ export class TablesDB { columnLongtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6340,6 +6699,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6350,6 +6710,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a longtext column. Changing the `default` value will not update already existing rows. @@ -6361,6 +6722,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6372,6 +6734,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateLongtextColumn( paramsOrFirst: @@ -6382,6 +6745,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -6390,6 +6754,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -6399,6 +6764,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -6413,6 +6779,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6422,6 +6789,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -6431,6 +6799,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6469,6 +6838,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6484,6 +6856,7 @@ export class TablesDB { columnLongtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6508,6 +6881,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6519,6 +6893,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a mediumtext column. @@ -6531,6 +6906,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6543,6 +6919,7 @@ export class TablesDB { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createMediumtextColumn( paramsOrFirst: @@ -6554,6 +6931,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -6563,6 +6941,7 @@ export class TablesDB { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -6573,6 +6952,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -6588,6 +6968,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -6598,6 +6979,7 @@ export class TablesDB { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -6608,6 +6990,7 @@ export class TablesDB { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6646,6 +7029,9 @@ export class TablesDB { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6661,6 +7047,7 @@ export class TablesDB { columnMediumtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6684,6 +7071,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6694,6 +7082,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a mediumtext column. Changing the `default` value will not update already existing rows. @@ -6705,6 +7094,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6716,6 +7106,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateMediumtextColumn( paramsOrFirst: @@ -6726,6 +7117,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -6734,6 +7126,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -6743,6 +7136,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -6757,6 +7151,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6766,6 +7161,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -6775,6 +7171,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6813,6 +7210,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6828,6 +7228,7 @@ export class TablesDB { columnMediumtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6849,6 +7250,7 @@ export class TablesDB { * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {number[] | null} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6858,6 +7260,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }): Promise; /** * Create a geometric point column. @@ -6867,6 +7270,7 @@ export class TablesDB { * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {number[] | null} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6877,6 +7281,7 @@ export class TablesDB { key: string, required: boolean, xdefault?: number[] | null, + description?: string, ): Promise; createPointColumn( paramsOrFirst: @@ -6886,9 +7291,10 @@ export class TablesDB { key: string; required: boolean; xdefault?: number[] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (number[] | null)?] + ...rest: [string?, string?, boolean?, (number[] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -6896,6 +7302,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }; if ( @@ -6909,6 +7316,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }; } else { params = { @@ -6917,6 +7325,7 @@ export class TablesDB { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as number[] | null, + description: rest[4] as string, }; } @@ -6925,6 +7334,7 @@ export class TablesDB { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6956,6 +7366,9 @@ export class TablesDB { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6971,6 +7384,7 @@ export class TablesDB { columnPoint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6993,6 +7407,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {number[] | null} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -7003,6 +7418,7 @@ export class TablesDB { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a point column. Changing the `default` value will not update already existing rows. @@ -7013,6 +7429,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {number[] | null} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7024,6 +7441,7 @@ export class TablesDB { required: boolean, xdefault?: number[] | null, newKey?: string | null, + description?: string | null, ): Promise; updatePointColumn( paramsOrFirst: @@ -7034,6 +7452,7 @@ export class TablesDB { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -7042,6 +7461,7 @@ export class TablesDB { boolean?, (number[] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -7051,6 +7471,7 @@ export class TablesDB { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7065,6 +7486,7 @@ export class TablesDB { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7074,6 +7496,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as number[] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -7083,6 +7506,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7116,6 +7540,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7131,6 +7558,7 @@ export class TablesDB { columnPoint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7152,6 +7580,7 @@ export class TablesDB { * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {any[][] | null} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -7161,6 +7590,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }): Promise; /** * Create a geometric polygon column. @@ -7170,6 +7600,7 @@ export class TablesDB { * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {any[][] | null} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7180,6 +7611,7 @@ export class TablesDB { key: string, required: boolean, xdefault?: any[][] | null, + description?: string, ): Promise; createPolygonColumn( paramsOrFirst: @@ -7189,9 +7621,10 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (any[][] | null)?] + ...rest: [string?, string?, boolean?, (any[][] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -7199,6 +7632,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; if ( @@ -7212,6 +7646,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; } else { params = { @@ -7220,6 +7655,7 @@ export class TablesDB { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, + description: rest[4] as string, }; } @@ -7228,6 +7664,7 @@ export class TablesDB { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7260,6 +7697,9 @@ export class TablesDB { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7275,6 +7715,7 @@ export class TablesDB { columnPolygon: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7297,6 +7738,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {any[][] | null} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -7307,6 +7749,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a polygon column. Changing the `default` value will not update already existing rows. @@ -7317,6 +7760,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {any[][] | null} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7328,6 +7772,7 @@ export class TablesDB { required: boolean, xdefault?: any[][] | null, newKey?: string | null, + description?: string | null, ): Promise; updatePolygonColumn( paramsOrFirst: @@ -7338,6 +7783,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -7346,6 +7792,7 @@ export class TablesDB { boolean?, (any[][] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -7355,6 +7802,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7369,6 +7817,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7378,6 +7827,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -7387,6 +7837,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7420,6 +7871,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7435,6 +7889,7 @@ export class TablesDB { columnPolygon: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7460,6 +7915,7 @@ export class TablesDB { * @param {string | null} params.key - Column Key. * @param {string | null} params.twoWayKey - Two Way Column Key. * @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -7472,6 +7928,7 @@ export class TablesDB { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }): Promise; /** * Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). @@ -7485,6 +7942,7 @@ export class TablesDB { * @param {string | null} key - Column Key. * @param {string | null} twoWayKey - Two Way Column Key. * @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7498,6 +7956,7 @@ export class TablesDB { key?: string | null, twoWayKey?: string | null, onDelete?: RelationMutate, + description?: string, ): Promise; createRelationshipColumn( paramsOrFirst: @@ -7510,6 +7969,7 @@ export class TablesDB { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; } | string, ...rest: [ @@ -7520,6 +7980,7 @@ export class TablesDB { (string | null)?, (string | null)?, RelationMutate?, + string?, ] ): Promise { let params: { @@ -7531,6 +7992,7 @@ export class TablesDB { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }; if ( @@ -7547,6 +8009,7 @@ export class TablesDB { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }; } else { params = { @@ -7558,6 +8021,7 @@ export class TablesDB { key: rest[4] as string | null, twoWayKey: rest[5] as string | null, onDelete: rest[6] as RelationMutate, + description: rest[7] as string, }; } @@ -7569,6 +8033,7 @@ export class TablesDB { const key = params.key; const twoWayKey = params.twoWayKey; const onDelete = params.onDelete; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7610,6 +8075,9 @@ export class TablesDB { if (typeof onDelete !== 'undefined') { apiPayload['onDelete'] = onDelete; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7625,6 +8093,7 @@ export class TablesDB { columnRelationship: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7652,6 +8121,7 @@ export class TablesDB { * @param {string} params.key - Column Key. * @param {RelationMutate | null} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -7661,6 +8131,7 @@ export class TablesDB { key: string; onDelete?: RelationMutate | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). @@ -7671,6 +8142,7 @@ export class TablesDB { * @param {string} key - Column Key. * @param {RelationMutate | null} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7681,6 +8153,7 @@ export class TablesDB { key: string, onDelete?: RelationMutate | null, newKey?: string | null, + description?: string | null, ): Promise; updateRelationshipColumn( paramsOrFirst: @@ -7690,9 +8163,16 @@ export class TablesDB { key: string; onDelete?: RelationMutate | null; newKey?: string | null; + description?: string | null; } | string, - ...rest: [string?, string?, (RelationMutate | null)?, (string | null)?] + ...rest: [ + string?, + string?, + (RelationMutate | null)?, + (string | null)?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; @@ -7700,6 +8180,7 @@ export class TablesDB { key: string; onDelete?: RelationMutate | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7713,6 +8194,7 @@ export class TablesDB { key: string; onDelete?: RelationMutate | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7721,6 +8203,7 @@ export class TablesDB { key: rest[1] as string, onDelete: rest[2] as RelationMutate | null, newKey: rest[3] as string | null, + description: rest[4] as string | null, }; } @@ -7729,6 +8212,7 @@ export class TablesDB { const key = params.key; const onDelete = params.onDelete; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7754,6 +8238,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7769,6 +8256,7 @@ export class TablesDB { columnRelationship: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7799,6 +8287,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.9.0. Please use `TablesDB.createTextColumn` instead. @@ -7812,6 +8301,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a string column. @@ -7825,6 +8315,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7838,6 +8329,7 @@ export class TablesDB { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createStringColumn( paramsOrFirst: @@ -7850,6 +8342,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -7860,6 +8353,7 @@ export class TablesDB { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -7871,6 +8365,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -7887,6 +8382,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -7898,6 +8394,7 @@ export class TablesDB { xdefault: rest[4] as string | null, array: rest[5] as boolean, encrypt: rest[6] as boolean, + description: rest[7] as string, }; } @@ -7909,6 +8406,7 @@ export class TablesDB { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7952,6 +8450,9 @@ export class TablesDB { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7967,6 +8468,7 @@ export class TablesDB { columnString: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7992,6 +8494,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {number | null} params.size - Maximum size of the string column. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTextColumn` instead. @@ -8004,6 +8507,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a string column. Changing the `default` value will not update already existing rows. @@ -8016,6 +8520,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {number | null} size - Maximum size of the string column. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8028,6 +8533,7 @@ export class TablesDB { xdefault?: string | null, size?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateStringColumn( paramsOrFirst: @@ -8039,6 +8545,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -8048,6 +8555,7 @@ export class TablesDB { (string | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -8058,6 +8566,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -8073,6 +8582,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -8083,6 +8593,7 @@ export class TablesDB { xdefault: rest[3] as string | null, size: rest[4] as number | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -8093,6 +8604,7 @@ export class TablesDB { const xdefault = params.xdefault; const size = params.size; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8134,6 +8646,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8149,6 +8664,7 @@ export class TablesDB { columnString: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8174,6 +8690,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -8185,6 +8702,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a text column. @@ -8197,6 +8715,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8209,6 +8728,7 @@ export class TablesDB { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createTextColumn( paramsOrFirst: @@ -8220,6 +8740,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -8229,6 +8750,7 @@ export class TablesDB { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -8239,6 +8761,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -8254,6 +8777,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -8264,6 +8788,7 @@ export class TablesDB { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -8274,6 +8799,7 @@ export class TablesDB { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8311,6 +8837,9 @@ export class TablesDB { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8326,6 +8855,7 @@ export class TablesDB { columnText: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8349,6 +8879,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -8359,6 +8890,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a text column. Changing the `default` value will not update already existing rows. @@ -8370,6 +8902,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8381,6 +8914,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateTextColumn( paramsOrFirst: @@ -8391,6 +8925,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -8399,6 +8934,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -8408,6 +8944,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -8422,6 +8959,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -8431,6 +8969,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -8440,6 +8979,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8478,6 +9018,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8493,6 +9036,7 @@ export class TablesDB { columnText: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8516,6 +9060,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -8526,6 +9071,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create a URL column. @@ -8537,6 +9083,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8548,6 +9095,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createUrlColumn( paramsOrFirst: @@ -8558,9 +9106,17 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -8569,6 +9125,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -8583,6 +9140,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -8592,6 +9150,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -8601,6 +9160,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8635,6 +9195,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8650,6 +9213,7 @@ export class TablesDB { columnUrl: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8674,6 +9238,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -8684,6 +9249,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an url column. Changing the `default` value will not update already existing rows. @@ -8695,6 +9261,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8706,6 +9273,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateUrlColumn( paramsOrFirst: @@ -8716,6 +9284,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -8724,6 +9293,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -8733,6 +9303,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -8747,6 +9318,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -8756,6 +9328,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -8765,6 +9338,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8803,6 +9377,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8818,6 +9395,7 @@ export class TablesDB { columnUrl: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8844,6 +9422,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -8856,6 +9435,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a varchar column. @@ -8869,6 +9449,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8882,6 +9463,7 @@ export class TablesDB { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createVarcharColumn( paramsOrFirst: @@ -8894,6 +9476,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -8904,6 +9487,7 @@ export class TablesDB { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -8915,6 +9499,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -8931,6 +9516,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -8942,6 +9528,7 @@ export class TablesDB { xdefault: rest[4] as string | null, array: rest[5] as boolean, encrypt: rest[6] as boolean, + description: rest[7] as string, }; } @@ -8953,6 +9540,7 @@ export class TablesDB { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8997,6 +9585,9 @@ export class TablesDB { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -9012,6 +9603,7 @@ export class TablesDB { columnVarchar: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -9037,6 +9629,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {number | null} params.size - Maximum size of the varchar column. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -9048,6 +9641,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a varchar column. Changing the `default` value will not update already existing rows. @@ -9060,6 +9654,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {number | null} size - Maximum size of the varchar column. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -9072,6 +9667,7 @@ export class TablesDB { xdefault?: string | null, size?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateVarcharColumn( paramsOrFirst: @@ -9083,6 +9679,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -9092,6 +9689,7 @@ export class TablesDB { (string | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -9102,6 +9700,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -9117,6 +9716,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -9127,6 +9727,7 @@ export class TablesDB { xdefault: rest[3] as string | null, size: rest[4] as number | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -9137,6 +9738,7 @@ export class TablesDB { const xdefault = params.xdefault; const size = params.size; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -9178,6 +9780,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -9193,6 +9798,7 @@ export class TablesDB { columnVarchar: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -9554,6 +10160,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -9578,6 +10185,7 @@ export class TablesDB { * @param {string[]} params.columns - Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long. * @param {OrderBy[]} params.orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} params.lengths - Length of index. Maximum of 100 + * @param {string} params.description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} */ @@ -9589,6 +10197,7 @@ export class TablesDB { columns: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }): Promise; /** * Creates an index on the columns listed. Your index should include all the columns you will query in a single request. @@ -9601,6 +10210,7 @@ export class TablesDB { * @param {string[]} columns - Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long. * @param {OrderBy[]} orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} lengths - Length of index. Maximum of 100 + * @param {string} description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -9613,6 +10223,7 @@ export class TablesDB { columns: string[], orders?: OrderBy[], lengths?: number[], + description?: string, ): Promise; createIndex( paramsOrFirst: @@ -9624,6 +10235,7 @@ export class TablesDB { columns: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; } | string, ...rest: [ @@ -9633,6 +10245,7 @@ export class TablesDB { string[]?, OrderBy[]?, number[]?, + string?, ] ): Promise { let params: { @@ -9643,6 +10256,7 @@ export class TablesDB { columns: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; if ( @@ -9658,6 +10272,7 @@ export class TablesDB { columns: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; } else { params = { @@ -9668,6 +10283,7 @@ export class TablesDB { columns: rest[3] as string[], orders: rest[4] as OrderBy[], lengths: rest[5] as number[], + description: rest[6] as string, }; } @@ -9678,6 +10294,7 @@ export class TablesDB { const columns = params.columns; const orders = params.orders; const lengths = params.lengths; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -9718,6 +10335,9 @@ export class TablesDB { if (typeof lengths !== 'undefined') { apiPayload['lengths'] = lengths; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -9736,6 +10356,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -9841,6 +10462,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -9939,12 +10561,14 @@ export class TablesDB { /** * Get a list of all the user's rows in a given table. You can use the query params to filter your results. * + * Rows returned by aggregate, groupBy or distinct queries hold only the columns they select, group or aggregate, typed as a row types them, with a joined column named by its join alias (`alias.column`). They have no `$id`, `$sequence`, `$createdAt`, `$updatedAt`, `$permissions`, `$databaseId` or `$tableId` unless they select or group it, and neither does a right or full join row that no row of this table matched. + * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table). * @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. * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction. * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. - * @param {number} params.ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row 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). + * @param {number} params.ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). * @throws {AppwriteException} * @returns {Promise>} */ @@ -9959,12 +10583,14 @@ export class TablesDB { /** * Get a list of all the user's rows in a given table. You can use the query params to filter your results. * + * Rows returned by aggregate, groupBy or distinct queries hold only the columns they select, group or aggregate, typed as a row types them, with a joined column named by its join alias (`alias.column`). They have no `$id`, `$sequence`, `$createdAt`, `$updatedAt`, `$permissions`, `$databaseId` or `$tableId` unless they select or group it, and neither does a right or full join row that no row of this table matched. + * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table). * @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. * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction. * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. - * @param {number} ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row 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). + * @param {number} ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. @@ -10828,6 +11454,167 @@ export class TablesDB { return request.then((response) => applyDefaults(response, defaults)); } + /** + * Get a list of all the user's rows in a given table using a POST request. This behaves identically to the list rows endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table). + * @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. + * @param {string | null} params.transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} params.ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + */ + createQuery(params: { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }): Promise>; + /** + * Get a list of all the user's rows in a given table using a POST request. This behaves identically to the list rows endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} databaseId - Database ID. + * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table). + * @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. + * @param {string | null} transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createQuery( + databaseId: string, + tableId: string, + queries?: string[], + transactionId?: string | null, + total?: boolean, + ttl?: number, + ): Promise>; + createQuery( + paramsOrFirst: + | { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + } + | string, + ...rest: [string?, string[]?, (string | null)?, boolean?, number?] + ): Promise> { + let params: { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + tableId: rest[0] as string, + queries: rest[1] as string[], + transactionId: rest[2] as string | null, + total: rest[3] as boolean, + ttl: rest[4] as number, + }; + } + + const databaseId = params.databaseId; + const tableId = params.tableId; + const queries = params.queries; + const transactionId = params.transactionId; + const total = params.total; + const ttl = params.ttl; + if (typeof databaseId === 'undefined' || databaseId === '') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof tableId === 'undefined' || tableId === '') { + throw new AppwriteException( + 'Missing required parameter: "tableId"', + ); + } + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/query' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace('{tableId}', encodeURIComponent(String(tableId))); + const apiPayload: Payload = {}; + if (typeof queries !== 'undefined') { + apiPayload['queries'] = queries; + } + if (typeof transactionId !== 'undefined') { + apiPayload['transactionId'] = transactionId; + } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } + if (typeof ttl !== 'undefined') { + apiPayload['ttl'] = ttl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + const request = this.client.call('post', uri, apiHeaders, apiPayload); + const defaults = { + root: 'rowList', + models: { + rowList: { + defaults: { + total: 0, + rows: [], + }, + properties: { + rows: { + items: 'row', + }, + }, + }, + row: { + defaults: { + $id: '', + $sequence: '', + $tableId: '', + $databaseId: '', + $createdAt: '', + $updatedAt: '', + $permissions: [], + }, + }, + }, + }; + + return request.then((response) => applyDefaults(response, defaults)); + } + /** * Get a row by its unique ID. This endpoint response returns a JSON object with the row data. * diff --git a/src/services/vectors-db.ts b/src/services/vectors-db.ts index d2f0c5d..fe290d1 100644 --- a/src/services/vectors-db.ts +++ b/src/services/vectors-db.ts @@ -96,6 +96,7 @@ export class VectorsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -149,6 +150,7 @@ export class VectorsDB { * @param {string} params.databaseId - Unique 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. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string} params.description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -159,6 +161,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -170,6 +173,7 @@ export class VectorsDB { * @param {string} databaseId - Unique 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. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string} description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -181,6 +185,7 @@ export class VectorsDB { databaseId: string, name: string, enabled?: boolean, + description?: string, specification?: string, replicas?: number, syncMode?: string | null, @@ -191,17 +196,26 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; } | string, - ...rest: [string?, boolean?, string?, number?, (string | null)?] + ...rest: [ + string?, + boolean?, + string?, + string?, + number?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -216,6 +230,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -225,15 +240,17 @@ export class VectorsDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string, - replicas: rest[3] as number, - syncMode: rest[4] as string | null, + description: rest[2] as string, + specification: rest[3] as string, + replicas: rest[4] as number, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -256,6 +273,9 @@ export class VectorsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -281,6 +301,7 @@ export class VectorsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -934,6 +955,7 @@ export class VectorsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -986,6 +1008,7 @@ export class VectorsDB { * @param {string} params.databaseId - Database ID. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string | null} params.description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -996,6 +1019,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1006,6 +1030,7 @@ export class VectorsDB { * @param {string} databaseId - Database ID. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string | null} description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -1017,6 +1042,7 @@ export class VectorsDB { databaseId: string, name: string, enabled?: boolean, + description?: string | null, specification?: string | null, replicas?: number | null, syncMode?: string | null, @@ -1027,6 +1053,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1036,6 +1063,7 @@ export class VectorsDB { string?, boolean?, (string | null)?, + (string | null)?, (number | null)?, (string | null)?, ] @@ -1044,6 +1072,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1058,6 +1087,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1067,15 +1097,17 @@ export class VectorsDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string | null, - replicas: rest[3] as number | null, - syncMode: rest[4] as string | null, + description: rest[2] as string | null, + specification: rest[3] as string | null, + replicas: rest[4] as number | null, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -1098,6 +1130,9 @@ export class VectorsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -1123,6 +1158,7 @@ export class VectorsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -1347,6 +1383,7 @@ export class VectorsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1367,6 +1404,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1389,6 +1427,7 @@ export class VectorsDB { * @param {string[]} params.permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @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). * @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. + * @param {string} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} */ @@ -1400,6 +1439,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean; + description?: string; }): Promise; /** * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. @@ -1411,6 +1451,7 @@ export class VectorsDB { * @param {string[]} permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @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). * @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. + * @param {string} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1423,6 +1464,7 @@ export class VectorsDB { permissions?: string[], documentSecurity?: boolean, enabled?: boolean, + description?: string, ): Promise; createCollection( paramsOrFirst: @@ -1434,9 +1476,18 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean; + description?: string; } | string, - ...rest: [string?, string?, number?, string[]?, boolean?, boolean?] + ...rest: [ + string?, + string?, + number?, + string[]?, + boolean?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -1446,6 +1497,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean; + description?: string; }; if ( @@ -1461,6 +1513,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean; + description?: string; }; } else { params = { @@ -1471,6 +1524,7 @@ export class VectorsDB { permissions: rest[3] as string[], documentSecurity: rest[4] as boolean, enabled: rest[5] as boolean, + description: rest[6] as string, }; } @@ -1481,6 +1535,7 @@ export class VectorsDB { const permissions = params.permissions; const documentSecurity = params.documentSecurity; const enabled = params.enabled; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1522,6 +1577,9 @@ export class VectorsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1542,6 +1600,7 @@ export class VectorsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1562,6 +1621,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1659,6 +1719,7 @@ export class VectorsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1679,6 +1740,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1701,6 +1763,7 @@ export class VectorsDB { * @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). * @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). * @param {boolean | null} 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. + * @param {string | null} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} */ @@ -1712,6 +1775,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean | null; + description?: string | null; }): Promise; /** * Update a collection by its unique ID. @@ -1723,6 +1787,7 @@ export class VectorsDB { * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @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). * @param {boolean | null} 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. + * @param {string | null} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1735,6 +1800,7 @@ export class VectorsDB { permissions?: string[], documentSecurity?: boolean, enabled?: boolean | null, + description?: string | null, ): Promise; updateCollection( paramsOrFirst: @@ -1746,6 +1812,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean | null; + description?: string | null; } | string, ...rest: [ @@ -1755,6 +1822,7 @@ export class VectorsDB { string[]?, boolean?, (boolean | null)?, + (string | null)?, ] ): Promise { let params: { @@ -1765,6 +1833,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean | null; + description?: string | null; }; if ( @@ -1780,6 +1849,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean | null; + description?: string | null; }; } else { params = { @@ -1790,6 +1860,7 @@ export class VectorsDB { permissions: rest[3] as string[], documentSecurity: rest[4] as boolean, enabled: rest[5] as boolean | null, + description: rest[6] as string | null, }; } @@ -1800,6 +1871,7 @@ export class VectorsDB { const permissions = params.permissions; const documentSecurity = params.documentSecurity; const enabled = params.enabled; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1835,6 +1907,9 @@ export class VectorsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1855,6 +1930,7 @@ export class VectorsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1875,6 +1951,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -3831,6 +3908,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -3854,6 +3932,7 @@ export class VectorsDB { * @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} params.orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} params.lengths - Length of index. Maximum of 100 + * @param {string} params.description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} */ @@ -3865,6 +3944,7 @@ export class VectorsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }): Promise; /** * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. @@ -3877,6 +3957,7 @@ export class VectorsDB { * @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} lengths - Length of index. Maximum of 100 + * @param {string} description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3889,6 +3970,7 @@ export class VectorsDB { attributes: string[], orders?: OrderBy[], lengths?: number[], + description?: string, ): Promise; createIndex( paramsOrFirst: @@ -3900,6 +3982,7 @@ export class VectorsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; } | string, ...rest: [ @@ -3909,6 +3992,7 @@ export class VectorsDB { string[]?, OrderBy[]?, number[]?, + string?, ] ): Promise { let params: { @@ -3919,6 +4003,7 @@ export class VectorsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; if ( @@ -3934,6 +4019,7 @@ export class VectorsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; } else { params = { @@ -3944,6 +4030,7 @@ export class VectorsDB { attributes: rest[3] as string[], orders: rest[4] as OrderBy[], lengths: rest[5] as number[], + description: rest[6] as string, }; } @@ -3954,6 +4041,7 @@ export class VectorsDB { const attributes = params.attributes; const orders = params.orders; const lengths = params.lengths; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3998,6 +4086,9 @@ export class VectorsDB { if (typeof lengths !== 'undefined') { apiPayload['lengths'] = lengths; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4016,6 +4107,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -4124,6 +4216,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], diff --git a/src/services/webhooks.ts b/src/services/webhooks.ts index 32f492f..02f9f2d 100644 --- a/src/services/webhooks.ts +++ b/src/services/webhooks.ts @@ -96,6 +96,7 @@ export class Webhooks { $createdAt: '', $updatedAt: '', name: '', + description: '', url: '', events: [], tls: true, @@ -125,6 +126,7 @@ export class Webhooks { * @param {string} params.authUsername - Webhook HTTP user. Max length: 255 chars. * @param {string} params.authPassword - Webhook HTTP password. Max length: 2048 chars. * @param {string | null} params.secret - Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters. + * @param {string} params.description - Optional description for the webhook. * @throws {AppwriteException} * @returns {Promise} */ @@ -138,6 +140,7 @@ export class Webhooks { authUsername?: string; authPassword?: string; secret?: string | null; + description?: string; }): Promise; /** * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. @@ -151,6 +154,7 @@ export class Webhooks { * @param {string} authUsername - Webhook HTTP user. Max length: 255 chars. * @param {string} authPassword - Webhook HTTP password. Max length: 2048 chars. * @param {string | null} secret - Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters. + * @param {string} description - Optional description for the webhook. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -165,6 +169,7 @@ export class Webhooks { authUsername?: string, authPassword?: string, secret?: string | null, + description?: string, ): Promise; create( paramsOrFirst: @@ -178,6 +183,7 @@ export class Webhooks { authUsername?: string; authPassword?: string; secret?: string | null; + description?: string; } | string, ...rest: [ @@ -189,6 +195,7 @@ export class Webhooks { string?, string?, (string | null)?, + string?, ] ): Promise { let params: { @@ -201,6 +208,7 @@ export class Webhooks { authUsername?: string; authPassword?: string; secret?: string | null; + description?: string; }; if ( @@ -218,6 +226,7 @@ export class Webhooks { authUsername?: string; authPassword?: string; secret?: string | null; + description?: string; }; } else { params = { @@ -230,6 +239,7 @@ export class Webhooks { authUsername: rest[5] as string, authPassword: rest[6] as string, secret: rest[7] as string | null, + description: rest[8] as string, }; } @@ -242,6 +252,7 @@ export class Webhooks { const authUsername = params.authUsername; const authPassword = params.authPassword; const secret = params.secret; + const description = params.description; if (typeof webhookId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "webhookId"', @@ -285,6 +296,9 @@ export class Webhooks { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -303,6 +317,7 @@ export class Webhooks { $createdAt: '', $updatedAt: '', name: '', + description: '', url: '', events: [], tls: true, @@ -382,6 +397,7 @@ export class Webhooks { $createdAt: '', $updatedAt: '', name: '', + description: '', url: '', events: [], tls: true, @@ -410,6 +426,7 @@ export class Webhooks { * @param {boolean} params.tls - Certificate verification, false for disabled or true for enabled. * @param {string} params.authUsername - Webhook HTTP user. Max length: 255 chars. * @param {string | null} params.authPassword - Webhook HTTP password. Max length: 2048 chars. Omit to keep the current password; it is cleared when the URL changes or TLS verification is disabled. + * @param {string | null} params.description - Optional description for the webhook. * @throws {AppwriteException} * @returns {Promise} */ @@ -422,6 +439,7 @@ export class Webhooks { tls?: boolean; authUsername?: string; authPassword?: string | null; + description?: string | null; }): Promise; /** * Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. @@ -434,6 +452,7 @@ export class Webhooks { * @param {boolean} tls - Certificate verification, false for disabled or true for enabled. * @param {string} authUsername - Webhook HTTP user. Max length: 255 chars. * @param {string | null} authPassword - Webhook HTTP password. Max length: 2048 chars. Omit to keep the current password; it is cleared when the URL changes or TLS verification is disabled. + * @param {string | null} description - Optional description for the webhook. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -447,6 +466,7 @@ export class Webhooks { tls?: boolean, authUsername?: string, authPassword?: string | null, + description?: string | null, ): Promise; update( paramsOrFirst: @@ -459,6 +479,7 @@ export class Webhooks { tls?: boolean; authUsername?: string; authPassword?: string | null; + description?: string | null; } | string, ...rest: [ @@ -469,6 +490,7 @@ export class Webhooks { boolean?, string?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -480,6 +502,7 @@ export class Webhooks { tls?: boolean; authUsername?: string; authPassword?: string | null; + description?: string | null; }; if ( @@ -496,6 +519,7 @@ export class Webhooks { tls?: boolean; authUsername?: string; authPassword?: string | null; + description?: string | null; }; } else { params = { @@ -507,6 +531,7 @@ export class Webhooks { tls: rest[4] as boolean, authUsername: rest[5] as string, authPassword: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -518,6 +543,7 @@ export class Webhooks { const tls = params.tls; const authUsername = params.authUsername; const authPassword = params.authPassword; + const description = params.description; if (typeof webhookId === 'undefined' || webhookId === '') { throw new AppwriteException( 'Missing required parameter: "webhookId"', @@ -558,6 +584,9 @@ export class Webhooks { if (typeof authPassword !== 'undefined') { apiPayload['authPassword'] = authPassword; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -576,6 +605,7 @@ export class Webhooks { $createdAt: '', $updatedAt: '', name: '', + description: '', url: '', events: [], tls: true, @@ -727,6 +757,7 @@ export class Webhooks { $createdAt: '', $updatedAt: '', name: '', + description: '', url: '', events: [], tls: true, diff --git a/test/query.test.js b/test/query.test.js index 1083ecd..d84064f 100644 --- a/test/query.test.js +++ b/test/query.test.js @@ -376,6 +376,23 @@ describe('Query', () => { values: ['ord'], })); + test('nested join without alias leaves the alias to the server', () => { + const query = JSON.parse( + Query.join('orders', [Query.on('$id', 'customerId')]), + ); + expect(query.method).toEqual('join'); + expect(query.attribute).toEqual('orders'); + expect(query.values).toHaveLength(1); + expect(query.values[0].method).toEqual('on'); + }); + + test('crossJoin without alias leaves the alias to the server', () => { + const query = JSON.parse(Query.crossJoin('orders')); + expect(query.method).toEqual('crossJoin'); + expect(query.attribute).toEqual('orders'); + expect(query.values ?? []).toEqual([]); + }); + test('vectorDot', () => expectQuery(Query.vectorDot('embedding', [0.1, 0.2])).toEqual({ method: 'vectorDot', diff --git a/test/services/account.test.js b/test/services/account.test.js index 0bd3f1c..bce69f3 100644 --- a/test/services/account.test.js +++ b/test/services/account.test.js @@ -219,6 +219,19 @@ describe('Account', () => { expect(response).toEqual(data); }); + test('test method listMemberships()', async () => { + const data = { + total: 5, + memberships: [], + }; + mockedFetch.mockImplementation(() => Response.json(data)); + const response = await account.listMemberships(); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); test('test method updateMFA()', async () => { const data = { $id: '5e5ea5c16897e', diff --git a/test/services/databases.test.js b/test/services/databases.test.js index 502bcb0..8bc6447 100644 --- a/test/services/databases.test.js +++ b/test/services/databases.test.js @@ -28,6 +28,7 @@ describe('Databases', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -136,6 +137,7 @@ describe('Databases', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -153,6 +155,7 @@ describe('Databases', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -197,6 +200,7 @@ describe('Databases', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -224,6 +228,7 @@ describe('Databases', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -250,6 +255,7 @@ describe('Databases', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -300,6 +306,7 @@ describe('Databases', () => { test('test method createBigIntAttribute()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'bigint', status: 'available', error: 'string', @@ -323,6 +330,7 @@ describe('Databases', () => { test('test method updateBigIntAttribute()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'bigint', status: 'available', error: 'string', @@ -347,6 +355,7 @@ describe('Databases', () => { test('test method createBooleanAttribute()', async () => { const data = { key: 'isEnabled', + description: 'Name shown on the public profile.', type: 'boolean', status: 'available', error: 'string', @@ -370,6 +379,7 @@ describe('Databases', () => { test('test method updateBooleanAttribute()', async () => { const data = { key: 'isEnabled', + description: 'Name shown on the public profile.', type: 'boolean', status: 'available', error: 'string', @@ -394,6 +404,7 @@ describe('Databases', () => { test('test method createDatetimeAttribute()', async () => { const data = { key: 'birthDay', + description: 'Name shown on the public profile.', type: 'datetime', status: 'available', error: 'string', @@ -418,6 +429,7 @@ describe('Databases', () => { test('test method updateDatetimeAttribute()', async () => { const data = { key: 'birthDay', + description: 'Name shown on the public profile.', type: 'datetime', status: 'available', error: 'string', @@ -443,6 +455,7 @@ describe('Databases', () => { test('test method createEmailAttribute()', async () => { const data = { key: 'userEmail', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -467,6 +480,7 @@ describe('Databases', () => { test('test method updateEmailAttribute()', async () => { const data = { key: 'userEmail', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -492,6 +506,7 @@ describe('Databases', () => { test('test method createEnumAttribute()', async () => { const data = { key: 'status', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -518,6 +533,7 @@ describe('Databases', () => { test('test method updateEnumAttribute()', async () => { const data = { key: 'status', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -545,6 +561,7 @@ describe('Databases', () => { test('test method createFloatAttribute()', async () => { const data = { key: 'percentageCompleted', + description: 'Name shown on the public profile.', type: 'double', status: 'available', error: 'string', @@ -568,6 +585,7 @@ describe('Databases', () => { test('test method updateFloatAttribute()', async () => { const data = { key: 'percentageCompleted', + description: 'Name shown on the public profile.', type: 'double', status: 'available', error: 'string', @@ -592,6 +610,7 @@ describe('Databases', () => { test('test method createIntegerAttribute()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'integer', status: 'available', error: 'string', @@ -615,6 +634,7 @@ describe('Databases', () => { test('test method updateIntegerAttribute()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'integer', status: 'available', error: 'string', @@ -639,6 +659,7 @@ describe('Databases', () => { test('test method createIpAttribute()', async () => { const data = { key: 'ipAddress', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -663,6 +684,7 @@ describe('Databases', () => { test('test method updateIpAttribute()', async () => { const data = { key: 'ipAddress', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -688,6 +710,7 @@ describe('Databases', () => { test('test method createLineAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -711,6 +734,7 @@ describe('Databases', () => { test('test method updateLineAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -734,6 +758,7 @@ describe('Databases', () => { test('test method createLongtextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -757,6 +782,7 @@ describe('Databases', () => { test('test method updateLongtextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -781,6 +807,7 @@ describe('Databases', () => { test('test method createMediumtextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -804,6 +831,7 @@ describe('Databases', () => { test('test method updateMediumtextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -828,6 +856,7 @@ describe('Databases', () => { test('test method createPointAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -851,6 +880,7 @@ describe('Databases', () => { test('test method updatePointAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -874,6 +904,7 @@ describe('Databases', () => { test('test method createPolygonAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -897,6 +928,7 @@ describe('Databases', () => { test('test method updatePolygonAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -920,6 +952,7 @@ describe('Databases', () => { test('test method createRelationshipAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -949,6 +982,7 @@ describe('Databases', () => { test('test method updateRelationshipAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -977,6 +1011,7 @@ describe('Databases', () => { test('test method createStringAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1002,6 +1037,7 @@ describe('Databases', () => { test('test method updateStringAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1027,6 +1063,7 @@ describe('Databases', () => { test('test method createTextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1050,6 +1087,7 @@ describe('Databases', () => { test('test method updateTextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1074,6 +1112,7 @@ describe('Databases', () => { test('test method createUrlAttribute()', async () => { const data = { key: 'githubUrl', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1098,6 +1137,7 @@ describe('Databases', () => { test('test method updateUrlAttribute()', async () => { const data = { key: 'githubUrl', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1123,6 +1163,7 @@ describe('Databases', () => { test('test method createVarcharAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1148,6 +1189,7 @@ describe('Databases', () => { test('test method updateVarcharAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1173,6 +1215,7 @@ describe('Databases', () => { test('test method getAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1312,6 +1355,22 @@ describe('Databases', () => { expect(response).toEqual(data); }); + test('test method createQuery()', async () => { + const data = { + total: 5, + documents: [], + }; + mockedFetch.mockImplementation(() => Response.json(data)); + const response = await databases.createQuery( + '', + '', + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); test('test method getDocument()', async () => { const data = { $id: '5e5ea5c16897e', @@ -1460,6 +1519,7 @@ describe('Databases', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', @@ -1486,6 +1546,7 @@ describe('Databases', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', diff --git a/test/services/documents-d-b.test.js b/test/services/documents-d-b.test.js index b56872d..8a1fa5b 100644 --- a/test/services/documents-d-b.test.js +++ b/test/services/documents-d-b.test.js @@ -28,6 +28,7 @@ describe('DocumentsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -151,6 +152,7 @@ describe('DocumentsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -168,6 +170,7 @@ describe('DocumentsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -212,6 +215,7 @@ describe('DocumentsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -239,6 +243,7 @@ describe('DocumentsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -265,6 +270,7 @@ describe('DocumentsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -402,6 +408,22 @@ describe('DocumentsDB', () => { expect(response).toEqual(data); }); + test('test method createQuery()', async () => { + const data = { + total: 5, + documents: [], + }; + mockedFetch.mockImplementation(() => Response.json(data)); + const response = await documentsDB.createQuery( + '', + '', + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); test('test method getDocument()', async () => { const data = { $id: '5e5ea5c16897e', @@ -550,6 +572,7 @@ describe('DocumentsDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', @@ -576,6 +599,7 @@ describe('DocumentsDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', diff --git a/test/services/functions.test.js b/test/services/functions.test.js index 78f0a33..231282f 100644 --- a/test/services/functions.test.js +++ b/test/services/functions.test.js @@ -32,6 +32,7 @@ describe('Functions', () => { $updatedAt: '2020-10-15T06:38:00.000+00:00', execute: [], name: 'My Function', + description: 'Sends a welcome email to newly registered users.', enabled: true, live: true, logging: true, @@ -106,6 +107,7 @@ describe('Functions', () => { $updatedAt: '2020-10-15T06:38:00.000+00:00', execute: [], name: 'My Function', + description: 'Sends a welcome email to newly registered users.', enabled: true, live: true, logging: true, @@ -150,6 +152,7 @@ describe('Functions', () => { $updatedAt: '2020-10-15T06:38:00.000+00:00', execute: [], name: 'My Function', + description: 'Sends a welcome email to newly registered users.', enabled: true, live: true, logging: true, @@ -204,6 +207,7 @@ describe('Functions', () => { $updatedAt: '2020-10-15T06:38:00.000+00:00', execute: [], name: 'My Function', + description: 'Sends a welcome email to newly registered users.', enabled: true, live: true, logging: true, @@ -659,6 +663,7 @@ describe('Functions', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -683,6 +688,7 @@ describe('Functions', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -705,6 +711,7 @@ describe('Functions', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', diff --git a/test/services/messaging.test.js b/test/services/messaging.test.js index 3ffc4e3..084a603 100644 --- a/test/services/messaging.test.js +++ b/test/services/messaging.test.js @@ -963,6 +963,7 @@ describe('Messaging', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'events', + description: 'Order status updates sent to customers.', emailTotal: 100, smsTotal: 100, pushTotal: 100, @@ -982,6 +983,7 @@ describe('Messaging', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'events', + description: 'Order status updates sent to customers.', emailTotal: 100, smsTotal: 100, pushTotal: 100, @@ -1001,6 +1003,7 @@ describe('Messaging', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'events', + description: 'Order status updates sent to customers.', emailTotal: 100, smsTotal: 100, pushTotal: 100, diff --git a/test/services/organization.test.js b/test/services/organization.test.js index e955287..9c92cb6 100644 --- a/test/services/organization.test.js +++ b/test/services/organization.test.js @@ -422,6 +422,7 @@ describe('Organization', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', @@ -446,6 +447,7 @@ describe('Organization', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', @@ -469,6 +471,7 @@ describe('Organization', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', diff --git a/test/services/project.test.js b/test/services/project.test.js index 13066dc..d6f2eea 100644 --- a/test/services/project.test.js +++ b/test/services/project.test.js @@ -254,6 +254,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', @@ -274,6 +275,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', @@ -294,6 +296,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', @@ -2399,6 +2402,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -2422,6 +2426,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -2441,6 +2446,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', diff --git a/test/services/sites.test.js b/test/services/sites.test.js index cf30e82..d0644f7 100644 --- a/test/services/sites.test.js +++ b/test/services/sites.test.js @@ -31,6 +31,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Site', + description: 'Marketing site for the spring launch.', enabled: true, live: true, logging: true, @@ -108,6 +109,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Site', + description: 'Marketing site for the spring launch.', enabled: true, live: true, logging: true, @@ -154,6 +156,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Site', + description: 'Marketing site for the spring launch.', enabled: true, live: true, logging: true, @@ -210,6 +213,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Site', + description: 'Marketing site for the spring launch.', enabled: true, live: true, logging: true, @@ -632,6 +636,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -656,6 +661,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -675,6 +681,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', diff --git a/test/services/storage.test.js b/test/services/storage.test.js index b46b168..a085166 100644 --- a/test/services/storage.test.js +++ b/test/services/storage.test.js @@ -33,6 +33,7 @@ describe('Storage', () => { $permissions: [], fileSecurity: true, name: 'Documents', + description: 'Invoices and receipts uploaded by customers.', enabled: true, maximumFileSize: 100, allowedFileExtensions: [], @@ -58,6 +59,7 @@ describe('Storage', () => { $permissions: [], fileSecurity: true, name: 'Documents', + description: 'Invoices and receipts uploaded by customers.', enabled: true, maximumFileSize: 100, allowedFileExtensions: [], @@ -83,6 +85,7 @@ describe('Storage', () => { $permissions: [], fileSecurity: true, name: 'Documents', + description: 'Invoices and receipts uploaded by customers.', enabled: true, maximumFileSize: 100, allowedFileExtensions: [], diff --git a/test/services/tables-d-b.test.js b/test/services/tables-d-b.test.js index 6320233..a182489 100644 --- a/test/services/tables-d-b.test.js +++ b/test/services/tables-d-b.test.js @@ -28,6 +28,7 @@ describe('TablesDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -149,6 +150,7 @@ describe('TablesDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -166,6 +168,7 @@ describe('TablesDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -438,6 +441,7 @@ describe('TablesDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Table', + description: 'Movies available in the catalog.', enabled: true, rowSecurity: true, columns: [], @@ -465,6 +469,7 @@ describe('TablesDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Table', + description: 'Movies available in the catalog.', enabled: true, rowSecurity: true, columns: [], @@ -488,6 +493,7 @@ describe('TablesDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Table', + description: 'Movies available in the catalog.', enabled: true, rowSecurity: true, columns: [], @@ -538,6 +544,7 @@ describe('TablesDB', () => { test('test method createBigIntColumn()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'bigint', status: 'available', error: 'string', @@ -561,6 +568,7 @@ describe('TablesDB', () => { test('test method updateBigIntColumn()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'bigint', status: 'available', error: 'string', @@ -585,6 +593,7 @@ describe('TablesDB', () => { test('test method createBooleanColumn()', async () => { const data = { key: 'isEnabled', + description: 'Name shown on the public profile.', type: 'boolean', status: 'available', error: 'string', @@ -608,6 +617,7 @@ describe('TablesDB', () => { test('test method updateBooleanColumn()', async () => { const data = { key: 'isEnabled', + description: 'Name shown on the public profile.', type: 'boolean', status: 'available', error: 'string', @@ -632,6 +642,7 @@ describe('TablesDB', () => { test('test method createDatetimeColumn()', async () => { const data = { key: 'birthDay', + description: 'Name shown on the public profile.', type: 'datetime', status: 'available', error: 'string', @@ -656,6 +667,7 @@ describe('TablesDB', () => { test('test method updateDatetimeColumn()', async () => { const data = { key: 'birthDay', + description: 'Name shown on the public profile.', type: 'datetime', status: 'available', error: 'string', @@ -681,6 +693,7 @@ describe('TablesDB', () => { test('test method createEmailColumn()', async () => { const data = { key: 'userEmail', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -705,6 +718,7 @@ describe('TablesDB', () => { test('test method updateEmailColumn()', async () => { const data = { key: 'userEmail', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -730,6 +744,7 @@ describe('TablesDB', () => { test('test method createEnumColumn()', async () => { const data = { key: 'status', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -756,6 +771,7 @@ describe('TablesDB', () => { test('test method updateEnumColumn()', async () => { const data = { key: 'status', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -783,6 +799,7 @@ describe('TablesDB', () => { test('test method createFloatColumn()', async () => { const data = { key: 'percentageCompleted', + description: 'Name shown on the public profile.', type: 'double', status: 'available', error: 'string', @@ -806,6 +823,7 @@ describe('TablesDB', () => { test('test method updateFloatColumn()', async () => { const data = { key: 'percentageCompleted', + description: 'Name shown on the public profile.', type: 'double', status: 'available', error: 'string', @@ -830,6 +848,7 @@ describe('TablesDB', () => { test('test method createIntegerColumn()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'integer', status: 'available', error: 'string', @@ -853,6 +872,7 @@ describe('TablesDB', () => { test('test method updateIntegerColumn()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'integer', status: 'available', error: 'string', @@ -877,6 +897,7 @@ describe('TablesDB', () => { test('test method createIpColumn()', async () => { const data = { key: 'ipAddress', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -901,6 +922,7 @@ describe('TablesDB', () => { test('test method updateIpColumn()', async () => { const data = { key: 'ipAddress', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -926,6 +948,7 @@ describe('TablesDB', () => { test('test method createLineColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -949,6 +972,7 @@ describe('TablesDB', () => { test('test method updateLineColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -972,6 +996,7 @@ describe('TablesDB', () => { test('test method createLongtextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -995,6 +1020,7 @@ describe('TablesDB', () => { test('test method updateLongtextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1019,6 +1045,7 @@ describe('TablesDB', () => { test('test method createMediumtextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1042,6 +1069,7 @@ describe('TablesDB', () => { test('test method updateMediumtextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1066,6 +1094,7 @@ describe('TablesDB', () => { test('test method createPointColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1089,6 +1118,7 @@ describe('TablesDB', () => { test('test method updatePointColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1112,6 +1142,7 @@ describe('TablesDB', () => { test('test method createPolygonColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1135,6 +1166,7 @@ describe('TablesDB', () => { test('test method updatePolygonColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1158,6 +1190,7 @@ describe('TablesDB', () => { test('test method createRelationshipColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1187,6 +1220,7 @@ describe('TablesDB', () => { test('test method updateRelationshipColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1215,6 +1249,7 @@ describe('TablesDB', () => { test('test method createStringColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1240,6 +1275,7 @@ describe('TablesDB', () => { test('test method updateStringColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1265,6 +1301,7 @@ describe('TablesDB', () => { test('test method createTextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1288,6 +1325,7 @@ describe('TablesDB', () => { test('test method updateTextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1312,6 +1350,7 @@ describe('TablesDB', () => { test('test method createUrlColumn()', async () => { const data = { key: 'githubUrl', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1336,6 +1375,7 @@ describe('TablesDB', () => { test('test method updateUrlColumn()', async () => { const data = { key: 'githubUrl', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1361,6 +1401,7 @@ describe('TablesDB', () => { test('test method createVarcharColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1386,6 +1427,7 @@ describe('TablesDB', () => { test('test method updateVarcharColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1411,6 +1453,7 @@ describe('TablesDB', () => { test('test method getColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1467,6 +1510,7 @@ describe('TablesDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', @@ -1493,6 +1537,7 @@ describe('TablesDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', @@ -1627,6 +1672,22 @@ describe('TablesDB', () => { expect(response).toEqual(data); }); + test('test method createQuery()', async () => { + const data = { + total: 5, + rows: [], + }; + mockedFetch.mockImplementation(() => Response.json(data)); + const response = await tablesDB.createQuery( + '', + '', + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); test('test method getRow()', async () => { const data = { $id: '5e5ea5c16897e', diff --git a/test/services/vectors-d-b.test.js b/test/services/vectors-d-b.test.js index 4fe8681..79dcf15 100644 --- a/test/services/vectors-d-b.test.js +++ b/test/services/vectors-d-b.test.js @@ -28,6 +28,7 @@ describe('VectorsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -149,6 +150,7 @@ describe('VectorsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -166,6 +168,7 @@ describe('VectorsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -210,6 +213,7 @@ describe('VectorsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -239,6 +243,7 @@ describe('VectorsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -266,6 +271,7 @@ describe('VectorsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -522,6 +528,7 @@ describe('VectorsDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', @@ -548,6 +555,7 @@ describe('VectorsDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', diff --git a/test/services/webhooks.test.js b/test/services/webhooks.test.js index d232fb5..2fbaba7 100644 --- a/test/services/webhooks.test.js +++ b/test/services/webhooks.test.js @@ -30,6 +30,7 @@ describe('Webhooks', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Webhook', + description: 'Notifies the billing service about new users.', url: 'https://example.com/webhook', events: [], tls: true, @@ -59,6 +60,7 @@ describe('Webhooks', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Webhook', + description: 'Notifies the billing service about new users.', url: 'https://example.com/webhook', events: [], tls: true, @@ -83,6 +85,7 @@ describe('Webhooks', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Webhook', + description: 'Notifies the billing service about new users.', url: 'https://example.com/webhook', events: [], tls: true, @@ -122,6 +125,7 @@ describe('Webhooks', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Webhook', + description: 'Notifies the billing service about new users.', url: 'https://example.com/webhook', events: [], tls: true, From 0b07633d3ee6c8361524256ef2fb1481b5ab3ee2 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 21 Oct 2026 12:40:16 +1300 Subject: [PATCH 2/2] chore: update Node.js SDK to 31.0.0 --- CHANGELOG.md | 15 + docs/examples/account/list-memberships.md | 15 + docs/examples/activities/list-events.md | 1 + docs/examples/backups/list-archives.md | 1 + docs/examples/backups/list-policies.md | 1 + docs/examples/backups/list-restorations.md | 1 + .../databases/create-big-int-attribute.md | 1 + .../databases/create-boolean-attribute.md | 1 + docs/examples/databases/create-collection.md | 1 + .../databases/create-datetime-attribute.md | 1 + .../databases/create-email-attribute.md | 1 + .../databases/create-enum-attribute.md | 1 + .../databases/create-float-attribute.md | 1 + docs/examples/databases/create-index.md | 1 + .../databases/create-integer-attribute.md | 1 + .../examples/databases/create-ip-attribute.md | 1 + .../databases/create-line-attribute.md | 1 + .../databases/create-longtext-attribute.md | 1 + .../databases/create-mediumtext-attribute.md | 1 + .../databases/create-point-attribute.md | 1 + .../databases/create-polygon-attribute.md | 1 + docs/examples/databases/create-query.md | 19 + .../create-relationship-attribute.md | 1 + .../databases/create-string-attribute.md | 1 + .../databases/create-text-attribute.md | 1 + .../databases/create-url-attribute.md | 1 + .../databases/create-varchar-attribute.md | 1 + docs/examples/databases/create.md | 1 + .../databases/update-big-int-attribute.md | 1 + .../databases/update-boolean-attribute.md | 1 + docs/examples/databases/update-collection.md | 1 + .../databases/update-datetime-attribute.md | 1 + .../databases/update-email-attribute.md | 1 + .../databases/update-enum-attribute.md | 1 + .../databases/update-float-attribute.md | 1 + .../databases/update-integer-attribute.md | 1 + .../examples/databases/update-ip-attribute.md | 1 + .../databases/update-line-attribute.md | 1 + .../databases/update-longtext-attribute.md | 1 + .../databases/update-mediumtext-attribute.md | 1 + .../databases/update-point-attribute.md | 1 + .../databases/update-polygon-attribute.md | 1 + .../update-relationship-attribute.md | 1 + .../databases/update-string-attribute.md | 1 + .../databases/update-text-attribute.md | 1 + .../databases/update-url-attribute.md | 1 + .../databases/update-varchar-attribute.md | 1 + docs/examples/databases/update.md | 1 + .../examples/documentsdb/create-collection.md | 1 + docs/examples/documentsdb/create-index.md | 1 + docs/examples/documentsdb/create-query.md | 19 + docs/examples/documentsdb/create.md | 1 + .../examples/documentsdb/update-collection.md | 1 + docs/examples/documentsdb/update.md | 1 + docs/examples/domains/list-records.md | 1 + docs/examples/domains/list.md | 1 + docs/examples/functions/create-variable.md | 1 + docs/examples/functions/create.md | 1 + docs/examples/functions/update-variable.md | 1 + docs/examples/functions/update.md | 1 + docs/examples/messaging/create-email.md | 1 + docs/examples/messaging/create-topic.md | 1 + docs/examples/messaging/update-email.md | 1 + docs/examples/messaging/update-topic.md | 1 + docs/examples/mongo/list-backup-policies.md | 1 + docs/examples/mongo/list-backups.md | 1 + docs/examples/mongo/list.md | 1 + docs/examples/mysql/list-backup-policies.md | 1 + docs/examples/mysql/list-backups.md | 1 + docs/examples/mysql/list.md | 1 + .../organization/update-project-key.md | 1 + .../postgresql/list-backup-policies.md | 1 + docs/examples/postgresql/list-backups.md | 1 + docs/examples/postgresql/list.md | 1 + docs/examples/project/create-variable.md | 1 + docs/examples/project/update-key.md | 1 + .../update-password-dictionary-policy.md | 1 + .../update-password-personal-data-policy.md | 1 + docs/examples/project/update-variable.md | 1 + docs/examples/sites/create-variable.md | 1 + docs/examples/sites/create.md | 1 + docs/examples/sites/update-variable.md | 1 + docs/examples/sites/update.md | 1 + docs/examples/storage/create-bucket.md | 2 + docs/examples/storage/update-bucket.md | 2 + .../tablesdb/create-big-int-column.md | 1 + .../tablesdb/create-boolean-column.md | 1 + .../tablesdb/create-datetime-column.md | 1 + docs/examples/tablesdb/create-email-column.md | 1 + docs/examples/tablesdb/create-enum-column.md | 1 + docs/examples/tablesdb/create-float-column.md | 1 + docs/examples/tablesdb/create-index.md | 1 + .../tablesdb/create-integer-column.md | 1 + docs/examples/tablesdb/create-ip-column.md | 1 + docs/examples/tablesdb/create-line-column.md | 1 + .../tablesdb/create-longtext-column.md | 1 + .../tablesdb/create-mediumtext-column.md | 1 + docs/examples/tablesdb/create-point-column.md | 1 + .../tablesdb/create-polygon-column.md | 1 + docs/examples/tablesdb/create-query.md | 19 + .../tablesdb/create-relationship-column.md | 1 + .../examples/tablesdb/create-string-column.md | 1 + docs/examples/tablesdb/create-table.md | 1 + docs/examples/tablesdb/create-text-column.md | 1 + docs/examples/tablesdb/create-url-column.md | 1 + .../tablesdb/create-varchar-column.md | 1 + docs/examples/tablesdb/create.md | 1 + .../tablesdb/update-big-int-column.md | 1 + .../tablesdb/update-boolean-column.md | 1 + .../tablesdb/update-datetime-column.md | 1 + docs/examples/tablesdb/update-email-column.md | 1 + docs/examples/tablesdb/update-enum-column.md | 1 + docs/examples/tablesdb/update-float-column.md | 1 + .../tablesdb/update-integer-column.md | 1 + docs/examples/tablesdb/update-ip-column.md | 1 + docs/examples/tablesdb/update-line-column.md | 1 + .../tablesdb/update-longtext-column.md | 1 + .../tablesdb/update-mediumtext-column.md | 1 + docs/examples/tablesdb/update-point-column.md | 1 + .../tablesdb/update-polygon-column.md | 1 + .../tablesdb/update-relationship-column.md | 1 + .../examples/tablesdb/update-string-column.md | 1 + docs/examples/tablesdb/update-table.md | 1 + docs/examples/tablesdb/update-text-column.md | 1 + docs/examples/tablesdb/update-url-column.md | 1 + .../tablesdb/update-varchar-column.md | 1 + docs/examples/tablesdb/update.md | 1 + docs/examples/vectorsdb/create-collection.md | 1 + docs/examples/vectorsdb/create-index.md | 1 + docs/examples/vectorsdb/create.md | 1 + docs/examples/vectorsdb/update-collection.md | 1 + docs/examples/vectorsdb/update.md | 1 + docs/examples/webhooks/create.md | 1 + docs/examples/webhooks/update.md | 1 + package-lock.json | 319 +++---- package.json | 5 +- src/client.ts | 4 +- src/models.ts | 224 +++++ src/query.ts | 14 +- src/services/account.ts | 115 +++ src/services/activities.ts | 25 +- src/services/backups.ts | 75 +- src/services/databases.ts | 838 +++++++++++++++++- src/services/documents-db.ts | 276 +++++- src/services/domains.ts | 39 +- src/services/functions.ts | 69 +- src/services/messaging.ts | 63 +- src/services/mongo.ts | 61 +- src/services/mysql.ts | 61 +- src/services/organization.ts | 24 +- src/services/postgresql.ts | 61 +- src/services/project.ts | 118 ++- src/services/sites.ts | 67 +- src/services/storage.ts | 64 +- src/services/tables-db.ts | 823 ++++++++++++++++- src/services/vectors-db.ts | 109 ++- src/services/webhooks.ts | 31 + test/query.test.js | 17 + test/services/account.test.js | 13 + test/services/databases.test.js | 61 ++ test/services/documents-d-b.test.js | 24 + test/services/functions.test.js | 7 + test/services/messaging.test.js | 3 + test/services/organization.test.js | 3 + test/services/project.test.js | 6 + test/services/sites.test.js | 7 + test/services/storage.test.js | 6 + test/services/tables-d-b.test.js | 61 ++ test/services/vectors-d-b.test.js | 8 + test/services/webhooks.test.js | 4 + 170 files changed, 3626 insertions(+), 297 deletions(-) create mode 100644 docs/examples/account/list-memberships.md create mode 100644 docs/examples/databases/create-query.md create mode 100644 docs/examples/documentsdb/create-query.md create mode 100644 docs/examples/tablesdb/create-query.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 27c2f13..6426bb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Change Log +## 31.0.0 + +* Breaking: positional `tablesDB`, `documentsDB` and `vectorsDB` `create` and `update` take `description` before `specification` +* Breaking: positional `functions.update` takes `description` before `emailEnabled` +* Added: `createQuery` on `databases`, `documentsDB` and `tablesDB` to send list queries in the request body +* Added: `account.listMemberships` +* Added: optional `description` on create and update for databases, collections, tables, attributes, columns, indexes, buckets, functions, sites, variables, topics, webhooks and keys +* Added: `description` on the matching models +* Added: `total` on list methods in `activities`, `backups`, `domains`, `mongo`, `mysql` and `postgresql` +* Added: `emails` on `messaging.createEmail` and `messaging.updateEmail` +* Added: `denyList` on `project.updatePasswordDictionaryPolicy`, `updatePasswordPersonalDataPolicy` and their policy models +* Added: `BillingPlan.functionsAllowCron` +* Added: `stripMetadata` on `storage.createBucket`, `updateBucket` and the `Bucket` model +* Updated: `package.json` declares `engines.node` `>=20.0.0` + ## 30.0.1 * Breaking: requests send `X-Appwrite-Response-Format: 2.5.0`; responses follow the 2.5 shapes diff --git a/docs/examples/account/list-memberships.md b/docs/examples/account/list-memberships.md new file mode 100644 index 0000000..15c8ed7 --- /dev/null +++ b/docs/examples/account/list-memberships.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const account = new sdk.Account(client); + +const result = await account.listMemberships({ + queries: [], // optional + total: false, // optional +}); +``` diff --git a/docs/examples/activities/list-events.md b/docs/examples/activities/list-events.md index 97f14e3..28aad51 100644 --- a/docs/examples/activities/list-events.md +++ b/docs/examples/activities/list-events.md @@ -10,5 +10,6 @@ const activities = new sdk.Activities(client); const result = await activities.listEvents({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/backups/list-archives.md b/docs/examples/backups/list-archives.md index 4e4ff60..9f6c68a 100644 --- a/docs/examples/backups/list-archives.md +++ b/docs/examples/backups/list-archives.md @@ -10,5 +10,6 @@ const backups = new sdk.Backups(client); const result = await backups.listArchives({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/backups/list-policies.md b/docs/examples/backups/list-policies.md index 322024b..4e29bbd 100644 --- a/docs/examples/backups/list-policies.md +++ b/docs/examples/backups/list-policies.md @@ -10,5 +10,6 @@ const backups = new sdk.Backups(client); const result = await backups.listPolicies({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/backups/list-restorations.md b/docs/examples/backups/list-restorations.md index 5ea7e0a..86c802d 100644 --- a/docs/examples/backups/list-restorations.md +++ b/docs/examples/backups/list-restorations.md @@ -10,5 +10,6 @@ const backups = new sdk.Backups(client); const result = await backups.listRestorations({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/databases/create-big-int-attribute.md b/docs/examples/databases/create-big-int-attribute.md index f52034e..2305886 100644 --- a/docs/examples/databases/create-big-int-attribute.md +++ b/docs/examples/databases/create-big-int-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createBigIntAttribute({ max: 1000000, // optional xdefault: 0, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md index 88aac35..58bd8a6 100644 --- a/docs/examples/databases/create-boolean-attribute.md +++ b/docs/examples/databases/create-boolean-attribute.md @@ -15,5 +15,6 @@ const result = await databases.createBooleanAttribute({ required: false, xdefault: false, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-collection.md b/docs/examples/databases/create-collection.md index 8eda415..996d34d 100644 --- a/docs/examples/databases/create-collection.md +++ b/docs/examples/databases/create-collection.md @@ -17,5 +17,6 @@ const result = await databases.createCollection({ enabled: false, // optional attributes: [], // optional indexes: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md index 0a90cbc..6a57679 100644 --- a/docs/examples/databases/create-datetime-attribute.md +++ b/docs/examples/databases/create-datetime-attribute.md @@ -15,5 +15,6 @@ const result = await databases.createDatetimeAttribute({ required: false, xdefault: '2020-10-15T06:38:00.000+00:00', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md index 0f2f7ac..3f823f8 100644 --- a/docs/examples/databases/create-email-attribute.md +++ b/docs/examples/databases/create-email-attribute.md @@ -15,5 +15,6 @@ const result = await databases.createEmailAttribute({ required: false, xdefault: 'email@example.com', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md index fddf585..c78cf77 100644 --- a/docs/examples/databases/create-enum-attribute.md +++ b/docs/examples/databases/create-enum-attribute.md @@ -16,5 +16,6 @@ const result = await databases.createEnumAttribute({ required: false, xdefault: 'active', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md index ebf6ef5..a894a79 100644 --- a/docs/examples/databases/create-float-attribute.md +++ b/docs/examples/databases/create-float-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createFloatAttribute({ max: 100, // optional xdefault: 10.5, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-index.md b/docs/examples/databases/create-index.md index ae24378..932e497 100644 --- a/docs/examples/databases/create-index.md +++ b/docs/examples/databases/create-index.md @@ -16,5 +16,6 @@ const result = await databases.createIndex({ attributes: ['username'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md index b9f5654..8eda692 100644 --- a/docs/examples/databases/create-integer-attribute.md +++ b/docs/examples/databases/create-integer-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createIntegerAttribute({ max: 100, // optional xdefault: 10, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md index edcee67..5dd3679 100644 --- a/docs/examples/databases/create-ip-attribute.md +++ b/docs/examples/databases/create-ip-attribute.md @@ -15,5 +15,6 @@ const result = await databases.createIpAttribute({ required: false, xdefault: '192.0.2.0', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-line-attribute.md b/docs/examples/databases/create-line-attribute.md index 01ae03e..986bf35 100644 --- a/docs/examples/databases/create-line-attribute.md +++ b/docs/examples/databases/create-line-attribute.md @@ -18,5 +18,6 @@ const result = await databases.createLineAttribute({ [3, 4], [5, 6], ], // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-longtext-attribute.md b/docs/examples/databases/create-longtext-attribute.md index 6685fde..cff4734 100644 --- a/docs/examples/databases/create-longtext-attribute.md +++ b/docs/examples/databases/create-longtext-attribute.md @@ -16,5 +16,6 @@ const result = await databases.createLongtextAttribute({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-mediumtext-attribute.md b/docs/examples/databases/create-mediumtext-attribute.md index ed950b4..096c96f 100644 --- a/docs/examples/databases/create-mediumtext-attribute.md +++ b/docs/examples/databases/create-mediumtext-attribute.md @@ -16,5 +16,6 @@ const result = await databases.createMediumtextAttribute({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-point-attribute.md b/docs/examples/databases/create-point-attribute.md index 6825bfe..6ccc21e 100644 --- a/docs/examples/databases/create-point-attribute.md +++ b/docs/examples/databases/create-point-attribute.md @@ -14,5 +14,6 @@ const result = await databases.createPointAttribute({ key: '', required: false, xdefault: [1, 2], // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-polygon-attribute.md b/docs/examples/databases/create-polygon-attribute.md index c155e13..f5033c2 100644 --- a/docs/examples/databases/create-polygon-attribute.md +++ b/docs/examples/databases/create-polygon-attribute.md @@ -21,5 +21,6 @@ const result = await databases.createPolygonAttribute({ [1, 2], ], ], // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-query.md b/docs/examples/databases/create-query.md new file mode 100644 index 0000000..756c698 --- /dev/null +++ b/docs/examples/databases/create-query.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const databases = new sdk.Databases(client); + +const result = await databases.createQuery({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/docs/examples/databases/create-relationship-attribute.md b/docs/examples/databases/create-relationship-attribute.md index 4d79cf4..31e7772 100644 --- a/docs/examples/databases/create-relationship-attribute.md +++ b/docs/examples/databases/create-relationship-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createRelationshipAttribute({ key: '', // optional twoWayKey: '', // optional onDelete: sdk.RelationMutate.Cascade, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md index 187afaf..9eb11c3 100644 --- a/docs/examples/databases/create-string-attribute.md +++ b/docs/examples/databases/create-string-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createStringAttribute({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-text-attribute.md b/docs/examples/databases/create-text-attribute.md index 3dec73c..ed3c3d7 100644 --- a/docs/examples/databases/create-text-attribute.md +++ b/docs/examples/databases/create-text-attribute.md @@ -16,5 +16,6 @@ const result = await databases.createTextAttribute({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md index 41c5db9..30e2f38 100644 --- a/docs/examples/databases/create-url-attribute.md +++ b/docs/examples/databases/create-url-attribute.md @@ -15,5 +15,6 @@ const result = await databases.createUrlAttribute({ required: false, xdefault: 'https://example.com', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create-varchar-attribute.md b/docs/examples/databases/create-varchar-attribute.md index ce55e84..ce17b28 100644 --- a/docs/examples/databases/create-varchar-attribute.md +++ b/docs/examples/databases/create-varchar-attribute.md @@ -17,5 +17,6 @@ const result = await databases.createVarcharAttribute({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index ce42a13..bd78657 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -12,5 +12,6 @@ const result = await databases.create({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-big-int-attribute.md b/docs/examples/databases/update-big-int-attribute.md index 7603578..567320d 100644 --- a/docs/examples/databases/update-big-int-attribute.md +++ b/docs/examples/databases/update-big-int-attribute.md @@ -17,5 +17,6 @@ const result = await databases.updateBigIntAttribute({ min: 0, // optional max: 1000000, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index 5184217..169977b 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateBooleanAttribute({ required: false, xdefault: false, newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-collection.md b/docs/examples/databases/update-collection.md index d33ce0b..6743646 100644 --- a/docs/examples/databases/update-collection.md +++ b/docs/examples/databases/update-collection.md @@ -16,5 +16,6 @@ const result = await databases.updateCollection({ documentSecurity: false, // optional enabled: false, // optional purge: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index f3bb80e..5d8807a 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateDatetimeAttribute({ required: false, xdefault: '2020-10-15T06:38:00.000+00:00', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index 69658e2..7540123 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateEmailAttribute({ required: false, xdefault: 'email@example.com', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index 2463223..3c6bd8b 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -16,5 +16,6 @@ const result = await databases.updateEnumAttribute({ required: false, xdefault: 'active', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index 63af3be..3e1295a 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -17,5 +17,6 @@ const result = await databases.updateFloatAttribute({ min: 0, // optional max: 100, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index 14a16a9..8373826 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -17,5 +17,6 @@ const result = await databases.updateIntegerAttribute({ min: 0, // optional max: 100, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index 1ece665..02abb70 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateIpAttribute({ required: false, xdefault: '192.0.2.0', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-line-attribute.md b/docs/examples/databases/update-line-attribute.md index bd36689..638cce9 100644 --- a/docs/examples/databases/update-line-attribute.md +++ b/docs/examples/databases/update-line-attribute.md @@ -19,5 +19,6 @@ const result = await databases.updateLineAttribute({ [5, 6], ], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-longtext-attribute.md b/docs/examples/databases/update-longtext-attribute.md index 97d3c28..cbfb17d 100644 --- a/docs/examples/databases/update-longtext-attribute.md +++ b/docs/examples/databases/update-longtext-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateLongtextAttribute({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-mediumtext-attribute.md b/docs/examples/databases/update-mediumtext-attribute.md index 5398f71..299a834 100644 --- a/docs/examples/databases/update-mediumtext-attribute.md +++ b/docs/examples/databases/update-mediumtext-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateMediumtextAttribute({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-point-attribute.md b/docs/examples/databases/update-point-attribute.md index 1c64a2c..eee38d2 100644 --- a/docs/examples/databases/update-point-attribute.md +++ b/docs/examples/databases/update-point-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updatePointAttribute({ required: false, xdefault: [1, 2], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-polygon-attribute.md b/docs/examples/databases/update-polygon-attribute.md index 9cff577..7842b77 100644 --- a/docs/examples/databases/update-polygon-attribute.md +++ b/docs/examples/databases/update-polygon-attribute.md @@ -22,5 +22,6 @@ const result = await databases.updatePolygonAttribute({ ], ], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index 50710f8..305fda1 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -14,5 +14,6 @@ const result = await databases.updateRelationshipAttribute({ key: '', onDelete: sdk.RelationMutate.Cascade, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index 75f269c..6543174 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -16,5 +16,6 @@ const result = await databases.updateStringAttribute({ xdefault: 'Hello World', size: 1, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-text-attribute.md b/docs/examples/databases/update-text-attribute.md index 0075135..a3107c9 100644 --- a/docs/examples/databases/update-text-attribute.md +++ b/docs/examples/databases/update-text-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateTextAttribute({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index 96c6953..eff8d8f 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -15,5 +15,6 @@ const result = await databases.updateUrlAttribute({ required: false, xdefault: 'https://example.com', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update-varchar-attribute.md b/docs/examples/databases/update-varchar-attribute.md index 1a2ad8c..1bd4a07 100644 --- a/docs/examples/databases/update-varchar-attribute.md +++ b/docs/examples/databases/update-varchar-attribute.md @@ -16,5 +16,6 @@ const result = await databases.updateVarcharAttribute({ xdefault: 'Hello World', size: 1, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/databases/update.md b/docs/examples/databases/update.md index 6ae2bc1..8640fc1 100644 --- a/docs/examples/databases/update.md +++ b/docs/examples/databases/update.md @@ -12,5 +12,6 @@ const result = await databases.update({ databaseId: '', name: '', // optional enabled: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/documentsdb/create-collection.md b/docs/examples/documentsdb/create-collection.md index 5915ae9..8d0fe98 100644 --- a/docs/examples/documentsdb/create-collection.md +++ b/docs/examples/documentsdb/create-collection.md @@ -17,5 +17,6 @@ const result = await documentsDB.createCollection({ enabled: false, // optional attributes: [], // optional indexes: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/documentsdb/create-index.md b/docs/examples/documentsdb/create-index.md index 40035ea..e437154 100644 --- a/docs/examples/documentsdb/create-index.md +++ b/docs/examples/documentsdb/create-index.md @@ -16,5 +16,6 @@ const result = await documentsDB.createIndex({ attributes: ['username'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/documentsdb/create-query.md b/docs/examples/documentsdb/create-query.md new file mode 100644 index 0000000..8a108fe --- /dev/null +++ b/docs/examples/documentsdb/create-query.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createQuery({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/docs/examples/documentsdb/create.md b/docs/examples/documentsdb/create.md index cb0806b..2477afb 100644 --- a/docs/examples/documentsdb/create.md +++ b/docs/examples/documentsdb/create.md @@ -12,6 +12,7 @@ const result = await documentsDB.create({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/documentsdb/update-collection.md b/docs/examples/documentsdb/update-collection.md index beb1cd3..1ead3a2 100644 --- a/docs/examples/documentsdb/update-collection.md +++ b/docs/examples/documentsdb/update-collection.md @@ -16,5 +16,6 @@ const result = await documentsDB.updateCollection({ documentSecurity: false, // optional enabled: false, // optional purge: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/documentsdb/update.md b/docs/examples/documentsdb/update.md index 1e3c22a..3833e9b 100644 --- a/docs/examples/documentsdb/update.md +++ b/docs/examples/documentsdb/update.md @@ -12,6 +12,7 @@ const result = await documentsDB.update({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/domains/list-records.md b/docs/examples/domains/list-records.md index 5cbab51..8a03b71 100644 --- a/docs/examples/domains/list-records.md +++ b/docs/examples/domains/list-records.md @@ -11,5 +11,6 @@ const domains = new sdk.Domains(client); const result = await domains.listRecords({ domainId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/domains/list.md b/docs/examples/domains/list.md index 8974554..408bcb9 100644 --- a/docs/examples/domains/list.md +++ b/docs/examples/domains/list.md @@ -11,5 +11,6 @@ const domains = new sdk.Domains(client); const result = await domains.list({ queries: [], // optional search: '', // optional + total: false, // optional }); ``` diff --git a/docs/examples/functions/create-variable.md b/docs/examples/functions/create-variable.md index e6ffd3d..c409984 100644 --- a/docs/examples/functions/create-variable.md +++ b/docs/examples/functions/create-variable.md @@ -14,5 +14,6 @@ const result = await functions.createVariable({ key: '', value: '', secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/functions/create.md b/docs/examples/functions/create.md index c20e342..ffd07dd 100644 --- a/docs/examples/functions/create.md +++ b/docs/examples/functions/create.md @@ -32,5 +32,6 @@ const result = await functions.create({ runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional interval: 0, // optional + description: '', // optional }); ``` diff --git a/docs/examples/functions/update-variable.md b/docs/examples/functions/update-variable.md index 61b9662..9237c8b 100644 --- a/docs/examples/functions/update-variable.md +++ b/docs/examples/functions/update-variable.md @@ -14,5 +14,6 @@ const result = await functions.updateVariable({ key: '', // optional value: '', // optional secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/functions/update.md b/docs/examples/functions/update.md index a9c4c9d..94f9e7b 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -32,6 +32,7 @@ const result = await functions.update({ runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional interval: 0, // optional + description: '', // optional emailEnabled: false, // optional }); ``` diff --git a/docs/examples/messaging/create-email.md b/docs/examples/messaging/create-email.md index 256234c..7900428 100644 --- a/docs/examples/messaging/create-email.md +++ b/docs/examples/messaging/create-email.md @@ -23,5 +23,6 @@ const result = await messaging.createEmail({ scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional replyToEmail: 'email@example.com', // optional replyToName: '', // optional + emails: [], // optional }); ``` diff --git a/docs/examples/messaging/create-topic.md b/docs/examples/messaging/create-topic.md index 0a4b292..587ef03 100644 --- a/docs/examples/messaging/create-topic.md +++ b/docs/examples/messaging/create-topic.md @@ -14,5 +14,6 @@ const result = await messaging.createTopic({ subscribe: ['any'], // optional qos: 0, // optional expiry: 0, // optional + description: '', // optional }); ``` diff --git a/docs/examples/messaging/update-email.md b/docs/examples/messaging/update-email.md index 0fc7a9a..7a93611 100644 --- a/docs/examples/messaging/update-email.md +++ b/docs/examples/messaging/update-email.md @@ -23,5 +23,6 @@ const result = await messaging.updateEmail({ attachments: [], // optional replyToEmail: 'email@example.com', // optional replyToName: '', // optional + emails: [], // optional }); ``` diff --git a/docs/examples/messaging/update-topic.md b/docs/examples/messaging/update-topic.md index 292b3b6..e355dd1 100644 --- a/docs/examples/messaging/update-topic.md +++ b/docs/examples/messaging/update-topic.md @@ -14,5 +14,6 @@ const result = await messaging.updateTopic({ subscribe: ['any'], // optional qos: 0, // optional expiry: 0, // optional + description: '', // optional }); ``` diff --git a/docs/examples/mongo/list-backup-policies.md b/docs/examples/mongo/list-backup-policies.md index d40381e..e2b3d7d 100644 --- a/docs/examples/mongo/list-backup-policies.md +++ b/docs/examples/mongo/list-backup-policies.md @@ -11,5 +11,6 @@ const mongo = new sdk.Mongo(client); const result = await mongo.listBackupPolicies({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/mongo/list-backups.md b/docs/examples/mongo/list-backups.md index 2041759..ba31dcc 100644 --- a/docs/examples/mongo/list-backups.md +++ b/docs/examples/mongo/list-backups.md @@ -11,5 +11,6 @@ const mongo = new sdk.Mongo(client); const result = await mongo.listBackups({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/mongo/list.md b/docs/examples/mongo/list.md index ee7406b..e4f1dbd 100644 --- a/docs/examples/mongo/list.md +++ b/docs/examples/mongo/list.md @@ -10,5 +10,6 @@ const mongo = new sdk.Mongo(client); const result = await mongo.list({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/mysql/list-backup-policies.md b/docs/examples/mysql/list-backup-policies.md index 4b3127a..76bfe62 100644 --- a/docs/examples/mysql/list-backup-policies.md +++ b/docs/examples/mysql/list-backup-policies.md @@ -11,5 +11,6 @@ const mysql = new sdk.Mysql(client); const result = await mysql.listBackupPolicies({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/mysql/list-backups.md b/docs/examples/mysql/list-backups.md index c88356e..07482ca 100644 --- a/docs/examples/mysql/list-backups.md +++ b/docs/examples/mysql/list-backups.md @@ -11,5 +11,6 @@ const mysql = new sdk.Mysql(client); const result = await mysql.listBackups({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/mysql/list.md b/docs/examples/mysql/list.md index 11907b7..77b5a85 100644 --- a/docs/examples/mysql/list.md +++ b/docs/examples/mysql/list.md @@ -10,5 +10,6 @@ const mysql = new sdk.Mysql(client); const result = await mysql.list({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/organization/update-project-key.md b/docs/examples/organization/update-project-key.md index 07440b6..d2a1f88 100644 --- a/docs/examples/organization/update-project-key.md +++ b/docs/examples/organization/update-project-key.md @@ -14,5 +14,6 @@ const result = await organization.updateProjectKey({ name: '', scopes: [sdk.ProjectKeyScopes.UsersRead], expire: '2020-10-15T06:38:00.000+00:00', // optional + description: '', // optional }); ``` diff --git a/docs/examples/postgresql/list-backup-policies.md b/docs/examples/postgresql/list-backup-policies.md index 281577f..10bab29 100644 --- a/docs/examples/postgresql/list-backup-policies.md +++ b/docs/examples/postgresql/list-backup-policies.md @@ -11,5 +11,6 @@ const postgresql = new sdk.Postgresql(client); const result = await postgresql.listBackupPolicies({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/postgresql/list-backups.md b/docs/examples/postgresql/list-backups.md index 183fd59..364b7b7 100644 --- a/docs/examples/postgresql/list-backups.md +++ b/docs/examples/postgresql/list-backups.md @@ -11,5 +11,6 @@ const postgresql = new sdk.Postgresql(client); const result = await postgresql.listBackups({ databaseId: '', queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/postgresql/list.md b/docs/examples/postgresql/list.md index 4a6597b..ab260a3 100644 --- a/docs/examples/postgresql/list.md +++ b/docs/examples/postgresql/list.md @@ -10,5 +10,6 @@ const postgresql = new sdk.Postgresql(client); const result = await postgresql.list({ queries: [], // optional + total: false, // optional }); ``` diff --git a/docs/examples/project/create-variable.md b/docs/examples/project/create-variable.md index 3f06a9e..84c214c 100644 --- a/docs/examples/project/create-variable.md +++ b/docs/examples/project/create-variable.md @@ -13,5 +13,6 @@ const result = await project.createVariable({ key: '', value: '', secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/project/update-key.md b/docs/examples/project/update-key.md index 81c77a7..b164d78 100644 --- a/docs/examples/project/update-key.md +++ b/docs/examples/project/update-key.md @@ -13,5 +13,6 @@ const result = await project.updateKey({ name: '', scopes: [sdk.ProjectKeyScopes.UsersRead], expire: '2020-10-15T06:38:00.000+00:00', // optional + description: '', // optional }); ``` diff --git a/docs/examples/project/update-password-dictionary-policy.md b/docs/examples/project/update-password-dictionary-policy.md index 859aa6e..c572f0e 100644 --- a/docs/examples/project/update-password-dictionary-policy.md +++ b/docs/examples/project/update-password-dictionary-policy.md @@ -10,5 +10,6 @@ const project = new sdk.Project(client); const result = await project.updatePasswordDictionaryPolicy({ enabled: false, + denyList: [], // optional }); ``` diff --git a/docs/examples/project/update-password-personal-data-policy.md b/docs/examples/project/update-password-personal-data-policy.md index b0669c5..097bb71 100644 --- a/docs/examples/project/update-password-personal-data-policy.md +++ b/docs/examples/project/update-password-personal-data-policy.md @@ -10,5 +10,6 @@ const project = new sdk.Project(client); const result = await project.updatePasswordPersonalDataPolicy({ enabled: false, + denyList: [], // optional }); ``` diff --git a/docs/examples/project/update-variable.md b/docs/examples/project/update-variable.md index b53da55..ccc2574 100644 --- a/docs/examples/project/update-variable.md +++ b/docs/examples/project/update-variable.md @@ -13,5 +13,6 @@ const result = await project.updateVariable({ key: '', // optional value: '', // optional secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/sites/create-variable.md b/docs/examples/sites/create-variable.md index b6acc61..f7df704 100644 --- a/docs/examples/sites/create-variable.md +++ b/docs/examples/sites/create-variable.md @@ -14,5 +14,6 @@ const result = await sites.createVariable({ key: '', value: '', secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/sites/create.md b/docs/examples/sites/create.md index 686e737..142d9fe 100644 --- a/docs/examples/sites/create.md +++ b/docs/examples/sites/create.md @@ -33,5 +33,6 @@ const result = await sites.create({ runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional scopes: [sdk.ProjectKeyScopes.ProjectRead], // optional + description: '', // optional }); ``` diff --git a/docs/examples/sites/update-variable.md b/docs/examples/sites/update-variable.md index d489347..16b9476 100644 --- a/docs/examples/sites/update-variable.md +++ b/docs/examples/sites/update-variable.md @@ -14,5 +14,6 @@ const result = await sites.updateVariable({ key: '', // optional value: '', // optional secret: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/sites/update.md b/docs/examples/sites/update.md index 932cf00..2f577ca 100644 --- a/docs/examples/sites/update.md +++ b/docs/examples/sites/update.md @@ -33,5 +33,6 @@ const result = await sites.update({ runtimeSpecification: 's-1vcpu-512mb', // optional deploymentRetention: 0, // optional scopes: [sdk.ProjectKeyScopes.ProjectRead], // optional + description: '', // optional }); ``` diff --git a/docs/examples/storage/create-bucket.md b/docs/examples/storage/create-bucket.md index fe16a23..719661d 100644 --- a/docs/examples/storage/create-bucket.md +++ b/docs/examples/storage/create-bucket.md @@ -20,5 +20,7 @@ const result = await storage.createBucket({ encryption: false, // optional antivirus: false, // optional transformations: false, // optional + description: '', // optional + stripMetadata: false, // optional }); ``` diff --git a/docs/examples/storage/update-bucket.md b/docs/examples/storage/update-bucket.md index baddf9c..dfc51ab 100644 --- a/docs/examples/storage/update-bucket.md +++ b/docs/examples/storage/update-bucket.md @@ -20,5 +20,7 @@ const result = await storage.updateBucket({ encryption: false, // optional antivirus: false, // optional transformations: false, // optional + description: '', // optional + stripMetadata: false, // optional }); ``` diff --git a/docs/examples/tablesdb/create-big-int-column.md b/docs/examples/tablesdb/create-big-int-column.md index 914c27a..486976b 100644 --- a/docs/examples/tablesdb/create-big-int-column.md +++ b/docs/examples/tablesdb/create-big-int-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createBigIntColumn({ max: 1000000, // optional xdefault: 0, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md index c8c8955..5740530 100644 --- a/docs/examples/tablesdb/create-boolean-column.md +++ b/docs/examples/tablesdb/create-boolean-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.createBooleanColumn({ required: false, xdefault: false, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md index 7c0d259..aedb58b 100644 --- a/docs/examples/tablesdb/create-datetime-column.md +++ b/docs/examples/tablesdb/create-datetime-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.createDatetimeColumn({ required: false, xdefault: '2020-10-15T06:38:00.000+00:00', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md index 9577598..3abee73 100644 --- a/docs/examples/tablesdb/create-email-column.md +++ b/docs/examples/tablesdb/create-email-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.createEmailColumn({ required: false, xdefault: 'email@example.com', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md index d3b878a..c4b8e8c 100644 --- a/docs/examples/tablesdb/create-enum-column.md +++ b/docs/examples/tablesdb/create-enum-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.createEnumColumn({ required: false, xdefault: 'active', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md index 5a284be..3c439dd 100644 --- a/docs/examples/tablesdb/create-float-column.md +++ b/docs/examples/tablesdb/create-float-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createFloatColumn({ max: 100, // optional xdefault: 10.5, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-index.md b/docs/examples/tablesdb/create-index.md index 5a90943..158a764 100644 --- a/docs/examples/tablesdb/create-index.md +++ b/docs/examples/tablesdb/create-index.md @@ -16,5 +16,6 @@ const result = await tablesDB.createIndex({ columns: ['username'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md index a7d37f7..079e770 100644 --- a/docs/examples/tablesdb/create-integer-column.md +++ b/docs/examples/tablesdb/create-integer-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createIntegerColumn({ max: 100, // optional xdefault: 10, // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md index b6be4f1..c59393e 100644 --- a/docs/examples/tablesdb/create-ip-column.md +++ b/docs/examples/tablesdb/create-ip-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.createIpColumn({ required: false, xdefault: '192.0.2.0', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-line-column.md b/docs/examples/tablesdb/create-line-column.md index f23523e..c2d6a90 100644 --- a/docs/examples/tablesdb/create-line-column.md +++ b/docs/examples/tablesdb/create-line-column.md @@ -18,5 +18,6 @@ const result = await tablesDB.createLineColumn({ [3, 4], [5, 6], ], // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-longtext-column.md b/docs/examples/tablesdb/create-longtext-column.md index 04dde8e..404db1e 100644 --- a/docs/examples/tablesdb/create-longtext-column.md +++ b/docs/examples/tablesdb/create-longtext-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.createLongtextColumn({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-mediumtext-column.md b/docs/examples/tablesdb/create-mediumtext-column.md index 5c9ec6d..3da424f 100644 --- a/docs/examples/tablesdb/create-mediumtext-column.md +++ b/docs/examples/tablesdb/create-mediumtext-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.createMediumtextColumn({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-point-column.md b/docs/examples/tablesdb/create-point-column.md index 9783951..ef3ddf6 100644 --- a/docs/examples/tablesdb/create-point-column.md +++ b/docs/examples/tablesdb/create-point-column.md @@ -14,5 +14,6 @@ const result = await tablesDB.createPointColumn({ key: '', required: false, xdefault: [1, 2], // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-polygon-column.md b/docs/examples/tablesdb/create-polygon-column.md index 71f1406..f917af6 100644 --- a/docs/examples/tablesdb/create-polygon-column.md +++ b/docs/examples/tablesdb/create-polygon-column.md @@ -21,5 +21,6 @@ const result = await tablesDB.createPolygonColumn({ [1, 2], ], ], // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-query.md b/docs/examples/tablesdb/create-query.md new file mode 100644 index 0000000..8ce61a5 --- /dev/null +++ b/docs/examples/tablesdb/create-query.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const tablesDB = new sdk.TablesDB(client); + +const result = await tablesDB.createQuery({ + databaseId: '', + tableId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0, // optional +}); +``` diff --git a/docs/examples/tablesdb/create-relationship-column.md b/docs/examples/tablesdb/create-relationship-column.md index 0f40996..ccc85b0 100644 --- a/docs/examples/tablesdb/create-relationship-column.md +++ b/docs/examples/tablesdb/create-relationship-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createRelationshipColumn({ key: '', // optional twoWayKey: '', // optional onDelete: sdk.RelationMutate.Cascade, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md index 217c050..fd3d1e4 100644 --- a/docs/examples/tablesdb/create-string-column.md +++ b/docs/examples/tablesdb/create-string-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createStringColumn({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-table.md b/docs/examples/tablesdb/create-table.md index cd898df..e633543 100644 --- a/docs/examples/tablesdb/create-table.md +++ b/docs/examples/tablesdb/create-table.md @@ -17,5 +17,6 @@ const result = await tablesDB.createTable({ enabled: false, // optional columns: [], // optional indexes: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-text-column.md b/docs/examples/tablesdb/create-text-column.md index 4ac2fe7..792496a 100644 --- a/docs/examples/tablesdb/create-text-column.md +++ b/docs/examples/tablesdb/create-text-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.createTextColumn({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md index ba037a6..60fa6a4 100644 --- a/docs/examples/tablesdb/create-url-column.md +++ b/docs/examples/tablesdb/create-url-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.createUrlColumn({ required: false, xdefault: 'https://example.com', // optional array: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create-varchar-column.md b/docs/examples/tablesdb/create-varchar-column.md index 3c3ae8a..53a46ce 100644 --- a/docs/examples/tablesdb/create-varchar-column.md +++ b/docs/examples/tablesdb/create-varchar-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.createVarcharColumn({ xdefault: 'Hello World', // optional array: false, // optional encrypt: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index c7b4759..62bd6cb 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -12,6 +12,7 @@ const result = await tablesDB.create({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/tablesdb/update-big-int-column.md b/docs/examples/tablesdb/update-big-int-column.md index 51ba71a..2ad914c 100644 --- a/docs/examples/tablesdb/update-big-int-column.md +++ b/docs/examples/tablesdb/update-big-int-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.updateBigIntColumn({ min: 0, // optional max: 1000000, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md index 0f292d0..febd32c 100644 --- a/docs/examples/tablesdb/update-boolean-column.md +++ b/docs/examples/tablesdb/update-boolean-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateBooleanColumn({ required: false, xdefault: false, newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md index 162f2f7..09e7136 100644 --- a/docs/examples/tablesdb/update-datetime-column.md +++ b/docs/examples/tablesdb/update-datetime-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateDatetimeColumn({ required: false, xdefault: '2020-10-15T06:38:00.000+00:00', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md index 4c4f1e8..08458f1 100644 --- a/docs/examples/tablesdb/update-email-column.md +++ b/docs/examples/tablesdb/update-email-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateEmailColumn({ required: false, xdefault: 'email@example.com', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md index 0b1bf8d..32519c0 100644 --- a/docs/examples/tablesdb/update-enum-column.md +++ b/docs/examples/tablesdb/update-enum-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.updateEnumColumn({ required: false, xdefault: 'active', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md index ee1f80a..fd8de80 100644 --- a/docs/examples/tablesdb/update-float-column.md +++ b/docs/examples/tablesdb/update-float-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.updateFloatColumn({ min: 0, // optional max: 100, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md index 16284f3..6b1466d 100644 --- a/docs/examples/tablesdb/update-integer-column.md +++ b/docs/examples/tablesdb/update-integer-column.md @@ -17,5 +17,6 @@ const result = await tablesDB.updateIntegerColumn({ min: 0, // optional max: 100, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md index 99b0a3c..6be2420 100644 --- a/docs/examples/tablesdb/update-ip-column.md +++ b/docs/examples/tablesdb/update-ip-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateIpColumn({ required: false, xdefault: '192.0.2.0', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-line-column.md b/docs/examples/tablesdb/update-line-column.md index f1d3573..bb3bd83 100644 --- a/docs/examples/tablesdb/update-line-column.md +++ b/docs/examples/tablesdb/update-line-column.md @@ -19,5 +19,6 @@ const result = await tablesDB.updateLineColumn({ [5, 6], ], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-longtext-column.md b/docs/examples/tablesdb/update-longtext-column.md index e103593..c32c2e5 100644 --- a/docs/examples/tablesdb/update-longtext-column.md +++ b/docs/examples/tablesdb/update-longtext-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateLongtextColumn({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-mediumtext-column.md b/docs/examples/tablesdb/update-mediumtext-column.md index 3292151..1c3cec9 100644 --- a/docs/examples/tablesdb/update-mediumtext-column.md +++ b/docs/examples/tablesdb/update-mediumtext-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateMediumtextColumn({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-point-column.md b/docs/examples/tablesdb/update-point-column.md index d5ec472..d428cec 100644 --- a/docs/examples/tablesdb/update-point-column.md +++ b/docs/examples/tablesdb/update-point-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updatePointColumn({ required: false, xdefault: [1, 2], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-polygon-column.md b/docs/examples/tablesdb/update-polygon-column.md index 41b65bf..68dfd43 100644 --- a/docs/examples/tablesdb/update-polygon-column.md +++ b/docs/examples/tablesdb/update-polygon-column.md @@ -22,5 +22,6 @@ const result = await tablesDB.updatePolygonColumn({ ], ], // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-relationship-column.md b/docs/examples/tablesdb/update-relationship-column.md index 88b17f1..b193a94 100644 --- a/docs/examples/tablesdb/update-relationship-column.md +++ b/docs/examples/tablesdb/update-relationship-column.md @@ -14,5 +14,6 @@ const result = await tablesDB.updateRelationshipColumn({ key: '', onDelete: sdk.RelationMutate.Cascade, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md index 368d97c..b42e2ec 100644 --- a/docs/examples/tablesdb/update-string-column.md +++ b/docs/examples/tablesdb/update-string-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.updateStringColumn({ xdefault: 'Hello World', size: 1, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-table.md b/docs/examples/tablesdb/update-table.md index dd37e42..e747a82 100644 --- a/docs/examples/tablesdb/update-table.md +++ b/docs/examples/tablesdb/update-table.md @@ -16,5 +16,6 @@ const result = await tablesDB.updateTable({ rowSecurity: false, // optional enabled: false, // optional purge: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-text-column.md b/docs/examples/tablesdb/update-text-column.md index 4a132e6..7a2b834 100644 --- a/docs/examples/tablesdb/update-text-column.md +++ b/docs/examples/tablesdb/update-text-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateTextColumn({ required: false, xdefault: 'Hello World', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md index 72f285c..d85c91e 100644 --- a/docs/examples/tablesdb/update-url-column.md +++ b/docs/examples/tablesdb/update-url-column.md @@ -15,5 +15,6 @@ const result = await tablesDB.updateUrlColumn({ required: false, xdefault: 'https://example.com', newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update-varchar-column.md b/docs/examples/tablesdb/update-varchar-column.md index e2e7714..4819d31 100644 --- a/docs/examples/tablesdb/update-varchar-column.md +++ b/docs/examples/tablesdb/update-varchar-column.md @@ -16,5 +16,6 @@ const result = await tablesDB.updateVarcharColumn({ xdefault: 'Hello World', size: 1, // optional newKey: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/tablesdb/update.md b/docs/examples/tablesdb/update.md index 2eb0647..3b39ec6 100644 --- a/docs/examples/tablesdb/update.md +++ b/docs/examples/tablesdb/update.md @@ -12,6 +12,7 @@ const result = await tablesDB.update({ databaseId: '', name: '', // optional enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/vectorsdb/create-collection.md b/docs/examples/vectorsdb/create-collection.md index fa1be7a..d464829 100644 --- a/docs/examples/vectorsdb/create-collection.md +++ b/docs/examples/vectorsdb/create-collection.md @@ -16,5 +16,6 @@ const result = await vectorsDB.createCollection({ permissions: [sdk.Permission.read(sdk.Role.any())], // optional documentSecurity: false, // optional enabled: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/vectorsdb/create-index.md b/docs/examples/vectorsdb/create-index.md index 583faee..ed86563 100644 --- a/docs/examples/vectorsdb/create-index.md +++ b/docs/examples/vectorsdb/create-index.md @@ -16,5 +16,6 @@ const result = await vectorsDB.createIndex({ attributes: ['embeddings'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional + description: '', // optional }); ``` diff --git a/docs/examples/vectorsdb/create.md b/docs/examples/vectorsdb/create.md index 8fbd31d..28f27f1 100644 --- a/docs/examples/vectorsdb/create.md +++ b/docs/examples/vectorsdb/create.md @@ -12,6 +12,7 @@ const result = await vectorsDB.create({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/vectorsdb/update-collection.md b/docs/examples/vectorsdb/update-collection.md index f1ca760..de2a631 100644 --- a/docs/examples/vectorsdb/update-collection.md +++ b/docs/examples/vectorsdb/update-collection.md @@ -16,5 +16,6 @@ const result = await vectorsDB.updateCollection({ permissions: [sdk.Permission.read(sdk.Role.any())], // optional documentSecurity: false, // optional enabled: false, // optional + description: '', // optional }); ``` diff --git a/docs/examples/vectorsdb/update.md b/docs/examples/vectorsdb/update.md index 09108e7..bc4cef6 100644 --- a/docs/examples/vectorsdb/update.md +++ b/docs/examples/vectorsdb/update.md @@ -12,6 +12,7 @@ const result = await vectorsDB.update({ databaseId: '', name: '', enabled: false, // optional + description: '', // optional specification: 'serverless', // optional replicas: 0, // optional syncMode: 'async', // optional diff --git a/docs/examples/webhooks/create.md b/docs/examples/webhooks/create.md index c56e892..eb6d627 100644 --- a/docs/examples/webhooks/create.md +++ b/docs/examples/webhooks/create.md @@ -18,5 +18,6 @@ const result = await webhooks.create({ authUsername: '', // optional authPassword: 'password', // optional secret: '', // optional + description: '', // optional }); ``` diff --git a/docs/examples/webhooks/update.md b/docs/examples/webhooks/update.md index 283cf78..789229a 100644 --- a/docs/examples/webhooks/update.md +++ b/docs/examples/webhooks/update.md @@ -17,5 +17,6 @@ const result = await webhooks.update({ tls: false, // optional authUsername: '', // optional authPassword: 'password', // optional + description: '', // optional }); ``` diff --git a/package-lock.json b/package-lock.json index dc39f37..b0abf32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "node-appwrite", - "version": "30.0.1", + "version": "31.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "node-appwrite", - "version": "30.0.1", + "version": "31.0.0", "license": "BSD-3-Clause", "dependencies": { "json-bigint": "1.0.0", @@ -26,6 +26,9 @@ "typescript": "5.9.3", "typescript-eslint": "8.70.0" }, + "engines": { + "node": ">=20.0.0" + }, "overrides": { "esbuild": "^0.28.1", "js-yaml": "^4.2.0", @@ -205,14 +208,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", - "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.10.tgz", + "integrity": "sha512-EMCx3AGZ3WfAl6ht7AyQoPm2Lh+BGYEMdc4Q6Hf7uSCDOZFuLq44qNwL+iaim8VlyYhRAo4X43+weadK8ZB4Yg==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.29.7", - "@babel/types": "^7.29.7" + "@babel/types": "^7.29.8" }, "engines": { "node": ">=6.9.0" @@ -489,16 +492,16 @@ } }, "node_modules/@babel/traverse": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.8.tgz", - "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==", + "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.10.tgz", + "integrity": "sha512-B3lYAs2nkKskbgQ1nfy8Ma9ao9Q1rntTAQHrzzyDuj+TSO+X3le6PfWwqDvodsb+OumE10eMFfuMCTQSQ5iuIQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.8", "@babel/helper-globals": "^7.29.7", - "@babel/parser": "^7.29.8", + "@babel/parser": "^7.29.9", "@babel/template": "^7.29.7", "@babel/types": "^7.29.8", "debug": "^4.3.1" @@ -1595,9 +1598,9 @@ }, "node_modules/@jest/react-is-19": { "name": "react-is", - "version": "19.3.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.0.tgz", - "integrity": "sha512-UpMYezM4v5/18F28aC66AEsjXIgE02kyEMH6yLdgLXu/UTfa1Ntwck/nNLrbqJsEXW7gPb0coNO9FQse9WTovA==", + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.1.tgz", + "integrity": "sha512-RRieF6IyxQBkcK6pP8xOHprLTPW6QjRkbGdImtqNme+/hYVwCZkLQLdlZGOhUqXwkS9IEynaGvPJtv6XB/cz0Q==", "dev": true, "license": "MIT" }, @@ -1861,9 +1864,9 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.4.tgz", - "integrity": "sha512-AJxoUD2/15ESHbvpcyjU274nsAPLuOtPHCk0vKJM5pj//Fg/B1FXNWjPnXTT9PymCYYiHo4zPj0ZomXBKhoy7g==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.5.tgz", + "integrity": "sha512-HshSvXzmBxNzqejd3k/KemgQ3hdREUYFRRrgxOZ+gPljDIsO2SDZrVZMd4Z/HsxudQbE62OVyVFE8z9BCurfjA==", "dev": true, "license": "MIT", "optional": true, @@ -2212,9 +2215,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.5.tgz", - "integrity": "sha512-J25QJU+B78T4FhhBsNpLJyVWOi31mwtpcMwywHmOKH65Q9IWGA81gPj+dnwlhU8wktVriYE+tFAaQgrnJRzAZg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.64.10.tgz", + "integrity": "sha512-oJ9ZfVIZjSjts0ZIYA48+5T0vurE5fQfX/Liad2U52Y6EN99x/OCdjGGuKMDP6jSk2i2lY6jwwA3X0drEc4PBg==", "cpu": [ "arm" ], @@ -2226,9 +2229,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.5.tgz", - "integrity": "sha512-LDopB3zuZM5Ux9TT2luNEBJW/tYbGU2g1d+VpKk6I+gSKDb+/7sYE6M225gRQt4RbMX6MSwMsVR/phdjVUgRLg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.64.10.tgz", + "integrity": "sha512-LylBINgYYwgHNz8OMCy5+Y0w/LEgRYE0PcAIZfEuTuLNMf0S40GSLX6SFwqZsBLplS7RIHHy4zOAbl8Y5cQEvg==", "cpu": [ "arm64" ], @@ -2240,9 +2243,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.5.tgz", - "integrity": "sha512-wlJEERGfeuHeBavCL2qVnNacOK43NDoZM4sjkeRPymd04OAE9T1zBqDJgmZ+CIsPTYKwdzpUC8vmOw84dwY4Tg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.64.10.tgz", + "integrity": "sha512-vbuT3VT1GBI2fAOoUJUrsHVoOg9nbrFXTM7e3DSnb9PYf4n6jZCN8v4Vo8O6x4u5B67+/c803b8BtCZe2nIeqA==", "cpu": [ "arm64" ], @@ -2254,9 +2257,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.5.tgz", - "integrity": "sha512-4nJJGg5jbo2wwPP4JP+LfEBA3bvP8rU9CLuhp7jWvq9sxEyhjQFTFdrqi+/dHEin/pd8jpT0vcehIpnZtmEdcQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.64.10.tgz", + "integrity": "sha512-qYUp/qYvM3T4cF+VWalPl+przBUESILxi+qZ1m1MVRHpg06vS+jHaxXubjCaRpXjLJPDFdXzOZ0FABDghHOhNQ==", "cpu": [ "x64" ], @@ -2268,9 +2271,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.5.tgz", - "integrity": "sha512-DrZbyCDF1hneuO6jRbvZ2D7+PIBM6yIwYnJpg2vIk58T+wuFpiaGZrfUr59lDWw45bg+IrpTGLPiNi/Fk4w3Cg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.64.10.tgz", + "integrity": "sha512-v9NRQG+JztbP4DP/0yuhSyDcEJk047lYbqeNnqIgbXITcVDjGDS7OpkW5nadSY3tJ7MY8W1qIMMqP4Q3Q8BDjQ==", "cpu": [ "arm64" ], @@ -2282,9 +2285,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.5.tgz", - "integrity": "sha512-gqfUVMJMB3mehqywxp6hTBFfgtMQykZY19+cfiaYP0toIJLb/1DZRJHVkQQGP13W4TAwfZDWeg1qBcheTRioXQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.64.10.tgz", + "integrity": "sha512-CHc9LBHdxhn6/NXfb9IegXCWoz5VlvcDOx9QrzZ9q+XYhFlfzwymSWJjOlZcEMMtC1zgMV7qxDe6U18AI1SG0A==", "cpu": [ "x64" ], @@ -2296,9 +2299,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.5.tgz", - "integrity": "sha512-CFmhpvAwzSaWMlN3VN7UtmoTihlZNzoP0juQib5TQRnYUyDV8dXeWOp29sobWAT6gXl/hQgAClLlEiYozQG3OQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.64.10.tgz", + "integrity": "sha512-ble2WR7kWfzZFJUd3ODMGCJn1XDszptfRC0QvWc0h9/EA6MxnrQ1mvbjPZifEdgHyfHhDrwWeKeJONDITcrHSg==", "cpu": [ "arm" ], @@ -2313,9 +2316,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.5.tgz", - "integrity": "sha512-Uc9H8eXCOayV6JLTH5bXKMId6qbhNHa818/BgYjm4jrlq3vZquC9cqyvHBw17xy5Mnj5f+I3gFK5JcEf3hSqrw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.64.10.tgz", + "integrity": "sha512-DMCYegihxBMKvLpODdk4OsvIgxtHTi+Oddf1Pm3d6wMVNjcBiG2pqyXjMPy55HgG1gCdEFr9VfhB1CmvuKn1lw==", "cpu": [ "arm" ], @@ -2330,9 +2333,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.5.tgz", - "integrity": "sha512-VcPr/szv/1BFw112Kt//fxulXt/JPqzzidU84iW68L2DdjnOO8QFUv2zTSYBEPHD6movBD4z+bbr5y60GYM7Jw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.64.10.tgz", + "integrity": "sha512-HQ6HuVH9TmhvPWIas7MA/KeAROgdwqH3REpUU6hZq47NW7m1b1QCrHgM+M3+N/B8DfMt88x1/z79ppRc9RflCQ==", "cpu": [ "arm64" ], @@ -2347,9 +2350,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.5.tgz", - "integrity": "sha512-BnxtJ5/91BrIHYIkGrmjz/lbMhqEHt1dPFqIxIFR+jPn0xVc/oUSCtIT089zfp5ufwGDlYz2UC+Fe1SRBpYFbQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.64.10.tgz", + "integrity": "sha512-avBhxba1DdctX0kxKkN3JWdTSg72QsxSn6FdfhZ9MkL3TTYDOXqxY1GqbC7VNttlgviK7tCe2No5btfRkFgeIg==", "cpu": [ "arm64" ], @@ -2364,9 +2367,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.5.tgz", - "integrity": "sha512-LrYcHZwF+fAMNKHYTOQ5osWM4AZF7YF6D+XtsjDyEvljtt11twc+zHVXBLNEjxVSUnKYsOhvVz4Z213eW02COQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.64.10.tgz", + "integrity": "sha512-UtQMex7fiXq0W/GqcWRpy6XKqUbXgQeGKB+Bd5rJngmHzpI+3kjwpWFLAhKg02onFsIMSh+Zx0zp9JIMQ7/05A==", "cpu": [ "loong64" ], @@ -2381,9 +2384,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.5.tgz", - "integrity": "sha512-nj7QKQePAAUpCpJHtg0pR0W/b92A9NO17JS3BAQmHDn/yhmkir2p8llrKY9TOhleKIaSzy1JhxS3T9FVld6coA==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.64.10.tgz", + "integrity": "sha512-0Aum2pUsCSuOopi6oka+nR1DTj/nfvc1xjL979lvh6kXUjNa30TCX7sKFjyMsrX7bK3bNVs0FsJwQcE2HCWX1Q==", "cpu": [ "loong64" ], @@ -2398,9 +2401,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.5.tgz", - "integrity": "sha512-5ylkX6dWMeBKge9nTU+Rxfb+ZfaCIJ9lRqIFaK0eAMcWp7OJbYnLveLgXmm0VrvuLKb8qIK+mHyH0qu88RM+iA==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.64.10.tgz", + "integrity": "sha512-4dgsouKal3qfMFORgtNigLPt7K3HXiO6jTr7+nFJv1GWu1OkZx0kvQIXbK4sjrIGnaLBk0s80eQCQ9hPIelLrw==", "cpu": [ "ppc64" ], @@ -2415,9 +2418,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.5.tgz", - "integrity": "sha512-oHK4ZHYFDKjZviK34I+NwgfbGxgI7ztrNxj2hPTSSNFgeq1a/lEd7dHV2fdGAuTH4Iym3RHJg+vAbWaWG4B7Zg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.64.10.tgz", + "integrity": "sha512-d7NE89try3jisYzBD7J9M5iwfgcrXYC4dwHEjQ3HIWBftvwch1U/cy3iZ26SthtUOyClKiu7iqYiFjQEwiOlqQ==", "cpu": [ "ppc64" ], @@ -2432,9 +2435,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.5.tgz", - "integrity": "sha512-UcetmHZ6XOXuUByiKZyQmb55ZPr0LABr3Ec/HB9wKZn6CEAFWZkE+hsJErJ9hbPBC7nI0dKuELx7CoV6IM7TMg==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.64.10.tgz", + "integrity": "sha512-dqB5ChSBp91JWXxpCKAS5ZVAE38esKQvdfyqANm0lF5JPiQrXnYwgG3oVBQmuNRcQ1WHkA3j5qYLsrl2CtfhCA==", "cpu": [ "riscv64" ], @@ -2449,9 +2452,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.5.tgz", - "integrity": "sha512-C5CmDPQBtvjVo8cgQsBs+w6WB0JLkiixhgi6hVLV11hERWdn/p0XcPU2OUcZzac9BPOFq7SbaHFa8r3SWEysCQ==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.64.10.tgz", + "integrity": "sha512-7GMf3vbQQslorWLmfsbi5fdt9RVnglk205XpOMFvW6UY5jE5oJc6JLieQJPHtsYlZ2EO0PtC06nY9Hz/IG8guw==", "cpu": [ "riscv64" ], @@ -2466,9 +2469,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.5.tgz", - "integrity": "sha512-lHVQHJFKsuuxLMi3MQO9XVL8Tje3JR82CzB+QDKC5NWBcsIWuwsn9uIM5e3lBhI+fF1/s63qnyYqsg65+8rV/w==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.64.10.tgz", + "integrity": "sha512-tuKbkB23DKc5LG+irPSUnZZztRHqC3CNmyxeWloueBteHB+i+1HkRCMzAE41lseLDlarybeLhqfibFitKOxKMg==", "cpu": [ "s390x" ], @@ -2483,9 +2486,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.5.tgz", - "integrity": "sha512-3W9bTFcQNJn71cSJVM9RKIiZOy8DO/XLDii8Uv/Pm6WKqDRj7JV3ZfuXIEfyuy5LXpIzAbB/1M4Ukp9GKNa7nA==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.64.10.tgz", + "integrity": "sha512-ntHtQOMw7oIshHRF1swV3vyBw+beQt9PeZ04O3D32EeDZUMoHMJuZKp4/fDllH/+xogeK0GUCONVfjjKusqKLg==", "cpu": [ "x64" ], @@ -2500,9 +2503,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.5.tgz", - "integrity": "sha512-VDC7rRJlee/scpki96GZ27Omf6yU87s1YXwVTpjE5841faVlDYYT565rgfmoR1U0sqL7z5ivQSDjcsF6VRXyBA==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.64.10.tgz", + "integrity": "sha512-Dlh8q8r145aYgh+N3gNIG1dz35Fz/FCxe5hs/43orDsffjP8S1P4Xz5I4FpSJsDS4LpQw1QmswZkQlUbkCldjQ==", "cpu": [ "x64" ], @@ -2517,9 +2520,9 @@ ] }, "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.5.tgz", - "integrity": "sha512-z86Ok2p4pTdv5xqCKZsTooO7yBEiaJR/HzU3Wx8RmWsPoLppnMKROhJusQob8B3IE1ghC343kUW9rC2r+Wf3ig==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.64.10.tgz", + "integrity": "sha512-VBJhHWz/55u45CWFv9OmfSRDgJDVENESgFxSAn13gIKJpTuFJbP4/7ymMZhDfeKFx1zGn1XBsLnNB7Ryy71qww==", "cpu": [ "x64" ], @@ -2531,9 +2534,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.5.tgz", - "integrity": "sha512-IzQmj+xXwQFGhMAMKMQVXkMwMZN3TqkJgAE0nSsqvVwWWciP4AIPMmWRqOQ2GfX7TUDZr+xqGFcBS36CRPGw0g==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.64.10.tgz", + "integrity": "sha512-Vjcazg+EEzUfIz+LcaxS6YtbQHo+sv0sCD+5VbwhY504bCKNW4OOreVgKq61pHT2esRQ/+AXYVPStDwxSvAOdw==", "cpu": [ "arm64" ], @@ -2545,9 +2548,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.5.tgz", - "integrity": "sha512-F6qpTaPc9bwBH85kjy0/BLmLSW1uv7AoOXCoRIkg2arlgCYlWYcAbiMkvZuAcaWk9TpCRG//okznLAqLGshkMw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.64.10.tgz", + "integrity": "sha512-jJAaP4El+HWxYkM0jeJghASaFgfnluY0FRHhyHXxU6STs/nBhKMIxIMDrJEFg2ftKz6orX9WAo4diVan5NugNA==", "cpu": [ "arm64" ], @@ -2559,9 +2562,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.5.tgz", - "integrity": "sha512-igoDsTFhhwECBeGbUuLeIk7t8Y1apa+cs6mDWpx2EZ0ch7oEQgzHbFUXN9euoHekCAQzXdXApAGkV6jznS7tWw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.64.10.tgz", + "integrity": "sha512-bXXdRUfRx9PaHCToKt8R/7wjDV6Tbk/hmSHK0uQBKmD3rj4jkuYndct8uGX77ZuZsePrVkQbWUgPR2jJhCTMpQ==", "cpu": [ "ia32" ], @@ -2573,9 +2576,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.5.tgz", - "integrity": "sha512-U3teMeMbXFmaM5D+OTJpsOXd+wV/qftIeYF9kBKL4v73641qyJmoXFtA28DQLsnmlyayEsTe72xpLHrArq6vHw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.64.10.tgz", + "integrity": "sha512-57Idx+VkEOQeG6Ys6sZOBFT7FfbeyxGv9A3k1m+Lf/z2SwqT40rNWbAINzjPHSMoCCBvY7Fnb9RGZWQin/HHAw==", "cpu": [ "x64" ], @@ -2587,9 +2590,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.5.tgz", - "integrity": "sha512-ypfC34F3RKXvCXBglGqGMsUSMKlgwd1HX9AOAlx9RoZZ6GaI42YHVeKpzg3JG+wpBUJYTG+NNZhqbDWL8tBZkw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.64.10.tgz", + "integrity": "sha512-vrvuasIpm/xf+BpZbzgirku0WnrQZMAc+H2Ai26jzqBxYEmQQE4DdJb7h8erkJMfRRipx0ma2Cty8jJwUm9ocQ==", "cpu": [ "x64" ], @@ -2802,9 +2805,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.10.tgz", - "integrity": "sha512-HpbUakT7xp5miBUywCHf36ZEuAJNklBJDDsGpUIjMzOSmM8ELSfA9Sa/QDPeNeqeoN31u+UTCkL4klCOVvRm4Q==", + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.12.tgz", + "integrity": "sha512-/8UvqAPU9DGTI9k4mxtf49U37Isfwr8Uts96+SBHIkFxPJnHS0Ew4f00sM4Scd8V8EjM0jUNtVDdv1kPdt35lg==", "dev": true, "license": "MIT", "engines": { @@ -3366,9 +3369,9 @@ ] }, "node_modules/acorn": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", - "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz", + "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==", "dev": true, "license": "MIT", "bin": { @@ -3598,9 +3601,9 @@ } }, "node_modules/baseline-browser-mapping": { - "version": "2.11.26", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.26.tgz", - "integrity": "sha512-GLQdD3y6UF8iVuMJl5fHgE4jdn/ua7n+toKfLgNlg3BqQtOZjpy68T8Tup8/wGWZCDlm7KMg7tPb4MPn7oN0TQ==", + "version": "2.11.29", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.29.tgz", + "integrity": "sha512-YeesxhUmR4h5y5V8KF8iBCqJb8YFrBJ++XBTeGcWIaQOYXGN19JM0FoiOjAhwuDoln8owMgXcWBmgHtYSkky2w==", "dev": true, "license": "Apache-2.0", "bin": { @@ -3667,11 +3670,11 @@ } }, "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.2.tgz", + "integrity": "sha512-V2o8YS2EhrKMO9AumnkK0ynynfFlsajpYupwq7S46H5mhcanwxDkNTw3K67wPIcKTH1ffkA4vhMOtAc7gRmPZw==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { "node-int64": "^0.4.0" } @@ -3737,9 +3740,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001814", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001814.tgz", - "integrity": "sha512-/Uaf1lAzr59XcMpW0o96WoEfr+VXK2OX4U9AgFoiSHsVJ4HppnIFUjtYzsyDH2+tgANaQb2/oxYGwCPapN1FpA==", + "version": "1.0.30001816", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001816.tgz", + "integrity": "sha512-+8Yx7BXCoqk6IF8yTicjfUR6D/ldJzdlsodlEOiOSPmhK844WIgk67/zIQaGAOxNkZyyvBlrRFnLvqKIoqbAFw==", "dev": true, "funding": [ { @@ -3817,9 +3820,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.1.tgz", - "integrity": "sha512-Ca8swihM+/4yKecYHY52kgJd300hi2lADU/a1RxNTRe+RJ9jvqQlESpbz9DnG9mowez8qwXHB8qYdIUw9e+F5Q==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.3.0.tgz", + "integrity": "sha512-lmNyBzi6iYiqyrExTctfmjd8tInx+dHu9PBomTfH5RXS53c27JMFJgzNv5TyAnm3PgGf+MLy0+Ws41/HlVxdKQ==", "dev": true, "license": "MIT" }, @@ -4003,9 +4006,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.442", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.442.tgz", - "integrity": "sha512-najZYZ3+ZpjN1z3VOsrBiv5ej18vQgfV2lvEmxWzfmKrk4bdm3Owseyud4yGU6DfFn9pyunoAHDDyM4KmP78Ew==", + "version": "1.5.459", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.459.tgz", + "integrity": "sha512-4SC9HHSFjO/liAhifpdOL5hG9b4BP7/5G3y3UPZVO8trlAXr1CaUEEJL0gWK3kOcYcZrOA5rkwG45Gra/lTIgg==", "dev": true, "license": "ISC" }, @@ -4351,13 +4354,13 @@ "license": "MIT" }, "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.4.tgz", + "integrity": "sha512-tGQtaoYisPDriJBN0mT5yZSyNETnJGA1gTYxaVRAE5KUO3LI9kPUc9WIu8JXcxaIci+faIKlzXqXyPgrmubtBQ==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "bser": "2.1.1" + "bser": "2.1.2" } }, "node_modules/fdir": { @@ -5538,9 +5541,9 @@ } }, "node_modules/lilconfig": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", - "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.4.tgz", + "integrity": "sha512-zJZyBmQhArDRefuWTypZxwDpFDIYmrj8ypSBvwGD5P13Y95s6DjzKgu4DVdGbeQa5PDEsAOCAPNk4X+QOR006w==", "dev": true, "license": "MIT", "engines": { @@ -5745,9 +5748,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.57", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.57.tgz", - "integrity": "sha512-kQK9LGGFiHtrWiNhZtA7Qbw17AQz+dmsEKODRIVTXA9+e5MS/2gZEBhYJt13GrAz5/IOZKddH/0Z3TP/Zgo+yw==", + "version": "2.0.59", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.59.tgz", + "integrity": "sha512-5qr2okC4ItAI0hG5SaV0HoYMpnM/Y6+Oqr7AmPYy/2uEoGvS+GbSKLeRxSS1uAdu59yz0ouzcuXievSgg///WA==", "dev": true, "license": "MIT", "engines": { @@ -6247,9 +6250,9 @@ } }, "node_modules/rollup": { - "version": "4.63.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.5.tgz", - "integrity": "sha512-KRWwmNLlPw5M7HcdYfm15oBv9n9LPtjzpzCIxS/phwqvPyxHSoKX6Y2YU3pxSPfy0CLquVgsx/j/hBi6OvH1Nw==", + "version": "4.64.10", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.64.10.tgz", + "integrity": "sha512-8N52YH1B5JzBP+B1rkcBERG7rfRTGAM0RmUpyd76yyRfTljuG452GCNbVm6MPzs1+gXBha6Rw5/oHRFohOpfDg==", "dev": true, "license": "MIT", "dependencies": { @@ -6264,31 +6267,31 @@ }, "optionalDependencies": { "@napi-rs/lzma-linux-x64-gnu": "1.5.1", - "@rollup/rollup-android-arm-eabi": "4.63.5", - "@rollup/rollup-android-arm64": "4.63.5", - "@rollup/rollup-darwin-arm64": "4.63.5", - "@rollup/rollup-darwin-x64": "4.63.5", - "@rollup/rollup-freebsd-arm64": "4.63.5", - "@rollup/rollup-freebsd-x64": "4.63.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.63.5", - "@rollup/rollup-linux-arm-musleabihf": "4.63.5", - "@rollup/rollup-linux-arm64-gnu": "4.63.5", - "@rollup/rollup-linux-arm64-musl": "4.63.5", - "@rollup/rollup-linux-loong64-gnu": "4.63.5", - "@rollup/rollup-linux-loong64-musl": "4.63.5", - "@rollup/rollup-linux-ppc64-gnu": "4.63.5", - "@rollup/rollup-linux-ppc64-musl": "4.63.5", - "@rollup/rollup-linux-riscv64-gnu": "4.63.5", - "@rollup/rollup-linux-riscv64-musl": "4.63.5", - "@rollup/rollup-linux-s390x-gnu": "4.63.5", - "@rollup/rollup-linux-x64-gnu": "4.63.5", - "@rollup/rollup-linux-x64-musl": "4.63.5", - "@rollup/rollup-openbsd-x64": "4.63.5", - "@rollup/rollup-openharmony-arm64": "4.63.5", - "@rollup/rollup-win32-arm64-msvc": "4.63.5", - "@rollup/rollup-win32-ia32-msvc": "4.63.5", - "@rollup/rollup-win32-x64-gnu": "4.63.5", - "@rollup/rollup-win32-x64-msvc": "4.63.5", + "@rollup/rollup-android-arm-eabi": "4.64.10", + "@rollup/rollup-android-arm64": "4.64.10", + "@rollup/rollup-darwin-arm64": "4.64.10", + "@rollup/rollup-darwin-x64": "4.64.10", + "@rollup/rollup-freebsd-arm64": "4.64.10", + "@rollup/rollup-freebsd-x64": "4.64.10", + "@rollup/rollup-linux-arm-gnueabihf": "4.64.10", + "@rollup/rollup-linux-arm-musleabihf": "4.64.10", + "@rollup/rollup-linux-arm64-gnu": "4.64.10", + "@rollup/rollup-linux-arm64-musl": "4.64.10", + "@rollup/rollup-linux-loong64-gnu": "4.64.10", + "@rollup/rollup-linux-loong64-musl": "4.64.10", + "@rollup/rollup-linux-ppc64-gnu": "4.64.10", + "@rollup/rollup-linux-ppc64-musl": "4.64.10", + "@rollup/rollup-linux-riscv64-gnu": "4.64.10", + "@rollup/rollup-linux-riscv64-musl": "4.64.10", + "@rollup/rollup-linux-s390x-gnu": "4.64.10", + "@rollup/rollup-linux-x64-gnu": "4.64.10", + "@rollup/rollup-linux-x64-musl": "4.64.10", + "@rollup/rollup-openbsd-x64": "4.64.10", + "@rollup/rollup-openharmony-arm64": "4.64.10", + "@rollup/rollup-win32-arm64-msvc": "4.64.10", + "@rollup/rollup-win32-ia32-msvc": "4.64.10", + "@rollup/rollup-win32-x64-gnu": "4.64.10", + "@rollup/rollup-win32-x64-msvc": "4.64.10", "fsevents": "~2.3.2" } }, @@ -6828,9 +6831,9 @@ "license": "MIT" }, "node_modules/undici": { - "version": "6.29.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.0.tgz", - "integrity": "sha512-R+RODBqp6i2pPflGdq+xIOUkl+RNfGgHwoinecKu/JCuf2uO06cOKoDbI2P7Dn6KcswdKwrczbU6IYJ6K8X+wg==", + "version": "6.29.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz", + "integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==", "license": "MIT", "engines": { "node": ">=18.17" @@ -6882,9 +6885,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.3.tgz", - "integrity": "sha512-pJ2sYawQS0R/WI928Gj5GlPhTGzbMelq0+4INtSYNDV9ErKJcX6xjGWkoG/VnB3dpUm00zALaqkrUD77pO5TDQ==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", + "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==", "dev": true, "funding": [ { diff --git a/package.json b/package.json index 08ac31b..2293f5e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "node-appwrite", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API", - "version": "30.0.1", + "version": "31.0.0", "license": "BSD-3-Clause", "main": "dist/index.js", "type": "commonjs", @@ -15,6 +15,9 @@ "lint:fix": "eslint --fix .", "analyse": "tsc --noEmit" }, + "engines": { + "node": ">=20.0.0" + }, "exports": { ".": { "import": { diff --git a/src/client.ts b/src/client.ts index 70e8538..88e1131 100644 --- a/src/client.ts +++ b/src/client.ts @@ -154,7 +154,7 @@ class AppwriteException extends Error { } function getUserAgent() { - let ua = 'AppwriteNodeJSSDK/30.0.1'; + let ua = 'AppwriteNodeJSSDK/31.0.0'; // `process` is a global in Node.js, but not fully available in all runtimes. const platform: string[] = []; @@ -215,7 +215,7 @@ class Client { 'x-sdk-name': 'Node.js', 'x-sdk-platform': 'server', 'x-sdk-language': 'nodejs', - 'x-sdk-version': '30.0.1', + 'x-sdk-version': '31.0.0', 'user-agent': getUserAgent(), 'X-Appwrite-Response-Format': '2.5.0', }; diff --git a/src/models.ts b/src/models.ts index afb50ff..04aa34a 100644 --- a/src/models.ts +++ b/src/models.ts @@ -729,6 +729,10 @@ export namespace Models { * Database name. */ name: string; + /** + * Optional description for the database. + */ + description: string; /** * Database creation date in ISO 8601 format. */ @@ -833,6 +837,10 @@ export namespace Models { * Collection name. */ name: string; + /** + * Optional description for the collection. + */ + description: string; /** * Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys. */ @@ -919,6 +927,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -969,6 +981,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1019,6 +1035,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1069,6 +1089,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1119,6 +1143,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1161,6 +1189,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1207,6 +1239,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1257,6 +1293,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1303,6 +1343,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1349,6 +1393,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1395,6 +1443,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1457,6 +1509,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1499,6 +1555,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1541,6 +1601,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1583,6 +1647,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1633,6 +1701,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1679,6 +1751,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1725,6 +1801,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1791,6 +1871,10 @@ export namespace Models { * Collection name. */ name: string; + /** + * Optional description for the collection. + */ + description: string; /** * Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys. */ @@ -1829,6 +1913,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1867,6 +1955,10 @@ export namespace Models { * Attribute Key. */ key: string; + /** + * Optional description for the attribute. + */ + description: string; /** * Attribute type. */ @@ -1929,6 +2021,10 @@ export namespace Models { * Table name. */ name: string; + /** + * Optional description for the table. + */ + description: string; /** * Table enabled. Can be 'enabled' or 'disabled'. When disabled, the table is inaccessible to users, but remains accessible to Server SDKs using API keys. */ @@ -2015,6 +2111,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2065,6 +2165,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2115,6 +2219,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2165,6 +2273,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2215,6 +2327,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2257,6 +2373,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2303,6 +2423,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2353,6 +2477,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2399,6 +2527,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2445,6 +2577,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2491,6 +2627,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2553,6 +2693,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2595,6 +2739,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2637,6 +2785,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2679,6 +2831,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2729,6 +2885,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2775,6 +2935,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2821,6 +2985,10 @@ export namespace Models { * Column Key. */ key: string; + /** + * Optional description for the column. + */ + description: string; /** * Column type. */ @@ -2879,6 +3047,10 @@ export namespace Models { * Index key. */ key: string; + /** + * Optional description for the index. + */ + description: string; /** * Index type. */ @@ -2925,6 +3097,10 @@ export namespace Models { * Index Key. */ key: string; + /** + * Optional description for the index. + */ + description: string; /** * Index type. */ @@ -3813,6 +3989,10 @@ export namespace Models { * Bucket name. */ name: string; + /** + * Optional description for the bucket. + */ + description: string; /** * Bucket enabled. */ @@ -3841,6 +4021,10 @@ export namespace Models { * Image transformations are enabled. */ transformations: boolean; + /** + * Metadata such as location, device and capture time is removed from uploaded images. + */ + stripMetadata: boolean; /** * Total size of this bucket in bytes. */ @@ -3999,6 +4183,10 @@ export namespace Models { * Site name. */ name: string; + /** + * Optional description for the site. + */ + description: string; /** * Site enabled. */ @@ -4149,6 +4337,10 @@ export namespace Models { * Function name. */ name: string; + /** + * Optional description for the function. + */ + description: string; /** * Function enabled. */ @@ -4813,6 +5005,10 @@ export namespace Models { * Webhook name. */ name: string; + /** + * Optional description for the webhook. + */ + description: string; /** * Webhook URL endpoint. */ @@ -4871,6 +5067,10 @@ export namespace Models { * Key name. */ name: string; + /** + * Optional description for the key. + */ + description: string; /** * Key expiration date in ISO 8601 format. */ @@ -4913,6 +5113,10 @@ export namespace Models { * Key name. */ name: string; + /** + * Optional description for the key. + */ + description: string; /** * Key expiration date in ISO 8601 format. */ @@ -6185,6 +6389,10 @@ export namespace Models { * Whether password dictionary policy is enabled. */ enabled: boolean; + /** + * Custom passwords blocked by case-sensitive equality when enabled. + */ + denyList: string[]; }; /** @@ -6243,6 +6451,10 @@ export namespace Models { * Whether password personal data policy is enabled. */ enabled: boolean; + /** + * Custom terms blocked by case-insensitive substring matching when enabled. + */ + denyList: string[]; }; /** @@ -6683,6 +6895,10 @@ export namespace Models { * Variable key. */ key: string; + /** + * Optional description for the variable. + */ + description: string; /** * Variable value. */ @@ -7257,6 +7473,10 @@ export namespace Models { * The name of the topic. */ name: string; + /** + * Optional description for the topic. + */ + description: string; /** * Total count of email subscribers subscribed to the topic. */ @@ -8185,6 +8405,10 @@ export namespace Models { * Shortest function schedule interval allowed, in minutes. 0 allows every interval. */ functionsIntervalMinimum: number; + /** + * Does the plan allow cron function schedules or only intervals. + */ + functionsAllowCron: boolean; /** * Does the plan support encrypted string attributes or not. */ diff --git a/src/query.ts b/src/query.ts index ca0b350..f25c491 100644 --- a/src/query.ts +++ b/src/query.ts @@ -726,7 +726,7 @@ export class Query { alias !== '' ? alias : undefined, ).toString(); - /** Standard deviation of `attribute`, optionally aliased. */ + /** Population standard deviation of `attribute` (the same as stddevPop), optionally aliased. */ static stddev = (attribute: string, alias: string = ''): string => new Query( 'stddev', @@ -750,7 +750,7 @@ export class Query { alias !== '' ? alias : undefined, ).toString(); - /** Variance of `attribute`, optionally aliased. */ + /** Population variance of `attribute` (the same as varPop), optionally aliased. */ static variance = (attribute: string, alias: string = ''): string => new Query( 'variance', @@ -824,7 +824,7 @@ export class Query { new Query('on', undefined, [left, operator, right]).toString(); /** - * Inner join. `table` is the joined collection/table ID. + * Inner join. `table` is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ static join = ( table: string, @@ -842,7 +842,7 @@ export class Query { alias, ); - /** Left join. `table` is the joined collection/table ID. */ + /** Left join. `table` is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ static leftJoin = ( table: string, leftOrAliasOrOn: string | string[], @@ -859,7 +859,7 @@ export class Query { alias, ); - /** Right join. `table` is the joined collection/table ID. */ + /** Right join. `table` is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ static rightJoin = ( table: string, leftOrAliasOrOn: string | string[], @@ -876,7 +876,7 @@ export class Query { alias, ); - /** Full outer join. `table` is the joined collection/table ID. */ + /** Full outer join. `table` is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ static fullOuterJoin = ( table: string, leftOrAliasOrOn: string | string[], @@ -893,7 +893,7 @@ export class Query { alias, ); - /** Cross join. `table` is the joined collection/table ID. */ + /** Cross join. `table` is the joined collection/table ID; without an alias the server names the join after it, if the ID is a valid alias, and otherwise rejects the query. */ static crossJoin = (table: string, alias: string = ''): string => new Query( 'crossJoin', diff --git a/src/services/account.ts b/src/services/account.ts index 8c05720..c922d06 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -1027,6 +1027,111 @@ export class Account { return this.client.call('delete', uri, apiHeaders, apiPayload); } + /** + * Get the team memberships of the currently logged in user. + * + * @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: userId, teamId, invited, joined, confirm, roles + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + */ + listMemberships(params?: { + queries?: string[]; + total?: boolean; + }): Promise; + /** + * Get the team memberships of the currently logged in user. + * + * @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: userId, teamId, invited, joined, confirm, roles + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @throws {AppwriteException} + * @returns {Promise} + * @deprecated Use the object parameter style method for a better developer experience. + */ + listMemberships( + queries?: string[], + total?: boolean, + ): Promise; + listMemberships( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] + ): Promise { + let params: { queries?: string[]; total?: boolean }; + + if ( + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || + (paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst)) + ) { + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; + } else { + params = { + queries: paramsOrFirst as string[], + total: rest[0] as boolean, + }; + } + + const queries = params.queries; + const total = params.total; + const apiPath = '/account/memberships'; + const apiPayload: Payload = {}; + if (typeof queries !== 'undefined') { + apiPayload['queries'] = queries; + } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + accept: 'application/json', + }; + + const request = this.client.call('get', uri, apiHeaders, apiPayload); + const defaults = { + root: 'membershipList', + models: { + membershipList: { + defaults: { + total: 0, + memberships: [], + }, + properties: { + memberships: { + items: 'membership', + }, + }, + }, + membership: { + defaults: { + $id: '', + $createdAt: '', + $updatedAt: '', + userId: '', + userName: '', + userEmail: '', + userPhone: '', + teamId: '', + teamName: '', + invited: '', + joined: '', + confirm: false, + mfa: false, + userAccessedAt: '', + roles: [], + }, + }, + }, + }; + + return request.then((response) => applyDefaults(response, defaults)); + } + /** * Enable or disable MFA on an account. * @@ -3325,6 +3430,9 @@ export class Account { * * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * + * The new password must satisfy the project's enabled password policies, including custom deny lists. Dictionary entries match the entire password case-sensitively; personal-data terms match substrings case-insensitively. Personal-data validation runs after token verification against the recovered user's ID, name, email, and phone, closing the previous recovery gap for profile-based checks. A rejected password leaves the existing credentials unchanged and the recovery token usable. + * + * * @param {string} params.userId - User ID. * @param {string} params.secret - Valid reset token. * @param {string} params.password - New user password. Must be between 8 and 256 chars. @@ -3341,6 +3449,9 @@ export class Account { * * Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. * + * The new password must satisfy the project's enabled password policies, including custom deny lists. Dictionary entries match the entire password case-sensitively; personal-data terms match substrings case-insensitively. Personal-data validation runs after token verification against the recovered user's ID, name, email, and phone, closing the previous recovery gap for profile-based checks. A rejected password leaves the existing credentials unchanged and the recovery token usable. + * + * * @param {string} userId - User ID. * @param {string} secret - Valid reset token. * @param {string} password - New user password. Must be between 8 and 256 chars. @@ -3525,6 +3636,8 @@ export class Account { /** * Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https://appwrite.io/docs/references/cloud/client-web/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated. * + * The new password must satisfy the project's enabled password policies, including custom deny lists. Dictionary entries match the entire password case-sensitively; personal-data terms match substrings case-insensitively. Personal-data validation runs after token verification against the recovered user's ID, name, email, and phone, closing the previous recovery gap for profile-based checks. A rejected password leaves the existing credentials unchanged and the recovery token usable. + * * * @param {string} params.userId - User ID. * @param {string} params.secret - Valid recovery OTP code. @@ -3540,6 +3653,8 @@ export class Account { /** * Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https://appwrite.io/docs/references/cloud/client-web/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated. * + * The new password must satisfy the project's enabled password policies, including custom deny lists. Dictionary entries match the entire password case-sensitively; personal-data terms match substrings case-insensitively. Personal-data validation runs after token verification against the recovered user's ID, name, email, and phone, closing the previous recovery gap for profile-based checks. A rejected password leaves the existing credentials unchanged and the recovery token usable. + * * * @param {string} userId - User ID. * @param {string} secret - Valid recovery OTP code. diff --git a/src/services/activities.ts b/src/services/activities.ts index d082ca4..1d6e746 100644 --- a/src/services/activities.ts +++ b/src/services/activities.ts @@ -17,45 +17,60 @@ export class Activities { * List all events for selected filters. * * @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 attributes such as userId, teamId, etc. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listEvents(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all events for selected filters. * * @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 attributes such as userId, teamId, etc. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listEvents(queries?: string[]): Promise; listEvents( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + listEvents( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/activities/events'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/backups.ts b/src/services/backups.ts index d8dfb94..2e8c358 100644 --- a/src/services/backups.ts +++ b/src/services/backups.ts @@ -18,45 +18,60 @@ export class Backups { * List all archives for a project. * * @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. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listArchives(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all archives for a project. * * @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. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listArchives(queries?: string[]): Promise; listArchives( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + listArchives( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/backups/archives'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -324,45 +339,60 @@ export class Backups { * List all policies for a project. * * @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. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listPolicies(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all policies for a project. * * @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. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listPolicies(queries?: string[]): Promise; listPolicies( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + listPolicies( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/backups/policies'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1015,45 +1045,60 @@ export class Backups { * List all backup restorations for a project. * * @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. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listRestorations(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all backup restorations for a project. * * @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. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - listRestorations(queries?: string[]): Promise; listRestorations( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + listRestorations( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/backups/restorations'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/databases.ts b/src/services/databases.ts index 0b2d328..d221e45 100644 --- a/src/services/databases.ts +++ b/src/services/databases.ts @@ -113,6 +113,7 @@ export class Databases { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -166,6 +167,7 @@ export class Databases { * @param {string} params.databaseId - Unique 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. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string} params.description - Optional description for the database. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.create` instead. @@ -174,6 +176,7 @@ export class Databases { databaseId: string; name: string; enabled?: boolean; + description?: string; }): Promise; /** * Create a new Database. @@ -182,6 +185,7 @@ export class Databases { * @param {string} databaseId - Unique 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. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string} description - Optional description for the database. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -190,13 +194,25 @@ export class Databases { databaseId: string, name: string, enabled?: boolean, + description?: string, ): Promise; create( paramsOrFirst: - { databaseId: string; name: string; enabled?: boolean } | string, - ...rest: [string?, boolean?] + | { + databaseId: string; + name: string; + enabled?: boolean; + description?: string; + } + | string, + ...rest: [string?, boolean?, string?] ): Promise { - let params: { databaseId: string; name: string; enabled?: boolean }; + let params: { + databaseId: string; + name: string; + enabled?: boolean; + description?: string; + }; if ( paramsOrFirst && @@ -207,18 +223,21 @@ export class Databases { databaseId: string; name: string; enabled?: boolean; + description?: string; }; } else { params = { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, + description: rest[2] as string, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; if (typeof databaseId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -238,6 +257,9 @@ export class Databases { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -254,6 +276,7 @@ export class Databases { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -860,6 +883,7 @@ export class Databases { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -912,6 +936,7 @@ export class Databases { * @param {string} params.databaseId - Database ID. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string | null} params.description - Optional description for the database. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.update` instead. @@ -920,6 +945,7 @@ export class Databases { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; }): Promise; /** * Update a database by its unique ID. @@ -927,6 +953,7 @@ export class Databases { * @param {string} databaseId - Database ID. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string | null} description - Optional description for the database. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -935,13 +962,25 @@ export class Databases { databaseId: string, name?: string, enabled?: boolean, + description?: string | null, ): Promise; update( paramsOrFirst: - { databaseId: string; name?: string; enabled?: boolean } | string, - ...rest: [string?, boolean?] + | { + databaseId: string; + name?: string; + enabled?: boolean; + description?: string | null; + } + | string, + ...rest: [string?, boolean?, (string | null)?] ): Promise { - let params: { databaseId: string; name?: string; enabled?: boolean }; + let params: { + databaseId: string; + name?: string; + enabled?: boolean; + description?: string | null; + }; if ( paramsOrFirst && @@ -952,18 +991,21 @@ export class Databases { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; }; } else { params = { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, + description: rest[2] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -980,6 +1022,9 @@ export class Databases { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -996,6 +1041,7 @@ export class Databases { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -1222,6 +1268,7 @@ export class Databases { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1241,6 +1288,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1264,6 +1312,7 @@ export class Databases { * @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. * @param {object[]} params.attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTable` instead. @@ -1277,6 +1326,7 @@ export class Databases { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }): Promise; /** * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. @@ -1289,6 +1339,7 @@ export class Databases { * @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. * @param {object[]} attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1302,6 +1353,7 @@ export class Databases { enabled?: boolean, attributes?: object[], indexes?: object[], + description?: string, ): Promise; createCollection( paramsOrFirst: @@ -1314,6 +1366,7 @@ export class Databases { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; } | string, ...rest: [ @@ -1324,6 +1377,7 @@ export class Databases { boolean?, object[]?, object[]?, + string?, ] ): Promise { let params: { @@ -1335,6 +1389,7 @@ export class Databases { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }; if ( @@ -1351,6 +1406,7 @@ export class Databases { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }; } else { params = { @@ -1362,6 +1418,7 @@ export class Databases { enabled: rest[4] as boolean, attributes: rest[5] as object[], indexes: rest[6] as object[], + description: rest[7] as string, }; } @@ -1373,6 +1430,7 @@ export class Databases { const enabled = params.enabled; const attributes = params.attributes; const indexes = params.indexes; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1412,6 +1470,9 @@ export class Databases { if (typeof indexes !== 'undefined') { apiPayload['indexes'] = indexes; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1432,6 +1493,7 @@ export class Databases { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1451,6 +1513,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1549,6 +1612,7 @@ export class Databases { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1568,6 +1632,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1590,6 +1655,7 @@ export class Databases { * @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). * @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. * @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. + * @param {string | null} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTable` instead. @@ -1602,6 +1668,7 @@ export class Databases { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }): Promise; /** * Update a collection by its unique ID. @@ -1613,6 +1680,7 @@ export class Databases { * @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). * @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. * @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. + * @param {string | null} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1625,6 +1693,7 @@ export class Databases { documentSecurity?: boolean, enabled?: boolean, purge?: boolean, + description?: string | null, ): Promise; updateCollection( paramsOrFirst: @@ -1636,6 +1705,7 @@ export class Databases { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; } | string, ...rest: [ @@ -1645,6 +1715,7 @@ export class Databases { boolean?, boolean?, boolean?, + (string | null)?, ] ): Promise { let params: { @@ -1655,6 +1726,7 @@ export class Databases { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; if ( @@ -1670,6 +1742,7 @@ export class Databases { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; } else { params = { @@ -1680,6 +1753,7 @@ export class Databases { documentSecurity: rest[3] as boolean, enabled: rest[4] as boolean, purge: rest[5] as boolean, + description: rest[6] as string | null, }; } @@ -1690,6 +1764,7 @@ export class Databases { const documentSecurity = params.documentSecurity; const enabled = params.enabled; const purge = params.purge; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1722,6 +1797,9 @@ export class Databases { if (typeof purge !== 'undefined') { apiPayload['purge'] = purge; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1742,6 +1820,7 @@ export class Databases { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1761,6 +1840,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1983,6 +2063,7 @@ export class Databases { * @param {number | bigint | null} params.max - Maximum value * @param {number | bigint | null} params.xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createBigIntColumn` instead. @@ -1996,6 +2077,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }): Promise; /** * Create a bigint attribute. Optionally, minimum and maximum values can be provided. @@ -2009,6 +2091,7 @@ export class Databases { * @param {number | bigint | null} max - Maximum value * @param {number | bigint | null} xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2022,6 +2105,7 @@ export class Databases { max?: number | bigint | null, xdefault?: number | bigint | null, array?: boolean, + description?: string, ): Promise; createBigIntAttribute( paramsOrFirst: @@ -2034,6 +2118,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -2044,6 +2129,7 @@ export class Databases { (number | bigint | null)?, (number | bigint | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -2055,6 +2141,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; if ( @@ -2071,6 +2158,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; } else { params = { @@ -2082,6 +2170,7 @@ export class Databases { max: rest[4] as number | bigint | null, xdefault: rest[5] as number | bigint | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -2093,6 +2182,7 @@ export class Databases { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2137,6 +2227,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2152,6 +2245,7 @@ export class Databases { attributeBigint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -2177,6 +2271,7 @@ export class Databases { * @param {number | bigint | null} params.min - Minimum value * @param {number | bigint | null} params.max - Maximum value * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateBigIntColumn` instead. @@ -2190,6 +2285,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a bigint attribute. Changing the `default` value will not update already existing documents. @@ -2203,6 +2299,7 @@ export class Databases { * @param {number | bigint | null} min - Minimum value * @param {number | bigint | null} max - Maximum value * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2216,6 +2313,7 @@ export class Databases { min?: number | bigint | null, max?: number | bigint | null, newKey?: string | null, + description?: string | null, ): Promise; updateBigIntAttribute( paramsOrFirst: @@ -2228,6 +2326,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -2238,6 +2337,7 @@ export class Databases { (number | bigint | null)?, (number | bigint | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -2249,6 +2349,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; if ( @@ -2265,6 +2366,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -2276,6 +2378,7 @@ export class Databases { min: rest[4] as number | bigint | null, max: rest[5] as number | bigint | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -2287,6 +2390,7 @@ export class Databases { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2334,6 +2438,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2349,6 +2456,7 @@ export class Databases { attributeBigint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -2372,6 +2480,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {boolean | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createBooleanColumn` instead. @@ -2383,6 +2492,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }): Promise; /** * Create a boolean attribute. @@ -2394,6 +2504,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {boolean | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2405,6 +2516,7 @@ export class Databases { required: boolean, xdefault?: boolean | null, array?: boolean, + description?: string, ): Promise; createBooleanAttribute( paramsOrFirst: @@ -2415,9 +2527,17 @@ export class Databases { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (boolean | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (boolean | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -2426,6 +2546,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }; if ( @@ -2440,6 +2561,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }; } else { params = { @@ -2449,6 +2571,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as boolean | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -2458,6 +2581,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2496,6 +2620,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2511,6 +2638,7 @@ export class Databases { attributeBoolean: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -2533,6 +2661,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {boolean | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New attribute key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateBooleanColumn` instead. @@ -2544,6 +2673,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a boolean attribute. Changing the `default` value will not update already existing documents. @@ -2554,6 +2684,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {boolean | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New attribute key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2565,6 +2696,7 @@ export class Databases { required: boolean, xdefault?: boolean | null, newKey?: string | null, + description?: string | null, ): Promise; updateBooleanAttribute( paramsOrFirst: @@ -2575,6 +2707,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -2583,6 +2716,7 @@ export class Databases { boolean?, (boolean | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -2592,6 +2726,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }; if ( @@ -2606,6 +2741,7 @@ export class Databases { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -2615,6 +2751,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as boolean | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -2624,6 +2761,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2665,6 +2803,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2680,6 +2821,7 @@ export class Databases { attributeBoolean: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -2702,6 +2844,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createDatetimeColumn` instead. @@ -2713,6 +2856,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create a date time attribute according to the ISO 8601 standard. @@ -2723,6 +2867,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2734,6 +2879,7 @@ export class Databases { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createDatetimeAttribute( paramsOrFirst: @@ -2744,9 +2890,17 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -2755,6 +2909,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -2769,6 +2924,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -2778,6 +2934,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -2787,6 +2944,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2825,6 +2983,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2840,6 +3001,7 @@ export class Databases { attributeDatetime: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -2862,6 +3024,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New attribute key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateDatetimeColumn` instead. @@ -2873,6 +3036,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a date time attribute. Changing the `default` value will not update already existing documents. @@ -2883,6 +3047,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New attribute key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2894,6 +3059,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateDatetimeAttribute( paramsOrFirst: @@ -2904,6 +3070,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -2912,6 +3079,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -2921,6 +3089,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -2935,6 +3104,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -2944,6 +3114,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -2953,6 +3124,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2994,6 +3166,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3009,6 +3184,7 @@ export class Databases { attributeDatetime: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3032,6 +3208,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEmailColumn` instead. @@ -3043,6 +3220,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create an email attribute. @@ -3054,6 +3232,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3065,6 +3244,7 @@ export class Databases { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createEmailAttribute( paramsOrFirst: @@ -3075,9 +3255,17 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -3086,6 +3274,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -3100,6 +3289,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -3109,6 +3299,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -3118,6 +3309,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3156,6 +3348,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3171,6 +3366,7 @@ export class Databases { attributeEmail: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3195,6 +3391,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateEmailColumn` instead. @@ -3206,6 +3403,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an email attribute. Changing the `default` value will not update already existing documents. @@ -3217,6 +3415,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3228,6 +3427,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateEmailAttribute( paramsOrFirst: @@ -3238,6 +3438,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -3246,6 +3447,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3255,6 +3457,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -3269,6 +3472,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -3278,6 +3482,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -3287,6 +3492,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3328,6 +3534,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3343,6 +3552,7 @@ export class Databases { attributeEmail: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3368,6 +3578,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEnumColumn` instead. @@ -3380,6 +3591,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create an enum attribute. The `elements` param acts as a white-list of accepted values for this attribute. @@ -3392,6 +3604,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3404,6 +3617,7 @@ export class Databases { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createEnumAttribute( paramsOrFirst: @@ -3415,6 +3629,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -3424,6 +3639,7 @@ export class Databases { boolean?, (string | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -3434,6 +3650,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -3449,6 +3666,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -3459,6 +3677,7 @@ export class Databases { required: rest[3] as boolean, xdefault: rest[4] as string | null, array: rest[5] as boolean, + description: rest[6] as string, }; } @@ -3469,6 +3688,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3515,6 +3735,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3530,6 +3753,7 @@ export class Databases { attributeEnum: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3556,6 +3780,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateEnumColumn` instead. @@ -3568,6 +3793,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an enum attribute. Changing the `default` value will not update already existing documents. @@ -3580,6 +3806,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3592,6 +3819,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateEnumAttribute( paramsOrFirst: @@ -3603,6 +3831,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -3612,6 +3841,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3622,6 +3852,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -3637,6 +3868,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -3647,6 +3879,7 @@ export class Databases { required: rest[3] as boolean, xdefault: rest[4] as string | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -3657,6 +3890,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3706,6 +3940,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3721,6 +3958,7 @@ export class Databases { attributeEnum: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3748,6 +3986,7 @@ export class Databases { * @param {number | null} params.max - Maximum value. * @param {number | null} params.xdefault - Default value. Cannot be set when required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createFloatColumn` instead. @@ -3761,6 +4000,7 @@ export class Databases { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }): Promise; /** * Create a float attribute. Optionally, minimum and maximum values can be provided. @@ -3774,6 +4014,7 @@ export class Databases { * @param {number | null} max - Maximum value. * @param {number | null} xdefault - Default value. Cannot be set when required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3787,6 +4028,7 @@ export class Databases { max?: number | null, xdefault?: number | null, array?: boolean, + description?: string, ): Promise; createFloatAttribute( paramsOrFirst: @@ -3799,6 +4041,7 @@ export class Databases { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -3809,6 +4052,7 @@ export class Databases { (number | null)?, (number | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -3820,6 +4064,7 @@ export class Databases { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }; if ( @@ -3836,6 +4081,7 @@ export class Databases { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }; } else { params = { @@ -3847,6 +4093,7 @@ export class Databases { max: rest[4] as number | null, xdefault: rest[5] as number | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -3858,6 +4105,7 @@ export class Databases { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3902,6 +4150,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3917,6 +4168,7 @@ export class Databases { attributeFloat: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3942,6 +4194,7 @@ export class Databases { * @param {number | null} params.min - Minimum value. * @param {number | null} params.max - Maximum value. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateFloatColumn` instead. @@ -3955,6 +4208,7 @@ export class Databases { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a float attribute. Changing the `default` value will not update already existing documents. @@ -3968,6 +4222,7 @@ export class Databases { * @param {number | null} min - Minimum value. * @param {number | null} max - Maximum value. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3981,6 +4236,7 @@ export class Databases { min?: number | null, max?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateFloatAttribute( paramsOrFirst: @@ -3993,6 +4249,7 @@ export class Databases { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -4003,6 +4260,7 @@ export class Databases { (number | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -4014,6 +4272,7 @@ export class Databases { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -4030,6 +4289,7 @@ export class Databases { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -4041,6 +4301,7 @@ export class Databases { min: rest[4] as number | null, max: rest[5] as number | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -4052,6 +4313,7 @@ export class Databases { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4099,6 +4361,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4114,6 +4379,7 @@ export class Databases { attributeFloat: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4139,6 +4405,7 @@ export class Databases { * @param {number | bigint | null} params.max - Maximum value * @param {number | bigint | null} params.xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIntegerColumn` instead. @@ -4152,6 +4419,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }): Promise; /** * Create an integer attribute. Optionally, minimum and maximum values can be provided. @@ -4165,6 +4433,7 @@ export class Databases { * @param {number | bigint | null} max - Maximum value * @param {number | bigint | null} xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4178,6 +4447,7 @@ export class Databases { max?: number | bigint | null, xdefault?: number | bigint | null, array?: boolean, + description?: string, ): Promise; createIntegerAttribute( paramsOrFirst: @@ -4190,6 +4460,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -4200,6 +4471,7 @@ export class Databases { (number | bigint | null)?, (number | bigint | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -4211,6 +4483,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; if ( @@ -4227,6 +4500,7 @@ export class Databases { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; } else { params = { @@ -4238,6 +4512,7 @@ export class Databases { max: rest[4] as number | bigint | null, xdefault: rest[5] as number | bigint | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -4249,6 +4524,7 @@ export class Databases { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4293,6 +4569,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4308,6 +4587,7 @@ export class Databases { attributeInteger: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4333,6 +4613,7 @@ export class Databases { * @param {number | bigint | null} params.min - Minimum value * @param {number | bigint | null} params.max - Maximum value * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateIntegerColumn` instead. @@ -4346,6 +4627,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an integer attribute. Changing the `default` value will not update already existing documents. @@ -4359,6 +4641,7 @@ export class Databases { * @param {number | bigint | null} min - Minimum value * @param {number | bigint | null} max - Maximum value * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4372,6 +4655,7 @@ export class Databases { min?: number | bigint | null, max?: number | bigint | null, newKey?: string | null, + description?: string | null, ): Promise; updateIntegerAttribute( paramsOrFirst: @@ -4384,6 +4668,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -4394,6 +4679,7 @@ export class Databases { (number | bigint | null)?, (number | bigint | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -4405,6 +4691,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; if ( @@ -4421,6 +4708,7 @@ export class Databases { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -4432,6 +4720,7 @@ export class Databases { min: rest[4] as number | bigint | null, max: rest[5] as number | bigint | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -4443,6 +4732,7 @@ export class Databases { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4490,6 +4780,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4505,6 +4798,7 @@ export class Databases { attributeInteger: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4528,6 +4822,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIpColumn` instead. @@ -4539,6 +4834,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create IP address attribute. @@ -4550,6 +4846,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4561,6 +4858,7 @@ export class Databases { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createIpAttribute( paramsOrFirst: @@ -4571,9 +4869,17 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -4582,6 +4888,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -4596,6 +4903,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -4605,6 +4913,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -4614,6 +4923,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4652,6 +4962,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4667,6 +4980,7 @@ export class Databases { attributeIp: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4691,6 +5005,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateIpColumn` instead. @@ -4702,6 +5017,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an ip attribute. Changing the `default` value will not update already existing documents. @@ -4713,6 +5029,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4724,6 +5041,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateIpAttribute( paramsOrFirst: @@ -4734,6 +5052,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -4742,6 +5061,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -4751,6 +5071,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -4765,6 +5086,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -4774,6 +5096,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -4783,6 +5106,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4824,6 +5148,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4839,6 +5166,7 @@ export class Databases { attributeIp: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4861,6 +5189,7 @@ export class Databases { * @param {string} params.key - Attribute Key. * @param {boolean} params.required - Is attribute required? * @param {any[][] | null} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLineColumn` instead. @@ -4871,6 +5200,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }): Promise; /** * Create a geometric line attribute. @@ -4880,6 +5210,7 @@ export class Databases { * @param {string} key - Attribute Key. * @param {boolean} required - Is attribute required? * @param {any[][] | null} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4890,6 +5221,7 @@ export class Databases { key: string, required: boolean, xdefault?: any[][] | null, + description?: string, ): Promise; createLineAttribute( paramsOrFirst: @@ -4899,9 +5231,10 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (any[][] | null)?] + ...rest: [string?, string?, boolean?, (any[][] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -4909,6 +5242,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; if ( @@ -4922,6 +5256,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; } else { params = { @@ -4930,6 +5265,7 @@ export class Databases { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, + description: rest[4] as string, }; } @@ -4938,6 +5274,7 @@ export class Databases { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4973,6 +5310,9 @@ export class Databases { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4988,6 +5328,7 @@ export class Databases { attributeLine: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5010,6 +5351,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {any[][] | null} params.xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. * @param {string | null} params.newKey - New attribute key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateLineColumn` instead. @@ -5021,6 +5363,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a line attribute. Changing the `default` value will not update already existing documents. @@ -5031,6 +5374,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {any[][] | null} xdefault - Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required. * @param {string | null} newKey - New attribute key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5042,6 +5386,7 @@ export class Databases { required: boolean, xdefault?: any[][] | null, newKey?: string | null, + description?: string | null, ): Promise; updateLineAttribute( paramsOrFirst: @@ -5052,6 +5397,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5060,6 +5406,7 @@ export class Databases { boolean?, (any[][] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5069,6 +5416,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5083,6 +5431,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5092,6 +5441,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -5101,6 +5451,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5137,6 +5488,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5152,6 +5506,7 @@ export class Databases { attributeLine: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5176,6 +5531,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLongtextColumn` instead. @@ -5188,6 +5544,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a longtext attribute. @@ -5200,6 +5557,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5212,6 +5570,7 @@ export class Databases { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createLongtextAttribute( paramsOrFirst: @@ -5223,6 +5582,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -5232,6 +5592,7 @@ export class Databases { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -5242,6 +5603,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -5257,6 +5619,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -5267,6 +5630,7 @@ export class Databases { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -5277,6 +5641,7 @@ export class Databases { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5318,6 +5683,9 @@ export class Databases { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5333,6 +5701,7 @@ export class Databases { attributeLongtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5356,6 +5725,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateLongtextColumn` instead. @@ -5367,6 +5737,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a longtext attribute. Changing the `default` value will not update already existing documents. @@ -5378,6 +5749,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5389,6 +5761,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateLongtextAttribute( paramsOrFirst: @@ -5399,6 +5772,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5407,6 +5781,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5416,6 +5791,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5430,6 +5806,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5439,6 +5816,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -5448,6 +5826,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5489,6 +5868,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5504,6 +5886,7 @@ export class Databases { attributeLongtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5528,6 +5911,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createMediumtextColumn` instead. @@ -5540,6 +5924,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a mediumtext attribute. @@ -5552,6 +5937,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5564,6 +5950,7 @@ export class Databases { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createMediumtextAttribute( paramsOrFirst: @@ -5575,6 +5962,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -5584,6 +5972,7 @@ export class Databases { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -5594,6 +5983,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -5609,6 +5999,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -5619,6 +6010,7 @@ export class Databases { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -5629,6 +6021,7 @@ export class Databases { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5670,6 +6063,9 @@ export class Databases { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5685,6 +6081,7 @@ export class Databases { attributeMediumtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5708,6 +6105,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateMediumtextColumn` instead. @@ -5719,6 +6117,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a mediumtext attribute. Changing the `default` value will not update already existing documents. @@ -5730,6 +6129,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5741,6 +6141,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateMediumtextAttribute( paramsOrFirst: @@ -5751,6 +6152,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5759,6 +6161,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5768,6 +6171,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5782,6 +6186,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5791,6 +6196,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -5800,6 +6206,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5841,6 +6248,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5856,6 +6266,7 @@ export class Databases { attributeMediumtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5877,6 +6288,7 @@ export class Databases { * @param {string} params.key - Attribute Key. * @param {boolean} params.required - Is attribute required? * @param {number[] | null} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPointColumn` instead. @@ -5887,6 +6299,7 @@ export class Databases { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }): Promise; /** * Create a geometric point attribute. @@ -5896,6 +6309,7 @@ export class Databases { * @param {string} key - Attribute Key. * @param {boolean} required - Is attribute required? * @param {number[] | null} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5906,6 +6320,7 @@ export class Databases { key: string, required: boolean, xdefault?: number[] | null, + description?: string, ): Promise; createPointAttribute( paramsOrFirst: @@ -5915,9 +6330,10 @@ export class Databases { key: string; required: boolean; xdefault?: number[] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (number[] | null)?] + ...rest: [string?, string?, boolean?, (number[] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -5925,6 +6341,7 @@ export class Databases { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }; if ( @@ -5938,6 +6355,7 @@ export class Databases { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }; } else { params = { @@ -5946,6 +6364,7 @@ export class Databases { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as number[] | null, + description: rest[4] as string, }; } @@ -5954,6 +6373,7 @@ export class Databases { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5989,6 +6409,9 @@ export class Databases { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6004,6 +6427,7 @@ export class Databases { attributePoint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6026,6 +6450,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {number[] | null} params.xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. * @param {string | null} params.newKey - New attribute key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePointColumn` instead. @@ -6037,6 +6462,7 @@ export class Databases { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a point attribute. Changing the `default` value will not update already existing documents. @@ -6047,6 +6473,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {number[] | null} xdefault - Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required. * @param {string | null} newKey - New attribute key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6058,6 +6485,7 @@ export class Databases { required: boolean, xdefault?: number[] | null, newKey?: string | null, + description?: string | null, ): Promise; updatePointAttribute( paramsOrFirst: @@ -6068,6 +6496,7 @@ export class Databases { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -6076,6 +6505,7 @@ export class Databases { boolean?, (number[] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -6085,6 +6515,7 @@ export class Databases { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -6099,6 +6530,7 @@ export class Databases { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6108,6 +6540,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as number[] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -6117,6 +6550,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6153,6 +6587,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6168,6 +6605,7 @@ export class Databases { attributePoint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6189,6 +6627,7 @@ export class Databases { * @param {string} params.key - Attribute Key. * @param {boolean} params.required - Is attribute required? * @param {any[][] | null} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPolygonColumn` instead. @@ -6199,6 +6638,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }): Promise; /** * Create a geometric polygon attribute. @@ -6208,6 +6648,7 @@ export class Databases { * @param {string} key - Attribute Key. * @param {boolean} required - Is attribute required? * @param {any[][] | null} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6218,6 +6659,7 @@ export class Databases { key: string, required: boolean, xdefault?: any[][] | null, + description?: string, ): Promise; createPolygonAttribute( paramsOrFirst: @@ -6227,9 +6669,10 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (any[][] | null)?] + ...rest: [string?, string?, boolean?, (any[][] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -6237,6 +6680,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; if ( @@ -6250,6 +6694,7 @@ export class Databases { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; } else { params = { @@ -6258,6 +6703,7 @@ export class Databases { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, + description: rest[4] as string, }; } @@ -6266,6 +6712,7 @@ export class Databases { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6301,6 +6748,9 @@ export class Databases { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6316,6 +6766,7 @@ export class Databases { attributePolygon: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6338,6 +6789,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {any[][] | null} params.xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. * @param {string | null} params.newKey - New attribute key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePolygonColumn` instead. @@ -6349,6 +6801,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a polygon attribute. Changing the `default` value will not update already existing documents. @@ -6359,6 +6812,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {any[][] | null} xdefault - Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required. * @param {string | null} newKey - New attribute key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6370,6 +6824,7 @@ export class Databases { required: boolean, xdefault?: any[][] | null, newKey?: string | null, + description?: string | null, ): Promise; updatePolygonAttribute( paramsOrFirst: @@ -6380,6 +6835,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -6388,6 +6844,7 @@ export class Databases { boolean?, (any[][] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -6397,6 +6854,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -6411,6 +6869,7 @@ export class Databases { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6420,6 +6879,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -6429,6 +6889,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6465,6 +6926,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6480,6 +6944,7 @@ export class Databases { attributePolygon: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6505,6 +6970,7 @@ export class Databases { * @param {string | null} params.key - Attribute Key. * @param {string | null} params.twoWayKey - Two Way Attribute Key. * @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRelationshipColumn` instead. @@ -6518,6 +6984,7 @@ export class Databases { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }): Promise; /** * Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). @@ -6531,6 +6998,7 @@ export class Databases { * @param {string | null} key - Attribute Key. * @param {string | null} twoWayKey - Two Way Attribute Key. * @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6544,6 +7012,7 @@ export class Databases { key?: string | null, twoWayKey?: string | null, onDelete?: RelationMutate, + description?: string, ): Promise; createRelationshipAttribute( paramsOrFirst: @@ -6556,6 +7025,7 @@ export class Databases { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; } | string, ...rest: [ @@ -6566,6 +7036,7 @@ export class Databases { (string | null)?, (string | null)?, RelationMutate?, + string?, ] ): Promise { let params: { @@ -6577,6 +7048,7 @@ export class Databases { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }; if ( @@ -6593,6 +7065,7 @@ export class Databases { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }; } else { params = { @@ -6604,6 +7077,7 @@ export class Databases { key: rest[4] as string | null, twoWayKey: rest[5] as string | null, onDelete: rest[6] as RelationMutate, + description: rest[7] as string, }; } @@ -6615,6 +7089,7 @@ export class Databases { const key = params.key; const twoWayKey = params.twoWayKey; const onDelete = params.onDelete; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6659,6 +7134,9 @@ export class Databases { if (typeof onDelete !== 'undefined') { apiPayload['onDelete'] = onDelete; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6674,6 +7152,7 @@ export class Databases { attributeRelationship: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6701,6 +7180,7 @@ export class Databases { * @param {string} params.key - Attribute Key. * @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead. @@ -6711,6 +7191,7 @@ export class Databases { key: string; onDelete?: RelationMutate; newKey?: string | null; + description?: string | null; }): Promise; /** * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). @@ -6721,6 +7202,7 @@ export class Databases { * @param {string} key - Attribute Key. * @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6731,6 +7213,7 @@ export class Databases { key: string, onDelete?: RelationMutate, newKey?: string | null, + description?: string | null, ): Promise; updateRelationshipAttribute( paramsOrFirst: @@ -6740,9 +7223,16 @@ export class Databases { key: string; onDelete?: RelationMutate; newKey?: string | null; + description?: string | null; } | string, - ...rest: [string?, string?, RelationMutate?, (string | null)?] + ...rest: [ + string?, + string?, + RelationMutate?, + (string | null)?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; @@ -6750,6 +7240,7 @@ export class Databases { key: string; onDelete?: RelationMutate; newKey?: string | null; + description?: string | null; }; if ( @@ -6763,6 +7254,7 @@ export class Databases { key: string; onDelete?: RelationMutate; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6771,6 +7263,7 @@ export class Databases { key: rest[1] as string, onDelete: rest[2] as RelationMutate, newKey: rest[3] as string | null, + description: rest[4] as string | null, }; } @@ -6779,6 +7272,7 @@ export class Databases { const key = params.key; const onDelete = params.onDelete; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6807,6 +7301,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6822,6 +7319,7 @@ export class Databases { attributeRelationship: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6852,6 +7350,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead. @@ -6865,6 +7364,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a string attribute. @@ -6878,6 +7378,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6891,6 +7392,7 @@ export class Databases { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createStringAttribute( paramsOrFirst: @@ -6903,6 +7405,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -6913,6 +7416,7 @@ export class Databases { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -6924,6 +7428,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -6940,6 +7445,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -6951,6 +7457,7 @@ export class Databases { xdefault: rest[4] as string | null, array: rest[5] as boolean, encrypt: rest[6] as boolean, + description: rest[7] as string, }; } @@ -6962,6 +7469,7 @@ export class Databases { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7009,6 +7517,9 @@ export class Databases { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7024,6 +7535,7 @@ export class Databases { attributeString: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7049,6 +7561,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {number | null} params.size - Maximum size of the string attribute. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateStringColumn` instead. @@ -7061,6 +7574,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a string attribute. Changing the `default` value will not update already existing documents. @@ -7073,6 +7587,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {number | null} size - Maximum size of the string attribute. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7085,6 +7600,7 @@ export class Databases { xdefault?: string | null, size?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateStringAttribute( paramsOrFirst: @@ -7096,6 +7612,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -7105,6 +7622,7 @@ export class Databases { (string | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -7115,6 +7633,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7130,6 +7649,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7140,6 +7660,7 @@ export class Databases { xdefault: rest[3] as string | null, size: rest[4] as number | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -7150,6 +7671,7 @@ export class Databases { const xdefault = params.xdefault; const size = params.size; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7194,6 +7716,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7209,6 +7734,7 @@ export class Databases { attributeString: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7234,6 +7760,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTextColumn` instead. @@ -7246,6 +7773,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a text attribute. @@ -7258,6 +7786,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7270,6 +7799,7 @@ export class Databases { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createTextAttribute( paramsOrFirst: @@ -7281,6 +7811,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -7290,6 +7821,7 @@ export class Databases { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -7300,6 +7832,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -7315,6 +7848,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -7325,6 +7859,7 @@ export class Databases { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -7335,6 +7870,7 @@ export class Databases { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7376,6 +7912,9 @@ export class Databases { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7391,6 +7930,7 @@ export class Databases { attributeText: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7414,6 +7954,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTextColumn` instead. @@ -7425,6 +7966,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a text attribute. Changing the `default` value will not update already existing documents. @@ -7436,6 +7978,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7447,6 +7990,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateTextAttribute( paramsOrFirst: @@ -7457,6 +8001,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -7465,6 +8010,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -7474,6 +8020,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7488,6 +8035,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7497,6 +8045,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -7506,6 +8055,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7547,6 +8097,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7562,6 +8115,7 @@ export class Databases { attributeText: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7585,6 +8139,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createUrlColumn` instead. @@ -7596,6 +8151,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create a URL attribute. @@ -7607,6 +8163,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7618,6 +8175,7 @@ export class Databases { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createUrlAttribute( paramsOrFirst: @@ -7628,9 +8186,17 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -7639,6 +8205,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -7653,6 +8220,7 @@ export class Databases { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -7662,6 +8230,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -7671,6 +8240,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7709,6 +8279,9 @@ export class Databases { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7724,6 +8297,7 @@ export class Databases { attributeUrl: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7748,6 +8322,7 @@ export class Databases { * @param {boolean} params.required - Is attribute required? * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateUrlColumn` instead. @@ -7759,6 +8334,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an url attribute. Changing the `default` value will not update already existing documents. @@ -7770,6 +8346,7 @@ export class Databases { * @param {boolean} required - Is attribute required? * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7781,6 +8358,7 @@ export class Databases { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateUrlAttribute( paramsOrFirst: @@ -7791,6 +8369,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -7799,6 +8378,7 @@ export class Databases { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -7808,6 +8388,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7822,6 +8403,7 @@ export class Databases { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7831,6 +8413,7 @@ export class Databases { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -7840,6 +8423,7 @@ export class Databases { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7881,6 +8465,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7896,6 +8483,7 @@ export class Databases { attributeUrl: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7922,6 +8510,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} params.array - Is attribute an array? * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createVarcharColumn` instead. @@ -7935,6 +8524,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a varchar attribute. @@ -7948,6 +8538,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {boolean} array - Is attribute an array? * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried. + * @param {string} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7961,6 +8552,7 @@ export class Databases { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createVarcharAttribute( paramsOrFirst: @@ -7973,6 +8565,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -7983,6 +8576,7 @@ export class Databases { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -7994,6 +8588,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -8010,6 +8605,7 @@ export class Databases { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -8021,6 +8617,7 @@ export class Databases { xdefault: rest[4] as string | null, array: rest[5] as boolean, encrypt: rest[6] as boolean, + description: rest[7] as string, }; } @@ -8032,6 +8629,7 @@ export class Databases { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8079,6 +8677,9 @@ export class Databases { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8094,6 +8695,7 @@ export class Databases { attributeVarchar: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8119,6 +8721,7 @@ export class Databases { * @param {string | null} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {number | null} params.size - Maximum size of the varchar attribute. * @param {string | null} params.newKey - New Attribute Key. + * @param {string | null} params.description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateVarcharColumn` instead. @@ -8131,6 +8734,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a varchar attribute. Changing the `default` value will not update already existing documents. @@ -8143,6 +8747,7 @@ export class Databases { * @param {string | null} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required. * @param {number | null} size - Maximum size of the varchar attribute. * @param {string | null} newKey - New Attribute Key. + * @param {string | null} description - Optional description for the attribute. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8155,6 +8760,7 @@ export class Databases { xdefault?: string | null, size?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateVarcharAttribute( paramsOrFirst: @@ -8166,6 +8772,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -8175,6 +8782,7 @@ export class Databases { (string | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -8185,6 +8793,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -8200,6 +8809,7 @@ export class Databases { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -8210,6 +8820,7 @@ export class Databases { xdefault: rest[3] as string | null, size: rest[4] as number | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -8220,6 +8831,7 @@ export class Databases { const xdefault = params.xdefault; const size = params.size; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8264,6 +8876,9 @@ export class Databases { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8279,6 +8894,7 @@ export class Databases { attributeVarchar: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8534,12 +9150,14 @@ export class Databases { /** * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. * + * Documents returned by aggregate, groupBy or distinct queries hold only the attributes they select, group or aggregate, typed as a document types them, with a joined attribute named by its join alias (`alias.attribute`). The response omits their `$id`, `$sequence`, `$createdAt`, `$updatedAt`, `$permissions`, `$databaseId` and `$collectionId` unless they select or group it, and those of a right or full join document that no document of this collection matched. SDK document models fill omitted system attributes with empty values. + * * @param {string} params.databaseId - Database ID. * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @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. * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction. * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. - * @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). + * @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. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). * @throws {AppwriteException} * @returns {Promise>} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead. @@ -8557,12 +9175,14 @@ export class Databases { /** * Get a list of all the user's documents in a given collection. You can use the query params to filter your results. * + * Documents returned by aggregate, groupBy or distinct queries hold only the attributes they select, group or aggregate, typed as a document types them, with a joined attribute named by its join alias (`alias.attribute`). The response omits their `$id`, `$sequence`, `$createdAt`, `$updatedAt`, `$permissions`, `$databaseId` and `$collectionId` unless they select or group it, and those of a right or full join document that no document of this collection matched. SDK document models fill omitted system attributes with empty values. + * * @param {string} databaseId - Database ID. * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). * @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. * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction. * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. - * @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). + * @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. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. @@ -9476,6 +10096,174 @@ export class Databases { return request.then((response) => applyDefaults(response, defaults)); } + /** + * Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @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. + * @param {string | null} params.transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @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. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createQuery` instead. + */ + createQuery< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }): Promise>; + /** + * Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @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. + * @param {string | null} transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @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. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createQuery( + databaseId: string, + collectionId: string, + queries?: string[], + transactionId?: string | null, + total?: boolean, + ttl?: number, + ): Promise>; + createQuery( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + } + | string, + ...rest: [string?, string[]?, (string | null)?, boolean?, number?] + ): Promise> { + let params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + queries: rest[1] as string[], + transactionId: rest[2] as string | null, + total: rest[3] as boolean, + ttl: rest[4] as number, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const queries = params.queries; + const transactionId = params.transactionId; + const total = params.total; + const ttl = params.ttl; + if (typeof databaseId === 'undefined' || databaseId === '') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined' || collectionId === '') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + const apiPath = + '/databases/{databaseId}/collections/{collectionId}/documents/query' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); + const apiPayload: Payload = {}; + if (typeof queries !== 'undefined') { + apiPayload['queries'] = queries; + } + if (typeof transactionId !== 'undefined') { + apiPayload['transactionId'] = transactionId; + } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } + if (typeof ttl !== 'undefined') { + apiPayload['ttl'] = ttl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + const request = this.client.call('post', uri, apiHeaders, apiPayload); + const defaults = { + root: 'documentList', + models: { + documentList: { + defaults: { + total: 0, + documents: [], + }, + properties: { + documents: { + items: 'document', + }, + }, + }, + document: { + defaults: { + $id: '', + $sequence: '', + $collectionId: '', + $databaseId: '', + $createdAt: '', + $updatedAt: '', + $permissions: [], + }, + }, + }, + }; + + return request.then((response) => applyDefaults(response, defaults)); + } + /** * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. * @@ -10613,6 +11401,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -10636,6 +11425,7 @@ export class Databases { * @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} params.orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} params.lengths - Length of index. Maximum of 100 + * @param {string} params.description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIndex` instead. @@ -10648,6 +11438,7 @@ export class Databases { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }): Promise; /** * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. @@ -10660,6 +11451,7 @@ export class Databases { * @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} lengths - Length of index. Maximum of 100 + * @param {string} description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -10672,6 +11464,7 @@ export class Databases { attributes: string[], orders?: OrderBy[], lengths?: number[], + description?: string, ): Promise; createIndex( paramsOrFirst: @@ -10683,6 +11476,7 @@ export class Databases { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; } | string, ...rest: [ @@ -10692,6 +11486,7 @@ export class Databases { string[]?, OrderBy[]?, number[]?, + string?, ] ): Promise { let params: { @@ -10702,6 +11497,7 @@ export class Databases { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; if ( @@ -10717,6 +11513,7 @@ export class Databases { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; } else { params = { @@ -10727,6 +11524,7 @@ export class Databases { attributes: rest[3] as string[], orders: rest[4] as OrderBy[], lengths: rest[5] as number[], + description: rest[6] as string, }; } @@ -10737,6 +11535,7 @@ export class Databases { const attributes = params.attributes; const orders = params.orders; const lengths = params.lengths; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -10781,6 +11580,9 @@ export class Databases { if (typeof lengths !== 'undefined') { apiPayload['lengths'] = lengths; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -10799,6 +11601,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -10908,6 +11711,7 @@ export class Databases { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], diff --git a/src/services/documents-db.ts b/src/services/documents-db.ts index 8d1f7f6..8a7a39b 100644 --- a/src/services/documents-db.ts +++ b/src/services/documents-db.ts @@ -96,6 +96,7 @@ export class DocumentsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -149,6 +150,7 @@ export class DocumentsDB { * @param {string} params.databaseId - Unique 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. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string} params.description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -159,6 +161,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -170,6 +173,7 @@ export class DocumentsDB { * @param {string} databaseId - Unique 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. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string} description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -181,6 +185,7 @@ export class DocumentsDB { databaseId: string, name: string, enabled?: boolean, + description?: string, specification?: string, replicas?: number, syncMode?: string | null, @@ -191,17 +196,26 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; } | string, - ...rest: [string?, boolean?, string?, number?, (string | null)?] + ...rest: [ + string?, + boolean?, + string?, + string?, + number?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -216,6 +230,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -225,15 +240,17 @@ export class DocumentsDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string, - replicas: rest[3] as number, - syncMode: rest[4] as string | null, + description: rest[2] as string, + specification: rest[3] as string, + replicas: rest[4] as number, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -256,6 +273,9 @@ export class DocumentsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -281,6 +301,7 @@ export class DocumentsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -934,6 +955,7 @@ export class DocumentsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -986,6 +1008,7 @@ export class DocumentsDB { * @param {string} params.databaseId - Database ID. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string | null} params.description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -996,6 +1019,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1006,6 +1030,7 @@ export class DocumentsDB { * @param {string} databaseId - Database ID. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string | null} description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -1017,6 +1042,7 @@ export class DocumentsDB { databaseId: string, name: string, enabled?: boolean, + description?: string | null, specification?: string | null, replicas?: number | null, syncMode?: string | null, @@ -1027,6 +1053,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1036,6 +1063,7 @@ export class DocumentsDB { string?, boolean?, (string | null)?, + (string | null)?, (number | null)?, (string | null)?, ] @@ -1044,6 +1072,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1058,6 +1087,7 @@ export class DocumentsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1067,15 +1097,17 @@ export class DocumentsDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string | null, - replicas: rest[3] as number | null, - syncMode: rest[4] as string | null, + description: rest[2] as string | null, + specification: rest[3] as string | null, + replicas: rest[4] as number | null, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -1098,6 +1130,9 @@ export class DocumentsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -1123,6 +1158,7 @@ export class DocumentsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -1347,6 +1383,7 @@ export class DocumentsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1366,6 +1403,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1389,6 +1427,7 @@ export class DocumentsDB { * @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. * @param {object[]} params.attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} */ @@ -1401,6 +1440,7 @@ export class DocumentsDB { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }): Promise; /** * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. @@ -1413,6 +1453,7 @@ export class DocumentsDB { * @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. * @param {object[]} attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1426,6 +1467,7 @@ export class DocumentsDB { enabled?: boolean, attributes?: object[], indexes?: object[], + description?: string, ): Promise; createCollection( paramsOrFirst: @@ -1438,6 +1480,7 @@ export class DocumentsDB { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; } | string, ...rest: [ @@ -1448,6 +1491,7 @@ export class DocumentsDB { boolean?, object[]?, object[]?, + string?, ] ): Promise { let params: { @@ -1459,6 +1503,7 @@ export class DocumentsDB { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }; if ( @@ -1475,6 +1520,7 @@ export class DocumentsDB { enabled?: boolean; attributes?: object[]; indexes?: object[]; + description?: string; }; } else { params = { @@ -1486,6 +1532,7 @@ export class DocumentsDB { enabled: rest[4] as boolean, attributes: rest[5] as object[], indexes: rest[6] as object[], + description: rest[7] as string, }; } @@ -1497,6 +1544,7 @@ export class DocumentsDB { const enabled = params.enabled; const attributes = params.attributes; const indexes = params.indexes; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1536,6 +1584,9 @@ export class DocumentsDB { if (typeof indexes !== 'undefined') { apiPayload['indexes'] = indexes; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1556,6 +1607,7 @@ export class DocumentsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1575,6 +1627,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1672,6 +1725,7 @@ export class DocumentsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1691,6 +1745,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1713,6 +1768,7 @@ export class DocumentsDB { * @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). * @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. * @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. + * @param {string | null} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} */ @@ -1724,6 +1780,7 @@ export class DocumentsDB { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }): Promise; /** * Update a collection by its unique ID. @@ -1735,6 +1792,7 @@ export class DocumentsDB { * @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). * @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. * @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. + * @param {string | null} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1747,6 +1805,7 @@ export class DocumentsDB { documentSecurity?: boolean, enabled?: boolean, purge?: boolean, + description?: string | null, ): Promise; updateCollection( paramsOrFirst: @@ -1758,9 +1817,18 @@ export class DocumentsDB { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; } | string, - ...rest: [string?, string?, string[]?, boolean?, boolean?, boolean?] + ...rest: [ + string?, + string?, + string[]?, + boolean?, + boolean?, + boolean?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; @@ -1770,6 +1838,7 @@ export class DocumentsDB { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; if ( @@ -1785,6 +1854,7 @@ export class DocumentsDB { documentSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; } else { params = { @@ -1795,6 +1865,7 @@ export class DocumentsDB { documentSecurity: rest[3] as boolean, enabled: rest[4] as boolean, purge: rest[5] as boolean, + description: rest[6] as string | null, }; } @@ -1805,6 +1876,7 @@ export class DocumentsDB { const documentSecurity = params.documentSecurity; const enabled = params.enabled; const purge = params.purge; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1840,6 +1912,9 @@ export class DocumentsDB { if (typeof purge !== 'undefined') { apiPayload['purge'] = purge; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1860,6 +1935,7 @@ export class DocumentsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1879,6 +1955,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -2904,6 +2981,173 @@ export class DocumentsDB { return request.then((response) => applyDefaults(response, defaults)); } + /** + * Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @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. + * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + */ + createQuery< + Document extends Models.Document = Models.DefaultDocument, + >(params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }): Promise>; + /** + * Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} databaseId - Database ID. + * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). + * @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. + * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createQuery( + databaseId: string, + collectionId: string, + queries?: string[], + transactionId?: string, + total?: boolean, + ttl?: number, + ): Promise>; + createQuery( + paramsOrFirst: + | { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + } + | string, + ...rest: [string?, string[]?, string?, boolean?, number?] + ): Promise> { + let params: { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + collectionId: string; + queries?: string[]; + transactionId?: string; + total?: boolean; + ttl?: number; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + collectionId: rest[0] as string, + queries: rest[1] as string[], + transactionId: rest[2] as string, + total: rest[3] as boolean, + ttl: rest[4] as number, + }; + } + + const databaseId = params.databaseId; + const collectionId = params.collectionId; + const queries = params.queries; + const transactionId = params.transactionId; + const total = params.total; + const ttl = params.ttl; + if (typeof databaseId === 'undefined' || databaseId === '') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof collectionId === 'undefined' || collectionId === '') { + throw new AppwriteException( + 'Missing required parameter: "collectionId"', + ); + } + const apiPath = + '/documentsdb/{databaseId}/collections/{collectionId}/documents/query' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace( + '{collectionId}', + encodeURIComponent(String(collectionId)), + ); + const apiPayload: Payload = {}; + if (typeof queries !== 'undefined') { + apiPayload['queries'] = queries; + } + if (typeof transactionId !== 'undefined') { + apiPayload['transactionId'] = transactionId; + } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } + if (typeof ttl !== 'undefined') { + apiPayload['ttl'] = ttl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + const request = this.client.call('post', uri, apiHeaders, apiPayload); + const defaults = { + root: 'documentList', + models: { + documentList: { + defaults: { + total: 0, + documents: [], + }, + properties: { + documents: { + items: 'document', + }, + }, + }, + document: { + defaults: { + $id: '', + $sequence: '', + $collectionId: '', + $databaseId: '', + $createdAt: '', + $updatedAt: '', + $permissions: [], + }, + }, + }, + }; + + return request.then((response) => applyDefaults(response, defaults)); + } + /** * Get a document by its unique ID. This endpoint response returns a JSON object with the document data. * @@ -4020,6 +4264,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -4043,6 +4288,7 @@ export class DocumentsDB { * @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} params.orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} params.lengths - Length of index. Maximum of 100 + * @param {string} params.description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} */ @@ -4054,6 +4300,7 @@ export class DocumentsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }): Promise; /** * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. @@ -4066,6 +4313,7 @@ export class DocumentsDB { * @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} lengths - Length of index. Maximum of 100 + * @param {string} description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4078,6 +4326,7 @@ export class DocumentsDB { attributes: string[], orders?: OrderBy[], lengths?: number[], + description?: string, ): Promise; createIndex( paramsOrFirst: @@ -4089,6 +4338,7 @@ export class DocumentsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; } | string, ...rest: [ @@ -4098,6 +4348,7 @@ export class DocumentsDB { string[]?, OrderBy[]?, number[]?, + string?, ] ): Promise { let params: { @@ -4108,6 +4359,7 @@ export class DocumentsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; if ( @@ -4123,6 +4375,7 @@ export class DocumentsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; } else { params = { @@ -4133,6 +4386,7 @@ export class DocumentsDB { attributes: rest[3] as string[], orders: rest[4] as OrderBy[], lengths: rest[5] as number[], + description: rest[6] as string, }; } @@ -4143,6 +4397,7 @@ export class DocumentsDB { const attributes = params.attributes; const orders = params.orders; const lengths = params.lengths; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4187,6 +4442,9 @@ export class DocumentsDB { if (typeof lengths !== 'undefined') { apiPayload['lengths'] = lengths; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4205,6 +4463,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -4313,6 +4572,7 @@ export class DocumentsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], diff --git a/src/services/domains.ts b/src/services/domains.ts index 12834f0..696f81e 100644 --- a/src/services/domains.ts +++ b/src/services/domains.ts @@ -19,28 +19,36 @@ export class Domains { * * @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 attributes such as domain name, teamInternalId, expiration, etc. * @param {string} params.search - Search term to filter your list results. Max length: 256 chars. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ list(params?: { queries?: string[]; search?: string; + total?: boolean; }): Promise; /** * List all domains registered for this project. This endpoint supports pagination. * * @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 attributes such as domain name, teamInternalId, expiration, etc. * @param {string} search - Search term to filter your list results. Max length: 256 chars. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - list(queries?: string[], search?: string): Promise; list( - paramsOrFirst?: { queries?: string[]; search?: string } | string[], - ...rest: [string?] + queries?: string[], + search?: string, + total?: boolean, + ): Promise; + list( + paramsOrFirst?: + { queries?: string[]; search?: string; total?: boolean } | string[], + ...rest: [string?, boolean?] ): Promise { - let params: { queries?: string[]; search?: string }; + let params: { queries?: string[]; search?: string; total?: boolean }; if ( (typeof paramsOrFirst === 'undefined' && rest.length === 0) || @@ -51,16 +59,19 @@ export class Domains { params = (paramsOrFirst || {}) as { queries?: string[]; search?: string; + total?: boolean; }; } else { params = { queries: paramsOrFirst as string[], search: rest[0] as string, + total: rest[1] as boolean, }; } const queries = params.queries; const search = params.search; + const total = params.total; const apiPath = '/domains'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { @@ -69,6 +80,9 @@ export class Domains { if (typeof search !== 'undefined') { apiPayload['search'] = search; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1966,12 +1980,14 @@ export class Domains { * * @param {string} params.domainId - Domain unique ID. * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. You may filter on attributes such as type, name, value, etc. Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listRecords(params: { domainId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List DNS records for a given domain. You can use this endpoint to list all the DNS records @@ -1979,6 +1995,7 @@ export class Domains { * * @param {string} domainId - Domain unique ID. * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. You may filter on attributes such as type, name, value, etc. Maximum of 100 queries are allowed, each 4096 characters long. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1986,12 +2003,14 @@ export class Domains { listRecords( domainId: string, queries?: string[], + total?: boolean, ): Promise; listRecords( - paramsOrFirst: { domainId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + { domainId: string; queries?: string[]; total?: boolean } | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { domainId: string; queries?: string[] }; + let params: { domainId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -2001,16 +2020,19 @@ export class Domains { params = (paramsOrFirst || {}) as { domainId: string; queries?: string[]; + total?: boolean; }; } else { params = { domainId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const domainId = params.domainId; const queries = params.queries; + const total = params.total; if (typeof domainId === 'undefined' || domainId === '') { throw new AppwriteException( 'Missing required parameter: "domainId"', @@ -2024,6 +2046,9 @@ export class Domains { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/functions.ts b/src/services/functions.ts index 75e54d4..ecbe01c 100644 --- a/src/services/functions.ts +++ b/src/services/functions.ts @@ -119,6 +119,7 @@ export class Functions { $updatedAt: '', execute: [], name: '', + description: '', enabled: true, live: true, logging: true, @@ -160,6 +161,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -198,6 +200,7 @@ export class Functions { * @param {string} params.runtimeSpecification - Runtime specification for the function executions. * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {number} params.interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. + * @param {string} params.description - Optional description for the function. * @throws {AppwriteException} * @returns {Promise} */ @@ -225,6 +228,7 @@ export class Functions { runtimeSpecification?: string; deploymentRetention?: number; interval?: number; + description?: string; }): Promise; /** * Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API. @@ -252,6 +256,7 @@ export class Functions { * @param {string} runtimeSpecification - Runtime specification for the function executions. * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {number} interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. + * @param {string} description - Optional description for the function. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -280,6 +285,7 @@ export class Functions { runtimeSpecification?: string, deploymentRetention?: number, interval?: number, + description?: string, ): Promise; create( paramsOrFirst: @@ -307,6 +313,7 @@ export class Functions { runtimeSpecification?: string; deploymentRetention?: number; interval?: number; + description?: string; } | string, ...rest: [ @@ -332,6 +339,7 @@ export class Functions { string?, number?, number?, + string?, ] ): Promise { let params: { @@ -358,6 +366,7 @@ export class Functions { runtimeSpecification?: string; deploymentRetention?: number; interval?: number; + description?: string; }; if ( @@ -389,6 +398,7 @@ export class Functions { runtimeSpecification?: string; deploymentRetention?: number; interval?: number; + description?: string; }; } else { params = { @@ -415,6 +425,7 @@ export class Functions { runtimeSpecification: rest[19] as string, deploymentRetention: rest[20] as number, interval: rest[21] as number, + description: rest[22] as string, }; } @@ -441,6 +452,7 @@ export class Functions { const runtimeSpecification = params.runtimeSpecification; const deploymentRetention = params.deploymentRetention; const interval = params.interval; + const description = params.description; if (typeof functionId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "functionId"', @@ -525,6 +537,9 @@ export class Functions { if (typeof interval !== 'undefined') { apiPayload['interval'] = interval; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -544,6 +559,7 @@ export class Functions { $updatedAt: '', execute: [], name: '', + description: '', enabled: true, live: true, logging: true, @@ -585,6 +601,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -835,6 +852,7 @@ export class Functions { $updatedAt: '', execute: [], name: '', + description: '', enabled: true, live: true, logging: true, @@ -876,6 +894,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -914,6 +933,7 @@ export class Functions { * @param {string | null} params.runtimeSpecification - Runtime specification for the function executions. * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {number | null} params.interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. When omitted, the current interval is kept unless schedule is set. + * @param {string | null} params.description - Optional description for the function. * @param {boolean | null} params.emailEnabled - Enable inbound email triggering for this function. When false or omitted on create, SMTP recipients are rejected. Opt-in; default is off. * @throws {AppwriteException} * @returns {Promise} @@ -942,6 +962,7 @@ export class Functions { runtimeSpecification?: string | null; deploymentRetention?: number; interval?: number | null; + description?: string | null; emailEnabled?: boolean | null; }): Promise; /** @@ -970,6 +991,7 @@ export class Functions { * @param {string | null} runtimeSpecification - Runtime specification for the function executions. * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {number | null} interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. When omitted, the current interval is kept unless schedule is set. + * @param {string | null} description - Optional description for the function. * @param {boolean | null} emailEnabled - Enable inbound email triggering for this function. When false or omitted on create, SMTP recipients are rejected. Opt-in; default is off. * @throws {AppwriteException} * @returns {Promise} @@ -999,6 +1021,7 @@ export class Functions { runtimeSpecification?: string | null, deploymentRetention?: number, interval?: number | null, + description?: string | null, emailEnabled?: boolean | null, ): Promise; update( @@ -1027,6 +1050,7 @@ export class Functions { runtimeSpecification?: string | null; deploymentRetention?: number; interval?: number | null; + description?: string | null; emailEnabled?: boolean | null; } | string, @@ -1053,6 +1077,7 @@ export class Functions { (string | null)?, number?, (number | null)?, + (string | null)?, (boolean | null)?, ] ): Promise { @@ -1080,6 +1105,7 @@ export class Functions { runtimeSpecification?: string | null; deploymentRetention?: number; interval?: number | null; + description?: string | null; emailEnabled?: boolean | null; }; @@ -1112,6 +1138,7 @@ export class Functions { runtimeSpecification?: string | null; deploymentRetention?: number; interval?: number | null; + description?: string | null; emailEnabled?: boolean | null; }; } else { @@ -1139,7 +1166,8 @@ export class Functions { runtimeSpecification: rest[19] as string | null, deploymentRetention: rest[20] as number, interval: rest[21] as number | null, - emailEnabled: rest[22] as boolean | null, + description: rest[22] as string | null, + emailEnabled: rest[23] as boolean | null, }; } @@ -1166,6 +1194,7 @@ export class Functions { const runtimeSpecification = params.runtimeSpecification; const deploymentRetention = params.deploymentRetention; const interval = params.interval; + const description = params.description; const emailEnabled = params.emailEnabled; if (typeof functionId === 'undefined' || functionId === '') { throw new AppwriteException( @@ -1246,6 +1275,9 @@ export class Functions { if (typeof interval !== 'undefined') { apiPayload['interval'] = interval; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof emailEnabled !== 'undefined') { apiPayload['emailEnabled'] = emailEnabled; } @@ -1268,6 +1300,7 @@ export class Functions { $updatedAt: '', execute: [], name: '', + description: '', enabled: true, live: true, logging: true, @@ -1309,6 +1342,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -1461,6 +1495,7 @@ export class Functions { $updatedAt: '', execute: [], name: '', + description: '', enabled: true, live: true, logging: true, @@ -1502,6 +1537,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3343,6 +3379,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3363,6 +3400,7 @@ export class Functions { * @param {string} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} params.value - Variable value. Max length: 8192 chars. * @param {boolean} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime. + * @param {string} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -3372,6 +3410,7 @@ export class Functions { key: string; value: string; secret?: boolean; + description?: string; }): Promise; /** * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables. @@ -3381,6 +3420,7 @@ export class Functions { * @param {string} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} value - Variable value. Max length: 8192 chars. * @param {boolean} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime. + * @param {string} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3391,6 +3431,7 @@ export class Functions { key: string, value: string, secret?: boolean, + description?: string, ): Promise; createVariable( paramsOrFirst: @@ -3400,9 +3441,10 @@ export class Functions { key: string; value: string; secret?: boolean; + description?: string; } | string, - ...rest: [string?, string?, string?, boolean?] + ...rest: [string?, string?, string?, boolean?, string?] ): Promise { let params: { functionId: string; @@ -3410,6 +3452,7 @@ export class Functions { key: string; value: string; secret?: boolean; + description?: string; }; if ( @@ -3423,6 +3466,7 @@ export class Functions { key: string; value: string; secret?: boolean; + description?: string; }; } else { params = { @@ -3431,6 +3475,7 @@ export class Functions { key: rest[1] as string, value: rest[2] as string, secret: rest[3] as boolean, + description: rest[4] as string, }; } @@ -3439,6 +3484,7 @@ export class Functions { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof functionId === 'undefined' || functionId === '') { throw new AppwriteException( 'Missing required parameter: "functionId"', @@ -3472,6 +3518,9 @@ export class Functions { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3490,6 +3539,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3582,6 +3632,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3602,6 +3653,7 @@ export class Functions { * @param {string | null} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} params.value - Variable value. Max length: 8192 chars. * @param {boolean | null} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime. + * @param {string | null} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -3611,6 +3663,7 @@ export class Functions { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }): Promise; /** * Update variable by its unique ID. @@ -3620,6 +3673,7 @@ export class Functions { * @param {string | null} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} value - Variable value. Max length: 8192 chars. * @param {boolean | null} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime. + * @param {string | null} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3630,6 +3684,7 @@ export class Functions { key?: string | null, value?: string | null, secret?: boolean | null, + description?: string | null, ): Promise; updateVariable( paramsOrFirst: @@ -3639,6 +3694,7 @@ export class Functions { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; } | string, ...rest: [ @@ -3646,6 +3702,7 @@ export class Functions { (string | null)?, (string | null)?, (boolean | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3654,6 +3711,7 @@ export class Functions { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; if ( @@ -3667,6 +3725,7 @@ export class Functions { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; } else { params = { @@ -3675,6 +3734,7 @@ export class Functions { key: rest[1] as string | null, value: rest[2] as string | null, secret: rest[3] as boolean | null, + description: rest[4] as string | null, }; } @@ -3683,6 +3743,7 @@ export class Functions { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof functionId === 'undefined' || functionId === '') { throw new AppwriteException( 'Missing required parameter: "functionId"', @@ -3706,6 +3767,9 @@ export class Functions { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3724,6 +3788,7 @@ export class Functions { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', diff --git a/src/services/messaging.ts b/src/services/messaging.ts index 4ea6d8c..7532156 100644 --- a/src/services/messaging.ts +++ b/src/services/messaging.ts @@ -143,6 +143,7 @@ export class Messaging { * @param {string | null} 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. * @param {string} params.replyToEmail - Email address to reply to. If not set, defaults to the sender email address. * @param {string} params.replyToName - Name of the reply to recipient. If not set, defaults to the sender name. + * @param {string[]} params.emails - List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Appwrite user, target, or topic. * @throws {AppwriteException} * @returns {Promise} */ @@ -161,6 +162,7 @@ export class Messaging { scheduledAt?: string | null; replyToEmail?: string; replyToName?: string; + emails?: string[]; }): Promise; /** * Create a new email message. @@ -179,6 +181,7 @@ export class Messaging { * @param {string | null} 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. * @param {string} replyToEmail - Email address to reply to. If not set, defaults to the sender email address. * @param {string} replyToName - Name of the reply to recipient. If not set, defaults to the sender name. + * @param {string[]} emails - List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Appwrite user, target, or topic. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -198,6 +201,7 @@ export class Messaging { scheduledAt?: string | null, replyToEmail?: string, replyToName?: string, + emails?: string[], ): Promise; createEmail( paramsOrFirst: @@ -216,6 +220,7 @@ export class Messaging { scheduledAt?: string | null; replyToEmail?: string; replyToName?: string; + emails?: string[]; } | string, ...rest: [ @@ -232,6 +237,7 @@ export class Messaging { (string | null)?, string?, string?, + string[]?, ] ): Promise { let params: { @@ -249,6 +255,7 @@ export class Messaging { scheduledAt?: string | null; replyToEmail?: string; replyToName?: string; + emails?: string[]; }; if ( @@ -271,6 +278,7 @@ export class Messaging { scheduledAt?: string | null; replyToEmail?: string; replyToName?: string; + emails?: string[]; }; } else { params = { @@ -288,6 +296,7 @@ export class Messaging { scheduledAt: rest[10] as string | null, replyToEmail: rest[11] as string, replyToName: rest[12] as string, + emails: rest[13] as string[], }; } @@ -305,6 +314,7 @@ export class Messaging { const scheduledAt = params.scheduledAt; const replyToEmail = params.replyToEmail; const replyToName = params.replyToName; + const emails = params.emails; if (typeof messageId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "messageId"', @@ -364,6 +374,9 @@ export class Messaging { if (typeof replyToName !== 'undefined') { apiPayload['replyToName'] = replyToName; } + if (typeof emails !== 'undefined') { + apiPayload['emails'] = emails; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -414,6 +427,7 @@ export class Messaging { * @param {string[] | null} params.attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :. * @param {string | null} params.replyToEmail - Email address to reply to. Pass an empty string to restore the provider or sender default. * @param {string | null} params.replyToName - Name of the reply to recipient. Pass an empty string to restore the provider or sender default. + * @param {string[] | null} params.emails - List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Appwrite user, target, or topic. * @throws {AppwriteException} * @returns {Promise} */ @@ -432,6 +446,7 @@ export class Messaging { attachments?: string[] | null; replyToEmail?: string | null; replyToName?: string | null; + emails?: string[] | null; }): Promise; /** * 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. @@ -451,6 +466,7 @@ export class Messaging { * @param {string[] | null} attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :. * @param {string | null} replyToEmail - Email address to reply to. Pass an empty string to restore the provider or sender default. * @param {string | null} replyToName - Name of the reply to recipient. Pass an empty string to restore the provider or sender default. + * @param {string[] | null} emails - List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Appwrite user, target, or topic. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -470,6 +486,7 @@ export class Messaging { attachments?: string[] | null, replyToEmail?: string | null, replyToName?: string | null, + emails?: string[] | null, ): Promise; updateEmail( paramsOrFirst: @@ -488,6 +505,7 @@ export class Messaging { attachments?: string[] | null; replyToEmail?: string | null; replyToName?: string | null; + emails?: string[] | null; } | string, ...rest: [ @@ -504,6 +522,7 @@ export class Messaging { (string[] | null)?, (string | null)?, (string | null)?, + (string[] | null)?, ] ): Promise { let params: { @@ -521,6 +540,7 @@ export class Messaging { attachments?: string[] | null; replyToEmail?: string | null; replyToName?: string | null; + emails?: string[] | null; }; if ( @@ -543,6 +563,7 @@ export class Messaging { attachments?: string[] | null; replyToEmail?: string | null; replyToName?: string | null; + emails?: string[] | null; }; } else { params = { @@ -560,6 +581,7 @@ export class Messaging { attachments: rest[10] as string[] | null, replyToEmail: rest[11] as string | null, replyToName: rest[12] as string | null, + emails: rest[13] as string[] | null, }; } @@ -577,6 +599,7 @@ export class Messaging { const attachments = params.attachments; const replyToEmail = params.replyToEmail; const replyToName = params.replyToName; + const emails = params.emails; if (typeof messageId === 'undefined' || messageId === '') { throw new AppwriteException( 'Missing required parameter: "messageId"', @@ -626,6 +649,9 @@ export class Messaging { if (typeof replyToName !== 'undefined') { apiPayload['replyToName'] = replyToName; } + if (typeof emails !== 'undefined') { + apiPayload['emails'] = emails; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8225,6 +8251,7 @@ export class Messaging { $createdAt: '', $updatedAt: '', name: '', + description: '', emailTotal: 0, smsTotal: 0, pushTotal: 0, @@ -8245,6 +8272,7 @@ export class Messaging { * @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. * @param {number | null} 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. * @param {number | null} params.expiry - Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project's enabled Appwrite providers, or the 7-day ledger window if none sets one. + * @param {string} params.description - Optional description for the topic. * @throws {AppwriteException} * @returns {Promise} */ @@ -8254,6 +8282,7 @@ export class Messaging { subscribe?: string[]; qos?: number | null; expiry?: number | null; + description?: string; }): Promise; /** * Create a new topic. @@ -8263,6 +8292,7 @@ export class Messaging { * @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. * @param {number | null} 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. * @param {number | null} expiry - Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project's enabled Appwrite providers, or the 7-day ledger window if none sets one. + * @param {string} description - Optional description for the topic. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8273,6 +8303,7 @@ export class Messaging { subscribe?: string[], qos?: number | null, expiry?: number | null, + description?: string, ): Promise; createTopic( paramsOrFirst: @@ -8282,9 +8313,16 @@ export class Messaging { subscribe?: string[]; qos?: number | null; expiry?: number | null; + description?: string; } | string, - ...rest: [string?, string[]?, (number | null)?, (number | null)?] + ...rest: [ + string?, + string[]?, + (number | null)?, + (number | null)?, + string?, + ] ): Promise { let params: { topicId: string; @@ -8292,6 +8330,7 @@ export class Messaging { subscribe?: string[]; qos?: number | null; expiry?: number | null; + description?: string; }; if ( @@ -8305,6 +8344,7 @@ export class Messaging { subscribe?: string[]; qos?: number | null; expiry?: number | null; + description?: string; }; } else { params = { @@ -8313,6 +8353,7 @@ export class Messaging { subscribe: rest[1] as string[], qos: rest[2] as number | null, expiry: rest[3] as number | null, + description: rest[4] as string, }; } @@ -8321,6 +8362,7 @@ export class Messaging { const subscribe = params.subscribe; const qos = params.qos; const expiry = params.expiry; + const description = params.description; if (typeof topicId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "topicId"', @@ -8346,6 +8388,9 @@ export class Messaging { if (typeof expiry !== 'undefined') { apiPayload['expiry'] = expiry; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8364,6 +8409,7 @@ export class Messaging { $createdAt: '', $updatedAt: '', name: '', + description: '', emailTotal: 0, smsTotal: 0, pushTotal: 0, @@ -8440,6 +8486,7 @@ export class Messaging { $createdAt: '', $updatedAt: '', name: '', + description: '', emailTotal: 0, smsTotal: 0, pushTotal: 0, @@ -8461,6 +8508,7 @@ export class Messaging { * @param {string[] | null} 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. * @param {number | null} 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. * @param {number | null} params.expiry - Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project's enabled Appwrite providers, or the 7-day ledger window if none sets one. + * @param {string | null} params.description - Optional description for the topic. * @throws {AppwriteException} * @returns {Promise} */ @@ -8470,6 +8518,7 @@ export class Messaging { subscribe?: string[] | null; qos?: number | null; expiry?: number | null; + description?: string | null; }): Promise; /** * Update a topic by its unique ID. @@ -8480,6 +8529,7 @@ export class Messaging { * @param {string[] | null} 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. * @param {number | null} 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. * @param {number | null} expiry - Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project's enabled Appwrite providers, or the 7-day ledger window if none sets one. + * @param {string | null} description - Optional description for the topic. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8490,6 +8540,7 @@ export class Messaging { subscribe?: string[] | null, qos?: number | null, expiry?: number | null, + description?: string | null, ): Promise; updateTopic( paramsOrFirst: @@ -8499,6 +8550,7 @@ export class Messaging { subscribe?: string[] | null; qos?: number | null; expiry?: number | null; + description?: string | null; } | string, ...rest: [ @@ -8506,6 +8558,7 @@ export class Messaging { (string[] | null)?, (number | null)?, (number | null)?, + (string | null)?, ] ): Promise { let params: { @@ -8514,6 +8567,7 @@ export class Messaging { subscribe?: string[] | null; qos?: number | null; expiry?: number | null; + description?: string | null; }; if ( @@ -8527,6 +8581,7 @@ export class Messaging { subscribe?: string[] | null; qos?: number | null; expiry?: number | null; + description?: string | null; }; } else { params = { @@ -8535,6 +8590,7 @@ export class Messaging { subscribe: rest[1] as string[] | null, qos: rest[2] as number | null, expiry: rest[3] as number | null, + description: rest[4] as string | null, }; } @@ -8543,6 +8599,7 @@ export class Messaging { const subscribe = params.subscribe; const qos = params.qos; const expiry = params.expiry; + const description = params.description; if (typeof topicId === 'undefined' || topicId === '') { throw new AppwriteException( 'Missing required parameter: "topicId"', @@ -8565,6 +8622,9 @@ export class Messaging { if (typeof expiry !== 'undefined') { apiPayload['expiry'] = expiry; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8583,6 +8643,7 @@ export class Messaging { $createdAt: '', $updatedAt: '', name: '', + description: '', emailTotal: 0, smsTotal: 0, pushTotal: 0, diff --git a/src/services/mongo.ts b/src/services/mongo.ts index 169782c..25e0b07 100644 --- a/src/services/mongo.ts +++ b/src/services/mongo.ts @@ -17,45 +17,60 @@ export class Mongo { * List all dedicated databases. Results support pagination. * * @param {string[]} params.queries - Array of query strings. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ list(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all dedicated databases. Results support pagination. * * @param {string[]} queries - Array of query strings. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - list(queries?: string[]): Promise; list( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + list( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/mongo'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1047,18 +1062,21 @@ export class Mongo { * * @param {string} params.databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackups(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List all backups for a dedicated database. Results can be filtered by status and type. * * @param {string} databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1066,12 +1084,15 @@ export class Mongo { listBackups( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackups( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1081,16 +1102,19 @@ export class Mongo { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1104,6 +1128,9 @@ export class Mongo { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1249,18 +1276,21 @@ export class Mongo { * * @param {string} params.databaseId - Database ID. * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackupPolicies(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List scheduled backup policies for a dedicated database. * * @param {string} databaseId - Database ID. * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1268,12 +1298,15 @@ export class Mongo { listBackupPolicies( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackupPolicies( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1283,16 +1316,19 @@ export class Mongo { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1306,6 +1342,9 @@ export class Mongo { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/mysql.ts b/src/services/mysql.ts index 13e7de1..3fd0d8e 100644 --- a/src/services/mysql.ts +++ b/src/services/mysql.ts @@ -17,45 +17,60 @@ export class Mysql { * List all dedicated databases. Results support pagination. * * @param {string[]} params.queries - Array of query strings. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ list(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all dedicated databases. Results support pagination. * * @param {string[]} queries - Array of query strings. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - list(queries?: string[]): Promise; list( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + list( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/mysql'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1047,18 +1062,21 @@ export class Mysql { * * @param {string} params.databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackups(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List all backups for a dedicated database. Results can be filtered by status and type. * * @param {string} databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1066,12 +1084,15 @@ export class Mysql { listBackups( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackups( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1081,16 +1102,19 @@ export class Mysql { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1104,6 +1128,9 @@ export class Mysql { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1249,18 +1276,21 @@ export class Mysql { * * @param {string} params.databaseId - Database ID. * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackupPolicies(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List scheduled backup policies for a dedicated database. * * @param {string} databaseId - Database ID. * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1268,12 +1298,15 @@ export class Mysql { listBackupPolicies( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackupPolicies( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1283,16 +1316,19 @@ export class Mysql { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1306,6 +1342,9 @@ export class Mysql { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/organization.ts b/src/services/organization.ts index 37dffa7..adca165 100644 --- a/src/services/organization.ts +++ b/src/services/organization.ts @@ -1848,6 +1848,7 @@ export class Organization { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -1974,6 +1975,7 @@ export class Organization { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -2062,6 +2064,7 @@ export class Organization { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -2083,6 +2086,7 @@ export class Organization { * @param {string} params.name - Key name. Max length: 128 chars. * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string | null} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. + * @param {string | null} params.description - Optional description for the key. * @throws {AppwriteException} * @returns {Promise} */ @@ -2092,6 +2096,7 @@ export class Organization { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }): Promise; /** * Update a project key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. @@ -2101,6 +2106,7 @@ export class Organization { * @param {string} name - Key name. Max length: 128 chars. * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string | null} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. + * @param {string | null} description - Optional description for the key. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2111,6 +2117,7 @@ export class Organization { name: string, scopes: ProjectKeyScopes[], expire?: string | null, + description?: string | null, ): Promise; updateProjectKey( paramsOrFirst: @@ -2120,9 +2127,16 @@ export class Organization { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; } | string, - ...rest: [string?, string?, ProjectKeyScopes[]?, (string | null)?] + ...rest: [ + string?, + string?, + ProjectKeyScopes[]?, + (string | null)?, + (string | null)?, + ] ): Promise { let params: { projectId: string; @@ -2130,6 +2144,7 @@ export class Organization { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }; if ( @@ -2143,6 +2158,7 @@ export class Organization { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }; } else { params = { @@ -2151,6 +2167,7 @@ export class Organization { name: rest[1] as string, scopes: rest[2] as ProjectKeyScopes[], expire: rest[3] as string | null, + description: rest[4] as string | null, }; } @@ -2159,6 +2176,7 @@ export class Organization { const name = params.name; const scopes = params.scopes; const expire = params.expire; + const description = params.description; if (typeof projectId === 'undefined' || projectId === '') { throw new AppwriteException( 'Missing required parameter: "projectId"', @@ -2186,6 +2204,9 @@ export class Organization { if (typeof expire !== 'undefined') { apiPayload['expire'] = expire; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2204,6 +2225,7 @@ export class Organization { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', diff --git a/src/services/postgresql.ts b/src/services/postgresql.ts index aafaf2d..af7490f 100644 --- a/src/services/postgresql.ts +++ b/src/services/postgresql.ts @@ -17,45 +17,60 @@ export class Postgresql { * List all dedicated databases. Results support pagination. * * @param {string[]} params.queries - Array of query strings. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ list(params?: { queries?: string[]; + total?: boolean; }): Promise; /** * List all dedicated databases. Results support pagination. * * @param {string[]} queries - Array of query strings. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - list(queries?: string[]): Promise; list( - paramsOrFirst?: { queries?: string[] } | string[], + queries?: string[], + total?: boolean, + ): Promise; + list( + paramsOrFirst?: { queries?: string[]; total?: boolean } | string[], + ...rest: [boolean?] ): Promise { - let params: { queries?: string[] }; + let params: { queries?: string[]; total?: boolean }; if ( - typeof paramsOrFirst === 'undefined' || + (typeof paramsOrFirst === 'undefined' && rest.length === 0) || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst)) ) { - params = (paramsOrFirst || {}) as { queries?: string[] }; + params = (paramsOrFirst || {}) as { + queries?: string[]; + total?: boolean; + }; } else { params = { queries: paramsOrFirst as string[], + total: rest[0] as boolean, }; } const queries = params.queries; + const total = params.total; const apiPath = '/postgresql'; const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1047,18 +1062,21 @@ export class Postgresql { * * @param {string} params.databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackups(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List all backups for a dedicated database. Results can be filtered by status and type. * * @param {string} databaseId - Database ID. * @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: status, type, databaseId + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1066,12 +1084,15 @@ export class Postgresql { listBackups( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackups( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1081,16 +1102,19 @@ export class Postgresql { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1104,6 +1128,9 @@ export class Postgresql { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1249,18 +1276,21 @@ export class Postgresql { * * @param {string} params.databaseId - Database ID. * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ listBackupPolicies(params: { databaseId: string; queries?: string[]; + total?: boolean; }): Promise; /** * List scheduled backup policies for a dedicated database. * * @param {string} databaseId - Database ID. * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1268,12 +1298,15 @@ export class Postgresql { listBackupPolicies( databaseId: string, queries?: string[], + total?: boolean, ): Promise; listBackupPolicies( - paramsOrFirst: { databaseId: string; queries?: string[] } | string, - ...rest: [string[]?] + paramsOrFirst: + | { databaseId: string; queries?: string[]; total?: boolean } + | string, + ...rest: [string[]?, boolean?] ): Promise { - let params: { databaseId: string; queries?: string[] }; + let params: { databaseId: string; queries?: string[]; total?: boolean }; if ( paramsOrFirst && @@ -1283,16 +1316,19 @@ export class Postgresql { params = (paramsOrFirst || {}) as { databaseId: string; queries?: string[]; + total?: boolean; }; } else { params = { databaseId: paramsOrFirst as string, queries: rest[0] as string[], + total: rest[1] as boolean, }; } const databaseId = params.databaseId; const queries = params.queries; + const total = params.total; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1306,6 +1342,9 @@ export class Postgresql { if (typeof queries !== 'undefined') { apiPayload['queries'] = queries; } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { diff --git a/src/services/project.ts b/src/services/project.ts index 6e554ab..2695bec 100644 --- a/src/services/project.ts +++ b/src/services/project.ts @@ -1021,6 +1021,7 @@ export class Project { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -1124,6 +1125,7 @@ export class Project { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -1195,6 +1197,7 @@ export class Project { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -1215,6 +1218,7 @@ export class Project { * @param {string} params.name - Key name. Max length: 128 chars. * @param {ProjectKeyScopes[]} params.scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string | null} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. + * @param {string | null} params.description - Optional description for the key. * @throws {AppwriteException} * @returns {Promise} */ @@ -1223,6 +1227,7 @@ export class Project { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }): Promise; /** * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. @@ -1231,6 +1236,7 @@ export class Project { * @param {string} name - Key name. Max length: 128 chars. * @param {ProjectKeyScopes[]} scopes - Key scopes list. Maximum of 200 scopes are allowed. * @param {string | null} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. + * @param {string | null} description - Optional description for the key. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1240,6 +1246,7 @@ export class Project { name: string, scopes: ProjectKeyScopes[], expire?: string | null, + description?: string | null, ): Promise; updateKey( paramsOrFirst: @@ -1248,15 +1255,22 @@ export class Project { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; } | string, - ...rest: [string?, ProjectKeyScopes[]?, (string | null)?] + ...rest: [ + string?, + ProjectKeyScopes[]?, + (string | null)?, + (string | null)?, + ] ): Promise { let params: { keyId: string; name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }; if ( @@ -1269,6 +1283,7 @@ export class Project { name: string; scopes: ProjectKeyScopes[]; expire?: string | null; + description?: string | null; }; } else { params = { @@ -1276,6 +1291,7 @@ export class Project { name: rest[0] as string, scopes: rest[1] as ProjectKeyScopes[], expire: rest[2] as string | null, + description: rest[3] as string | null, }; } @@ -1283,6 +1299,7 @@ export class Project { const name = params.name; const scopes = params.scopes; const expire = params.expire; + const description = params.description; if (typeof keyId === 'undefined' || keyId === '') { throw new AppwriteException('Missing required parameter: "keyId"'); } @@ -1306,6 +1323,9 @@ export class Project { if (typeof expire !== 'undefined') { apiPayload['expire'] = expire; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1324,6 +1344,7 @@ export class Project { $createdAt: '', $updatedAt: '', name: '', + description: '', expire: '', scopes: [], secret: '', @@ -10606,40 +10627,57 @@ export class Project { /** * Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary. * + * Custom denyList entries use case-sensitive equality and apply only while this policy is enabled. Omit denyList or pass null to preserve it, pass an array to replace it, or pass [] to clear it. Entries are stored without trimming or deduplication. Existing passwords remain valid for sign-in and password confirmation. The combined serialized project authentication configuration must fit within 16,384 characters, even when each list meets its entry limits. + * * @param {boolean} params.enabled - Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid. + * @param {string[] | null} params.denyList - Custom blocked values using case-sensitive equality. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters. * @throws {AppwriteException} * @returns {Promise} */ updatePasswordDictionaryPolicy(params: { enabled: boolean; + denyList?: string[] | null; }): Promise; /** * Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary. * + * Custom denyList entries use case-sensitive equality and apply only while this policy is enabled. Omit denyList or pass null to preserve it, pass an array to replace it, or pass [] to clear it. Entries are stored without trimming or deduplication. Existing passwords remain valid for sign-in and password confirmation. The combined serialized project authentication configuration must fit within 16,384 characters, even when each list meets its entry limits. + * * @param {boolean} enabled - Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid. + * @param {string[] | null} denyList - Custom blocked values using case-sensitive equality. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePasswordDictionaryPolicy(enabled: boolean): Promise; updatePasswordDictionaryPolicy( - paramsOrFirst: { enabled: boolean } | boolean, + enabled: boolean, + denyList?: string[] | null, + ): Promise; + updatePasswordDictionaryPolicy( + paramsOrFirst: + { enabled: boolean; denyList?: string[] | null } | boolean, + ...rest: [(string[] | null)?] ): Promise { - let params: { enabled: boolean }; + let params: { enabled: boolean; denyList?: string[] | null }; if ( paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) ) { - params = (paramsOrFirst || {}) as { enabled: boolean }; + params = (paramsOrFirst || {}) as { + enabled: boolean; + denyList?: string[] | null; + }; } else { params = { enabled: paramsOrFirst as boolean, + denyList: rest[0] as string[] | null, }; } const enabled = params.enabled; + const denyList = params.denyList; if (typeof enabled === 'undefined') { throw new AppwriteException( 'Missing required parameter: "enabled"', @@ -10650,6 +10688,9 @@ export class Project { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof denyList !== 'undefined') { + apiPayload['denyList'] = denyList; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -10872,40 +10913,59 @@ export class Project { /** * Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number. * + * Custom denyList entries use case-insensitive substring matching and apply only while this policy is enabled. Omit denyList or pass null to preserve it, pass an array to replace it, or pass [] to clear it. Entries are stored without trimming or deduplication. Existing passwords remain valid for sign-in and password confirmation. The combined serialized project authentication configuration must fit within 16,384 characters, even when each list meets its entry limits. + * Password recovery also checks the recovered user profile, closing the previous gap in profile-based personal-data validation. + * * @param {boolean} params.enabled - Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid. + * @param {string[] | null} params.denyList - Custom blocked values using case-insensitive substring matching. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters. * @throws {AppwriteException} * @returns {Promise} */ updatePasswordPersonalDataPolicy(params: { enabled: boolean; + denyList?: string[] | null; }): Promise; /** * Updating this policy allows you to control if password strength is checked against personal data. When enabled, and user sets or changes their password, the password must not contain user ID, name, email or phone number. * + * Custom denyList entries use case-insensitive substring matching and apply only while this policy is enabled. Omit denyList or pass null to preserve it, pass an array to replace it, or pass [] to clear it. Entries are stored without trimming or deduplication. Existing passwords remain valid for sign-in and password confirmation. The combined serialized project authentication configuration must fit within 16,384 characters, even when each list meets its entry limits. + * Password recovery also checks the recovered user profile, closing the previous gap in profile-based personal-data validation. + * * @param {boolean} enabled - Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid. + * @param {string[] | null} denyList - Custom blocked values using case-insensitive substring matching. Up to 100 entries of 1 to 256 characters. Omit or pass null to preserve, an array to replace, or [] to clear. Combined authentication settings must fit within 16,384 characters. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - updatePasswordPersonalDataPolicy(enabled: boolean): Promise; updatePasswordPersonalDataPolicy( - paramsOrFirst: { enabled: boolean } | boolean, + enabled: boolean, + denyList?: string[] | null, + ): Promise; + updatePasswordPersonalDataPolicy( + paramsOrFirst: + { enabled: boolean; denyList?: string[] | null } | boolean, + ...rest: [(string[] | null)?] ): Promise { - let params: { enabled: boolean }; + let params: { enabled: boolean; denyList?: string[] | null }; if ( paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) ) { - params = (paramsOrFirst || {}) as { enabled: boolean }; + params = (paramsOrFirst || {}) as { + enabled: boolean; + denyList?: string[] | null; + }; } else { params = { enabled: paramsOrFirst as boolean, + denyList: rest[0] as string[] | null, }; } const enabled = params.enabled; + const denyList = params.denyList; if (typeof enabled === 'undefined') { throw new AppwriteException( 'Missing required parameter: "enabled"', @@ -10916,6 +10976,9 @@ export class Project { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof denyList !== 'undefined') { + apiPayload['denyList'] = denyList; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -13296,6 +13359,7 @@ export class Project { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -13315,6 +13379,7 @@ export class Project { * @param {string} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} params.value - Variable value. Max length: 8192 chars. * @param {boolean} params.secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime. + * @param {string} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -13323,6 +13388,7 @@ export class Project { key: string; value: string; secret?: boolean; + description?: string; }): Promise; /** * Create a new project environment variable. These variables can be accessed by all functions and sites in the project. @@ -13331,6 +13397,7 @@ export class Project { * @param {string} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} value - Variable value. Max length: 8192 chars. * @param {boolean} secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime. + * @param {string} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -13340,6 +13407,7 @@ export class Project { key: string, value: string, secret?: boolean, + description?: string, ): Promise; createVariable( paramsOrFirst: @@ -13348,15 +13416,17 @@ export class Project { key: string; value: string; secret?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?] + ...rest: [string?, string?, boolean?, string?] ): Promise { let params: { variableId: string; key: string; value: string; secret?: boolean; + description?: string; }; if ( @@ -13369,6 +13439,7 @@ export class Project { key: string; value: string; secret?: boolean; + description?: string; }; } else { params = { @@ -13376,6 +13447,7 @@ export class Project { key: rest[0] as string, value: rest[1] as string, secret: rest[2] as boolean, + description: rest[3] as string, }; } @@ -13383,6 +13455,7 @@ export class Project { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof variableId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "variableId"', @@ -13408,6 +13481,9 @@ export class Project { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -13426,6 +13502,7 @@ export class Project { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -13500,6 +13577,7 @@ export class Project { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -13519,6 +13597,7 @@ export class Project { * @param {string | null} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} params.value - Variable value. Max length: 8192 chars. * @param {boolean | null} params.secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime. + * @param {string | null} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -13527,6 +13606,7 @@ export class Project { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }): Promise; /** * Update variable by its unique ID. @@ -13535,6 +13615,7 @@ export class Project { * @param {string | null} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} value - Variable value. Max length: 8192 chars. * @param {boolean | null} secret - Secret variables can be updated or deleted, but only projects can read them during build and runtime. + * @param {string | null} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -13544,6 +13625,7 @@ export class Project { key?: string | null, value?: string | null, secret?: boolean | null, + description?: string | null, ): Promise; updateVariable( paramsOrFirst: @@ -13552,15 +13634,22 @@ export class Project { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; } | string, - ...rest: [(string | null)?, (string | null)?, (boolean | null)?] + ...rest: [ + (string | null)?, + (string | null)?, + (boolean | null)?, + (string | null)?, + ] ): Promise { let params: { variableId: string; key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; if ( @@ -13573,6 +13662,7 @@ export class Project { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; } else { params = { @@ -13580,6 +13670,7 @@ export class Project { key: rest[0] as string | null, value: rest[1] as string | null, secret: rest[2] as boolean | null, + description: rest[3] as string | null, }; } @@ -13587,6 +13678,7 @@ export class Project { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof variableId === 'undefined' || variableId === '') { throw new AppwriteException( 'Missing required parameter: "variableId"', @@ -13606,6 +13698,9 @@ export class Project { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -13624,6 +13719,7 @@ export class Project { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', diff --git a/src/services/sites.ts b/src/services/sites.ts index 2424cc0..7823ef8 100644 --- a/src/services/sites.ts +++ b/src/services/sites.ts @@ -119,6 +119,7 @@ export class Sites { $createdAt: '', $updatedAt: '', name: '', + description: '', enabled: true, live: true, logging: true, @@ -161,6 +162,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -200,6 +202,7 @@ export class Sites { * @param {string} params.runtimeSpecification - Runtime specification for the SSR executions. * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {ProjectKeyScopes[]} params.scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed. + * @param {string} params.description - Optional description for the site. * @throws {AppwriteException} * @returns {Promise} */ @@ -228,6 +231,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[]; + description?: string; }): Promise; /** * Create a new site. @@ -256,6 +260,7 @@ export class Sites { * @param {string} runtimeSpecification - Runtime specification for the SSR executions. * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {ProjectKeyScopes[]} scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed. + * @param {string} description - Optional description for the site. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -285,6 +290,7 @@ export class Sites { runtimeSpecification?: string, deploymentRetention?: number, scopes?: ProjectKeyScopes[], + description?: string, ): Promise; create( paramsOrFirst: @@ -313,6 +319,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[]; + description?: string; } | string, ...rest: [ @@ -339,6 +346,7 @@ export class Sites { string?, number?, ProjectKeyScopes[]?, + string?, ] ): Promise { let params: { @@ -366,6 +374,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[]; + description?: string; }; if ( @@ -398,6 +407,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[]; + description?: string; }; } else { params = { @@ -425,6 +435,7 @@ export class Sites { runtimeSpecification: rest[20] as string, deploymentRetention: rest[21] as number, scopes: rest[22] as ProjectKeyScopes[], + description: rest[23] as string, }; } @@ -452,6 +463,7 @@ export class Sites { const runtimeSpecification = params.runtimeSpecification; const deploymentRetention = params.deploymentRetention; const scopes = params.scopes; + const description = params.description; if (typeof siteId === 'undefined') { throw new AppwriteException('Missing required parameter: "siteId"'); } @@ -542,6 +554,9 @@ export class Sites { if (typeof scopes !== 'undefined') { apiPayload['scopes'] = scopes; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -560,6 +575,7 @@ export class Sites { $createdAt: '', $updatedAt: '', name: '', + description: '', enabled: true, live: true, logging: true, @@ -602,6 +618,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -857,6 +874,7 @@ export class Sites { $createdAt: '', $updatedAt: '', name: '', + description: '', enabled: true, live: true, logging: true, @@ -899,6 +917,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -938,6 +957,7 @@ export class Sites { * @param {string} params.runtimeSpecification - Runtime specification for the SSR executions. * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {ProjectKeyScopes[] | null} params.scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed. + * @param {string | null} params.description - Optional description for the site. * @throws {AppwriteException} * @returns {Promise} */ @@ -966,6 +986,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[] | null; + description?: string | null; }): Promise; /** * Update site by its unique ID. @@ -994,6 +1015,7 @@ export class Sites { * @param {string} runtimeSpecification - Runtime specification for the SSR executions. * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept. * @param {ProjectKeyScopes[] | null} scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed. + * @param {string | null} description - Optional description for the site. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1023,6 +1045,7 @@ export class Sites { runtimeSpecification?: string, deploymentRetention?: number, scopes?: ProjectKeyScopes[] | null, + description?: string | null, ): Promise; update( paramsOrFirst: @@ -1051,6 +1074,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[] | null; + description?: string | null; } | string, ...rest: [ @@ -1077,6 +1101,7 @@ export class Sites { string?, number?, (ProjectKeyScopes[] | null)?, + (string | null)?, ] ): Promise { let params: { @@ -1104,6 +1129,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[] | null; + description?: string | null; }; if ( @@ -1136,6 +1162,7 @@ export class Sites { runtimeSpecification?: string; deploymentRetention?: number; scopes?: ProjectKeyScopes[] | null; + description?: string | null; }; } else { params = { @@ -1163,6 +1190,7 @@ export class Sites { runtimeSpecification: rest[20] as string, deploymentRetention: rest[21] as number, scopes: rest[22] as ProjectKeyScopes[] | null, + description: rest[23] as string | null, }; } @@ -1190,6 +1218,7 @@ export class Sites { const runtimeSpecification = params.runtimeSpecification; const deploymentRetention = params.deploymentRetention; const scopes = params.scopes; + const description = params.description; if (typeof siteId === 'undefined' || siteId === '') { throw new AppwriteException('Missing required parameter: "siteId"'); } @@ -1275,6 +1304,9 @@ export class Sites { if (typeof scopes !== 'undefined') { apiPayload['scopes'] = scopes; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1293,6 +1325,7 @@ export class Sites { $createdAt: '', $updatedAt: '', name: '', + description: '', enabled: true, live: true, logging: true, @@ -1335,6 +1368,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -1482,6 +1516,7 @@ export class Sites { $createdAt: '', $updatedAt: '', name: '', + description: '', enabled: true, live: true, logging: true, @@ -1524,6 +1559,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3114,6 +3150,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3134,6 +3171,7 @@ export class Sites { * @param {string} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} params.value - Variable value. Max length: 8192 chars. * @param {boolean} params.secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime. + * @param {string} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -3143,6 +3181,7 @@ export class Sites { key: string; value: string; secret?: boolean; + description?: string; }): Promise; /** * Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables. @@ -3152,6 +3191,7 @@ export class Sites { * @param {string} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string} value - Variable value. Max length: 8192 chars. * @param {boolean} secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime. + * @param {string} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3162,6 +3202,7 @@ export class Sites { key: string, value: string, secret?: boolean, + description?: string, ): Promise; createVariable( paramsOrFirst: @@ -3171,9 +3212,10 @@ export class Sites { key: string; value: string; secret?: boolean; + description?: string; } | string, - ...rest: [string?, string?, string?, boolean?] + ...rest: [string?, string?, string?, boolean?, string?] ): Promise { let params: { siteId: string; @@ -3181,6 +3223,7 @@ export class Sites { key: string; value: string; secret?: boolean; + description?: string; }; if ( @@ -3194,6 +3237,7 @@ export class Sites { key: string; value: string; secret?: boolean; + description?: string; }; } else { params = { @@ -3202,6 +3246,7 @@ export class Sites { key: rest[1] as string, value: rest[2] as string, secret: rest[3] as boolean, + description: rest[4] as string, }; } @@ -3210,6 +3255,7 @@ export class Sites { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof siteId === 'undefined' || siteId === '') { throw new AppwriteException('Missing required parameter: "siteId"'); } @@ -3241,6 +3287,9 @@ export class Sites { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3259,6 +3308,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3346,6 +3396,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', @@ -3366,6 +3417,7 @@ export class Sites { * @param {string | null} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} params.value - Variable value. Max length: 8192 chars. * @param {boolean | null} params.secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime. + * @param {string | null} params.description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} */ @@ -3375,6 +3427,7 @@ export class Sites { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }): Promise; /** * Update variable by its unique ID. @@ -3384,6 +3437,7 @@ export class Sites { * @param {string | null} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars. * @param {string | null} value - Variable value. Max length: 8192 chars. * @param {boolean | null} secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime. + * @param {string | null} description - Optional description for the variable. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3394,6 +3448,7 @@ export class Sites { key?: string | null, value?: string | null, secret?: boolean | null, + description?: string | null, ): Promise; updateVariable( paramsOrFirst: @@ -3403,6 +3458,7 @@ export class Sites { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; } | string, ...rest: [ @@ -3410,6 +3466,7 @@ export class Sites { (string | null)?, (string | null)?, (boolean | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3418,6 +3475,7 @@ export class Sites { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; if ( @@ -3431,6 +3489,7 @@ export class Sites { key?: string | null; value?: string | null; secret?: boolean | null; + description?: string | null; }; } else { params = { @@ -3439,6 +3498,7 @@ export class Sites { key: rest[1] as string | null, value: rest[2] as string | null, secret: rest[3] as boolean | null, + description: rest[4] as string | null, }; } @@ -3447,6 +3507,7 @@ export class Sites { const key = params.key; const value = params.value; const secret = params.secret; + const description = params.description; if (typeof siteId === 'undefined' || siteId === '') { throw new AppwriteException('Missing required parameter: "siteId"'); } @@ -3468,6 +3529,9 @@ export class Sites { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3486,6 +3550,7 @@ export class Sites { $createdAt: '', $updatedAt: '', key: '', + description: '', value: '', secret: false, resourceType: '', diff --git a/src/services/storage.ts b/src/services/storage.ts index d810652..cfa4b5a 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -21,7 +21,7 @@ export class Storage { /** * Get a list of all the storage buckets. You can use the query params to filter your results. * - * @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations + * @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations, stripMetadata * @param {string} params.search - Search term to filter your list results. Max length: 256 chars. * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} @@ -35,7 +35,7 @@ export class Storage { /** * Get a list of all the storage buckets. You can use the query params to filter your results. * - * @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations + * @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations, stripMetadata * @param {string} search - Search term to filter your list results. Max length: 256 chars. * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} @@ -117,6 +117,7 @@ export class Storage { $permissions: [], fileSecurity: false, name: '', + description: '', enabled: true, maximumFileSize: 0, allowedFileExtensions: [], @@ -124,6 +125,7 @@ export class Storage { encryption: true, antivirus: true, transformations: true, + stripMetadata: false, totalSize: 0, }, }, @@ -147,6 +149,8 @@ export class Storage { * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled * @param {boolean} params.transformations - Are image transformations enabled? + * @param {string} params.description - Optional description for the bucket. + * @param {boolean} params.stripMetadata - Remove metadata such as location, device and capture time from uploaded images. The color profile and orientation are kept. For file size above 20MB metadata is not removed even if it's enabled. * @throws {AppwriteException} * @returns {Promise} */ @@ -162,6 +166,8 @@ export class Storage { encryption?: boolean; antivirus?: boolean; transformations?: boolean; + description?: string; + stripMetadata?: boolean; }): Promise; /** * Create a new storage bucket. @@ -177,6 +183,8 @@ export class Storage { * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled * @param {boolean} transformations - Are image transformations enabled? + * @param {string} description - Optional description for the bucket. + * @param {boolean} stripMetadata - Remove metadata such as location, device and capture time from uploaded images. The color profile and orientation are kept. For file size above 20MB metadata is not removed even if it's enabled. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -193,6 +201,8 @@ export class Storage { encryption?: boolean, antivirus?: boolean, transformations?: boolean, + description?: string, + stripMetadata?: boolean, ): Promise; createBucket( paramsOrFirst: @@ -208,6 +218,8 @@ export class Storage { encryption?: boolean; antivirus?: boolean; transformations?: boolean; + description?: string; + stripMetadata?: boolean; } | string, ...rest: [ @@ -221,6 +233,8 @@ export class Storage { boolean?, boolean?, boolean?, + string?, + boolean?, ] ): Promise { let params: { @@ -235,6 +249,8 @@ export class Storage { encryption?: boolean; antivirus?: boolean; transformations?: boolean; + description?: string; + stripMetadata?: boolean; }; if ( @@ -254,6 +270,8 @@ export class Storage { encryption?: boolean; antivirus?: boolean; transformations?: boolean; + description?: string; + stripMetadata?: boolean; }; } else { params = { @@ -268,6 +286,8 @@ export class Storage { encryption: rest[7] as boolean, antivirus: rest[8] as boolean, transformations: rest[9] as boolean, + description: rest[10] as string, + stripMetadata: rest[11] as boolean, }; } @@ -282,6 +302,8 @@ export class Storage { const encryption = params.encryption; const antivirus = params.antivirus; const transformations = params.transformations; + const description = params.description; + const stripMetadata = params.stripMetadata; if (typeof bucketId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "bucketId"', @@ -325,6 +347,12 @@ export class Storage { if (typeof transformations !== 'undefined') { apiPayload['transformations'] = transformations; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } + if (typeof stripMetadata !== 'undefined') { + apiPayload['stripMetadata'] = stripMetadata; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -345,6 +373,7 @@ export class Storage { $permissions: [], fileSecurity: false, name: '', + description: '', enabled: true, maximumFileSize: 0, allowedFileExtensions: [], @@ -352,6 +381,7 @@ export class Storage { encryption: true, antivirus: true, transformations: true, + stripMetadata: false, totalSize: 0, }, }, @@ -425,6 +455,7 @@ export class Storage { $permissions: [], fileSecurity: false, name: '', + description: '', enabled: true, maximumFileSize: 0, allowedFileExtensions: [], @@ -432,6 +463,7 @@ export class Storage { encryption: true, antivirus: true, transformations: true, + stripMetadata: false, totalSize: 0, }, }, @@ -455,6 +487,8 @@ export class Storage { * @param {boolean | null} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled * @param {boolean} params.transformations - Are image transformations enabled? + * @param {string | null} params.description - Optional description for the bucket. + * @param {boolean | null} params.stripMetadata - Remove metadata such as location, device and capture time from uploaded images. The color profile and orientation are kept. For file size above 20MB metadata is not removed even if it's enabled. By default, the current setting is kept. * @throws {AppwriteException} * @returns {Promise} */ @@ -470,6 +504,8 @@ export class Storage { encryption?: boolean | null; antivirus?: boolean; transformations?: boolean; + description?: string | null; + stripMetadata?: boolean | null; }): Promise; /** * Update a storage bucket by its unique ID. @@ -485,6 +521,8 @@ export class Storage { * @param {boolean | null} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled * @param {boolean} transformations - Are image transformations enabled? + * @param {string | null} description - Optional description for the bucket. + * @param {boolean | null} stripMetadata - Remove metadata such as location, device and capture time from uploaded images. The color profile and orientation are kept. For file size above 20MB metadata is not removed even if it's enabled. By default, the current setting is kept. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -501,6 +539,8 @@ export class Storage { encryption?: boolean | null, antivirus?: boolean, transformations?: boolean, + description?: string | null, + stripMetadata?: boolean | null, ): Promise; updateBucket( paramsOrFirst: @@ -516,6 +556,8 @@ export class Storage { encryption?: boolean | null; antivirus?: boolean; transformations?: boolean; + description?: string | null; + stripMetadata?: boolean | null; } | string, ...rest: [ @@ -529,6 +571,8 @@ export class Storage { (boolean | null)?, boolean?, boolean?, + (string | null)?, + (boolean | null)?, ] ): Promise { let params: { @@ -543,6 +587,8 @@ export class Storage { encryption?: boolean | null; antivirus?: boolean; transformations?: boolean; + description?: string | null; + stripMetadata?: boolean | null; }; if ( @@ -562,6 +608,8 @@ export class Storage { encryption?: boolean | null; antivirus?: boolean; transformations?: boolean; + description?: string | null; + stripMetadata?: boolean | null; }; } else { params = { @@ -576,6 +624,8 @@ export class Storage { encryption: rest[7] as boolean | null, antivirus: rest[8] as boolean, transformations: rest[9] as boolean, + description: rest[10] as string | null, + stripMetadata: rest[11] as boolean | null, }; } @@ -590,6 +640,8 @@ export class Storage { const encryption = params.encryption; const antivirus = params.antivirus; const transformations = params.transformations; + const description = params.description; + const stripMetadata = params.stripMetadata; if (typeof bucketId === 'undefined' || bucketId === '') { throw new AppwriteException( 'Missing required parameter: "bucketId"', @@ -633,6 +685,12 @@ export class Storage { if (typeof transformations !== 'undefined') { apiPayload['transformations'] = transformations; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } + if (typeof stripMetadata !== 'undefined') { + apiPayload['stripMetadata'] = stripMetadata; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -653,6 +711,7 @@ export class Storage { $permissions: [], fileSecurity: false, name: '', + description: '', enabled: true, maximumFileSize: 0, allowedFileExtensions: [], @@ -660,6 +719,7 @@ export class Storage { encryption: true, antivirus: true, transformations: true, + stripMetadata: false, totalSize: 0, }, }, diff --git a/src/services/tables-db.ts b/src/services/tables-db.ts index adb947d..fde3052 100644 --- a/src/services/tables-db.ts +++ b/src/services/tables-db.ts @@ -112,6 +112,7 @@ export class TablesDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -165,6 +166,7 @@ export class TablesDB { * @param {string} params.databaseId - Unique 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. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string} params.description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -175,6 +177,7 @@ export class TablesDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -186,6 +189,7 @@ export class TablesDB { * @param {string} databaseId - Unique 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. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string} description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -197,6 +201,7 @@ export class TablesDB { databaseId: string, name: string, enabled?: boolean, + description?: string, specification?: string, replicas?: number, syncMode?: string | null, @@ -207,17 +212,26 @@ export class TablesDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; } | string, - ...rest: [string?, boolean?, string?, number?, (string | null)?] + ...rest: [ + string?, + boolean?, + string?, + string?, + number?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -232,6 +246,7 @@ export class TablesDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -241,15 +256,17 @@ export class TablesDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string, - replicas: rest[3] as number, - syncMode: rest[4] as string | null, + description: rest[2] as string, + specification: rest[3] as string, + replicas: rest[4] as number, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -272,6 +289,9 @@ export class TablesDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -297,6 +317,7 @@ export class TablesDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -950,6 +971,7 @@ export class TablesDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -1002,6 +1024,7 @@ export class TablesDB { * @param {string} params.databaseId - Database ID. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string | null} params.description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -1012,6 +1035,7 @@ export class TablesDB { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1022,6 +1046,7 @@ export class TablesDB { * @param {string} databaseId - Database ID. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string | null} description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -1033,6 +1058,7 @@ export class TablesDB { databaseId: string, name?: string, enabled?: boolean, + description?: string | null, specification?: string | null, replicas?: number | null, syncMode?: string | null, @@ -1043,6 +1069,7 @@ export class TablesDB { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1052,6 +1079,7 @@ export class TablesDB { string?, boolean?, (string | null)?, + (string | null)?, (number | null)?, (string | null)?, ] @@ -1060,6 +1088,7 @@ export class TablesDB { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1074,6 +1103,7 @@ export class TablesDB { databaseId: string; name?: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1083,15 +1113,17 @@ export class TablesDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string | null, - replicas: rest[3] as number | null, - syncMode: rest[4] as string | null, + description: rest[2] as string | null, + specification: rest[3] as string | null, + replicas: rest[4] as number | null, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -1111,6 +1143,9 @@ export class TablesDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -1136,6 +1171,7 @@ export class TablesDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -2310,6 +2346,7 @@ export class TablesDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, rowSecurity: false, columns: [], @@ -2329,6 +2366,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -2353,6 +2391,7 @@ export class TablesDB { * @param {boolean} params.enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @param {object[]} params.columns - Array of column definitions to create. Each column should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} params.description - Optional description for the table. * @throws {AppwriteException} * @returns {Promise} */ @@ -2365,6 +2404,7 @@ export class TablesDB { enabled?: boolean; columns?: object[]; indexes?: object[]; + description?: string; }): Promise; /** * Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console. @@ -2377,6 +2417,7 @@ export class TablesDB { * @param {boolean} enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @param {object[]} columns - Array of column definitions to create. Each column should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options. * @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional). + * @param {string} description - Optional description for the table. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2390,6 +2431,7 @@ export class TablesDB { enabled?: boolean, columns?: object[], indexes?: object[], + description?: string, ): Promise; createTable( paramsOrFirst: @@ -2402,6 +2444,7 @@ export class TablesDB { enabled?: boolean; columns?: object[]; indexes?: object[]; + description?: string; } | string, ...rest: [ @@ -2412,6 +2455,7 @@ export class TablesDB { boolean?, object[]?, object[]?, + string?, ] ): Promise { let params: { @@ -2423,6 +2467,7 @@ export class TablesDB { enabled?: boolean; columns?: object[]; indexes?: object[]; + description?: string; }; if ( @@ -2439,6 +2484,7 @@ export class TablesDB { enabled?: boolean; columns?: object[]; indexes?: object[]; + description?: string; }; } else { params = { @@ -2450,6 +2496,7 @@ export class TablesDB { enabled: rest[4] as boolean, columns: rest[5] as object[], indexes: rest[6] as object[], + description: rest[7] as string, }; } @@ -2461,6 +2508,7 @@ export class TablesDB { const enabled = params.enabled; const columns = params.columns; const indexes = params.indexes; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2500,6 +2548,9 @@ export class TablesDB { if (typeof indexes !== 'undefined') { apiPayload['indexes'] = indexes; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2520,6 +2571,7 @@ export class TablesDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, rowSecurity: false, columns: [], @@ -2539,6 +2591,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -2631,6 +2684,7 @@ export class TablesDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, rowSecurity: false, columns: [], @@ -2650,6 +2704,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -2673,6 +2728,7 @@ export class TablesDB { * @param {boolean} params.rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} params.enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @param {boolean} params.purge - When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire. + * @param {string | null} params.description - Optional description for the table. * @throws {AppwriteException} * @returns {Promise} */ @@ -2684,6 +2740,7 @@ export class TablesDB { rowSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }): Promise; /** * Update a table by its unique ID. @@ -2695,6 +2752,7 @@ export class TablesDB { * @param {boolean} rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @param {boolean} purge - When true, purge all cached list responses for this table as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire. + * @param {string | null} description - Optional description for the table. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -2707,6 +2765,7 @@ export class TablesDB { rowSecurity?: boolean, enabled?: boolean, purge?: boolean, + description?: string | null, ): Promise; updateTable( paramsOrFirst: @@ -2718,6 +2777,7 @@ export class TablesDB { rowSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; } | string, ...rest: [ @@ -2727,6 +2787,7 @@ export class TablesDB { boolean?, boolean?, boolean?, + (string | null)?, ] ): Promise { let params: { @@ -2737,6 +2798,7 @@ export class TablesDB { rowSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; if ( @@ -2752,6 +2814,7 @@ export class TablesDB { rowSecurity?: boolean; enabled?: boolean; purge?: boolean; + description?: string | null; }; } else { params = { @@ -2762,6 +2825,7 @@ export class TablesDB { rowSecurity: rest[3] as boolean, enabled: rest[4] as boolean, purge: rest[5] as boolean, + description: rest[6] as string | null, }; } @@ -2772,6 +2836,7 @@ export class TablesDB { const rowSecurity = params.rowSecurity; const enabled = params.enabled; const purge = params.purge; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -2801,6 +2866,9 @@ export class TablesDB { if (typeof purge !== 'undefined') { apiPayload['purge'] = purge; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2821,6 +2889,7 @@ export class TablesDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, rowSecurity: false, columns: [], @@ -2840,6 +2909,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -3051,6 +3121,7 @@ export class TablesDB { * @param {number | bigint | null} params.max - Maximum value * @param {number | bigint | null} params.xdefault - Default value. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3063,6 +3134,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }): Promise; /** * Create a bigint column. Optionally, minimum and maximum values can be provided. @@ -3076,6 +3148,7 @@ export class TablesDB { * @param {number | bigint | null} max - Maximum value * @param {number | bigint | null} xdefault - Default value. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3089,6 +3162,7 @@ export class TablesDB { max?: number | bigint | null, xdefault?: number | bigint | null, array?: boolean, + description?: string, ): Promise; createBigIntColumn( paramsOrFirst: @@ -3101,6 +3175,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -3111,6 +3186,7 @@ export class TablesDB { (number | bigint | null)?, (number | bigint | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -3122,6 +3198,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; if ( @@ -3138,6 +3215,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; } else { params = { @@ -3149,6 +3227,7 @@ export class TablesDB { max: rest[4] as number | bigint | null, xdefault: rest[5] as number | bigint | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -3160,6 +3239,7 @@ export class TablesDB { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3200,6 +3280,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3215,6 +3298,7 @@ export class TablesDB { columnBigint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3240,6 +3324,7 @@ export class TablesDB { * @param {number | bigint | null} params.min - Minimum value * @param {number | bigint | null} params.max - Maximum value * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3252,6 +3337,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a bigint column. Changing the `default` value will not update already existing rows. @@ -3265,6 +3351,7 @@ export class TablesDB { * @param {number | bigint | null} min - Minimum value * @param {number | bigint | null} max - Maximum value * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3278,6 +3365,7 @@ export class TablesDB { min?: number | bigint | null, max?: number | bigint | null, newKey?: string | null, + description?: string | null, ): Promise; updateBigIntColumn( paramsOrFirst: @@ -3290,6 +3378,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -3300,6 +3389,7 @@ export class TablesDB { (number | bigint | null)?, (number | bigint | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3311,6 +3401,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; if ( @@ -3327,6 +3418,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -3338,6 +3430,7 @@ export class TablesDB { min: rest[4] as number | bigint | null, max: rest[5] as number | bigint | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -3349,6 +3442,7 @@ export class TablesDB { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3393,6 +3487,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3408,6 +3505,7 @@ export class TablesDB { columnBigint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3431,6 +3529,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {boolean | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3441,6 +3540,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }): Promise; /** * Create a boolean column. @@ -3452,6 +3552,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {boolean | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3463,6 +3564,7 @@ export class TablesDB { required: boolean, xdefault?: boolean | null, array?: boolean, + description?: string, ): Promise; createBooleanColumn( paramsOrFirst: @@ -3473,9 +3575,17 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (boolean | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (boolean | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -3484,6 +3594,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }; if ( @@ -3498,6 +3609,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; array?: boolean; + description?: string; }; } else { params = { @@ -3507,6 +3619,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as boolean | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -3516,6 +3629,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3551,6 +3665,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3566,6 +3683,7 @@ export class TablesDB { columnBoolean: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3588,6 +3706,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {boolean | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3598,6 +3717,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a boolean column. Changing the `default` value will not update already existing rows. @@ -3608,6 +3728,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {boolean | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3619,6 +3740,7 @@ export class TablesDB { required: boolean, xdefault?: boolean | null, newKey?: string | null, + description?: string | null, ): Promise; updateBooleanColumn( paramsOrFirst: @@ -3629,6 +3751,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -3637,6 +3760,7 @@ export class TablesDB { boolean?, (boolean | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3646,6 +3770,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }; if ( @@ -3660,6 +3785,7 @@ export class TablesDB { required: boolean; xdefault?: boolean | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -3669,6 +3795,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as boolean | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -3678,6 +3805,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3716,6 +3844,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3731,6 +3862,7 @@ export class TablesDB { columnBoolean: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3753,6 +3885,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3763,6 +3896,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create a date time column according to the ISO 8601 standard. @@ -3773,6 +3907,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for the column in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3784,6 +3919,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createDatetimeColumn( paramsOrFirst: @@ -3794,9 +3930,17 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -3805,6 +3949,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -3819,6 +3964,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -3828,6 +3974,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -3837,6 +3984,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3872,6 +4020,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3887,6 +4038,7 @@ export class TablesDB { columnDatetime: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -3909,6 +4061,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -3919,6 +4072,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a date time column. Changing the `default` value will not update already existing rows. @@ -3929,6 +4083,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3940,6 +4095,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateDatetimeColumn( paramsOrFirst: @@ -3950,6 +4106,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -3958,6 +4115,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -3967,6 +4125,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -3981,6 +4140,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -3990,6 +4150,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -3999,6 +4160,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4037,6 +4199,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4052,6 +4217,7 @@ export class TablesDB { columnDatetime: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4075,6 +4241,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4085,6 +4252,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create an email column. @@ -4096,6 +4264,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4107,6 +4276,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createEmailColumn( paramsOrFirst: @@ -4117,9 +4287,17 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -4128,6 +4306,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -4142,6 +4321,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -4151,6 +4331,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -4160,6 +4341,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4194,6 +4376,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4209,6 +4394,7 @@ export class TablesDB { columnEmail: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4233,6 +4419,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4243,6 +4430,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an email column. Changing the `default` value will not update already existing rows. @@ -4254,6 +4442,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4265,6 +4454,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateEmailColumn( paramsOrFirst: @@ -4275,6 +4465,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -4283,6 +4474,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -4292,6 +4484,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -4306,6 +4499,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -4315,6 +4509,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -4324,6 +4519,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4362,6 +4558,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4377,6 +4576,7 @@ export class TablesDB { columnEmail: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4401,6 +4601,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4412,6 +4613,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create an enumeration column. The `elements` param acts as a white-list of accepted values for this column. @@ -4423,6 +4625,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4435,6 +4638,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createEnumColumn( paramsOrFirst: @@ -4446,6 +4650,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -4455,6 +4660,7 @@ export class TablesDB { boolean?, (string | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -4465,6 +4671,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -4480,6 +4687,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -4490,6 +4698,7 @@ export class TablesDB { required: rest[3] as boolean, xdefault: rest[4] as string | null, array: rest[5] as boolean, + description: rest[6] as string, }; } @@ -4500,6 +4709,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4542,6 +4752,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4557,6 +4770,7 @@ export class TablesDB { columnEnum: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4583,6 +4797,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4594,6 +4809,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an enum column. Changing the `default` value will not update already existing rows. @@ -4606,6 +4822,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4618,6 +4835,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateEnumColumn( paramsOrFirst: @@ -4629,6 +4847,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -4638,6 +4857,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -4648,6 +4868,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -4663,6 +4884,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -4673,6 +4895,7 @@ export class TablesDB { required: rest[3] as boolean, xdefault: rest[4] as string | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -4683,6 +4906,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4729,6 +4953,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4744,6 +4971,7 @@ export class TablesDB { columnEnum: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4771,6 +4999,7 @@ export class TablesDB { * @param {number | null} params.max - Maximum value * @param {number | null} params.xdefault - Default value. Cannot be set when required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4783,6 +5012,7 @@ export class TablesDB { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }): Promise; /** * Create a float column. Optionally, minimum and maximum values can be provided. @@ -4796,6 +5026,7 @@ export class TablesDB { * @param {number | null} max - Maximum value * @param {number | null} xdefault - Default value. Cannot be set when required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4809,6 +5040,7 @@ export class TablesDB { max?: number | null, xdefault?: number | null, array?: boolean, + description?: string, ): Promise; createFloatColumn( paramsOrFirst: @@ -4821,6 +5053,7 @@ export class TablesDB { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -4831,6 +5064,7 @@ export class TablesDB { (number | null)?, (number | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -4842,6 +5076,7 @@ export class TablesDB { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }; if ( @@ -4858,6 +5093,7 @@ export class TablesDB { max?: number | null; xdefault?: number | null; array?: boolean; + description?: string; }; } else { params = { @@ -4869,6 +5105,7 @@ export class TablesDB { max: rest[4] as number | null, xdefault: rest[5] as number | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -4880,6 +5117,7 @@ export class TablesDB { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -4920,6 +5158,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4935,6 +5176,7 @@ export class TablesDB { columnFloat: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -4960,6 +5202,7 @@ export class TablesDB { * @param {number | null} params.min - Minimum value * @param {number | null} params.max - Maximum value * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -4972,6 +5215,7 @@ export class TablesDB { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a float column. Changing the `default` value will not update already existing rows. @@ -4985,6 +5229,7 @@ export class TablesDB { * @param {number | null} min - Minimum value * @param {number | null} max - Maximum value * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -4998,6 +5243,7 @@ export class TablesDB { min?: number | null, max?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateFloatColumn( paramsOrFirst: @@ -5010,6 +5256,7 @@ export class TablesDB { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5020,6 +5267,7 @@ export class TablesDB { (number | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5031,6 +5279,7 @@ export class TablesDB { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5047,6 +5296,7 @@ export class TablesDB { min?: number | null; max?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5058,6 +5308,7 @@ export class TablesDB { min: rest[4] as number | null, max: rest[5] as number | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -5069,6 +5320,7 @@ export class TablesDB { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5113,6 +5365,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5128,6 +5383,7 @@ export class TablesDB { columnFloat: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5153,6 +5409,7 @@ export class TablesDB { * @param {number | bigint | null} params.max - Maximum value * @param {number | bigint | null} params.xdefault - Default value. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -5165,6 +5422,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }): Promise; /** * Create an integer column. Optionally, minimum and maximum values can be provided. @@ -5178,6 +5436,7 @@ export class TablesDB { * @param {number | bigint | null} max - Maximum value * @param {number | bigint | null} xdefault - Default value. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5191,6 +5450,7 @@ export class TablesDB { max?: number | bigint | null, xdefault?: number | bigint | null, array?: boolean, + description?: string, ): Promise; createIntegerColumn( paramsOrFirst: @@ -5203,6 +5463,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; } | string, ...rest: [ @@ -5213,6 +5474,7 @@ export class TablesDB { (number | bigint | null)?, (number | bigint | null)?, boolean?, + string?, ] ): Promise { let params: { @@ -5224,6 +5486,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; if ( @@ -5240,6 +5503,7 @@ export class TablesDB { max?: number | bigint | null; xdefault?: number | bigint | null; array?: boolean; + description?: string; }; } else { params = { @@ -5251,6 +5515,7 @@ export class TablesDB { max: rest[4] as number | bigint | null, xdefault: rest[5] as number | bigint | null, array: rest[6] as boolean, + description: rest[7] as string, }; } @@ -5262,6 +5527,7 @@ export class TablesDB { const max = params.max; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5303,6 +5569,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5318,6 +5587,7 @@ export class TablesDB { columnInteger: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5343,6 +5613,7 @@ export class TablesDB { * @param {number | bigint | null} params.min - Minimum value * @param {number | bigint | null} params.max - Maximum value * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -5355,6 +5626,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an integer column. Changing the `default` value will not update already existing rows. @@ -5368,6 +5640,7 @@ export class TablesDB { * @param {number | bigint | null} min - Minimum value * @param {number | bigint | null} max - Maximum value * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5381,6 +5654,7 @@ export class TablesDB { min?: number | bigint | null, max?: number | bigint | null, newKey?: string | null, + description?: string | null, ): Promise; updateIntegerColumn( paramsOrFirst: @@ -5393,6 +5667,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5403,6 +5678,7 @@ export class TablesDB { (number | bigint | null)?, (number | bigint | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5414,6 +5690,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5430,6 +5707,7 @@ export class TablesDB { min?: number | bigint | null; max?: number | bigint | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5441,6 +5719,7 @@ export class TablesDB { min: rest[4] as number | bigint | null, max: rest[5] as number | bigint | null, newKey: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -5452,6 +5731,7 @@ export class TablesDB { const min = params.min; const max = params.max; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5496,6 +5776,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5511,6 +5794,7 @@ export class TablesDB { columnInteger: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5534,6 +5818,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -5544,6 +5829,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create IP address column. @@ -5555,6 +5841,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5566,6 +5853,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createIpColumn( paramsOrFirst: @@ -5576,9 +5864,17 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -5587,6 +5883,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -5601,6 +5898,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -5610,6 +5908,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -5619,6 +5918,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5653,6 +5953,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5668,6 +5971,7 @@ export class TablesDB { columnIp: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5692,6 +5996,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -5702,6 +6007,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an ip column. Changing the `default` value will not update already existing rows. @@ -5713,6 +6019,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5724,6 +6031,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateIpColumn( paramsOrFirst: @@ -5734,6 +6042,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -5742,6 +6051,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -5751,6 +6061,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -5765,6 +6076,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -5774,6 +6086,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -5783,6 +6096,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5821,6 +6135,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5836,6 +6153,7 @@ export class TablesDB { columnIp: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -5858,6 +6176,7 @@ export class TablesDB { * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {any[][] | null} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -5867,6 +6186,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }): Promise; /** * Create a geometric line column. @@ -5876,6 +6196,7 @@ export class TablesDB { * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {any[][] | null} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -5886,6 +6207,7 @@ export class TablesDB { key: string, required: boolean, xdefault?: any[][] | null, + description?: string, ): Promise; createLineColumn( paramsOrFirst: @@ -5895,9 +6217,10 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (any[][] | null)?] + ...rest: [string?, string?, boolean?, (any[][] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -5905,6 +6228,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; if ( @@ -5918,6 +6242,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; } else { params = { @@ -5926,6 +6251,7 @@ export class TablesDB { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, + description: rest[4] as string, }; } @@ -5934,6 +6260,7 @@ export class TablesDB { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -5965,6 +6292,9 @@ export class TablesDB { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5980,6 +6310,7 @@ export class TablesDB { columnLine: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6002,6 +6333,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {any[][] | null} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6012,6 +6344,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a line column. Changing the `default` value will not update already existing rows. @@ -6022,6 +6355,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {any[][] | null} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6033,6 +6367,7 @@ export class TablesDB { required: boolean, xdefault?: any[][] | null, newKey?: string | null, + description?: string | null, ): Promise; updateLineColumn( paramsOrFirst: @@ -6043,6 +6378,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -6051,6 +6387,7 @@ export class TablesDB { boolean?, (any[][] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -6060,6 +6397,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -6074,6 +6412,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6083,6 +6422,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -6092,6 +6432,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6125,6 +6466,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6140,6 +6484,7 @@ export class TablesDB { columnLine: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6164,6 +6509,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6175,6 +6521,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a longtext column. @@ -6187,6 +6534,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6199,6 +6547,7 @@ export class TablesDB { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createLongtextColumn( paramsOrFirst: @@ -6210,6 +6559,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -6219,6 +6569,7 @@ export class TablesDB { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -6229,6 +6580,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -6244,6 +6596,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -6254,6 +6607,7 @@ export class TablesDB { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -6264,6 +6618,7 @@ export class TablesDB { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6302,6 +6657,9 @@ export class TablesDB { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6317,6 +6675,7 @@ export class TablesDB { columnLongtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6340,6 +6699,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6350,6 +6710,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a longtext column. Changing the `default` value will not update already existing rows. @@ -6361,6 +6722,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6372,6 +6734,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateLongtextColumn( paramsOrFirst: @@ -6382,6 +6745,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -6390,6 +6754,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -6399,6 +6764,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -6413,6 +6779,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6422,6 +6789,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -6431,6 +6799,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6469,6 +6838,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6484,6 +6856,7 @@ export class TablesDB { columnLongtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6508,6 +6881,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6519,6 +6893,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a mediumtext column. @@ -6531,6 +6906,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6543,6 +6919,7 @@ export class TablesDB { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createMediumtextColumn( paramsOrFirst: @@ -6554,6 +6931,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -6563,6 +6941,7 @@ export class TablesDB { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -6573,6 +6952,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -6588,6 +6968,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -6598,6 +6979,7 @@ export class TablesDB { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -6608,6 +6990,7 @@ export class TablesDB { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6646,6 +7029,9 @@ export class TablesDB { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6661,6 +7047,7 @@ export class TablesDB { columnMediumtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6684,6 +7071,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6694,6 +7082,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a mediumtext column. Changing the `default` value will not update already existing rows. @@ -6705,6 +7094,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6716,6 +7106,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateMediumtextColumn( paramsOrFirst: @@ -6726,6 +7117,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -6734,6 +7126,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -6743,6 +7136,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -6757,6 +7151,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -6766,6 +7161,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -6775,6 +7171,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6813,6 +7210,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6828,6 +7228,7 @@ export class TablesDB { columnMediumtext: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6849,6 +7250,7 @@ export class TablesDB { * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {number[] | null} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -6858,6 +7260,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }): Promise; /** * Create a geometric point column. @@ -6867,6 +7270,7 @@ export class TablesDB { * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {number[] | null} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -6877,6 +7281,7 @@ export class TablesDB { key: string, required: boolean, xdefault?: number[] | null, + description?: string, ): Promise; createPointColumn( paramsOrFirst: @@ -6886,9 +7291,10 @@ export class TablesDB { key: string; required: boolean; xdefault?: number[] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (number[] | null)?] + ...rest: [string?, string?, boolean?, (number[] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -6896,6 +7302,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }; if ( @@ -6909,6 +7316,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: number[] | null; + description?: string; }; } else { params = { @@ -6917,6 +7325,7 @@ export class TablesDB { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as number[] | null, + description: rest[4] as string, }; } @@ -6925,6 +7334,7 @@ export class TablesDB { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -6956,6 +7366,9 @@ export class TablesDB { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6971,6 +7384,7 @@ export class TablesDB { columnPoint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -6993,6 +7407,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {number[] | null} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -7003,6 +7418,7 @@ export class TablesDB { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a point column. Changing the `default` value will not update already existing rows. @@ -7013,6 +7429,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {number[] | null} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7024,6 +7441,7 @@ export class TablesDB { required: boolean, xdefault?: number[] | null, newKey?: string | null, + description?: string | null, ): Promise; updatePointColumn( paramsOrFirst: @@ -7034,6 +7452,7 @@ export class TablesDB { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -7042,6 +7461,7 @@ export class TablesDB { boolean?, (number[] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -7051,6 +7471,7 @@ export class TablesDB { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7065,6 +7486,7 @@ export class TablesDB { required: boolean; xdefault?: number[] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7074,6 +7496,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as number[] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -7083,6 +7506,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7116,6 +7540,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7131,6 +7558,7 @@ export class TablesDB { columnPoint: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7152,6 +7580,7 @@ export class TablesDB { * @param {string} params.key - Column Key. * @param {boolean} params.required - Is column required? * @param {any[][] | null} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -7161,6 +7590,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }): Promise; /** * Create a geometric polygon column. @@ -7170,6 +7600,7 @@ export class TablesDB { * @param {string} key - Column Key. * @param {boolean} required - Is column required? * @param {any[][] | null} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7180,6 +7611,7 @@ export class TablesDB { key: string, required: boolean, xdefault?: any[][] | null, + description?: string, ): Promise; createPolygonColumn( paramsOrFirst: @@ -7189,9 +7621,10 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (any[][] | null)?] + ...rest: [string?, string?, boolean?, (any[][] | null)?, string?] ): Promise { let params: { databaseId: string; @@ -7199,6 +7632,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; if ( @@ -7212,6 +7646,7 @@ export class TablesDB { key: string; required: boolean; xdefault?: any[][] | null; + description?: string; }; } else { params = { @@ -7220,6 +7655,7 @@ export class TablesDB { key: rest[1] as string, required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, + description: rest[4] as string, }; } @@ -7228,6 +7664,7 @@ export class TablesDB { const key = params.key; const required = params.required; const xdefault = params.xdefault; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7260,6 +7697,9 @@ export class TablesDB { if (typeof xdefault !== 'undefined') { apiPayload['default'] = xdefault; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7275,6 +7715,7 @@ export class TablesDB { columnPolygon: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7297,6 +7738,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {any[][] | null} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -7307,6 +7749,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a polygon column. Changing the `default` value will not update already existing rows. @@ -7317,6 +7760,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {any[][] | null} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7328,6 +7772,7 @@ export class TablesDB { required: boolean, xdefault?: any[][] | null, newKey?: string | null, + description?: string | null, ): Promise; updatePolygonColumn( paramsOrFirst: @@ -7338,6 +7783,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -7346,6 +7792,7 @@ export class TablesDB { boolean?, (any[][] | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -7355,6 +7802,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7369,6 +7817,7 @@ export class TablesDB { required: boolean; xdefault?: any[][] | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7378,6 +7827,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as any[][] | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -7387,6 +7837,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7420,6 +7871,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7435,6 +7889,7 @@ export class TablesDB { columnPolygon: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7460,6 +7915,7 @@ export class TablesDB { * @param {string | null} params.key - Column Key. * @param {string | null} params.twoWayKey - Two Way Column Key. * @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -7472,6 +7928,7 @@ export class TablesDB { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }): Promise; /** * Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). @@ -7485,6 +7942,7 @@ export class TablesDB { * @param {string | null} key - Column Key. * @param {string | null} twoWayKey - Two Way Column Key. * @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7498,6 +7956,7 @@ export class TablesDB { key?: string | null, twoWayKey?: string | null, onDelete?: RelationMutate, + description?: string, ): Promise; createRelationshipColumn( paramsOrFirst: @@ -7510,6 +7969,7 @@ export class TablesDB { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; } | string, ...rest: [ @@ -7520,6 +7980,7 @@ export class TablesDB { (string | null)?, (string | null)?, RelationMutate?, + string?, ] ): Promise { let params: { @@ -7531,6 +7992,7 @@ export class TablesDB { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }; if ( @@ -7547,6 +8009,7 @@ export class TablesDB { key?: string | null; twoWayKey?: string | null; onDelete?: RelationMutate; + description?: string; }; } else { params = { @@ -7558,6 +8021,7 @@ export class TablesDB { key: rest[4] as string | null, twoWayKey: rest[5] as string | null, onDelete: rest[6] as RelationMutate, + description: rest[7] as string, }; } @@ -7569,6 +8033,7 @@ export class TablesDB { const key = params.key; const twoWayKey = params.twoWayKey; const onDelete = params.onDelete; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7610,6 +8075,9 @@ export class TablesDB { if (typeof onDelete !== 'undefined') { apiPayload['onDelete'] = onDelete; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7625,6 +8093,7 @@ export class TablesDB { columnRelationship: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7652,6 +8121,7 @@ export class TablesDB { * @param {string} params.key - Column Key. * @param {RelationMutate | null} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -7661,6 +8131,7 @@ export class TablesDB { key: string; onDelete?: RelationMutate | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns). @@ -7671,6 +8142,7 @@ export class TablesDB { * @param {string} key - Column Key. * @param {RelationMutate | null} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7681,6 +8153,7 @@ export class TablesDB { key: string, onDelete?: RelationMutate | null, newKey?: string | null, + description?: string | null, ): Promise; updateRelationshipColumn( paramsOrFirst: @@ -7690,9 +8163,16 @@ export class TablesDB { key: string; onDelete?: RelationMutate | null; newKey?: string | null; + description?: string | null; } | string, - ...rest: [string?, string?, (RelationMutate | null)?, (string | null)?] + ...rest: [ + string?, + string?, + (RelationMutate | null)?, + (string | null)?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; @@ -7700,6 +8180,7 @@ export class TablesDB { key: string; onDelete?: RelationMutate | null; newKey?: string | null; + description?: string | null; }; if ( @@ -7713,6 +8194,7 @@ export class TablesDB { key: string; onDelete?: RelationMutate | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -7721,6 +8203,7 @@ export class TablesDB { key: rest[1] as string, onDelete: rest[2] as RelationMutate | null, newKey: rest[3] as string | null, + description: rest[4] as string | null, }; } @@ -7729,6 +8212,7 @@ export class TablesDB { const key = params.key; const onDelete = params.onDelete; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7754,6 +8238,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7769,6 +8256,7 @@ export class TablesDB { columnRelationship: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7799,6 +8287,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.9.0. Please use `TablesDB.createTextColumn` instead. @@ -7812,6 +8301,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a string column. @@ -7825,6 +8315,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -7838,6 +8329,7 @@ export class TablesDB { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createStringColumn( paramsOrFirst: @@ -7850,6 +8342,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -7860,6 +8353,7 @@ export class TablesDB { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -7871,6 +8365,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -7887,6 +8382,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -7898,6 +8394,7 @@ export class TablesDB { xdefault: rest[4] as string | null, array: rest[5] as boolean, encrypt: rest[6] as boolean, + description: rest[7] as string, }; } @@ -7909,6 +8406,7 @@ export class TablesDB { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -7952,6 +8450,9 @@ export class TablesDB { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7967,6 +8468,7 @@ export class TablesDB { columnString: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -7992,6 +8494,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {number | null} params.size - Maximum size of the string column. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTextColumn` instead. @@ -8004,6 +8507,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a string column. Changing the `default` value will not update already existing rows. @@ -8016,6 +8520,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {number | null} size - Maximum size of the string column. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8028,6 +8533,7 @@ export class TablesDB { xdefault?: string | null, size?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateStringColumn( paramsOrFirst: @@ -8039,6 +8545,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -8048,6 +8555,7 @@ export class TablesDB { (string | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -8058,6 +8566,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -8073,6 +8582,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -8083,6 +8593,7 @@ export class TablesDB { xdefault: rest[3] as string | null, size: rest[4] as number | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -8093,6 +8604,7 @@ export class TablesDB { const xdefault = params.xdefault; const size = params.size; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8134,6 +8646,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8149,6 +8664,7 @@ export class TablesDB { columnString: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8174,6 +8690,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -8185,6 +8702,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a text column. @@ -8197,6 +8715,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8209,6 +8728,7 @@ export class TablesDB { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createTextColumn( paramsOrFirst: @@ -8220,6 +8740,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -8229,6 +8750,7 @@ export class TablesDB { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -8239,6 +8761,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -8254,6 +8777,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -8264,6 +8788,7 @@ export class TablesDB { xdefault: rest[3] as string | null, array: rest[4] as boolean, encrypt: rest[5] as boolean, + description: rest[6] as string, }; } @@ -8274,6 +8799,7 @@ export class TablesDB { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8311,6 +8837,9 @@ export class TablesDB { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8326,6 +8855,7 @@ export class TablesDB { columnText: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8349,6 +8879,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -8359,6 +8890,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a text column. Changing the `default` value will not update already existing rows. @@ -8370,6 +8902,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8381,6 +8914,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateTextColumn( paramsOrFirst: @@ -8391,6 +8925,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -8399,6 +8934,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -8408,6 +8944,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -8422,6 +8959,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -8431,6 +8969,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -8440,6 +8979,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8478,6 +9018,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8493,6 +9036,7 @@ export class TablesDB { columnText: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8516,6 +9060,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -8526,6 +9071,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }): Promise; /** * Create a URL column. @@ -8537,6 +9083,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8548,6 +9095,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, array?: boolean, + description?: string, ): Promise; createUrlColumn( paramsOrFirst: @@ -8558,9 +9106,17 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; } | string, - ...rest: [string?, string?, boolean?, (string | null)?, boolean?] + ...rest: [ + string?, + string?, + boolean?, + (string | null)?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -8569,6 +9125,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; if ( @@ -8583,6 +9140,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; array?: boolean; + description?: string; }; } else { params = { @@ -8592,6 +9150,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, array: rest[4] as boolean, + description: rest[5] as string, }; } @@ -8601,6 +9160,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const array = params.array; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8635,6 +9195,9 @@ export class TablesDB { if (typeof array !== 'undefined') { apiPayload['array'] = array; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8650,6 +9213,7 @@ export class TablesDB { columnUrl: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8674,6 +9238,7 @@ export class TablesDB { * @param {boolean} params.required - Is column required? * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -8684,6 +9249,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update an url column. Changing the `default` value will not update already existing rows. @@ -8695,6 +9261,7 @@ export class TablesDB { * @param {boolean} required - Is column required? * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8706,6 +9273,7 @@ export class TablesDB { required: boolean, xdefault?: string | null, newKey?: string | null, + description?: string | null, ): Promise; updateUrlColumn( paramsOrFirst: @@ -8716,6 +9284,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -8724,6 +9293,7 @@ export class TablesDB { boolean?, (string | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -8733,6 +9303,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; if ( @@ -8747,6 +9318,7 @@ export class TablesDB { required: boolean; xdefault?: string | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -8756,6 +9328,7 @@ export class TablesDB { required: rest[2] as boolean, xdefault: rest[3] as string | null, newKey: rest[4] as string | null, + description: rest[5] as string | null, }; } @@ -8765,6 +9338,7 @@ export class TablesDB { const required = params.required; const xdefault = params.xdefault; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8803,6 +9377,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8818,6 +9395,7 @@ export class TablesDB { columnUrl: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -8844,6 +9422,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} params.array - Is column an array? * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -8856,6 +9435,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }): Promise; /** * Create a varchar column. @@ -8869,6 +9449,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {boolean} array - Is column an array? * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried. + * @param {string} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -8882,6 +9463,7 @@ export class TablesDB { xdefault?: string | null, array?: boolean, encrypt?: boolean, + description?: string, ): Promise; createVarcharColumn( paramsOrFirst: @@ -8894,6 +9476,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; } | string, ...rest: [ @@ -8904,6 +9487,7 @@ export class TablesDB { (string | null)?, boolean?, boolean?, + string?, ] ): Promise { let params: { @@ -8915,6 +9499,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; if ( @@ -8931,6 +9516,7 @@ export class TablesDB { xdefault?: string | null; array?: boolean; encrypt?: boolean; + description?: string; }; } else { params = { @@ -8942,6 +9528,7 @@ export class TablesDB { xdefault: rest[4] as string | null, array: rest[5] as boolean, encrypt: rest[6] as boolean, + description: rest[7] as string, }; } @@ -8953,6 +9540,7 @@ export class TablesDB { const xdefault = params.xdefault; const array = params.array; const encrypt = params.encrypt; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -8997,6 +9585,9 @@ export class TablesDB { if (typeof encrypt !== 'undefined') { apiPayload['encrypt'] = encrypt; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -9012,6 +9603,7 @@ export class TablesDB { columnVarchar: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -9037,6 +9629,7 @@ export class TablesDB { * @param {string | null} params.xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {number | null} params.size - Maximum size of the varchar column. * @param {string | null} params.newKey - New Column Key. + * @param {string | null} params.description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} */ @@ -9048,6 +9641,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }): Promise; /** * Update a varchar column. Changing the `default` value will not update already existing rows. @@ -9060,6 +9654,7 @@ export class TablesDB { * @param {string | null} xdefault - Default value for column when not provided. Cannot be set when column is required. * @param {number | null} size - Maximum size of the varchar column. * @param {string | null} newKey - New Column Key. + * @param {string | null} description - Optional description for the column. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -9072,6 +9667,7 @@ export class TablesDB { xdefault?: string | null, size?: number | null, newKey?: string | null, + description?: string | null, ): Promise; updateVarcharColumn( paramsOrFirst: @@ -9083,6 +9679,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; } | string, ...rest: [ @@ -9092,6 +9689,7 @@ export class TablesDB { (string | null)?, (number | null)?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -9102,6 +9700,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; if ( @@ -9117,6 +9716,7 @@ export class TablesDB { xdefault?: string | null; size?: number | null; newKey?: string | null; + description?: string | null; }; } else { params = { @@ -9127,6 +9727,7 @@ export class TablesDB { xdefault: rest[3] as string | null, size: rest[4] as number | null, newKey: rest[5] as string | null, + description: rest[6] as string | null, }; } @@ -9137,6 +9738,7 @@ export class TablesDB { const xdefault = params.xdefault; const size = params.size; const newKey = params.newKey; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -9178,6 +9780,9 @@ export class TablesDB { if (typeof newKey !== 'undefined') { apiPayload['newKey'] = newKey; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -9193,6 +9798,7 @@ export class TablesDB { columnVarchar: { defaults: { key: '', + description: '', type: '', error: '', required: false, @@ -9554,6 +10160,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -9578,6 +10185,7 @@ export class TablesDB { * @param {string[]} params.columns - Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long. * @param {OrderBy[]} params.orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} params.lengths - Length of index. Maximum of 100 + * @param {string} params.description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} */ @@ -9589,6 +10197,7 @@ export class TablesDB { columns: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }): Promise; /** * Creates an index on the columns listed. Your index should include all the columns you will query in a single request. @@ -9601,6 +10210,7 @@ export class TablesDB { * @param {string[]} columns - Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long. * @param {OrderBy[]} orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} lengths - Length of index. Maximum of 100 + * @param {string} description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -9613,6 +10223,7 @@ export class TablesDB { columns: string[], orders?: OrderBy[], lengths?: number[], + description?: string, ): Promise; createIndex( paramsOrFirst: @@ -9624,6 +10235,7 @@ export class TablesDB { columns: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; } | string, ...rest: [ @@ -9633,6 +10245,7 @@ export class TablesDB { string[]?, OrderBy[]?, number[]?, + string?, ] ): Promise { let params: { @@ -9643,6 +10256,7 @@ export class TablesDB { columns: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; if ( @@ -9658,6 +10272,7 @@ export class TablesDB { columns: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; } else { params = { @@ -9668,6 +10283,7 @@ export class TablesDB { columns: rest[3] as string[], orders: rest[4] as OrderBy[], lengths: rest[5] as number[], + description: rest[6] as string, }; } @@ -9678,6 +10294,7 @@ export class TablesDB { const columns = params.columns; const orders = params.orders; const lengths = params.lengths; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -9718,6 +10335,9 @@ export class TablesDB { if (typeof lengths !== 'undefined') { apiPayload['lengths'] = lengths; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -9736,6 +10356,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -9841,6 +10462,7 @@ export class TablesDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', status: '', error: '', @@ -9939,12 +10561,14 @@ export class TablesDB { /** * Get a list of all the user's rows in a given table. You can use the query params to filter your results. * + * Rows returned by aggregate, groupBy or distinct queries hold only the columns they select, group or aggregate, typed as a row types them, with a joined column named by its join alias (`alias.column`). The response omits their `$id`, `$sequence`, `$createdAt`, `$updatedAt`, `$permissions`, `$databaseId` and `$tableId` unless they select or group it, and those of a right or full join row that no row of this table matched. SDK row models fill omitted system columns with empty values. + * * @param {string} params.databaseId - Database ID. * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table). * @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. * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction. * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. - * @param {number} params.ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row 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). + * @param {number} params.ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). * @throws {AppwriteException} * @returns {Promise>} */ @@ -9959,12 +10583,14 @@ export class TablesDB { /** * Get a list of all the user's rows in a given table. You can use the query params to filter your results. * + * Rows returned by aggregate, groupBy or distinct queries hold only the columns they select, group or aggregate, typed as a row types them, with a joined column named by its join alias (`alias.column`). The response omits their `$id`, `$sequence`, `$createdAt`, `$updatedAt`, `$permissions`, `$databaseId` and `$tableId` unless they select or group it, and those of a right or full join row that no row of this table matched. SDK row models fill omitted system columns with empty values. + * * @param {string} databaseId - Database ID. * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table). * @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. * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction. * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. - * @param {number} ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row 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). + * @param {number} ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). * @throws {AppwriteException} * @returns {Promise>} * @deprecated Use the object parameter style method for a better developer experience. @@ -10828,6 +11454,167 @@ export class TablesDB { return request.then((response) => applyDefaults(response, defaults)); } + /** + * Get a list of all the user's rows in a given table using a POST request. This behaves identically to the list rows endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} params.databaseId - Database ID. + * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table). + * @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. + * @param {string | null} params.transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} params.ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + */ + createQuery(params: { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }): Promise>; + /** + * Get a list of all the user's rows in a given table using a POST request. This behaves identically to the list rows endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string. + * + * + * @param {string} databaseId - Database ID. + * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table). + * @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. + * @param {string | null} transactionId - Transaction ID to read uncommitted changes within the transaction. + * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. + * @param {number} ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours). + * @throws {AppwriteException} + * @returns {Promise>} + * @deprecated Use the object parameter style method for a better developer experience. + */ + createQuery( + databaseId: string, + tableId: string, + queries?: string[], + transactionId?: string | null, + total?: boolean, + ttl?: number, + ): Promise>; + createQuery( + paramsOrFirst: + | { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + } + | string, + ...rest: [string?, string[]?, (string | null)?, boolean?, number?] + ): Promise> { + let params: { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }; + + if ( + paramsOrFirst && + typeof paramsOrFirst === 'object' && + !Array.isArray(paramsOrFirst) + ) { + params = (paramsOrFirst || {}) as { + databaseId: string; + tableId: string; + queries?: string[]; + transactionId?: string | null; + total?: boolean; + ttl?: number; + }; + } else { + params = { + databaseId: paramsOrFirst as string, + tableId: rest[0] as string, + queries: rest[1] as string[], + transactionId: rest[2] as string | null, + total: rest[3] as boolean, + ttl: rest[4] as number, + }; + } + + const databaseId = params.databaseId; + const tableId = params.tableId; + const queries = params.queries; + const transactionId = params.transactionId; + const total = params.total; + const ttl = params.ttl; + if (typeof databaseId === 'undefined' || databaseId === '') { + throw new AppwriteException( + 'Missing required parameter: "databaseId"', + ); + } + if (typeof tableId === 'undefined' || tableId === '') { + throw new AppwriteException( + 'Missing required parameter: "tableId"', + ); + } + const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows/query' + .replace('{databaseId}', encodeURIComponent(String(databaseId))) + .replace('{tableId}', encodeURIComponent(String(tableId))); + const apiPayload: Payload = {}; + if (typeof queries !== 'undefined') { + apiPayload['queries'] = queries; + } + if (typeof transactionId !== 'undefined') { + apiPayload['transactionId'] = transactionId; + } + if (typeof total !== 'undefined') { + apiPayload['total'] = total; + } + if (typeof ttl !== 'undefined') { + apiPayload['ttl'] = ttl; + } + const uri = new URL(this.client.config.endpoint + apiPath); + + const apiHeaders: { [header: string]: string } = { + 'X-Appwrite-Project': this.client.config.project, + 'content-type': 'application/json', + accept: 'application/json', + }; + + const request = this.client.call('post', uri, apiHeaders, apiPayload); + const defaults = { + root: 'rowList', + models: { + rowList: { + defaults: { + total: 0, + rows: [], + }, + properties: { + rows: { + items: 'row', + }, + }, + }, + row: { + defaults: { + $id: '', + $sequence: '', + $tableId: '', + $databaseId: '', + $createdAt: '', + $updatedAt: '', + $permissions: [], + }, + }, + }, + }; + + return request.then((response) => applyDefaults(response, defaults)); + } + /** * Get a row by its unique ID. This endpoint response returns a JSON object with the row data. * diff --git a/src/services/vectors-db.ts b/src/services/vectors-db.ts index d2f0c5d..fe290d1 100644 --- a/src/services/vectors-db.ts +++ b/src/services/vectors-db.ts @@ -96,6 +96,7 @@ export class VectorsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -149,6 +150,7 @@ export class VectorsDB { * @param {string} params.databaseId - Unique 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. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string} params.description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -159,6 +161,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -170,6 +173,7 @@ export class VectorsDB { * @param {string} databaseId - Unique 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. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string} description - Optional description for the database. * @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. * @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. * @param {string | null} 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. @@ -181,6 +185,7 @@ export class VectorsDB { databaseId: string, name: string, enabled?: boolean, + description?: string, specification?: string, replicas?: number, syncMode?: string | null, @@ -191,17 +196,26 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; } | string, - ...rest: [string?, boolean?, string?, number?, (string | null)?] + ...rest: [ + string?, + boolean?, + string?, + string?, + number?, + (string | null)?, + ] ): Promise { let params: { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -216,6 +230,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string; specification?: string; replicas?: number; syncMode?: string | null; @@ -225,15 +240,17 @@ export class VectorsDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string, - replicas: rest[3] as number, - syncMode: rest[4] as string | null, + description: rest[2] as string, + specification: rest[3] as string, + replicas: rest[4] as number, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -256,6 +273,9 @@ export class VectorsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -281,6 +301,7 @@ export class VectorsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -934,6 +955,7 @@ export class VectorsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -986,6 +1008,7 @@ export class VectorsDB { * @param {string} params.databaseId - Database ID. * @param {string} params.name - Database name. Max length: 128 chars. * @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. + * @param {string | null} params.description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -996,6 +1019,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1006,6 +1030,7 @@ export class VectorsDB { * @param {string} databaseId - Database ID. * @param {string} name - Database name. Max length: 128 chars. * @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. + * @param {string | null} description - Optional description for the database. * @param {string | null} 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. * @param {number | null} 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. * @param {string | null} 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. @@ -1017,6 +1042,7 @@ export class VectorsDB { databaseId: string, name: string, enabled?: boolean, + description?: string | null, specification?: string | null, replicas?: number | null, syncMode?: string | null, @@ -1027,6 +1053,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1036,6 +1063,7 @@ export class VectorsDB { string?, boolean?, (string | null)?, + (string | null)?, (number | null)?, (string | null)?, ] @@ -1044,6 +1072,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1058,6 +1087,7 @@ export class VectorsDB { databaseId: string; name: string; enabled?: boolean; + description?: string | null; specification?: string | null; replicas?: number | null; syncMode?: string | null; @@ -1067,15 +1097,17 @@ export class VectorsDB { databaseId: paramsOrFirst as string, name: rest[0] as string, enabled: rest[1] as boolean, - specification: rest[2] as string | null, - replicas: rest[3] as number | null, - syncMode: rest[4] as string | null, + description: rest[2] as string | null, + specification: rest[3] as string | null, + replicas: rest[4] as number | null, + syncMode: rest[5] as string | null, }; } const databaseId = params.databaseId; const name = params.name; const enabled = params.enabled; + const description = params.description; const specification = params.specification; const replicas = params.replicas; const syncMode = params.syncMode; @@ -1098,6 +1130,9 @@ export class VectorsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } if (typeof specification !== 'undefined') { apiPayload['specification'] = specification; } @@ -1123,6 +1158,7 @@ export class VectorsDB { defaults: { $id: '', name: '', + description: '', $createdAt: '', $updatedAt: '', enabled: true, @@ -1347,6 +1383,7 @@ export class VectorsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1367,6 +1404,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1389,6 +1427,7 @@ export class VectorsDB { * @param {string[]} params.permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @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). * @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. + * @param {string} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} */ @@ -1400,6 +1439,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean; + description?: string; }): Promise; /** * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console. @@ -1411,6 +1451,7 @@ export class VectorsDB { * @param {string[]} permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @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). * @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. + * @param {string} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1423,6 +1464,7 @@ export class VectorsDB { permissions?: string[], documentSecurity?: boolean, enabled?: boolean, + description?: string, ): Promise; createCollection( paramsOrFirst: @@ -1434,9 +1476,18 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean; + description?: string; } | string, - ...rest: [string?, string?, number?, string[]?, boolean?, boolean?] + ...rest: [ + string?, + string?, + number?, + string[]?, + boolean?, + boolean?, + string?, + ] ): Promise { let params: { databaseId: string; @@ -1446,6 +1497,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean; + description?: string; }; if ( @@ -1461,6 +1513,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean; + description?: string; }; } else { params = { @@ -1471,6 +1524,7 @@ export class VectorsDB { permissions: rest[3] as string[], documentSecurity: rest[4] as boolean, enabled: rest[5] as boolean, + description: rest[6] as string, }; } @@ -1481,6 +1535,7 @@ export class VectorsDB { const permissions = params.permissions; const documentSecurity = params.documentSecurity; const enabled = params.enabled; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1522,6 +1577,9 @@ export class VectorsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1542,6 +1600,7 @@ export class VectorsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1562,6 +1621,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1659,6 +1719,7 @@ export class VectorsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1679,6 +1740,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -1701,6 +1763,7 @@ export class VectorsDB { * @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). * @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). * @param {boolean | null} 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. + * @param {string | null} params.description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} */ @@ -1712,6 +1775,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean | null; + description?: string | null; }): Promise; /** * Update a collection by its unique ID. @@ -1723,6 +1787,7 @@ export class VectorsDB { * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). * @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). * @param {boolean | null} 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. + * @param {string | null} description - Optional description for the collection. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -1735,6 +1800,7 @@ export class VectorsDB { permissions?: string[], documentSecurity?: boolean, enabled?: boolean | null, + description?: string | null, ): Promise; updateCollection( paramsOrFirst: @@ -1746,6 +1812,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean | null; + description?: string | null; } | string, ...rest: [ @@ -1755,6 +1822,7 @@ export class VectorsDB { string[]?, boolean?, (boolean | null)?, + (string | null)?, ] ): Promise { let params: { @@ -1765,6 +1833,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean | null; + description?: string | null; }; if ( @@ -1780,6 +1849,7 @@ export class VectorsDB { permissions?: string[]; documentSecurity?: boolean; enabled?: boolean | null; + description?: string | null; }; } else { params = { @@ -1790,6 +1860,7 @@ export class VectorsDB { permissions: rest[3] as string[], documentSecurity: rest[4] as boolean, enabled: rest[5] as boolean | null, + description: rest[6] as string | null, }; } @@ -1800,6 +1871,7 @@ export class VectorsDB { const permissions = params.permissions; const documentSecurity = params.documentSecurity; const enabled = params.enabled; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -1835,6 +1907,9 @@ export class VectorsDB { if (typeof enabled !== 'undefined') { apiPayload['enabled'] = enabled; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1855,6 +1930,7 @@ export class VectorsDB { $permissions: [], databaseId: '', name: '', + description: '', enabled: true, documentSecurity: false, attributes: [], @@ -1875,6 +1951,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -3831,6 +3908,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -3854,6 +3932,7 @@ export class VectorsDB { * @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} params.orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} params.lengths - Length of index. Maximum of 100 + * @param {string} params.description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} */ @@ -3865,6 +3944,7 @@ export class VectorsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }): Promise; /** * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. @@ -3877,6 +3957,7 @@ export class VectorsDB { * @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. * @param {OrderBy[]} orders - Array of index orders. Maximum of 100 orders are allowed. * @param {number[]} lengths - Length of index. Maximum of 100 + * @param {string} description - Optional description for the index. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -3889,6 +3970,7 @@ export class VectorsDB { attributes: string[], orders?: OrderBy[], lengths?: number[], + description?: string, ): Promise; createIndex( paramsOrFirst: @@ -3900,6 +3982,7 @@ export class VectorsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; } | string, ...rest: [ @@ -3909,6 +3992,7 @@ export class VectorsDB { string[]?, OrderBy[]?, number[]?, + string?, ] ): Promise { let params: { @@ -3919,6 +4003,7 @@ export class VectorsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; if ( @@ -3934,6 +4019,7 @@ export class VectorsDB { attributes: string[]; orders?: OrderBy[]; lengths?: number[]; + description?: string; }; } else { params = { @@ -3944,6 +4030,7 @@ export class VectorsDB { attributes: rest[3] as string[], orders: rest[4] as OrderBy[], lengths: rest[5] as number[], + description: rest[6] as string, }; } @@ -3954,6 +4041,7 @@ export class VectorsDB { const attributes = params.attributes; const orders = params.orders; const lengths = params.lengths; + const description = params.description; if (typeof databaseId === 'undefined' || databaseId === '') { throw new AppwriteException( 'Missing required parameter: "databaseId"', @@ -3998,6 +4086,9 @@ export class VectorsDB { if (typeof lengths !== 'undefined') { apiPayload['lengths'] = lengths; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4016,6 +4107,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], @@ -4124,6 +4216,7 @@ export class VectorsDB { $createdAt: '', $updatedAt: '', key: '', + description: '', type: '', error: '', attributes: [], diff --git a/src/services/webhooks.ts b/src/services/webhooks.ts index 32f492f..02f9f2d 100644 --- a/src/services/webhooks.ts +++ b/src/services/webhooks.ts @@ -96,6 +96,7 @@ export class Webhooks { $createdAt: '', $updatedAt: '', name: '', + description: '', url: '', events: [], tls: true, @@ -125,6 +126,7 @@ export class Webhooks { * @param {string} params.authUsername - Webhook HTTP user. Max length: 255 chars. * @param {string} params.authPassword - Webhook HTTP password. Max length: 2048 chars. * @param {string | null} params.secret - Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters. + * @param {string} params.description - Optional description for the webhook. * @throws {AppwriteException} * @returns {Promise} */ @@ -138,6 +140,7 @@ export class Webhooks { authUsername?: string; authPassword?: string; secret?: string | null; + description?: string; }): Promise; /** * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. @@ -151,6 +154,7 @@ export class Webhooks { * @param {string} authUsername - Webhook HTTP user. Max length: 255 chars. * @param {string} authPassword - Webhook HTTP password. Max length: 2048 chars. * @param {string | null} secret - Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters. + * @param {string} description - Optional description for the webhook. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -165,6 +169,7 @@ export class Webhooks { authUsername?: string, authPassword?: string, secret?: string | null, + description?: string, ): Promise; create( paramsOrFirst: @@ -178,6 +183,7 @@ export class Webhooks { authUsername?: string; authPassword?: string; secret?: string | null; + description?: string; } | string, ...rest: [ @@ -189,6 +195,7 @@ export class Webhooks { string?, string?, (string | null)?, + string?, ] ): Promise { let params: { @@ -201,6 +208,7 @@ export class Webhooks { authUsername?: string; authPassword?: string; secret?: string | null; + description?: string; }; if ( @@ -218,6 +226,7 @@ export class Webhooks { authUsername?: string; authPassword?: string; secret?: string | null; + description?: string; }; } else { params = { @@ -230,6 +239,7 @@ export class Webhooks { authUsername: rest[5] as string, authPassword: rest[6] as string, secret: rest[7] as string | null, + description: rest[8] as string, }; } @@ -242,6 +252,7 @@ export class Webhooks { const authUsername = params.authUsername; const authPassword = params.authPassword; const secret = params.secret; + const description = params.description; if (typeof webhookId === 'undefined') { throw new AppwriteException( 'Missing required parameter: "webhookId"', @@ -285,6 +296,9 @@ export class Webhooks { if (typeof secret !== 'undefined') { apiPayload['secret'] = secret; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -303,6 +317,7 @@ export class Webhooks { $createdAt: '', $updatedAt: '', name: '', + description: '', url: '', events: [], tls: true, @@ -382,6 +397,7 @@ export class Webhooks { $createdAt: '', $updatedAt: '', name: '', + description: '', url: '', events: [], tls: true, @@ -410,6 +426,7 @@ export class Webhooks { * @param {boolean} params.tls - Certificate verification, false for disabled or true for enabled. * @param {string} params.authUsername - Webhook HTTP user. Max length: 255 chars. * @param {string | null} params.authPassword - Webhook HTTP password. Max length: 2048 chars. Omit to keep the current password; it is cleared when the URL changes or TLS verification is disabled. + * @param {string | null} params.description - Optional description for the webhook. * @throws {AppwriteException} * @returns {Promise} */ @@ -422,6 +439,7 @@ export class Webhooks { tls?: boolean; authUsername?: string; authPassword?: string | null; + description?: string | null; }): Promise; /** * Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. @@ -434,6 +452,7 @@ export class Webhooks { * @param {boolean} tls - Certificate verification, false for disabled or true for enabled. * @param {string} authUsername - Webhook HTTP user. Max length: 255 chars. * @param {string | null} authPassword - Webhook HTTP password. Max length: 2048 chars. Omit to keep the current password; it is cleared when the URL changes or TLS verification is disabled. + * @param {string | null} description - Optional description for the webhook. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. @@ -447,6 +466,7 @@ export class Webhooks { tls?: boolean, authUsername?: string, authPassword?: string | null, + description?: string | null, ): Promise; update( paramsOrFirst: @@ -459,6 +479,7 @@ export class Webhooks { tls?: boolean; authUsername?: string; authPassword?: string | null; + description?: string | null; } | string, ...rest: [ @@ -469,6 +490,7 @@ export class Webhooks { boolean?, string?, (string | null)?, + (string | null)?, ] ): Promise { let params: { @@ -480,6 +502,7 @@ export class Webhooks { tls?: boolean; authUsername?: string; authPassword?: string | null; + description?: string | null; }; if ( @@ -496,6 +519,7 @@ export class Webhooks { tls?: boolean; authUsername?: string; authPassword?: string | null; + description?: string | null; }; } else { params = { @@ -507,6 +531,7 @@ export class Webhooks { tls: rest[4] as boolean, authUsername: rest[5] as string, authPassword: rest[6] as string | null, + description: rest[7] as string | null, }; } @@ -518,6 +543,7 @@ export class Webhooks { const tls = params.tls; const authUsername = params.authUsername; const authPassword = params.authPassword; + const description = params.description; if (typeof webhookId === 'undefined' || webhookId === '') { throw new AppwriteException( 'Missing required parameter: "webhookId"', @@ -558,6 +584,9 @@ export class Webhooks { if (typeof authPassword !== 'undefined') { apiPayload['authPassword'] = authPassword; } + if (typeof description !== 'undefined') { + apiPayload['description'] = description; + } const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -576,6 +605,7 @@ export class Webhooks { $createdAt: '', $updatedAt: '', name: '', + description: '', url: '', events: [], tls: true, @@ -727,6 +757,7 @@ export class Webhooks { $createdAt: '', $updatedAt: '', name: '', + description: '', url: '', events: [], tls: true, diff --git a/test/query.test.js b/test/query.test.js index 1083ecd..d84064f 100644 --- a/test/query.test.js +++ b/test/query.test.js @@ -376,6 +376,23 @@ describe('Query', () => { values: ['ord'], })); + test('nested join without alias leaves the alias to the server', () => { + const query = JSON.parse( + Query.join('orders', [Query.on('$id', 'customerId')]), + ); + expect(query.method).toEqual('join'); + expect(query.attribute).toEqual('orders'); + expect(query.values).toHaveLength(1); + expect(query.values[0].method).toEqual('on'); + }); + + test('crossJoin without alias leaves the alias to the server', () => { + const query = JSON.parse(Query.crossJoin('orders')); + expect(query.method).toEqual('crossJoin'); + expect(query.attribute).toEqual('orders'); + expect(query.values ?? []).toEqual([]); + }); + test('vectorDot', () => expectQuery(Query.vectorDot('embedding', [0.1, 0.2])).toEqual({ method: 'vectorDot', diff --git a/test/services/account.test.js b/test/services/account.test.js index 0bd3f1c..bce69f3 100644 --- a/test/services/account.test.js +++ b/test/services/account.test.js @@ -219,6 +219,19 @@ describe('Account', () => { expect(response).toEqual(data); }); + test('test method listMemberships()', async () => { + const data = { + total: 5, + memberships: [], + }; + mockedFetch.mockImplementation(() => Response.json(data)); + const response = await account.listMemberships(); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); test('test method updateMFA()', async () => { const data = { $id: '5e5ea5c16897e', diff --git a/test/services/databases.test.js b/test/services/databases.test.js index 502bcb0..8bc6447 100644 --- a/test/services/databases.test.js +++ b/test/services/databases.test.js @@ -28,6 +28,7 @@ describe('Databases', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -136,6 +137,7 @@ describe('Databases', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -153,6 +155,7 @@ describe('Databases', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -197,6 +200,7 @@ describe('Databases', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -224,6 +228,7 @@ describe('Databases', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -250,6 +255,7 @@ describe('Databases', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -300,6 +306,7 @@ describe('Databases', () => { test('test method createBigIntAttribute()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'bigint', status: 'available', error: 'string', @@ -323,6 +330,7 @@ describe('Databases', () => { test('test method updateBigIntAttribute()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'bigint', status: 'available', error: 'string', @@ -347,6 +355,7 @@ describe('Databases', () => { test('test method createBooleanAttribute()', async () => { const data = { key: 'isEnabled', + description: 'Name shown on the public profile.', type: 'boolean', status: 'available', error: 'string', @@ -370,6 +379,7 @@ describe('Databases', () => { test('test method updateBooleanAttribute()', async () => { const data = { key: 'isEnabled', + description: 'Name shown on the public profile.', type: 'boolean', status: 'available', error: 'string', @@ -394,6 +404,7 @@ describe('Databases', () => { test('test method createDatetimeAttribute()', async () => { const data = { key: 'birthDay', + description: 'Name shown on the public profile.', type: 'datetime', status: 'available', error: 'string', @@ -418,6 +429,7 @@ describe('Databases', () => { test('test method updateDatetimeAttribute()', async () => { const data = { key: 'birthDay', + description: 'Name shown on the public profile.', type: 'datetime', status: 'available', error: 'string', @@ -443,6 +455,7 @@ describe('Databases', () => { test('test method createEmailAttribute()', async () => { const data = { key: 'userEmail', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -467,6 +480,7 @@ describe('Databases', () => { test('test method updateEmailAttribute()', async () => { const data = { key: 'userEmail', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -492,6 +506,7 @@ describe('Databases', () => { test('test method createEnumAttribute()', async () => { const data = { key: 'status', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -518,6 +533,7 @@ describe('Databases', () => { test('test method updateEnumAttribute()', async () => { const data = { key: 'status', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -545,6 +561,7 @@ describe('Databases', () => { test('test method createFloatAttribute()', async () => { const data = { key: 'percentageCompleted', + description: 'Name shown on the public profile.', type: 'double', status: 'available', error: 'string', @@ -568,6 +585,7 @@ describe('Databases', () => { test('test method updateFloatAttribute()', async () => { const data = { key: 'percentageCompleted', + description: 'Name shown on the public profile.', type: 'double', status: 'available', error: 'string', @@ -592,6 +610,7 @@ describe('Databases', () => { test('test method createIntegerAttribute()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'integer', status: 'available', error: 'string', @@ -615,6 +634,7 @@ describe('Databases', () => { test('test method updateIntegerAttribute()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'integer', status: 'available', error: 'string', @@ -639,6 +659,7 @@ describe('Databases', () => { test('test method createIpAttribute()', async () => { const data = { key: 'ipAddress', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -663,6 +684,7 @@ describe('Databases', () => { test('test method updateIpAttribute()', async () => { const data = { key: 'ipAddress', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -688,6 +710,7 @@ describe('Databases', () => { test('test method createLineAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -711,6 +734,7 @@ describe('Databases', () => { test('test method updateLineAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -734,6 +758,7 @@ describe('Databases', () => { test('test method createLongtextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -757,6 +782,7 @@ describe('Databases', () => { test('test method updateLongtextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -781,6 +807,7 @@ describe('Databases', () => { test('test method createMediumtextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -804,6 +831,7 @@ describe('Databases', () => { test('test method updateMediumtextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -828,6 +856,7 @@ describe('Databases', () => { test('test method createPointAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -851,6 +880,7 @@ describe('Databases', () => { test('test method updatePointAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -874,6 +904,7 @@ describe('Databases', () => { test('test method createPolygonAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -897,6 +928,7 @@ describe('Databases', () => { test('test method updatePolygonAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -920,6 +952,7 @@ describe('Databases', () => { test('test method createRelationshipAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -949,6 +982,7 @@ describe('Databases', () => { test('test method updateRelationshipAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -977,6 +1011,7 @@ describe('Databases', () => { test('test method createStringAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1002,6 +1037,7 @@ describe('Databases', () => { test('test method updateStringAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1027,6 +1063,7 @@ describe('Databases', () => { test('test method createTextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1050,6 +1087,7 @@ describe('Databases', () => { test('test method updateTextAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1074,6 +1112,7 @@ describe('Databases', () => { test('test method createUrlAttribute()', async () => { const data = { key: 'githubUrl', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1098,6 +1137,7 @@ describe('Databases', () => { test('test method updateUrlAttribute()', async () => { const data = { key: 'githubUrl', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1123,6 +1163,7 @@ describe('Databases', () => { test('test method createVarcharAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1148,6 +1189,7 @@ describe('Databases', () => { test('test method updateVarcharAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1173,6 +1215,7 @@ describe('Databases', () => { test('test method getAttribute()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1312,6 +1355,22 @@ describe('Databases', () => { expect(response).toEqual(data); }); + test('test method createQuery()', async () => { + const data = { + total: 5, + documents: [], + }; + mockedFetch.mockImplementation(() => Response.json(data)); + const response = await databases.createQuery( + '', + '', + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); test('test method getDocument()', async () => { const data = { $id: '5e5ea5c16897e', @@ -1460,6 +1519,7 @@ describe('Databases', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', @@ -1486,6 +1546,7 @@ describe('Databases', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', diff --git a/test/services/documents-d-b.test.js b/test/services/documents-d-b.test.js index b56872d..8a1fa5b 100644 --- a/test/services/documents-d-b.test.js +++ b/test/services/documents-d-b.test.js @@ -28,6 +28,7 @@ describe('DocumentsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -151,6 +152,7 @@ describe('DocumentsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -168,6 +170,7 @@ describe('DocumentsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -212,6 +215,7 @@ describe('DocumentsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -239,6 +243,7 @@ describe('DocumentsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -265,6 +270,7 @@ describe('DocumentsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -402,6 +408,22 @@ describe('DocumentsDB', () => { expect(response).toEqual(data); }); + test('test method createQuery()', async () => { + const data = { + total: 5, + documents: [], + }; + mockedFetch.mockImplementation(() => Response.json(data)); + const response = await documentsDB.createQuery( + '', + '', + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); test('test method getDocument()', async () => { const data = { $id: '5e5ea5c16897e', @@ -550,6 +572,7 @@ describe('DocumentsDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', @@ -576,6 +599,7 @@ describe('DocumentsDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', diff --git a/test/services/functions.test.js b/test/services/functions.test.js index 78f0a33..231282f 100644 --- a/test/services/functions.test.js +++ b/test/services/functions.test.js @@ -32,6 +32,7 @@ describe('Functions', () => { $updatedAt: '2020-10-15T06:38:00.000+00:00', execute: [], name: 'My Function', + description: 'Sends a welcome email to newly registered users.', enabled: true, live: true, logging: true, @@ -106,6 +107,7 @@ describe('Functions', () => { $updatedAt: '2020-10-15T06:38:00.000+00:00', execute: [], name: 'My Function', + description: 'Sends a welcome email to newly registered users.', enabled: true, live: true, logging: true, @@ -150,6 +152,7 @@ describe('Functions', () => { $updatedAt: '2020-10-15T06:38:00.000+00:00', execute: [], name: 'My Function', + description: 'Sends a welcome email to newly registered users.', enabled: true, live: true, logging: true, @@ -204,6 +207,7 @@ describe('Functions', () => { $updatedAt: '2020-10-15T06:38:00.000+00:00', execute: [], name: 'My Function', + description: 'Sends a welcome email to newly registered users.', enabled: true, live: true, logging: true, @@ -659,6 +663,7 @@ describe('Functions', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -683,6 +688,7 @@ describe('Functions', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -705,6 +711,7 @@ describe('Functions', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', diff --git a/test/services/messaging.test.js b/test/services/messaging.test.js index 3ffc4e3..084a603 100644 --- a/test/services/messaging.test.js +++ b/test/services/messaging.test.js @@ -963,6 +963,7 @@ describe('Messaging', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'events', + description: 'Order status updates sent to customers.', emailTotal: 100, smsTotal: 100, pushTotal: 100, @@ -982,6 +983,7 @@ describe('Messaging', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'events', + description: 'Order status updates sent to customers.', emailTotal: 100, smsTotal: 100, pushTotal: 100, @@ -1001,6 +1003,7 @@ describe('Messaging', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'events', + description: 'Order status updates sent to customers.', emailTotal: 100, smsTotal: 100, pushTotal: 100, diff --git a/test/services/organization.test.js b/test/services/organization.test.js index e955287..9c92cb6 100644 --- a/test/services/organization.test.js +++ b/test/services/organization.test.js @@ -422,6 +422,7 @@ describe('Organization', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', @@ -446,6 +447,7 @@ describe('Organization', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', @@ -469,6 +471,7 @@ describe('Organization', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', diff --git a/test/services/project.test.js b/test/services/project.test.js index 13066dc..d6f2eea 100644 --- a/test/services/project.test.js +++ b/test/services/project.test.js @@ -254,6 +254,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', @@ -274,6 +275,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', @@ -294,6 +296,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My API Key', + description: 'Used by the nightly backup job.', expire: '2020-10-15T06:38:00.000+00:00', scopes: [], secret: '919c2d18fb5d4...a2ae413da83346ad2', @@ -2399,6 +2402,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -2422,6 +2426,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -2441,6 +2446,7 @@ describe('Project', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', diff --git a/test/services/sites.test.js b/test/services/sites.test.js index cf30e82..d0644f7 100644 --- a/test/services/sites.test.js +++ b/test/services/sites.test.js @@ -31,6 +31,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Site', + description: 'Marketing site for the spring launch.', enabled: true, live: true, logging: true, @@ -108,6 +109,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Site', + description: 'Marketing site for the spring launch.', enabled: true, live: true, logging: true, @@ -154,6 +156,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Site', + description: 'Marketing site for the spring launch.', enabled: true, live: true, logging: true, @@ -210,6 +213,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Site', + description: 'Marketing site for the spring launch.', enabled: true, live: true, logging: true, @@ -632,6 +636,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -656,6 +661,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', @@ -675,6 +681,7 @@ describe('Sites', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'API_KEY', + description: 'Stripe secret key used at checkout.', value: 'myPa\\$\\$word1', secret: true, resourceType: 'function', diff --git a/test/services/storage.test.js b/test/services/storage.test.js index b46b168..9397e54 100644 --- a/test/services/storage.test.js +++ b/test/services/storage.test.js @@ -33,6 +33,7 @@ describe('Storage', () => { $permissions: [], fileSecurity: true, name: 'Documents', + description: 'Invoices and receipts uploaded by customers.', enabled: true, maximumFileSize: 100, allowedFileExtensions: [], @@ -40,6 +41,7 @@ describe('Storage', () => { encryption: true, antivirus: true, transformations: true, + stripMetadata: true, totalSize: 128, }; mockedFetch.mockImplementation(() => Response.json(data)); @@ -58,6 +60,7 @@ describe('Storage', () => { $permissions: [], fileSecurity: true, name: 'Documents', + description: 'Invoices and receipts uploaded by customers.', enabled: true, maximumFileSize: 100, allowedFileExtensions: [], @@ -65,6 +68,7 @@ describe('Storage', () => { encryption: true, antivirus: true, transformations: true, + stripMetadata: true, totalSize: 128, }; mockedFetch.mockImplementation(() => Response.json(data)); @@ -83,6 +87,7 @@ describe('Storage', () => { $permissions: [], fileSecurity: true, name: 'Documents', + description: 'Invoices and receipts uploaded by customers.', enabled: true, maximumFileSize: 100, allowedFileExtensions: [], @@ -90,6 +95,7 @@ describe('Storage', () => { encryption: true, antivirus: true, transformations: true, + stripMetadata: true, totalSize: 128, }; mockedFetch.mockImplementation(() => Response.json(data)); diff --git a/test/services/tables-d-b.test.js b/test/services/tables-d-b.test.js index 6320233..a182489 100644 --- a/test/services/tables-d-b.test.js +++ b/test/services/tables-d-b.test.js @@ -28,6 +28,7 @@ describe('TablesDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -149,6 +150,7 @@ describe('TablesDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -166,6 +168,7 @@ describe('TablesDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -438,6 +441,7 @@ describe('TablesDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Table', + description: 'Movies available in the catalog.', enabled: true, rowSecurity: true, columns: [], @@ -465,6 +469,7 @@ describe('TablesDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Table', + description: 'Movies available in the catalog.', enabled: true, rowSecurity: true, columns: [], @@ -488,6 +493,7 @@ describe('TablesDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Table', + description: 'Movies available in the catalog.', enabled: true, rowSecurity: true, columns: [], @@ -538,6 +544,7 @@ describe('TablesDB', () => { test('test method createBigIntColumn()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'bigint', status: 'available', error: 'string', @@ -561,6 +568,7 @@ describe('TablesDB', () => { test('test method updateBigIntColumn()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'bigint', status: 'available', error: 'string', @@ -585,6 +593,7 @@ describe('TablesDB', () => { test('test method createBooleanColumn()', async () => { const data = { key: 'isEnabled', + description: 'Name shown on the public profile.', type: 'boolean', status: 'available', error: 'string', @@ -608,6 +617,7 @@ describe('TablesDB', () => { test('test method updateBooleanColumn()', async () => { const data = { key: 'isEnabled', + description: 'Name shown on the public profile.', type: 'boolean', status: 'available', error: 'string', @@ -632,6 +642,7 @@ describe('TablesDB', () => { test('test method createDatetimeColumn()', async () => { const data = { key: 'birthDay', + description: 'Name shown on the public profile.', type: 'datetime', status: 'available', error: 'string', @@ -656,6 +667,7 @@ describe('TablesDB', () => { test('test method updateDatetimeColumn()', async () => { const data = { key: 'birthDay', + description: 'Name shown on the public profile.', type: 'datetime', status: 'available', error: 'string', @@ -681,6 +693,7 @@ describe('TablesDB', () => { test('test method createEmailColumn()', async () => { const data = { key: 'userEmail', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -705,6 +718,7 @@ describe('TablesDB', () => { test('test method updateEmailColumn()', async () => { const data = { key: 'userEmail', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -730,6 +744,7 @@ describe('TablesDB', () => { test('test method createEnumColumn()', async () => { const data = { key: 'status', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -756,6 +771,7 @@ describe('TablesDB', () => { test('test method updateEnumColumn()', async () => { const data = { key: 'status', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -783,6 +799,7 @@ describe('TablesDB', () => { test('test method createFloatColumn()', async () => { const data = { key: 'percentageCompleted', + description: 'Name shown on the public profile.', type: 'double', status: 'available', error: 'string', @@ -806,6 +823,7 @@ describe('TablesDB', () => { test('test method updateFloatColumn()', async () => { const data = { key: 'percentageCompleted', + description: 'Name shown on the public profile.', type: 'double', status: 'available', error: 'string', @@ -830,6 +848,7 @@ describe('TablesDB', () => { test('test method createIntegerColumn()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'integer', status: 'available', error: 'string', @@ -853,6 +872,7 @@ describe('TablesDB', () => { test('test method updateIntegerColumn()', async () => { const data = { key: 'count', + description: 'Name shown on the public profile.', type: 'integer', status: 'available', error: 'string', @@ -877,6 +897,7 @@ describe('TablesDB', () => { test('test method createIpColumn()', async () => { const data = { key: 'ipAddress', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -901,6 +922,7 @@ describe('TablesDB', () => { test('test method updateIpColumn()', async () => { const data = { key: 'ipAddress', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -926,6 +948,7 @@ describe('TablesDB', () => { test('test method createLineColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -949,6 +972,7 @@ describe('TablesDB', () => { test('test method updateLineColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -972,6 +996,7 @@ describe('TablesDB', () => { test('test method createLongtextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -995,6 +1020,7 @@ describe('TablesDB', () => { test('test method updateLongtextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1019,6 +1045,7 @@ describe('TablesDB', () => { test('test method createMediumtextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1042,6 +1069,7 @@ describe('TablesDB', () => { test('test method updateMediumtextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1066,6 +1094,7 @@ describe('TablesDB', () => { test('test method createPointColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1089,6 +1118,7 @@ describe('TablesDB', () => { test('test method updatePointColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1112,6 +1142,7 @@ describe('TablesDB', () => { test('test method createPolygonColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1135,6 +1166,7 @@ describe('TablesDB', () => { test('test method updatePolygonColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1158,6 +1190,7 @@ describe('TablesDB', () => { test('test method createRelationshipColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1187,6 +1220,7 @@ describe('TablesDB', () => { test('test method updateRelationshipColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1215,6 +1249,7 @@ describe('TablesDB', () => { test('test method createStringColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1240,6 +1275,7 @@ describe('TablesDB', () => { test('test method updateStringColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1265,6 +1301,7 @@ describe('TablesDB', () => { test('test method createTextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1288,6 +1325,7 @@ describe('TablesDB', () => { test('test method updateTextColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1312,6 +1350,7 @@ describe('TablesDB', () => { test('test method createUrlColumn()', async () => { const data = { key: 'githubUrl', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1336,6 +1375,7 @@ describe('TablesDB', () => { test('test method updateUrlColumn()', async () => { const data = { key: 'githubUrl', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1361,6 +1401,7 @@ describe('TablesDB', () => { test('test method createVarcharColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1386,6 +1427,7 @@ describe('TablesDB', () => { test('test method updateVarcharColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1411,6 +1453,7 @@ describe('TablesDB', () => { test('test method getColumn()', async () => { const data = { key: 'fullName', + description: 'Name shown on the public profile.', type: 'string', status: 'available', error: 'string', @@ -1467,6 +1510,7 @@ describe('TablesDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', @@ -1493,6 +1537,7 @@ describe('TablesDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', @@ -1627,6 +1672,22 @@ describe('TablesDB', () => { expect(response).toEqual(data); }); + test('test method createQuery()', async () => { + const data = { + total: 5, + rows: [], + }; + mockedFetch.mockImplementation(() => Response.json(data)); + const response = await tablesDB.createQuery( + '', + '', + ); + + // Remove custom toString method on the objects to allow for clean data comparison. + delete response.toString; + + expect(response).toEqual(data); + }); test('test method getRow()', async () => { const data = { $id: '5e5ea5c16897e', diff --git a/test/services/vectors-d-b.test.js b/test/services/vectors-d-b.test.js index 4fe8681..79dcf15 100644 --- a/test/services/vectors-d-b.test.js +++ b/test/services/vectors-d-b.test.js @@ -28,6 +28,7 @@ describe('VectorsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -149,6 +150,7 @@ describe('VectorsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -166,6 +168,7 @@ describe('VectorsDB', () => { const data = { $id: '5e5ea5c16897e', name: 'My Database', + description: 'Customer orders and invoices.', $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', enabled: true, @@ -210,6 +213,7 @@ describe('VectorsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -239,6 +243,7 @@ describe('VectorsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -266,6 +271,7 @@ describe('VectorsDB', () => { $permissions: [], databaseId: '5e5ea5c16897e', name: 'My Collection', + description: 'Movies available in the catalog.', enabled: true, documentSecurity: true, attributes: [], @@ -522,6 +528,7 @@ describe('VectorsDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', @@ -548,6 +555,7 @@ describe('VectorsDB', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', key: 'index1', + description: 'Speeds up lookups by email.', type: 'primary', status: 'available', error: 'string', diff --git a/test/services/webhooks.test.js b/test/services/webhooks.test.js index d232fb5..2fbaba7 100644 --- a/test/services/webhooks.test.js +++ b/test/services/webhooks.test.js @@ -30,6 +30,7 @@ describe('Webhooks', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Webhook', + description: 'Notifies the billing service about new users.', url: 'https://example.com/webhook', events: [], tls: true, @@ -59,6 +60,7 @@ describe('Webhooks', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Webhook', + description: 'Notifies the billing service about new users.', url: 'https://example.com/webhook', events: [], tls: true, @@ -83,6 +85,7 @@ describe('Webhooks', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Webhook', + description: 'Notifies the billing service about new users.', url: 'https://example.com/webhook', events: [], tls: true, @@ -122,6 +125,7 @@ describe('Webhooks', () => { $createdAt: '2020-10-15T06:38:00.000+00:00', $updatedAt: '2020-10-15T06:38:00.000+00:00', name: 'My Webhook', + description: 'Notifies the billing service about new users.', url: 'https://example.com/webhook', events: [], tls: true,