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
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Appwrite Console SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.9.3-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.9.4-blue.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
Expand Down Expand Up @@ -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 <body> tag, but before you use any Appwrite services:

```html
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@12.1.0"></script>
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@12.2.0"></script>
```


Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/create-program-membership.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const xconsole = new Console(client);
const console = new Console(client);

const result = await xconsole.createProgramMembership({
const result = await console.createProgramMembership({
programId: '<PROGRAM_ID>'
});

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/create-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const xconsole = new Console(client);
const console = new Console(client);

const result = await xconsole.createSource({
const result = await console.createSource({
ref: '<REF>', // optional
referrer: 'https://example.com', // optional
utmSource: '<UTM_SOURCE>', // optional
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/get-campaign.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const xconsole = new Console(client);
const console = new Console(client);

const result = await xconsole.getCampaign({
const result = await console.getCampaign({
campaignId: '<CAMPAIGN_ID>'
});

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/get-coupon.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const xconsole = new Console(client);
const console = new Console(client);

const result = await xconsole.getCoupon({
const result = await console.getCoupon({
couponId: '<COUPON_ID>'
});

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/get-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const xconsole = new Console(client);
const console = new Console(client);

const result = await xconsole.getPlan({
const result = await console.getPlan({
planId: '<PLAN_ID>'
});

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/get-plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // 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
});

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/get-program.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const xconsole = new Console(client);
const console = new Console(client);

const result = await xconsole.getProgram({
const result = await console.getProgram({
programId: '<PROGRAM_ID>'
});

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/get-resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const xconsole = new Console(client);
const console = new Console(client);

const result = await xconsole.getResource({
const result = await console.getResource({
value: '<VALUE>',
type: ConsoleResourceType.Rules
});
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/list-o-auth-2-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // 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);
```
4 changes: 2 additions & 2 deletions docs/examples/console/list-project-scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // 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);
```
4 changes: 2 additions & 2 deletions docs/examples/console/list-regions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // 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);
```
4 changes: 2 additions & 2 deletions docs/examples/console/suggest-columns.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const xconsole = new Console(client);
const console = new Console(client);

const result = await xconsole.suggestColumns({
const result = await console.suggestColumns({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
context: '<CONTEXT>', // optional
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/suggest-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const xconsole = new Console(client);
const console = new Console(client);

const result = await xconsole.suggestIndexes({
const result = await console.suggestIndexes({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
min: 1, // optional
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/suggest-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // 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: '<INPUT>',
databaseId: '<DATABASE_ID>', // optional
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/console/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // 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);
```
22 changes: 22 additions & 0 deletions docs/examples/databases/create-big-int-attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
```javascript
import { Client, Databases } from "@appwrite.io/console";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID

const databases = new Databases(client);

const result = await databases.createBigIntAttribute({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
min: null, // optional
max: null, // optional
xdefault: null, // optional
array: false // optional
});

console.log(result);
```
2 changes: 1 addition & 1 deletion docs/examples/databases/create-boolean-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = await databases.createBooleanAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: false, // optional
xdefault: false, // optional
array: false // optional
});

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-datetime-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = await databases.createDatetimeAttribute({
collectionId: '<COLLECTION_ID>',
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
});

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-email-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = await databases.createEmailAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: 'email@example.com', // optional
xdefault: 'email@example.com', // optional
array: false // optional
});

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-enum-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const result = await databases.createEnumAttribute({
key: '',
elements: [],
required: false,
default: '<DEFAULT>', // optional
xdefault: '<DEFAULT>', // optional
array: false // optional
});

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-float-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
});

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-integer-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
});

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-ip-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = await databases.createIpAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '', // optional
xdefault: '', // optional
array: false // optional
});

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-line-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = await databases.createLineAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [[1, 2], [3, 4], [5, 6]] // optional
xdefault: [[1, 2], [3, 4], [5, 6]] // optional
});

console.log(result);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-longtext-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = await databases.createLongtextAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '<DEFAULT>', // optional
xdefault: '<DEFAULT>', // optional
array: false, // optional
encrypt: false // optional
});
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-mediumtext-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = await databases.createMediumtextAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '<DEFAULT>', // optional
xdefault: '<DEFAULT>', // optional
array: false, // optional
encrypt: false // optional
});
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-point-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = await databases.createPointAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: [1, 2] // optional
xdefault: [1, 2] // optional
});

console.log(result);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-polygon-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = await databases.createPolygonAttribute({
collectionId: '<COLLECTION_ID>',
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);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-string-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const result = await databases.createStringAttribute({
key: '',
size: 1,
required: false,
default: '<DEFAULT>', // optional
xdefault: '<DEFAULT>', // optional
array: false, // optional
encrypt: false // optional
});
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-text-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = await databases.createTextAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: '<DEFAULT>', // optional
xdefault: '<DEFAULT>', // optional
array: false, // optional
encrypt: false // optional
});
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-url-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const result = await databases.createUrlAttribute({
collectionId: '<COLLECTION_ID>',
key: '',
required: false,
default: 'https://example.com', // optional
xdefault: 'https://example.com', // optional
array: false // optional
});

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/create-varchar-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const result = await databases.createVarcharAttribute({
key: '',
size: 1,
required: false,
default: '<DEFAULT>', // optional
xdefault: '<DEFAULT>', // optional
array: false, // optional
encrypt: false // optional
});
Expand Down
Loading