Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 15 additions & 0 deletions docs/examples/account/list-memberships.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // 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
});
```
1 change: 1 addition & 0 deletions docs/examples/activities/list-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const activities = new sdk.Activities(client);

const result = await activities.listEvents({
queries: [], // optional
total: false, // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/backups/list-archives.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const backups = new sdk.Backups(client);

const result = await backups.listArchives({
queries: [], // optional
total: false, // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/backups/list-policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const backups = new sdk.Backups(client);

const result = await backups.listPolicies({
queries: [], // optional
total: false, // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/backups/list-restorations.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ const backups = new sdk.Backups(client);

const result = await backups.listRestorations({
queries: [], // optional
total: false, // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-big-int-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const result = await databases.createBigIntAttribute({
max: 1000000, // optional
xdefault: 0, // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-boolean-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.createBooleanAttribute({
required: false,
xdefault: false, // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const result = await databases.createCollection({
enabled: false, // optional
attributes: [], // optional
indexes: [], // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-email-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.createEmailAttribute({
required: false,
xdefault: 'email@example.com', // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-enum-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const result = await databases.createEnumAttribute({
required: false,
xdefault: 'active', // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-float-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const result = await databases.createFloatAttribute({
max: 100, // optional
xdefault: 10.5, // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const result = await databases.createIndex({
attributes: ['username'],
orders: [sdk.OrderBy.Asc], // optional
lengths: [], // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-integer-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const result = await databases.createIntegerAttribute({
max: 100, // optional
xdefault: 10, // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-ip-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.createIpAttribute({
required: false,
xdefault: '192.0.2.0', // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ const result = await databases.createLineAttribute({
[3, 4],
[5, 6],
], // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-longtext-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const result = await databases.createLongtextAttribute({
xdefault: 'Hello World', // optional
array: false, // optional
encrypt: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-mediumtext-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const result = await databases.createMediumtextAttribute({
xdefault: 'Hello World', // optional
array: false, // optional
encrypt: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ const result = await databases.createPointAttribute({
key: '<KEY>',
required: false,
xdefault: [1, 2], // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ const result = await databases.createPolygonAttribute({
[1, 2],
],
], // optional
description: '<DESCRIPTION>', // optional
});
```
19 changes: 19 additions & 0 deletions docs/examples/databases/create-query.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```javascript
const sdk = require('node-appwrite');

const client = new sdk.Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with

const databases = new sdk.Databases(client);

const result = await databases.createQuery({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: [], // optional
transactionId: '<TRANSACTION_ID>', // optional
total: false, // optional
ttl: 0, // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-relationship-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const result = await databases.createRelationshipAttribute({
key: '<KEY>', // optional
twoWayKey: '<TWO_WAY_KEY>', // optional
onDelete: sdk.RelationMutate.Cascade, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-string-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const result = await databases.createStringAttribute({
xdefault: 'Hello World', // optional
array: false, // optional
encrypt: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-text-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const result = await databases.createTextAttribute({
xdefault: 'Hello World', // optional
array: false, // optional
encrypt: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-url-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.createUrlAttribute({
required: false,
xdefault: 'https://example.com', // optional
array: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create-varchar-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const result = await databases.createVarcharAttribute({
xdefault: 'Hello World', // optional
array: false, // optional
encrypt: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ const result = await databases.create({
databaseId: '<DATABASE_ID>',
name: '<NAME>',
enabled: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-big-int-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const result = await databases.updateBigIntAttribute({
min: 0, // optional
max: 1000000, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-boolean-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.updateBooleanAttribute({
required: false,
xdefault: false,
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const result = await databases.updateCollection({
documentSecurity: false, // optional
enabled: false, // optional
purge: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.updateDatetimeAttribute({
required: false,
xdefault: '2020-10-15T06:38:00.000+00:00',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-email-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.updateEmailAttribute({
required: false,
xdefault: 'email@example.com',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-enum-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const result = await databases.updateEnumAttribute({
required: false,
xdefault: 'active',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-float-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const result = await databases.updateFloatAttribute({
min: 0, // optional
max: 100, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-integer-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const result = await databases.updateIntegerAttribute({
min: 0, // optional
max: 100, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-ip-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.updateIpAttribute({
required: false,
xdefault: '192.0.2.0',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ const result = await databases.updateLineAttribute({
[5, 6],
], // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-longtext-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.updateLongtextAttribute({
required: false,
xdefault: 'Hello World',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-mediumtext-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.updateMediumtextAttribute({
required: false,
xdefault: 'Hello World',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.updatePointAttribute({
required: false,
xdefault: [1, 2], // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ const result = await databases.updatePolygonAttribute({
],
], // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-relationship-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ const result = await databases.updateRelationshipAttribute({
key: '<KEY>',
onDelete: sdk.RelationMutate.Cascade, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-string-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const result = await databases.updateStringAttribute({
xdefault: 'Hello World',
size: 1, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-text-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.updateTextAttribute({
required: false,
xdefault: 'Hello World',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-url-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ const result = await databases.updateUrlAttribute({
required: false,
xdefault: 'https://example.com',
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update-varchar-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const result = await databases.updateVarcharAttribute({
xdefault: 'Hello World',
size: 1, // optional
newKey: '<NEW_KEY>', // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/databases/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ const result = await databases.update({
databaseId: '<DATABASE_ID>',
name: '<NAME>', // optional
enabled: false, // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/documentsdb/create-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ const result = await documentsDB.createCollection({
enabled: false, // optional
attributes: [], // optional
indexes: [], // optional
description: '<DESCRIPTION>', // optional
});
```
1 change: 1 addition & 0 deletions docs/examples/documentsdb/create-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ const result = await documentsDB.createIndex({
attributes: ['username'],
orders: [sdk.OrderBy.Asc], // optional
lengths: [], // optional
description: '<DESCRIPTION>', // optional
});
```
Loading