diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 47ba2484..e6ea266e 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@v4
- name: Use Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v4
with:
node-version: '24.14.1'
registry-url: 'https://registry.npmjs.org'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6c0f0a1a..01e735ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# Change Log
+## 12.2.0
+
+* Added: Introduced `bigint` create/update APIs for legacy Databases attributes
+* Added: Introduced `bigint` create/update APIs for `TablesDB` columns
+* Updated: Extended key-list query filters with `key`, `resourceType`, `resourceId`, and `secret`
+
## 12.1.0
* Added: `setSession` method on `Client` for `X-Appwrite-Session` authentication
diff --git a/README.md b/README.md
index 5fe2f0fd..4341de8f 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# Appwrite Console SDK

-
+
[](https://travis-ci.com/appwrite/sdk-generator)
[](https://twitter.com/appwrite)
[](https://appwrite.io/discord)
@@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
To install with a CDN (content delivery network) add the following scripts to the bottom of your
tag, but before you use any Appwrite services:
```html
-
+
```
diff --git a/docs/examples/console/create-program-membership.md b/docs/examples/console/create-program-membership.md
index 23ed45d7..fa19b0c8 100644
--- a/docs/examples/console/create-program-membership.md
+++ b/docs/examples/console/create-program-membership.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.createProgramMembership({
+const result = await console.createProgramMembership({
programId: ''
});
diff --git a/docs/examples/console/create-source.md b/docs/examples/console/create-source.md
index b6307b1d..a5283da5 100644
--- a/docs/examples/console/create-source.md
+++ b/docs/examples/console/create-source.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.createSource({
+const result = await console.createSource({
ref: '[', // optional
referrer: 'https://example.com', // optional
utmSource: '', // optional
diff --git a/docs/examples/console/get-campaign.md b/docs/examples/console/get-campaign.md
index e9d41aeb..703c6e31 100644
--- a/docs/examples/console/get-campaign.md
+++ b/docs/examples/console/get-campaign.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.getCampaign({
+const result = await console.getCampaign({
campaignId: ''
});
diff --git a/docs/examples/console/get-coupon.md b/docs/examples/console/get-coupon.md
index 716d26a5..74c7a579 100644
--- a/docs/examples/console/get-coupon.md
+++ b/docs/examples/console/get-coupon.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.getCoupon({
+const result = await console.getCoupon({
couponId: ''
});
diff --git a/docs/examples/console/get-plan.md b/docs/examples/console/get-plan.md
index 7171de67..4c860725 100644
--- a/docs/examples/console/get-plan.md
+++ b/docs/examples/console/get-plan.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.getPlan({
+const result = await console.getPlan({
planId: ''
});
diff --git a/docs/examples/console/get-plans.md b/docs/examples/console/get-plans.md
index c5d846a4..546c7286 100644
--- a/docs/examples/console/get-plans.md
+++ b/docs/examples/console/get-plans.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.getPlans({
+const result = await console.getPlans({
platform: Platform.Appwrite // optional
});
diff --git a/docs/examples/console/get-program.md b/docs/examples/console/get-program.md
index 5e19bcf0..038cf5f3 100644
--- a/docs/examples/console/get-program.md
+++ b/docs/examples/console/get-program.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.getProgram({
+const result = await console.getProgram({
programId: ''
});
diff --git a/docs/examples/console/get-resource.md b/docs/examples/console/get-resource.md
index 699a83dd..706d96ea 100644
--- a/docs/examples/console/get-resource.md
+++ b/docs/examples/console/get-resource.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.getResource({
+const result = await console.getResource({
value: '',
type: ConsoleResourceType.Rules
});
diff --git a/docs/examples/console/list-o-auth-2-providers.md b/docs/examples/console/list-o-auth-2-providers.md
index 278d16da..d26800b2 100644
--- a/docs/examples/console/list-o-auth-2-providers.md
+++ b/docs/examples/console/list-o-auth-2-providers.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.listOAuth2Providers();
+const result = await console.listOAuth2Providers();
console.log(result);
```
diff --git a/docs/examples/console/list-project-scopes.md b/docs/examples/console/list-project-scopes.md
index f59300a3..b1cb8034 100644
--- a/docs/examples/console/list-project-scopes.md
+++ b/docs/examples/console/list-project-scopes.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.listProjectScopes();
+const result = await console.listProjectScopes();
console.log(result);
```
diff --git a/docs/examples/console/list-regions.md b/docs/examples/console/list-regions.md
index ef750a85..5d49fee7 100644
--- a/docs/examples/console/list-regions.md
+++ b/docs/examples/console/list-regions.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.listRegions();
+const result = await console.listRegions();
console.log(result);
```
diff --git a/docs/examples/console/suggest-columns.md b/docs/examples/console/suggest-columns.md
index 50e866ed..32daa104 100644
--- a/docs/examples/console/suggest-columns.md
+++ b/docs/examples/console/suggest-columns.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.suggestColumns({
+const result = await console.suggestColumns({
databaseId: '',
tableId: '',
context: '', // optional
diff --git a/docs/examples/console/suggest-indexes.md b/docs/examples/console/suggest-indexes.md
index 3014fc3d..e59e3377 100644
--- a/docs/examples/console/suggest-indexes.md
+++ b/docs/examples/console/suggest-indexes.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.suggestIndexes({
+const result = await console.suggestIndexes({
databaseId: '',
tableId: '',
min: 1, // optional
diff --git a/docs/examples/console/suggest-queries.md b/docs/examples/console/suggest-queries.md
index cbffccc2..7e00cea7 100644
--- a/docs/examples/console/suggest-queries.md
+++ b/docs/examples/console/suggest-queries.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.suggestQueries({
+const result = await console.suggestQueries({
resource: QuerySuggestionResource.Activities,
input: '',
databaseId: '', // optional
diff --git a/docs/examples/console/variables.md b/docs/examples/console/variables.md
index 3eafec11..d8c4077d 100644
--- a/docs/examples/console/variables.md
+++ b/docs/examples/console/variables.md
@@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
.setProject(''); // Your project ID
-const xconsole = new Console(client);
+const console = new Console(client);
-const result = await xconsole.variables();
+const result = await console.variables();
console.log(result);
```
diff --git a/docs/examples/databases/create-big-int-attribute.md b/docs/examples/databases/create-big-int-attribute.md
new file mode 100644
index 00000000..f122c7c4
--- /dev/null
+++ b/docs/examples/databases/create-big-int-attribute.md
@@ -0,0 +1,22 @@
+```javascript
+import { Client, Databases } from "@appwrite.io/console";
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const databases = new Databases(client);
+
+const result = await databases.createBigIntAttribute({
+ databaseId: '',
+ collectionId: '',
+ key: '',
+ required: false,
+ min: null, // optional
+ max: null, // optional
+ xdefault: null, // optional
+ array: false // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md
index 42bfa489..08c3b1b3 100644
--- a/docs/examples/databases/create-boolean-attribute.md
+++ b/docs/examples/databases/create-boolean-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.createBooleanAttribute({
collectionId: '',
key: '',
required: false,
- default: false, // optional
+ xdefault: false, // optional
array: false // optional
});
diff --git a/docs/examples/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md
index b7ba76dd..65849d9a 100644
--- a/docs/examples/databases/create-datetime-attribute.md
+++ b/docs/examples/databases/create-datetime-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.createDatetimeAttribute({
collectionId: '',
key: '',
required: false,
- default: '2020-10-15T06:38:00.000+00:00', // optional
+ xdefault: '2020-10-15T06:38:00.000+00:00', // optional
array: false // optional
});
diff --git a/docs/examples/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md
index 2e519cec..d4b61f88 100644
--- a/docs/examples/databases/create-email-attribute.md
+++ b/docs/examples/databases/create-email-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.createEmailAttribute({
collectionId: '',
key: '',
required: false,
- default: 'email@example.com', // optional
+ xdefault: 'email@example.com', // optional
array: false // optional
});
diff --git a/docs/examples/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md
index 25e914a1..57794717 100644
--- a/docs/examples/databases/create-enum-attribute.md
+++ b/docs/examples/databases/create-enum-attribute.md
@@ -13,7 +13,7 @@ const result = await databases.createEnumAttribute({
key: '',
elements: [],
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false // optional
});
diff --git a/docs/examples/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md
index 0234ad10..2b47891d 100644
--- a/docs/examples/databases/create-float-attribute.md
+++ b/docs/examples/databases/create-float-attribute.md
@@ -14,7 +14,7 @@ const result = await databases.createFloatAttribute({
required: false,
min: null, // optional
max: null, // optional
- default: null, // optional
+ xdefault: null, // optional
array: false // optional
});
diff --git a/docs/examples/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md
index fad81d79..346d3c42 100644
--- a/docs/examples/databases/create-integer-attribute.md
+++ b/docs/examples/databases/create-integer-attribute.md
@@ -14,7 +14,7 @@ const result = await databases.createIntegerAttribute({
required: false,
min: null, // optional
max: null, // optional
- default: null, // optional
+ xdefault: null, // optional
array: false // optional
});
diff --git a/docs/examples/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md
index 1aa3a6c1..028ce6d8 100644
--- a/docs/examples/databases/create-ip-attribute.md
+++ b/docs/examples/databases/create-ip-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.createIpAttribute({
collectionId: '',
key: '',
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false // optional
});
diff --git a/docs/examples/databases/create-line-attribute.md b/docs/examples/databases/create-line-attribute.md
index 2ea9e813..4edfa325 100644
--- a/docs/examples/databases/create-line-attribute.md
+++ b/docs/examples/databases/create-line-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.createLineAttribute({
collectionId: '',
key: '',
required: false,
- default: [[1, 2], [3, 4], [5, 6]] // optional
+ xdefault: [[1, 2], [3, 4], [5, 6]] // optional
});
console.log(result);
diff --git a/docs/examples/databases/create-longtext-attribute.md b/docs/examples/databases/create-longtext-attribute.md
index 2a453501..69e397a6 100644
--- a/docs/examples/databases/create-longtext-attribute.md
+++ b/docs/examples/databases/create-longtext-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.createLongtextAttribute({
collectionId: '',
key: '',
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false, // optional
encrypt: false // optional
});
diff --git a/docs/examples/databases/create-mediumtext-attribute.md b/docs/examples/databases/create-mediumtext-attribute.md
index 6d47b00f..2f0a47bb 100644
--- a/docs/examples/databases/create-mediumtext-attribute.md
+++ b/docs/examples/databases/create-mediumtext-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.createMediumtextAttribute({
collectionId: '',
key: '',
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false, // optional
encrypt: false // optional
});
diff --git a/docs/examples/databases/create-point-attribute.md b/docs/examples/databases/create-point-attribute.md
index 37b500a1..a42e0961 100644
--- a/docs/examples/databases/create-point-attribute.md
+++ b/docs/examples/databases/create-point-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.createPointAttribute({
collectionId: '',
key: '',
required: false,
- default: [1, 2] // optional
+ xdefault: [1, 2] // optional
});
console.log(result);
diff --git a/docs/examples/databases/create-polygon-attribute.md b/docs/examples/databases/create-polygon-attribute.md
index 736e9c52..0c1be0f2 100644
--- a/docs/examples/databases/create-polygon-attribute.md
+++ b/docs/examples/databases/create-polygon-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.createPolygonAttribute({
collectionId: '',
key: '',
required: false,
- default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional
+ xdefault: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional
});
console.log(result);
diff --git a/docs/examples/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md
index e5a3de86..2c33d118 100644
--- a/docs/examples/databases/create-string-attribute.md
+++ b/docs/examples/databases/create-string-attribute.md
@@ -13,7 +13,7 @@ const result = await databases.createStringAttribute({
key: '',
size: 1,
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false, // optional
encrypt: false // optional
});
diff --git a/docs/examples/databases/create-text-attribute.md b/docs/examples/databases/create-text-attribute.md
index d883c36b..e301a34b 100644
--- a/docs/examples/databases/create-text-attribute.md
+++ b/docs/examples/databases/create-text-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.createTextAttribute({
collectionId: '',
key: '',
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false, // optional
encrypt: false // optional
});
diff --git a/docs/examples/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md
index c059cd8f..3886c900 100644
--- a/docs/examples/databases/create-url-attribute.md
+++ b/docs/examples/databases/create-url-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.createUrlAttribute({
collectionId: '',
key: '',
required: false,
- default: 'https://example.com', // optional
+ xdefault: 'https://example.com', // optional
array: false // optional
});
diff --git a/docs/examples/databases/create-varchar-attribute.md b/docs/examples/databases/create-varchar-attribute.md
index 9b3d2a49..d6a6664f 100644
--- a/docs/examples/databases/create-varchar-attribute.md
+++ b/docs/examples/databases/create-varchar-attribute.md
@@ -13,7 +13,7 @@ const result = await databases.createVarcharAttribute({
key: '',
size: 1,
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false, // optional
encrypt: false // optional
});
diff --git a/docs/examples/databases/update-big-int-attribute.md b/docs/examples/databases/update-big-int-attribute.md
new file mode 100644
index 00000000..48af1566
--- /dev/null
+++ b/docs/examples/databases/update-big-int-attribute.md
@@ -0,0 +1,22 @@
+```javascript
+import { Client, Databases } from "@appwrite.io/console";
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const databases = new Databases(client);
+
+const result = await databases.updateBigIntAttribute({
+ databaseId: '',
+ collectionId: '',
+ key: '',
+ required: false,
+ xdefault: null,
+ min: null, // optional
+ max: null, // optional
+ newKey: '' // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md
index d95cd30e..89b2038b 100644
--- a/docs/examples/databases/update-boolean-attribute.md
+++ b/docs/examples/databases/update-boolean-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateBooleanAttribute({
collectionId: '',
key: '',
required: false,
- default: false,
+ xdefault: false,
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md
index 578d9e35..d83ce78d 100644
--- a/docs/examples/databases/update-datetime-attribute.md
+++ b/docs/examples/databases/update-datetime-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateDatetimeAttribute({
collectionId: '',
key: '',
required: false,
- default: '2020-10-15T06:38:00.000+00:00',
+ xdefault: '2020-10-15T06:38:00.000+00:00',
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md
index d2cbd192..12d6155a 100644
--- a/docs/examples/databases/update-email-attribute.md
+++ b/docs/examples/databases/update-email-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateEmailAttribute({
collectionId: '',
key: '',
required: false,
- default: 'email@example.com',
+ xdefault: 'email@example.com',
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md
index fcc0f84f..660ccef2 100644
--- a/docs/examples/databases/update-enum-attribute.md
+++ b/docs/examples/databases/update-enum-attribute.md
@@ -13,7 +13,7 @@ const result = await databases.updateEnumAttribute({
key: '',
elements: [],
required: false,
- default: '',
+ xdefault: '',
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md
index 4727581e..44b217e1 100644
--- a/docs/examples/databases/update-float-attribute.md
+++ b/docs/examples/databases/update-float-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateFloatAttribute({
collectionId: '',
key: '',
required: false,
- default: null,
+ xdefault: null,
min: null, // optional
max: null, // optional
newKey: '' // optional
diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md
index d3f65130..44060d73 100644
--- a/docs/examples/databases/update-integer-attribute.md
+++ b/docs/examples/databases/update-integer-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateIntegerAttribute({
collectionId: '',
key: '',
required: false,
- default: null,
+ xdefault: null,
min: null, // optional
max: null, // optional
newKey: '' // optional
diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md
index c940c81d..ad835da3 100644
--- a/docs/examples/databases/update-ip-attribute.md
+++ b/docs/examples/databases/update-ip-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateIpAttribute({
collectionId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-line-attribute.md b/docs/examples/databases/update-line-attribute.md
index a7a68785..728e06d2 100644
--- a/docs/examples/databases/update-line-attribute.md
+++ b/docs/examples/databases/update-line-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateLineAttribute({
collectionId: '',
key: '',
required: false,
- default: [[1, 2], [3, 4], [5, 6]], // optional
+ xdefault: [[1, 2], [3, 4], [5, 6]], // optional
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-longtext-attribute.md b/docs/examples/databases/update-longtext-attribute.md
index d92bb148..71424460 100644
--- a/docs/examples/databases/update-longtext-attribute.md
+++ b/docs/examples/databases/update-longtext-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateLongtextAttribute({
collectionId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-mediumtext-attribute.md b/docs/examples/databases/update-mediumtext-attribute.md
index 37474b53..691a346f 100644
--- a/docs/examples/databases/update-mediumtext-attribute.md
+++ b/docs/examples/databases/update-mediumtext-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateMediumtextAttribute({
collectionId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-point-attribute.md b/docs/examples/databases/update-point-attribute.md
index 346fbab1..040c8f68 100644
--- a/docs/examples/databases/update-point-attribute.md
+++ b/docs/examples/databases/update-point-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updatePointAttribute({
collectionId: '',
key: '',
required: false,
- default: [1, 2], // optional
+ xdefault: [1, 2], // optional
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-polygon-attribute.md b/docs/examples/databases/update-polygon-attribute.md
index 13617139..a35fbbd8 100644
--- a/docs/examples/databases/update-polygon-attribute.md
+++ b/docs/examples/databases/update-polygon-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updatePolygonAttribute({
collectionId: '',
key: '',
required: false,
- default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional
+ xdefault: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md
index 56c743ab..1c9e91c5 100644
--- a/docs/examples/databases/update-string-attribute.md
+++ b/docs/examples/databases/update-string-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateStringAttribute({
collectionId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
size: 1, // optional
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-text-attribute.md b/docs/examples/databases/update-text-attribute.md
index f0299e90..e12557e1 100644
--- a/docs/examples/databases/update-text-attribute.md
+++ b/docs/examples/databases/update-text-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateTextAttribute({
collectionId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md
index 3b76a3f0..df026f35 100644
--- a/docs/examples/databases/update-url-attribute.md
+++ b/docs/examples/databases/update-url-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateUrlAttribute({
collectionId: '',
key: '',
required: false,
- default: 'https://example.com',
+ xdefault: 'https://example.com',
newKey: '' // optional
});
diff --git a/docs/examples/databases/update-varchar-attribute.md b/docs/examples/databases/update-varchar-attribute.md
index f369d3e9..0ce1a55a 100644
--- a/docs/examples/databases/update-varchar-attribute.md
+++ b/docs/examples/databases/update-varchar-attribute.md
@@ -12,7 +12,7 @@ const result = await databases.updateVarcharAttribute({
collectionId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
size: 1, // optional
newKey: '' // optional
});
diff --git a/docs/examples/functions/create-execution.md b/docs/examples/functions/create-execution.md
index 4a9f62bb..2707b790 100644
--- a/docs/examples/functions/create-execution.md
+++ b/docs/examples/functions/create-execution.md
@@ -11,7 +11,7 @@ const result = await functions.createExecution({
functionId: '',
body: '', // optional
async: false, // optional
- path: '', // optional
+ xpath: '', // optional
method: ExecutionMethod.GET, // optional
headers: {}, // optional
scheduledAt: '' // optional
diff --git a/docs/examples/functions/create-variable.md b/docs/examples/functions/create-variable.md
index 2310f83d..444a0c6c 100644
--- a/docs/examples/functions/create-variable.md
+++ b/docs/examples/functions/create-variable.md
@@ -9,6 +9,7 @@ const functions = new Functions(client);
const result = await functions.createVariable({
functionId: '',
+ variableId: '',
key: '',
value: '',
secret: false // optional
diff --git a/docs/examples/functions/list-variables.md b/docs/examples/functions/list-variables.md
index 854cff95..9407b8ef 100644
--- a/docs/examples/functions/list-variables.md
+++ b/docs/examples/functions/list-variables.md
@@ -8,7 +8,9 @@ const client = new Client()
const functions = new Functions(client);
const result = await functions.listVariables({
- functionId: ''
+ functionId: '',
+ queries: [], // optional
+ total: false // optional
});
console.log(result);
diff --git a/docs/examples/functions/update-variable.md b/docs/examples/functions/update-variable.md
index 383e9c05..5d7dc9aa 100644
--- a/docs/examples/functions/update-variable.md
+++ b/docs/examples/functions/update-variable.md
@@ -10,7 +10,7 @@ const functions = new Functions(client);
const result = await functions.updateVariable({
functionId: '',
variableId: '',
- key: '',
+ key: '', // optional
value: '', // optional
secret: false // optional
});
diff --git a/docs/examples/migrations/create-appwrite-migration.md b/docs/examples/migrations/create-appwrite-migration.md
index d0f61541..9729806f 100644
--- a/docs/examples/migrations/create-appwrite-migration.md
+++ b/docs/examples/migrations/create-appwrite-migration.md
@@ -1,5 +1,5 @@
```javascript
-import { Client, Migrations, AppwriteMigrationResource } from "@appwrite.io/console";
+import { Client, Migrations, AppwriteMigrationResource, OnDuplicate } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
@@ -11,7 +11,8 @@ const result = await migrations.createAppwriteMigration({
resources: [AppwriteMigrationResource.User],
endpoint: 'https://example.com',
projectId: '',
- apiKey: ''
+ apiKey: '',
+ onDuplicate: OnDuplicate.Fail // optional
});
console.log(result);
diff --git a/docs/examples/migrations/create-csv-import.md b/docs/examples/migrations/create-csv-import.md
index f39b1030..d24792b6 100644
--- a/docs/examples/migrations/create-csv-import.md
+++ b/docs/examples/migrations/create-csv-import.md
@@ -1,5 +1,5 @@
```javascript
-import { Client, Migrations } from "@appwrite.io/console";
+import { Client, Migrations, OnDuplicate } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
@@ -11,7 +11,8 @@ const result = await migrations.createCSVImport({
bucketId: '',
fileId: '',
resourceId: '',
- internalFile: false // optional
+ internalFile: false, // optional
+ onDuplicate: OnDuplicate.Fail // optional
});
console.log(result);
diff --git a/docs/examples/migrations/create-json-import.md b/docs/examples/migrations/create-json-import.md
index d0631117..f55fc8ff 100644
--- a/docs/examples/migrations/create-json-import.md
+++ b/docs/examples/migrations/create-json-import.md
@@ -1,5 +1,5 @@
```javascript
-import { Client, Migrations } from "@appwrite.io/console";
+import { Client, Migrations, OnDuplicate } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
@@ -11,7 +11,8 @@ const result = await migrations.createJSONImport({
bucketId: '',
fileId: '',
resourceId: '',
- internalFile: false // optional
+ internalFile: false, // optional
+ onDuplicate: OnDuplicate.Fail // optional
});
console.log(result);
diff --git a/docs/examples/project/create-ephemeral-key.md b/docs/examples/project/create-ephemeral-key.md
index e1514f60..c41bb809 100644
--- a/docs/examples/project/create-ephemeral-key.md
+++ b/docs/examples/project/create-ephemeral-key.md
@@ -9,7 +9,7 @@ const project = new Project(client);
const result = await project.createEphemeralKey({
scopes: [Scopes.ProjectRead],
- duration: 1
+ duration: 600
});
console.log(result);
diff --git a/docs/examples/project/get-o-auth-2-provider.md b/docs/examples/project/get-o-auth-2-provider.md
index a667c820..cb07b451 100644
--- a/docs/examples/project/get-o-auth-2-provider.md
+++ b/docs/examples/project/get-o-auth-2-provider.md
@@ -1,5 +1,5 @@
```javascript
-import { Client, Project } from "@appwrite.io/console";
+import { Client, Project, OAuthProvider } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
@@ -8,7 +8,7 @@ const client = new Client()
const project = new Project(client);
const result = await project.getOAuth2Provider({
- provider: ''
+ providerId: OAuthProvider.Amazon
});
console.log(result);
diff --git a/docs/examples/project/get-policy.md b/docs/examples/project/get-policy.md
index be9b5151..45fec071 100644
--- a/docs/examples/project/get-policy.md
+++ b/docs/examples/project/get-policy.md
@@ -1,5 +1,5 @@
```javascript
-import { Client, Project, PolicyId } from "@appwrite.io/console";
+import { Client, Project, ProjectPolicy } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
@@ -8,7 +8,7 @@ const client = new Client()
const project = new Project(client);
const result = await project.getPolicy({
- policyId: PolicyId.PasswordDictionary
+ policyId: ProjectPolicy.PasswordDictionary
});
console.log(result);
diff --git a/docs/examples/project/list-o-auth-2-providers.md b/docs/examples/project/list-o-auth-2-providers.md
index f4e6545b..3c8d5ea6 100644
--- a/docs/examples/project/list-o-auth-2-providers.md
+++ b/docs/examples/project/list-o-auth-2-providers.md
@@ -7,7 +7,10 @@ const client = new Client()
const project = new Project(client);
-const result = await project.listOAuth2Providers();
+const result = await project.listOAuth2Providers({
+ queries: [], // optional
+ total: false // optional
+});
console.log(result);
```
diff --git a/docs/examples/project/update-auth-method.md b/docs/examples/project/update-auth-method.md
index 802d1d2b..fc0dfdfd 100644
--- a/docs/examples/project/update-auth-method.md
+++ b/docs/examples/project/update-auth-method.md
@@ -1,5 +1,5 @@
```javascript
-import { Client, Project, MethodId } from "@appwrite.io/console";
+import { Client, Project, AuthMethod } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
@@ -8,7 +8,7 @@ const client = new Client()
const project = new Project(client);
const result = await project.updateAuthMethod({
- methodId: MethodId.EmailPassword,
+ methodId: AuthMethod.EmailPassword,
enabled: false
});
diff --git a/docs/examples/project/update-o-auth-2-oidc.md b/docs/examples/project/update-o-auth-2-oidc.md
index 29b8536e..4f97fb2f 100644
--- a/docs/examples/project/update-o-auth-2-oidc.md
+++ b/docs/examples/project/update-o-auth-2-oidc.md
@@ -12,8 +12,8 @@ const result = await project.updateOAuth2Oidc({
clientSecret: '', // optional
wellKnownURL: 'https://example.com', // optional
authorizationURL: 'https://example.com', // optional
- tokenUrl: 'https://example.com', // optional
- userInfoUrl: 'https://example.com', // optional
+ tokenURL: 'https://example.com', // optional
+ userInfoURL: 'https://example.com', // optional
enabled: false // optional
});
diff --git a/docs/examples/proxy/list-rules.md b/docs/examples/proxy/list-rules.md
index 83a661f0..b4bd8701 100644
--- a/docs/examples/proxy/list-rules.md
+++ b/docs/examples/proxy/list-rules.md
@@ -9,7 +9,6 @@ const proxy = new Proxy(client);
const result = await proxy.listRules({
queries: [], // optional
- search: '', // optional
total: false // optional
});
diff --git a/docs/examples/proxy/update-rule-verification.md b/docs/examples/proxy/update-rule-status.md
similarity index 86%
rename from docs/examples/proxy/update-rule-verification.md
rename to docs/examples/proxy/update-rule-status.md
index 6eccae87..39310888 100644
--- a/docs/examples/proxy/update-rule-verification.md
+++ b/docs/examples/proxy/update-rule-status.md
@@ -7,7 +7,7 @@ const client = new Client()
const proxy = new Proxy(client);
-const result = await proxy.updateRuleVerification({
+const result = await proxy.updateRuleStatus({
ruleId: ''
});
diff --git a/docs/examples/sites/create-variable.md b/docs/examples/sites/create-variable.md
index d255a025..73f2f2d9 100644
--- a/docs/examples/sites/create-variable.md
+++ b/docs/examples/sites/create-variable.md
@@ -9,6 +9,7 @@ const sites = new Sites(client);
const result = await sites.createVariable({
siteId: '',
+ variableId: '',
key: '',
value: '',
secret: false // optional
diff --git a/docs/examples/sites/list-variables.md b/docs/examples/sites/list-variables.md
index e0f5717d..ae7626c1 100644
--- a/docs/examples/sites/list-variables.md
+++ b/docs/examples/sites/list-variables.md
@@ -8,7 +8,9 @@ const client = new Client()
const sites = new Sites(client);
const result = await sites.listVariables({
- siteId: ''
+ siteId: '',
+ queries: [], // optional
+ total: false // optional
});
console.log(result);
diff --git a/docs/examples/sites/update-variable.md b/docs/examples/sites/update-variable.md
index 6dcb5421..df1aeaf7 100644
--- a/docs/examples/sites/update-variable.md
+++ b/docs/examples/sites/update-variable.md
@@ -10,7 +10,7 @@ const sites = new Sites(client);
const result = await sites.updateVariable({
siteId: '',
variableId: '',
- key: '',
+ key: '', // optional
value: '', // optional
secret: false // optional
});
diff --git a/docs/examples/tablesdb/create-big-int-column.md b/docs/examples/tablesdb/create-big-int-column.md
new file mode 100644
index 00000000..c00adcc4
--- /dev/null
+++ b/docs/examples/tablesdb/create-big-int-column.md
@@ -0,0 +1,22 @@
+```javascript
+import { Client, TablesDB } from "@appwrite.io/console";
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const tablesDB = new TablesDB(client);
+
+const result = await tablesDB.createBigIntColumn({
+ databaseId: '',
+ tableId: '',
+ key: '',
+ required: false,
+ min: null, // optional
+ max: null, // optional
+ xdefault: null, // optional
+ array: false // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md
index 7c61e928..9945d4c1 100644
--- a/docs/examples/tablesdb/create-boolean-column.md
+++ b/docs/examples/tablesdb/create-boolean-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.createBooleanColumn({
tableId: '',
key: '',
required: false,
- default: false, // optional
+ xdefault: false, // optional
array: false // optional
});
diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md
index d9a1feca..2c71780b 100644
--- a/docs/examples/tablesdb/create-datetime-column.md
+++ b/docs/examples/tablesdb/create-datetime-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.createDatetimeColumn({
tableId: '',
key: '',
required: false,
- default: '2020-10-15T06:38:00.000+00:00', // optional
+ xdefault: '2020-10-15T06:38:00.000+00:00', // optional
array: false // optional
});
diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md
index 876da2fa..4a10aeb8 100644
--- a/docs/examples/tablesdb/create-email-column.md
+++ b/docs/examples/tablesdb/create-email-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.createEmailColumn({
tableId: '',
key: '',
required: false,
- default: 'email@example.com', // optional
+ xdefault: 'email@example.com', // optional
array: false // optional
});
diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md
index 31700e02..38aa95a6 100644
--- a/docs/examples/tablesdb/create-enum-column.md
+++ b/docs/examples/tablesdb/create-enum-column.md
@@ -13,7 +13,7 @@ const result = await tablesDB.createEnumColumn({
key: '',
elements: [],
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false // optional
});
diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md
index 68aa906f..bae50920 100644
--- a/docs/examples/tablesdb/create-float-column.md
+++ b/docs/examples/tablesdb/create-float-column.md
@@ -14,7 +14,7 @@ const result = await tablesDB.createFloatColumn({
required: false,
min: null, // optional
max: null, // optional
- default: null, // optional
+ xdefault: null, // optional
array: false // optional
});
diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md
index fc9d6080..f8104508 100644
--- a/docs/examples/tablesdb/create-integer-column.md
+++ b/docs/examples/tablesdb/create-integer-column.md
@@ -14,7 +14,7 @@ const result = await tablesDB.createIntegerColumn({
required: false,
min: null, // optional
max: null, // optional
- default: null, // optional
+ xdefault: null, // optional
array: false // optional
});
diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md
index 89c29c00..71810e88 100644
--- a/docs/examples/tablesdb/create-ip-column.md
+++ b/docs/examples/tablesdb/create-ip-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.createIpColumn({
tableId: '',
key: '',
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false // optional
});
diff --git a/docs/examples/tablesdb/create-line-column.md b/docs/examples/tablesdb/create-line-column.md
index d2deeb4a..75136874 100644
--- a/docs/examples/tablesdb/create-line-column.md
+++ b/docs/examples/tablesdb/create-line-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.createLineColumn({
tableId: '',
key: '',
required: false,
- default: [[1, 2], [3, 4], [5, 6]] // optional
+ xdefault: [[1, 2], [3, 4], [5, 6]] // optional
});
console.log(result);
diff --git a/docs/examples/tablesdb/create-longtext-column.md b/docs/examples/tablesdb/create-longtext-column.md
index 89603a47..adc47e70 100644
--- a/docs/examples/tablesdb/create-longtext-column.md
+++ b/docs/examples/tablesdb/create-longtext-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.createLongtextColumn({
tableId: '',
key: '',
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false, // optional
encrypt: false // optional
});
diff --git a/docs/examples/tablesdb/create-mediumtext-column.md b/docs/examples/tablesdb/create-mediumtext-column.md
index aef3b404..416cb048 100644
--- a/docs/examples/tablesdb/create-mediumtext-column.md
+++ b/docs/examples/tablesdb/create-mediumtext-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.createMediumtextColumn({
tableId: '',
key: '',
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false, // optional
encrypt: false // optional
});
diff --git a/docs/examples/tablesdb/create-point-column.md b/docs/examples/tablesdb/create-point-column.md
index 58fd9237..40ab6a44 100644
--- a/docs/examples/tablesdb/create-point-column.md
+++ b/docs/examples/tablesdb/create-point-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.createPointColumn({
tableId: '',
key: '',
required: false,
- default: [1, 2] // optional
+ xdefault: [1, 2] // optional
});
console.log(result);
diff --git a/docs/examples/tablesdb/create-polygon-column.md b/docs/examples/tablesdb/create-polygon-column.md
index 54e02abe..5ad3723b 100644
--- a/docs/examples/tablesdb/create-polygon-column.md
+++ b/docs/examples/tablesdb/create-polygon-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.createPolygonColumn({
tableId: '',
key: '',
required: false,
- default: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional
+ xdefault: [[[1, 2], [3, 4], [5, 6], [1, 2]]] // optional
});
console.log(result);
diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md
index dec6e7d2..1e1c7710 100644
--- a/docs/examples/tablesdb/create-string-column.md
+++ b/docs/examples/tablesdb/create-string-column.md
@@ -13,7 +13,7 @@ const result = await tablesDB.createStringColumn({
key: '',
size: 1,
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false, // optional
encrypt: false // optional
});
diff --git a/docs/examples/tablesdb/create-text-column.md b/docs/examples/tablesdb/create-text-column.md
index 763e2df8..0ca82673 100644
--- a/docs/examples/tablesdb/create-text-column.md
+++ b/docs/examples/tablesdb/create-text-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.createTextColumn({
tableId: '',
key: '',
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false, // optional
encrypt: false // optional
});
diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md
index 127354ae..ffdb6e4f 100644
--- a/docs/examples/tablesdb/create-url-column.md
+++ b/docs/examples/tablesdb/create-url-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.createUrlColumn({
tableId: '',
key: '',
required: false,
- default: 'https://example.com', // optional
+ xdefault: 'https://example.com', // optional
array: false // optional
});
diff --git a/docs/examples/tablesdb/create-varchar-column.md b/docs/examples/tablesdb/create-varchar-column.md
index eee225d8..e143cc82 100644
--- a/docs/examples/tablesdb/create-varchar-column.md
+++ b/docs/examples/tablesdb/create-varchar-column.md
@@ -13,7 +13,7 @@ const result = await tablesDB.createVarcharColumn({
key: '',
size: 1,
required: false,
- default: '', // optional
+ xdefault: '', // optional
array: false, // optional
encrypt: false // optional
});
diff --git a/docs/examples/tablesdb/update-big-int-column.md b/docs/examples/tablesdb/update-big-int-column.md
new file mode 100644
index 00000000..578e813c
--- /dev/null
+++ b/docs/examples/tablesdb/update-big-int-column.md
@@ -0,0 +1,22 @@
+```javascript
+import { Client, TablesDB } from "@appwrite.io/console";
+
+const client = new Client()
+ .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
+ .setProject(''); // Your project ID
+
+const tablesDB = new TablesDB(client);
+
+const result = await tablesDB.updateBigIntColumn({
+ databaseId: '',
+ tableId: '',
+ key: '',
+ required: false,
+ xdefault: null,
+ min: null, // optional
+ max: null, // optional
+ newKey: '' // optional
+});
+
+console.log(result);
+```
diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md
index 6dade8f9..67380638 100644
--- a/docs/examples/tablesdb/update-boolean-column.md
+++ b/docs/examples/tablesdb/update-boolean-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateBooleanColumn({
tableId: '',
key: '',
required: false,
- default: false,
+ xdefault: false,
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md
index 34a70f97..89ec138f 100644
--- a/docs/examples/tablesdb/update-datetime-column.md
+++ b/docs/examples/tablesdb/update-datetime-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateDatetimeColumn({
tableId: '',
key: '',
required: false,
- default: '2020-10-15T06:38:00.000+00:00',
+ xdefault: '2020-10-15T06:38:00.000+00:00',
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md
index 29e59fe7..981e5dd5 100644
--- a/docs/examples/tablesdb/update-email-column.md
+++ b/docs/examples/tablesdb/update-email-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateEmailColumn({
tableId: '',
key: '',
required: false,
- default: 'email@example.com',
+ xdefault: 'email@example.com',
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md
index 182eba09..493e9f3a 100644
--- a/docs/examples/tablesdb/update-enum-column.md
+++ b/docs/examples/tablesdb/update-enum-column.md
@@ -13,7 +13,7 @@ const result = await tablesDB.updateEnumColumn({
key: '',
elements: [],
required: false,
- default: '',
+ xdefault: '',
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md
index b6c827a8..0f655fd8 100644
--- a/docs/examples/tablesdb/update-float-column.md
+++ b/docs/examples/tablesdb/update-float-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateFloatColumn({
tableId: '',
key: '',
required: false,
- default: null,
+ xdefault: null,
min: null, // optional
max: null, // optional
newKey: '' // optional
diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md
index f4fb54c4..e42a7142 100644
--- a/docs/examples/tablesdb/update-integer-column.md
+++ b/docs/examples/tablesdb/update-integer-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateIntegerColumn({
tableId: '',
key: '',
required: false,
- default: null,
+ xdefault: null,
min: null, // optional
max: null, // optional
newKey: '' // optional
diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md
index 513b1141..d96b0121 100644
--- a/docs/examples/tablesdb/update-ip-column.md
+++ b/docs/examples/tablesdb/update-ip-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateIpColumn({
tableId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-line-column.md b/docs/examples/tablesdb/update-line-column.md
index 3b0f8a73..ffc3813b 100644
--- a/docs/examples/tablesdb/update-line-column.md
+++ b/docs/examples/tablesdb/update-line-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateLineColumn({
tableId: '',
key: '',
required: false,
- default: [[1, 2], [3, 4], [5, 6]], // optional
+ xdefault: [[1, 2], [3, 4], [5, 6]], // optional
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-longtext-column.md b/docs/examples/tablesdb/update-longtext-column.md
index d444e8b1..6e3fda80 100644
--- a/docs/examples/tablesdb/update-longtext-column.md
+++ b/docs/examples/tablesdb/update-longtext-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateLongtextColumn({
tableId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-mediumtext-column.md b/docs/examples/tablesdb/update-mediumtext-column.md
index 10366e7d..dc994757 100644
--- a/docs/examples/tablesdb/update-mediumtext-column.md
+++ b/docs/examples/tablesdb/update-mediumtext-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateMediumtextColumn({
tableId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-point-column.md b/docs/examples/tablesdb/update-point-column.md
index 9706918d..eac241e8 100644
--- a/docs/examples/tablesdb/update-point-column.md
+++ b/docs/examples/tablesdb/update-point-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updatePointColumn({
tableId: '',
key: '',
required: false,
- default: [1, 2], // optional
+ xdefault: [1, 2], // optional
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-polygon-column.md b/docs/examples/tablesdb/update-polygon-column.md
index 1639129d..854db0bd 100644
--- a/docs/examples/tablesdb/update-polygon-column.md
+++ b/docs/examples/tablesdb/update-polygon-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updatePolygonColumn({
tableId: '',
key: '',
required: false,
- default: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional
+ xdefault: [[[1, 2], [3, 4], [5, 6], [1, 2]]], // optional
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md
index e997d71c..3be9e866 100644
--- a/docs/examples/tablesdb/update-string-column.md
+++ b/docs/examples/tablesdb/update-string-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateStringColumn({
tableId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
size: 1, // optional
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-text-column.md b/docs/examples/tablesdb/update-text-column.md
index 30db18db..f5bd5abd 100644
--- a/docs/examples/tablesdb/update-text-column.md
+++ b/docs/examples/tablesdb/update-text-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateTextColumn({
tableId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md
index cde0cb23..6af45cd0 100644
--- a/docs/examples/tablesdb/update-url-column.md
+++ b/docs/examples/tablesdb/update-url-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateUrlColumn({
tableId: '',
key: '',
required: false,
- default: 'https://example.com',
+ xdefault: 'https://example.com',
newKey: '' // optional
});
diff --git a/docs/examples/tablesdb/update-varchar-column.md b/docs/examples/tablesdb/update-varchar-column.md
index 6cbdc9c5..0b46befe 100644
--- a/docs/examples/tablesdb/update-varchar-column.md
+++ b/docs/examples/tablesdb/update-varchar-column.md
@@ -12,7 +12,7 @@ const result = await tablesDB.updateVarcharColumn({
tableId: '',
key: '',
required: false,
- default: '',
+ xdefault: '',
size: 1, // optional
newKey: '' // optional
});
diff --git a/docs/examples/vcs/create-repository.md b/docs/examples/vcs/create-repository.md
index 41707e65..a64eef87 100644
--- a/docs/examples/vcs/create-repository.md
+++ b/docs/examples/vcs/create-repository.md
@@ -10,7 +10,7 @@ const vcs = new Vcs(client);
const result = await vcs.createRepository({
installationId: '',
name: '',
- private: false
+ xprivate: false
});
console.log(result);
diff --git a/docs/examples/vcs/list-repository-branches.md b/docs/examples/vcs/list-repository-branches.md
index 4c85339e..97bf9296 100644
--- a/docs/examples/vcs/list-repository-branches.md
+++ b/docs/examples/vcs/list-repository-branches.md
@@ -9,7 +9,9 @@ const vcs = new Vcs(client);
const result = await vcs.listRepositoryBranches({
installationId: '',
- providerRepositoryId: ''
+ providerRepositoryId: '',
+ search: '', // optional
+ queries: '' // optional
});
console.log(result);
diff --git a/package-lock.json b/package-lock.json
index c78c3218..d260ac4e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@appwrite.io/console",
- "version": "12.1.0",
+ "version": "12.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@appwrite.io/console",
- "version": "12.1.0",
+ "version": "12.2.0",
"license": "BSD-3-Clause",
"dependencies": {
"json-bigint": "1.0.0"
diff --git a/package.json b/package.json
index 17dec575..6ff1b316 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "@appwrite.io/console",
"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": "12.1.0",
+ "version": "12.2.0",
"license": "BSD-3-Clause",
"main": "dist/cjs/sdk.js",
"exports": {
diff --git a/src/client.ts b/src/client.ts
index 7ba90334..fcd273d1 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -366,6 +366,7 @@ class Client {
impersonateuserphone: string;
platform: string;
selfSigned: boolean;
+ session?: string;
} = {
endpoint: 'https://cloud.appwrite.io/v1',
endpointRealtime: '',
@@ -382,6 +383,7 @@ class Client {
impersonateuserphone: '',
platform: '',
selfSigned: false,
+ session: undefined,
};
/**
* Custom headers for API requests.
@@ -390,8 +392,8 @@ class Client {
'x-sdk-name': 'Console',
'x-sdk-platform': 'console',
'x-sdk-language': 'web',
- 'x-sdk-version': '12.1.0',
- 'X-Appwrite-Response-Format': '1.9.3',
+ 'x-sdk-version': '12.2.0',
+ 'X-Appwrite-Response-Format': '1.9.4',
};
/**
diff --git a/src/enums/method-id.ts b/src/enums/auth-method.ts
similarity index 88%
rename from src/enums/method-id.ts
rename to src/enums/auth-method.ts
index 062d0d0e..d5800ad9 100644
--- a/src/enums/method-id.ts
+++ b/src/enums/auth-method.ts
@@ -1,4 +1,4 @@
-export enum MethodId {
+export enum AuthMethod {
Emailpassword = 'email-password',
Magicurl = 'magic-url',
Emailotp = 'email-otp',
diff --git a/src/enums/o-auth-provider.ts b/src/enums/o-auth-provider.ts
index cc9e340b..06189633 100644
--- a/src/enums/o-auth-provider.ts
+++ b/src/enums/o-auth-provider.ts
@@ -42,4 +42,6 @@ export enum OAuthProvider {
Yandex = 'yandex',
Zoho = 'zoho',
Zoom = 'zoom',
+ GithubImagine = 'githubImagine',
+ GoogleImagine = 'googleImagine',
}
\ No newline at end of file
diff --git a/src/enums/on-duplicate.ts b/src/enums/on-duplicate.ts
new file mode 100644
index 00000000..9ab3dc85
--- /dev/null
+++ b/src/enums/on-duplicate.ts
@@ -0,0 +1,5 @@
+export enum OnDuplicate {
+ Fail = 'fail',
+ Skip = 'skip',
+ Overwrite = 'overwrite',
+}
\ No newline at end of file
diff --git a/src/enums/policy-id.ts b/src/enums/project-policy.ts
similarity index 93%
rename from src/enums/policy-id.ts
rename to src/enums/project-policy.ts
index ab1c4cd2..d52bf99a 100644
--- a/src/enums/policy-id.ts
+++ b/src/enums/project-policy.ts
@@ -1,4 +1,4 @@
-export enum PolicyId {
+export enum ProjectPolicy {
Passworddictionary = 'password-dictionary',
Passwordhistory = 'password-history',
Passwordpersonaldata = 'password-personal-data',
diff --git a/src/enums/proxy-rule-status.ts b/src/enums/proxy-rule-status.ts
index 91896004..67b8e4cb 100644
--- a/src/enums/proxy-rule-status.ts
+++ b/src/enums/proxy-rule-status.ts
@@ -1,6 +1,5 @@
export enum ProxyRuleStatus {
- Created = 'created',
+ Unverified = 'unverified',
Verifying = 'verifying',
Verified = 'verified',
- Unverified = 'unverified',
}
\ No newline at end of file
diff --git a/src/enums/scopes.ts b/src/enums/scopes.ts
index 71badb40..532eb75c 100644
--- a/src/enums/scopes.ts
+++ b/src/enums/scopes.ts
@@ -64,6 +64,8 @@ export enum Scopes {
TargetsWrite = 'targets.write',
MessagesRead = 'messages.read',
MessagesWrite = 'messages.write',
+ RulesRead = 'rules.read',
+ RulesWrite = 'rules.write',
WebhooksRead = 'webhooks.read',
WebhooksWrite = 'webhooks.write',
LocaleRead = 'locale.read',
@@ -76,8 +78,6 @@ export enum Scopes {
SchedulesWrite = 'schedules.write',
VcsRead = 'vcs.read',
VcsWrite = 'vcs.write',
- RulesRead = 'rules.read',
- RulesWrite = 'rules.write',
BackupsPoliciesRead = 'backups.policies.read',
BackupsPoliciesWrite = 'backups.policies.write',
ArchivesRead = 'archives.read',
diff --git a/src/index.ts b/src/index.ts
index afd9a364..3bf3bc1b 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -79,12 +79,13 @@ export { ResourceType } from './enums/resource-type';
export { MessagePriority } from './enums/message-priority';
export { SmtpEncryption } from './enums/smtp-encryption';
export { AppwriteMigrationResource } from './enums/appwrite-migration-resource';
+export { OnDuplicate } from './enums/on-duplicate';
export { FirebaseMigrationResource } from './enums/firebase-migration-resource';
export { NHostMigrationResource } from './enums/n-host-migration-resource';
export { SupabaseMigrationResource } from './enums/supabase-migration-resource';
export { Addon } from './enums/addon';
-export { MethodId } from './enums/method-id';
-export { PolicyId } from './enums/policy-id';
+export { AuthMethod } from './enums/auth-method';
+export { ProjectPolicy } from './enums/project-policy';
export { ProtocolId } from './enums/protocol-id';
export { ServiceId } from './enums/service-id';
export { Secure } from './enums/secure';
diff --git a/src/models.ts b/src/models.ts
index cf07e8ed..8164b782 100644
--- a/src/models.ts
+++ b/src/models.ts
@@ -915,7 +915,7 @@ export namespace Models {
/**
* Collection attributes.
*/
- attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
+ attributes: (Models.AttributeBoolean | Models.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
/**
* Collection indexes.
*/
@@ -941,7 +941,7 @@ export namespace Models {
/**
* List of attributes.
*/
- attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
+ attributes: (Models.AttributeBoolean | Models.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
}
/**
@@ -1044,6 +1044,56 @@ export namespace Models {
default?: number;
}
+ /**
+ * AttributeBigInt
+ */
+ export type AttributeBigint = {
+ /**
+ * Attribute Key.
+ */
+ key: string;
+ /**
+ * Attribute type.
+ */
+ type: string;
+ /**
+ * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
+ */
+ status: AttributeStatus;
+ /**
+ * Error message. Displays error generated on failure of creating or deleting an attribute.
+ */
+ error: string;
+ /**
+ * Is attribute required?
+ */
+ required: boolean;
+ /**
+ * Is attribute an array?
+ */
+ array?: boolean;
+ /**
+ * Attribute creation date in ISO 8601 format.
+ */
+ $createdAt: string;
+ /**
+ * Attribute update date in ISO 8601 format.
+ */
+ $updatedAt: string;
+ /**
+ * Minimum value to enforce for new documents.
+ */
+ min?: number | bigint;
+ /**
+ * Maximum value to enforce for new documents.
+ */
+ max?: number | bigint;
+ /**
+ * Default value for attribute when not provided. Cannot be set when attribute is required.
+ */
+ default?: number | bigint;
+ }
+
/**
* AttributeFloat
*/
@@ -2081,7 +2131,7 @@ export namespace Models {
/**
* Table columns.
*/
- columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
+ columns: (Models.ColumnBoolean | Models.ColumnBigint | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
/**
* Table indexes.
*/
@@ -2107,7 +2157,7 @@ export namespace Models {
/**
* List of columns.
*/
- columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
+ columns: (Models.ColumnBoolean | Models.ColumnBigint | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
}
/**
@@ -2210,6 +2260,56 @@ export namespace Models {
default?: number;
}
+ /**
+ * ColumnBigInt
+ */
+ export type ColumnBigint = {
+ /**
+ * Column Key.
+ */
+ key: string;
+ /**
+ * Column type.
+ */
+ type: string;
+ /**
+ * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
+ */
+ status: ColumnStatus;
+ /**
+ * Error message. Displays error generated on failure of creating or deleting an column.
+ */
+ error: string;
+ /**
+ * Is column required?
+ */
+ required: boolean;
+ /**
+ * Is column an array?
+ */
+ array?: boolean;
+ /**
+ * Column creation date in ISO 8601 format.
+ */
+ $createdAt: string;
+ /**
+ * Column update date in ISO 8601 format.
+ */
+ $updatedAt: string;
+ /**
+ * Minimum value to enforce for new documents.
+ */
+ min?: number | bigint;
+ /**
+ * Maximum value to enforce for new documents.
+ */
+ max?: number | bigint;
+ /**
+ * Default value for column when not provided. Cannot be set when column is required.
+ */
+ default?: number | bigint;
+ }
+
/**
* ColumnFloat
*/
@@ -6292,11 +6392,11 @@ export namespace Models {
/**
* OpenID Connect token endpoint URL.
*/
- tokenUrl: string;
+ tokenURL: string;
/**
* OpenID Connect user info endpoint URL.
*/
- userInfoUrl: string;
+ userInfoURL: string;
}
/**
@@ -8140,7 +8240,7 @@ export namespace Models {
*/
deploymentResourceType?: ProxyRuleDeploymentResourceType;
/**
- * ID deployment's resource. Used if type is "deployment"
+ * ID of deployment's resource (site or function ID). Used if type is "deployment"
*/
deploymentResourceId: string;
/**
@@ -8148,7 +8248,7 @@ export namespace Models {
*/
deploymentVcsProviderBranch: string;
/**
- * Domain verification status. Possible values are "created", "verifying", "verified" and "unverified"
+ * Domain verification status. Possible values are "unverified", "verifying", "verified"
*/
status: ProxyRuleStatus;
/**
@@ -9226,7 +9326,7 @@ export namespace Models {
*/
size: number;
/**
- * The status of the archive creation. Possible values: pending, processing, uploading, completed, failed.
+ * The status of the archive creation. Possible values: pending, processing, uploading, completed, failed, skipped.
*/
status: string;
/**
diff --git a/src/services/databases.ts b/src/services/databases.ts
index 6cc264a5..e21b9918 100644
--- a/src/services/databases.ts
+++ b/src/services/databases.ts
@@ -1190,6 +1190,228 @@ export class Databases {
);
}
+ /**
+ * Create a bigint attribute. Optionally, minimum and maximum values can be provided.
+ *
+ *
+ * @param {string} params.databaseId - Database ID.
+ * @param {string} params.collectionId - Collection ID.
+ * @param {string} params.key - Attribute Key.
+ * @param {boolean} params.required - Is attribute required?
+ * @param {number | bigint} params.min - Minimum value
+ * @param {number | bigint} params.max - Maximum value
+ * @param {number | bigint} params.xdefault - Default value. Cannot be set when attribute is required.
+ * @param {boolean} params.array - Is attribute an array?
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createBigIntColumn` instead.
+ */
+ createBigIntAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean }): Promise;
+ /**
+ * Create a bigint attribute. Optionally, minimum and maximum values can be provided.
+ *
+ *
+ * @param {string} databaseId - Database ID.
+ * @param {string} collectionId - Collection ID.
+ * @param {string} key - Attribute Key.
+ * @param {boolean} required - Is attribute required?
+ * @param {number | bigint} min - Minimum value
+ * @param {number | bigint} max - Maximum value
+ * @param {number | bigint} xdefault - Default value. Cannot be set when attribute is required.
+ * @param {boolean} array - Is attribute an array?
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ * @deprecated Use the object parameter style method for a better developer experience.
+ */
+ createBigIntAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean): Promise;
+ createBigIntAttribute(
+ paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean } | string,
+ ...rest: [(string)?, (string)?, (boolean)?, (number | bigint)?, (number | bigint)?, (number | bigint)?, (boolean)?]
+ ): Promise {
+ let params: { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean };
+
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean };
+ } else {
+ params = {
+ databaseId: paramsOrFirst as string,
+ collectionId: rest[0] as string,
+ key: rest[1] as string,
+ required: rest[2] as boolean,
+ min: rest[3] as number | bigint,
+ max: rest[4] as number | bigint,
+ xdefault: rest[5] as number | bigint,
+ array: rest[6] as boolean
+ };
+ }
+
+ const databaseId = params.databaseId;
+ const collectionId = params.collectionId;
+ const key = params.key;
+ const required = params.required;
+ const min = params.min;
+ const max = params.max;
+ const xdefault = params.xdefault;
+ const array = params.array;
+
+ if (typeof databaseId === 'undefined') {
+ throw new AppwriteException('Missing required parameter: "databaseId"');
+ }
+ if (typeof collectionId === 'undefined') {
+ throw new AppwriteException('Missing required parameter: "collectionId"');
+ }
+ if (typeof key === 'undefined') {
+ throw new AppwriteException('Missing required parameter: "key"');
+ }
+ if (typeof required === 'undefined') {
+ throw new AppwriteException('Missing required parameter: "required"');
+ }
+
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
+ const payload: Payload = {};
+ if (typeof key !== 'undefined') {
+ payload['key'] = key;
+ }
+ if (typeof required !== 'undefined') {
+ payload['required'] = required;
+ }
+ if (typeof min !== 'undefined') {
+ payload['min'] = min;
+ }
+ if (typeof max !== 'undefined') {
+ payload['max'] = max;
+ }
+ if (typeof xdefault !== 'undefined') {
+ payload['default'] = xdefault;
+ }
+ if (typeof array !== 'undefined') {
+ payload['array'] = array;
+ }
+ const uri = new URL(this.client.config.endpoint + apiPath);
+
+ const apiHeaders: { [header: string]: string } = {
+ 'content-type': 'application/json',
+ }
+
+ return this.client.call(
+ 'post',
+ uri,
+ apiHeaders,
+ payload
+ );
+ }
+
+ /**
+ * Update a bigint attribute. Changing the `default` value will not update already existing documents.
+ *
+ *
+ * @param {string} params.databaseId - Database ID.
+ * @param {string} params.collectionId - Collection ID.
+ * @param {string} params.key - Attribute Key.
+ * @param {boolean} params.required - Is attribute required?
+ * @param {number | bigint} params.xdefault - Default value. Cannot be set when attribute is required.
+ * @param {number | bigint} params.min - Minimum value
+ * @param {number | bigint} params.max - Maximum value
+ * @param {string} params.newKey - New Attribute Key.
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateBigIntColumn` instead.
+ */
+ updateBigIntAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string }): Promise;
+ /**
+ * Update a bigint attribute. Changing the `default` value will not update already existing documents.
+ *
+ *
+ * @param {string} databaseId - Database ID.
+ * @param {string} collectionId - Collection ID.
+ * @param {string} key - Attribute Key.
+ * @param {boolean} required - Is attribute required?
+ * @param {number | bigint} xdefault - Default value. Cannot be set when attribute is required.
+ * @param {number | bigint} min - Minimum value
+ * @param {number | bigint} max - Maximum value
+ * @param {string} newKey - New Attribute Key.
+ * @throws {AppwriteException}
+ * @returns {Promise}
+ * @deprecated Use the object parameter style method for a better developer experience.
+ */
+ updateBigIntAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string): Promise;
+ updateBigIntAttribute(
+ paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string } | string,
+ ...rest: [(string)?, (string)?, (boolean)?, (number | bigint)?, (number | bigint)?, (number | bigint)?, (string)?]
+ ): Promise {
+ let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string };
+
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
+ params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string };
+ } else {
+ params = {
+ databaseId: paramsOrFirst as string,
+ collectionId: rest[0] as string,
+ key: rest[1] as string,
+ required: rest[2] as boolean,
+ xdefault: rest[3] as number | bigint,
+ min: rest[4] as number | bigint,
+ max: rest[5] as number | bigint,
+ newKey: rest[6] as string
+ };
+ }
+
+ const databaseId = params.databaseId;
+ const collectionId = params.collectionId;
+ const key = params.key;
+ const required = params.required;
+ const xdefault = params.xdefault;
+ const min = params.min;
+ const max = params.max;
+ const newKey = params.newKey;
+
+ if (typeof databaseId === 'undefined') {
+ throw new AppwriteException('Missing required parameter: "databaseId"');
+ }
+ if (typeof collectionId === 'undefined') {
+ throw new AppwriteException('Missing required parameter: "collectionId"');
+ }
+ if (typeof key === 'undefined') {
+ throw new AppwriteException('Missing required parameter: "key"');
+ }
+ if (typeof required === 'undefined') {
+ throw new AppwriteException('Missing required parameter: "required"');
+ }
+ if (typeof xdefault === 'undefined') {
+ throw new AppwriteException('Missing required parameter: "xdefault"');
+ }
+
+ const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
+ const payload: Payload = {};
+ if (typeof required !== 'undefined') {
+ payload['required'] = required;
+ }
+ if (typeof min !== 'undefined') {
+ payload['min'] = min;
+ }
+ if (typeof max !== 'undefined') {
+ payload['max'] = max;
+ }
+ if (typeof xdefault !== 'undefined') {
+ payload['default'] = xdefault;
+ }
+ if (typeof newKey !== 'undefined') {
+ payload['newKey'] = newKey;
+ }
+ const uri = new URL(this.client.config.endpoint + apiPath);
+
+ const apiHeaders: { [header: string]: string } = {
+ 'content-type': 'application/json',
+ }
+
+ return this.client.call(
+ 'patch',
+ uri,
+ apiHeaders,
+ payload
+ );
+ }
+
/**
* Create a boolean attribute.
*
diff --git a/src/services/functions.ts b/src/services/functions.ts
index 0e2c07e2..6bef57e6 100644
--- a/src/services/functions.ts
+++ b/src/services/functions.ts
@@ -1892,33 +1892,42 @@ export class Functions {
* Get a list of all variables of a specific function.
*
* @param {string} params.functionId - Function unique 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: key, resourceType, resourceId, secret
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise}
*/
- listVariables(params: { functionId: string }): Promise;
+ listVariables(params: { functionId: string, queries?: string[], total?: boolean }): Promise;
/**
* Get a list of all variables of a specific function.
*
* @param {string} functionId - Function unique 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: key, resourceType, resourceId, secret
+ * @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.
*/
- listVariables(functionId: string): Promise;
+ listVariables(functionId: string, queries?: string[], total?: boolean): Promise;
listVariables(
- paramsOrFirst: { functionId: string } | string
+ paramsOrFirst: { functionId: string, queries?: string[], total?: boolean } | string,
+ ...rest: [(string[])?, (boolean)?]
): Promise {
- let params: { functionId: string };
+ let params: { functionId: string, queries?: string[], total?: boolean };
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
- params = (paramsOrFirst || {}) as { functionId: string };
+ params = (paramsOrFirst || {}) as { functionId: string, queries?: string[], total?: boolean };
} else {
params = {
- functionId: paramsOrFirst as string
+ functionId: paramsOrFirst as string,
+ queries: rest[0] as string[],
+ total: rest[1] as boolean
};
}
const functionId = params.functionId;
+ const queries = params.queries;
+ const total = params.total;
if (typeof functionId === 'undefined') {
throw new AppwriteException('Missing required parameter: "functionId"');
@@ -1926,6 +1935,12 @@ export class Functions {
const apiPath = '/functions/{functionId}/variables'.replace('{functionId}', functionId);
const payload: Payload = {};
+ if (typeof queries !== 'undefined') {
+ payload['queries'] = queries;
+ }
+ if (typeof total !== 'undefined') {
+ payload['total'] = total;
+ }
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -1943,17 +1958,19 @@ export class Functions {
* Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
*
* @param {string} params.functionId - Function unique ID.
+ * @param {string} params.variableId - Variable 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.key - Variable key. 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.
* @throws {AppwriteException}
* @returns {Promise}
*/
- createVariable(params: { functionId: string, key: string, value: string, secret?: boolean }): Promise;
+ createVariable(params: { functionId: string, variableId: string, key: string, value: string, secret?: boolean }): Promise;
/**
* Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
*
* @param {string} functionId - Function unique ID.
+ * @param {string} variableId - Variable 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} key - Variable key. 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.
@@ -1961,25 +1978,27 @@ export class Functions {
* @returns {Promise}
* @deprecated Use the object parameter style method for a better developer experience.
*/
- createVariable(functionId: string, key: string, value: string, secret?: boolean): Promise;
+ createVariable(functionId: string, variableId: string, key: string, value: string, secret?: boolean): Promise;
createVariable(
- paramsOrFirst: { functionId: string, key: string, value: string, secret?: boolean } | string,
- ...rest: [(string)?, (string)?, (boolean)?]
+ paramsOrFirst: { functionId: string, variableId: string, key: string, value: string, secret?: boolean } | string,
+ ...rest: [(string)?, (string)?, (string)?, (boolean)?]
): Promise {
- let params: { functionId: string, key: string, value: string, secret?: boolean };
+ let params: { functionId: string, variableId: string, key: string, value: string, secret?: boolean };
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
- params = (paramsOrFirst || {}) as { functionId: string, key: string, value: string, secret?: boolean };
+ params = (paramsOrFirst || {}) as { functionId: string, variableId: string, key: string, value: string, secret?: boolean };
} else {
params = {
functionId: paramsOrFirst as string,
- key: rest[0] as string,
- value: rest[1] as string,
- secret: rest[2] as boolean
+ variableId: rest[0] as string,
+ key: rest[1] as string,
+ value: rest[2] as string,
+ secret: rest[3] as boolean
};
}
const functionId = params.functionId;
+ const variableId = params.variableId;
const key = params.key;
const value = params.value;
const secret = params.secret;
@@ -1987,6 +2006,9 @@ export class Functions {
if (typeof functionId === 'undefined') {
throw new AppwriteException('Missing required parameter: "functionId"');
}
+ if (typeof variableId === 'undefined') {
+ throw new AppwriteException('Missing required parameter: "variableId"');
+ }
if (typeof key === 'undefined') {
throw new AppwriteException('Missing required parameter: "key"');
}
@@ -1996,6 +2018,9 @@ export class Functions {
const apiPath = '/functions/{functionId}/variables'.replace('{functionId}', functionId);
const payload: Payload = {};
+ if (typeof variableId !== 'undefined') {
+ payload['variableId'] = variableId;
+ }
if (typeof key !== 'undefined') {
payload['key'] = key;
}
@@ -2089,7 +2114,7 @@ export class Functions {
* @throws {AppwriteException}
* @returns {Promise}
*/
- updateVariable(params: { functionId: string, variableId: string, key: string, value?: string, secret?: boolean }): Promise;
+ updateVariable(params: { functionId: string, variableId: string, key?: string, value?: string, secret?: boolean }): Promise;
/**
* Update variable by its unique ID.
*
@@ -2102,15 +2127,15 @@ export class Functions {
* @returns {Promise}
* @deprecated Use the object parameter style method for a better developer experience.
*/
- updateVariable(functionId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise;
+ updateVariable(functionId: string, variableId: string, key?: string, value?: string, secret?: boolean): Promise;
updateVariable(
- paramsOrFirst: { functionId: string, variableId: string, key: string, value?: string, secret?: boolean } | string,
+ paramsOrFirst: { functionId: string, variableId: string, key?: string, value?: string, secret?: boolean } | string,
...rest: [(string)?, (string)?, (string)?, (boolean)?]
): Promise {
- let params: { functionId: string, variableId: string, key: string, value?: string, secret?: boolean };
+ let params: { functionId: string, variableId: string, key?: string, value?: string, secret?: boolean };
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
- params = (paramsOrFirst || {}) as { functionId: string, variableId: string, key: string, value?: string, secret?: boolean };
+ params = (paramsOrFirst || {}) as { functionId: string, variableId: string, key?: string, value?: string, secret?: boolean };
} else {
params = {
functionId: paramsOrFirst as string,
@@ -2133,9 +2158,6 @@ export class Functions {
if (typeof variableId === 'undefined') {
throw new AppwriteException('Missing required parameter: "variableId"');
}
- if (typeof key === 'undefined') {
- throw new AppwriteException('Missing required parameter: "key"');
- }
const apiPath = '/functions/{functionId}/variables/{variableId}'.replace('{functionId}', functionId).replace('{variableId}', variableId);
const payload: Payload = {};
diff --git a/src/services/migrations.ts b/src/services/migrations.ts
index b4b8e483..1874744f 100644
--- a/src/services/migrations.ts
+++ b/src/services/migrations.ts
@@ -3,6 +3,7 @@ import { AppwriteException, Client, type Payload, UploadProgress } from '../clie
import type { Models } from '../models';
import { AppwriteMigrationResource } from '../enums/appwrite-migration-resource';
+import { OnDuplicate } from '../enums/on-duplicate';
import { FirebaseMigrationResource } from '../enums/firebase-migration-resource';
import { NHostMigrationResource } from '../enums/n-host-migration-resource';
import { SupabaseMigrationResource } from '../enums/supabase-migration-resource';
@@ -87,10 +88,11 @@ export class Migrations {
* @param {string} params.endpoint - Source Appwrite endpoint
* @param {string} params.projectId - Source Project ID
* @param {string} params.apiKey - Source API Key
+ * @param {OnDuplicate} params.onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
* @throws {AppwriteException}
* @returns {Promise}
*/
- createAppwriteMigration(params: { resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string }): Promise;
+ createAppwriteMigration(params: { resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string, onDuplicate?: OnDuplicate }): Promise;
/**
* Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project.
*
@@ -98,25 +100,27 @@ export class Migrations {
* @param {string} endpoint - Source Appwrite endpoint
* @param {string} projectId - Source Project ID
* @param {string} apiKey - Source API Key
+ * @param {OnDuplicate} onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
* @throws {AppwriteException}
* @returns {Promise}
* @deprecated Use the object parameter style method for a better developer experience.
*/
- createAppwriteMigration(resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string): Promise;
+ createAppwriteMigration(resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string, onDuplicate?: OnDuplicate): Promise;
createAppwriteMigration(
- paramsOrFirst: { resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string } | AppwriteMigrationResource[],
- ...rest: [(string)?, (string)?, (string)?]
+ paramsOrFirst: { resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string, onDuplicate?: OnDuplicate } | AppwriteMigrationResource[],
+ ...rest: [(string)?, (string)?, (string)?, (OnDuplicate)?]
): Promise {
- let params: { resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string };
+ let params: { resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string, onDuplicate?: OnDuplicate };
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectId' in paramsOrFirst || 'apiKey' in paramsOrFirst))) {
- params = (paramsOrFirst || {}) as { resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string };
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('resources' in paramsOrFirst || 'endpoint' in paramsOrFirst || 'projectId' in paramsOrFirst || 'apiKey' in paramsOrFirst || 'onDuplicate' in paramsOrFirst))) {
+ params = (paramsOrFirst || {}) as { resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string, onDuplicate?: OnDuplicate };
} else {
params = {
resources: paramsOrFirst as AppwriteMigrationResource[],
endpoint: rest[0] as string,
projectId: rest[1] as string,
- apiKey: rest[2] as string
+ apiKey: rest[2] as string,
+ onDuplicate: rest[3] as OnDuplicate
};
}
@@ -124,6 +128,7 @@ export class Migrations {
const endpoint = params.endpoint;
const projectId = params.projectId;
const apiKey = params.apiKey;
+ const onDuplicate = params.onDuplicate;
if (typeof resources === 'undefined') {
throw new AppwriteException('Missing required parameter: "resources"');
@@ -152,6 +157,9 @@ export class Migrations {
if (typeof apiKey !== 'undefined') {
payload['apiKey'] = apiKey;
}
+ if (typeof onDuplicate !== 'undefined') {
+ payload['onDuplicate'] = onDuplicate;
+ }
const uri = new URL(this.client.config.endpoint + apiPath);
const apiHeaders: { [header: string]: string } = {
@@ -373,10 +381,11 @@ export class Migrations {
* @param {string} params.fileId - File ID.
* @param {string} params.resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.
* @param {boolean} params.internalFile - Is the file stored in an internal bucket?
+ * @param {OnDuplicate} params.onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
* @throws {AppwriteException}
* @returns {Promise}
*/
- createCSVImport(params: { bucketId: string, fileId: string, resourceId: string, internalFile?: boolean }): Promise;
+ createCSVImport(params: { bucketId: string, fileId: string, resourceId: string, internalFile?: boolean, onDuplicate?: OnDuplicate }): Promise;
/**
* Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.
*
@@ -384,25 +393,27 @@ export class Migrations {
* @param {string} fileId - File ID.
* @param {string} resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.
* @param {boolean} internalFile - Is the file stored in an internal bucket?
+ * @param {OnDuplicate} onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
* @throws {AppwriteException}
* @returns {Promise}
* @deprecated Use the object parameter style method for a better developer experience.
*/
- createCSVImport(bucketId: string, fileId: string, resourceId: string, internalFile?: boolean): Promise]