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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

## 0.18.0

* Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance
* Add `Operator` class for atomic modification of rows via update, bulk update, upsert, and bulk upsert operations

## 0.17.1

* Add transaction support for Databases and TablesDB
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/account/list-identities.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const client = new Client()
const account = new Account(client);

const result = await account.listIdentities({
queries: [] // optional
queries: [], // optional
total: false // optional
});

console.log(result);
3 changes: 2 additions & 1 deletion docs/examples/account/list-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const client = new Client()
const account = new Account(client);

const result = await account.listLogs({
queries: [] // optional
queries: [], // optional
total: false // optional
});

console.log(result);
2 changes: 1 addition & 1 deletion docs/examples/databases/create-document.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, Databases } from "react-native-appwrite";
import { Client, Databases, Permission, Role } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/databases/list-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const result = await databases.listDocuments({
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
transactionId: '<TRANSACTION_ID>', // optional
total: false // optional
});

console.log(result);
2 changes: 1 addition & 1 deletion docs/examples/databases/update-document.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, Databases } from "react-native-appwrite";
import { Client, Databases, Permission, Role } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/databases/upsert-document.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, Databases } from "react-native-appwrite";
import { Client, Databases, Permission, Role } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/functions/list-executions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const functions = new Functions(client);

const result = await functions.listExecutions({
functionId: '<FUNCTION_ID>',
queries: [] // optional
queries: [], // optional
total: false // optional
});

console.log(result);
2 changes: 1 addition & 1 deletion docs/examples/storage/create-file.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, Storage } from "react-native-appwrite";
import { Client, Storage, Permission, Role } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/storage/list-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const storage = new Storage(client);
const result = await storage.listFiles({
bucketId: '<BUCKET_ID>',
queries: [], // optional
search: '<SEARCH>' // optional
search: '<SEARCH>', // optional
total: false // optional
});

console.log(result);
2 changes: 1 addition & 1 deletion docs/examples/storage/update-file.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, Storage } from "react-native-appwrite";
import { Client, Storage, Permission, Role } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/create-row.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, TablesDB } from "react-native-appwrite";
import { Client, TablesDB, Permission, Role } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/tablesdb/list-rows.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const result = await tablesDB.listRows({
databaseId: '<DATABASE_ID>',
tableId: '<TABLE_ID>',
queries: [], // optional
transactionId: '<TRANSACTION_ID>' // optional
transactionId: '<TRANSACTION_ID>', // optional
total: false // optional
});

console.log(result);
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/update-row.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, TablesDB } from "react-native-appwrite";
import { Client, TablesDB, Permission, Role } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/tablesdb/upsert-row.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client, TablesDB } from "react-native-appwrite";
import { Client, TablesDB, Permission, Role } from "react-native-appwrite";

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/teams/list-memberships.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const teams = new Teams(client);
const result = await teams.listMemberships({
teamId: '<TEAM_ID>',
queries: [], // optional
search: '<SEARCH>' // optional
search: '<SEARCH>', // optional
total: false // optional
});

console.log(result);
3 changes: 2 additions & 1 deletion docs/examples/teams/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const teams = new Teams(client);

const result = await teams.list({
queries: [], // optional
search: '<SEARCH>' // optional
search: '<SEARCH>', // optional
total: false // optional
});

console.log(result);
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-native-appwrite",
"homepage": "https://appwrite.io/support",
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
"version": "0.17.1",
"version": "0.18.0",
"license": "BSD-3-Clause",
"main": "dist/cjs/sdk.js",
"exports": {
Expand Down Expand Up @@ -37,7 +37,6 @@
"react-native": ">=0.76.7 <1.0.0"
},
"peerDependencies": {
"expo": "*",
"react-native": "*"
"expo": "*"
}
}
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class Client {
'x-sdk-name': 'React Native',
'x-sdk-platform': 'client',
'x-sdk-language': 'reactnative',
'x-sdk-version': '0.17.1',
'x-sdk-version': '0.18.0',
'X-Appwrite-Response-Format': '1.8.0',
};

Expand Down
1 change: 1 addition & 0 deletions src/enums/execution-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export enum ExecutionStatus {
Processing = 'processing',
Completed = 'completed',
Failed = 'failed',
Scheduled = 'scheduled',
}
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export { Query } from './query';
export { Permission } from './permission';
export { Role } from './role';
export { ID } from './id';
export { Operator, Condition } from './operator';
export { AuthenticatorType } from './enums/authenticator-type';
export { AuthenticationFactor } from './enums/authentication-factor';
export { OAuthProvider } from './enums/o-auth-provider';
Expand All @@ -24,3 +25,5 @@ export { Flag } from './enums/flag';
export { ExecutionMethod } from './enums/execution-method';
export { ImageGravity } from './enums/image-gravity';
export { ImageFormat } from './enums/image-format';
export { ExecutionTrigger } from './enums/execution-trigger';
export { ExecutionStatus } from './enums/execution-status';
2 changes: 1 addition & 1 deletion src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ export namespace Models {
*/
trigger: ExecutionTrigger;
/**
* The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
* The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.
*/
status: ExecutionStatus;
/**
Expand Down
Loading