react-native-appwrite 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/sdk.js +707 -31
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +707 -32
- package/dist/esm/sdk.js.map +1 -1
- package/docs/examples/account/list-identities.md +2 -1
- package/docs/examples/account/list-logs.md +2 -1
- package/docs/examples/databases/create-document.md +3 -2
- package/docs/examples/databases/create-operations.md +24 -0
- package/docs/examples/databases/create-transaction.md +13 -0
- package/docs/examples/databases/decrement-document-attribute.md +2 -1
- package/docs/examples/databases/delete-document.md +2 -1
- package/docs/examples/databases/delete-transaction.md +13 -0
- package/docs/examples/databases/get-document.md +2 -1
- package/docs/examples/databases/get-transaction.md +13 -0
- package/docs/examples/databases/increment-document-attribute.md +2 -1
- package/docs/examples/databases/list-documents.md +3 -1
- package/docs/examples/databases/list-transactions.md +13 -0
- package/docs/examples/databases/update-document.md +3 -2
- package/docs/examples/databases/update-transaction.md +15 -0
- package/docs/examples/databases/upsert-document.md +3 -2
- package/docs/examples/functions/list-executions.md +2 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/storage/list-files.md +2 -1
- package/docs/examples/storage/update-file.md +1 -1
- package/docs/examples/tablesdb/create-operations.md +24 -0
- package/docs/examples/tablesdb/create-row.md +3 -2
- package/docs/examples/tablesdb/create-transaction.md +13 -0
- package/docs/examples/tablesdb/decrement-row-column.md +2 -1
- package/docs/examples/tablesdb/delete-row.md +2 -1
- package/docs/examples/tablesdb/delete-transaction.md +13 -0
- package/docs/examples/tablesdb/get-row.md +2 -1
- package/docs/examples/tablesdb/get-transaction.md +13 -0
- package/docs/examples/tablesdb/increment-row-column.md +2 -1
- package/docs/examples/tablesdb/list-rows.md +3 -1
- package/docs/examples/tablesdb/list-transactions.md +13 -0
- package/docs/examples/tablesdb/update-row.md +3 -2
- package/docs/examples/tablesdb/update-transaction.md +15 -0
- package/docs/examples/tablesdb/upsert-row.md +3 -2
- package/docs/examples/teams/list-memberships.md +2 -1
- package/docs/examples/teams/list.md +2 -1
- package/package.json +2 -3
- package/src/client.ts +1 -1
- package/src/enums/execution-status.ts +1 -0
- package/src/index.ts +3 -0
- package/src/models.ts +45 -1
- package/src/operator.ts +308 -0
- package/src/query.ts +6 -6
- package/src/services/account.ts +30 -12
- package/src/services/databases.ts +422 -56
- package/src/services/functions.ts +15 -7
- package/src/services/storage.ts +15 -7
- package/src/services/tables-db.ts +422 -56
- package/src/services/teams.ts +30 -14
- package/types/enums/execution-status.d.ts +2 -1
- package/types/index.d.ts +3 -0
- package/types/models.d.ts +43 -1
- package/types/operator.d.ts +180 -0
- package/types/services/account.d.ts +8 -2
- package/types/services/databases.d.ts +158 -8
- package/types/services/functions.d.ts +4 -1
- package/types/services/storage.d.ts +4 -1
- package/types/services/tables-db.d.ts +158 -8
- package/types/services/teams.d.ts +8 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Client, Databases } from "react-native-appwrite";
|
|
1
|
+
import { Client, Databases, Permission, Role } from "react-native-appwrite";
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
@@ -17,7 +17,8 @@ const result = await databases.createDocument({
|
|
|
17
17
|
"age": 30,
|
|
18
18
|
"isAdmin": false
|
|
19
19
|
},
|
|
20
|
-
permissions: ["read("any")"] // optional
|
|
20
|
+
permissions: ["read("any")"], // optional
|
|
21
|
+
transactionId: '<TRANSACTION_ID>' // optional
|
|
21
22
|
});
|
|
22
23
|
|
|
23
24
|
console.log(result);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Client, Databases } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const databases = new Databases(client);
|
|
8
|
+
|
|
9
|
+
const result = await databases.createOperations({
|
|
10
|
+
transactionId: '<TRANSACTION_ID>',
|
|
11
|
+
operations: [
|
|
12
|
+
{
|
|
13
|
+
"action": "create",
|
|
14
|
+
"databaseId": "<DATABASE_ID>",
|
|
15
|
+
"collectionId": "<COLLECTION_ID>",
|
|
16
|
+
"documentId": "<DOCUMENT_ID>",
|
|
17
|
+
"data": {
|
|
18
|
+
"name": "Walter O'Brien"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
] // optional
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
console.log(result);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Client, Databases } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const databases = new Databases(client);
|
|
8
|
+
|
|
9
|
+
const result = await databases.createTransaction({
|
|
10
|
+
ttl: 60 // optional
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
console.log(result);
|
|
@@ -12,7 +12,8 @@ const result = await databases.decrementDocumentAttribute({
|
|
|
12
12
|
documentId: '<DOCUMENT_ID>',
|
|
13
13
|
attribute: '',
|
|
14
14
|
value: 0, // optional
|
|
15
|
-
min: 0 // optional
|
|
15
|
+
min: 0, // optional
|
|
16
|
+
transactionId: '<TRANSACTION_ID>' // optional
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
console.log(result);
|
|
@@ -9,7 +9,8 @@ const databases = new Databases(client);
|
|
|
9
9
|
const result = await databases.deleteDocument({
|
|
10
10
|
databaseId: '<DATABASE_ID>',
|
|
11
11
|
collectionId: '<COLLECTION_ID>',
|
|
12
|
-
documentId: '<DOCUMENT_ID>'
|
|
12
|
+
documentId: '<DOCUMENT_ID>',
|
|
13
|
+
transactionId: '<TRANSACTION_ID>' // optional
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
console.log(result);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Client, Databases } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const databases = new Databases(client);
|
|
8
|
+
|
|
9
|
+
const result = await databases.deleteTransaction({
|
|
10
|
+
transactionId: '<TRANSACTION_ID>'
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
console.log(result);
|
|
@@ -10,7 +10,8 @@ const result = await databases.getDocument({
|
|
|
10
10
|
databaseId: '<DATABASE_ID>',
|
|
11
11
|
collectionId: '<COLLECTION_ID>',
|
|
12
12
|
documentId: '<DOCUMENT_ID>',
|
|
13
|
-
queries: [] // optional
|
|
13
|
+
queries: [], // optional
|
|
14
|
+
transactionId: '<TRANSACTION_ID>' // optional
|
|
14
15
|
});
|
|
15
16
|
|
|
16
17
|
console.log(result);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Client, Databases } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const databases = new Databases(client);
|
|
8
|
+
|
|
9
|
+
const result = await databases.getTransaction({
|
|
10
|
+
transactionId: '<TRANSACTION_ID>'
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
console.log(result);
|
|
@@ -12,7 +12,8 @@ const result = await databases.incrementDocumentAttribute({
|
|
|
12
12
|
documentId: '<DOCUMENT_ID>',
|
|
13
13
|
attribute: '',
|
|
14
14
|
value: 0, // optional
|
|
15
|
-
max: 0 // optional
|
|
15
|
+
max: 0, // optional
|
|
16
|
+
transactionId: '<TRANSACTION_ID>' // optional
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
console.log(result);
|
|
@@ -9,7 +9,9 @@ const databases = new Databases(client);
|
|
|
9
9
|
const result = await databases.listDocuments({
|
|
10
10
|
databaseId: '<DATABASE_ID>',
|
|
11
11
|
collectionId: '<COLLECTION_ID>',
|
|
12
|
-
queries: [] // optional
|
|
12
|
+
queries: [], // optional
|
|
13
|
+
transactionId: '<TRANSACTION_ID>', // optional
|
|
14
|
+
total: false // optional
|
|
13
15
|
});
|
|
14
16
|
|
|
15
17
|
console.log(result);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Client, Databases } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const databases = new Databases(client);
|
|
8
|
+
|
|
9
|
+
const result = await databases.listTransactions({
|
|
10
|
+
queries: [] // optional
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
console.log(result);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Client, Databases } from "react-native-appwrite";
|
|
1
|
+
import { Client, Databases, Permission, Role } from "react-native-appwrite";
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
@@ -11,7 +11,8 @@ const result = await databases.updateDocument({
|
|
|
11
11
|
collectionId: '<COLLECTION_ID>',
|
|
12
12
|
documentId: '<DOCUMENT_ID>',
|
|
13
13
|
data: {}, // optional
|
|
14
|
-
permissions: ["read("any")"] // optional
|
|
14
|
+
permissions: ["read("any")"], // optional
|
|
15
|
+
transactionId: '<TRANSACTION_ID>' // optional
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
console.log(result);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Client, Databases } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const databases = new Databases(client);
|
|
8
|
+
|
|
9
|
+
const result = await databases.updateTransaction({
|
|
10
|
+
transactionId: '<TRANSACTION_ID>',
|
|
11
|
+
commit: false, // optional
|
|
12
|
+
rollback: false // optional
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
console.log(result);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Client, Databases } from "react-native-appwrite";
|
|
1
|
+
import { Client, Databases, Permission, Role } from "react-native-appwrite";
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
@@ -11,7 +11,8 @@ const result = await databases.upsertDocument({
|
|
|
11
11
|
collectionId: '<COLLECTION_ID>',
|
|
12
12
|
documentId: '<DOCUMENT_ID>',
|
|
13
13
|
data: {},
|
|
14
|
-
permissions: ["read("any")"] // optional
|
|
14
|
+
permissions: ["read("any")"], // optional
|
|
15
|
+
transactionId: '<TRANSACTION_ID>' // optional
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
console.log(result);
|
|
@@ -9,7 +9,8 @@ const storage = new Storage(client);
|
|
|
9
9
|
const result = await storage.listFiles({
|
|
10
10
|
bucketId: '<BUCKET_ID>',
|
|
11
11
|
queries: [], // optional
|
|
12
|
-
search: '<SEARCH>' // optional
|
|
12
|
+
search: '<SEARCH>', // optional
|
|
13
|
+
total: false // optional
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
console.log(result);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Client, TablesDB } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const tablesDB = new TablesDB(client);
|
|
8
|
+
|
|
9
|
+
const result = await tablesDB.createOperations({
|
|
10
|
+
transactionId: '<TRANSACTION_ID>',
|
|
11
|
+
operations: [
|
|
12
|
+
{
|
|
13
|
+
"action": "create",
|
|
14
|
+
"databaseId": "<DATABASE_ID>",
|
|
15
|
+
"tableId": "<TABLE_ID>",
|
|
16
|
+
"rowId": "<ROW_ID>",
|
|
17
|
+
"data": {
|
|
18
|
+
"name": "Walter O'Brien"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
] // optional
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
console.log(result);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Client, TablesDB } from "react-native-appwrite";
|
|
1
|
+
import { Client, TablesDB, Permission, Role } from "react-native-appwrite";
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
@@ -17,7 +17,8 @@ const result = await tablesDB.createRow({
|
|
|
17
17
|
"age": 30,
|
|
18
18
|
"isAdmin": false
|
|
19
19
|
},
|
|
20
|
-
permissions: ["read("any")"] // optional
|
|
20
|
+
permissions: ["read("any")"], // optional
|
|
21
|
+
transactionId: '<TRANSACTION_ID>' // optional
|
|
21
22
|
});
|
|
22
23
|
|
|
23
24
|
console.log(result);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Client, TablesDB } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const tablesDB = new TablesDB(client);
|
|
8
|
+
|
|
9
|
+
const result = await tablesDB.createTransaction({
|
|
10
|
+
ttl: 60 // optional
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
console.log(result);
|
|
@@ -9,7 +9,8 @@ const tablesDB = new TablesDB(client);
|
|
|
9
9
|
const result = await tablesDB.deleteRow({
|
|
10
10
|
databaseId: '<DATABASE_ID>',
|
|
11
11
|
tableId: '<TABLE_ID>',
|
|
12
|
-
rowId: '<ROW_ID>'
|
|
12
|
+
rowId: '<ROW_ID>',
|
|
13
|
+
transactionId: '<TRANSACTION_ID>' // optional
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
console.log(result);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Client, TablesDB } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const tablesDB = new TablesDB(client);
|
|
8
|
+
|
|
9
|
+
const result = await tablesDB.deleteTransaction({
|
|
10
|
+
transactionId: '<TRANSACTION_ID>'
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
console.log(result);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Client, TablesDB } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const tablesDB = new TablesDB(client);
|
|
8
|
+
|
|
9
|
+
const result = await tablesDB.getTransaction({
|
|
10
|
+
transactionId: '<TRANSACTION_ID>'
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
console.log(result);
|
|
@@ -9,7 +9,9 @@ const tablesDB = new TablesDB(client);
|
|
|
9
9
|
const result = await tablesDB.listRows({
|
|
10
10
|
databaseId: '<DATABASE_ID>',
|
|
11
11
|
tableId: '<TABLE_ID>',
|
|
12
|
-
queries: [] // optional
|
|
12
|
+
queries: [], // optional
|
|
13
|
+
transactionId: '<TRANSACTION_ID>', // optional
|
|
14
|
+
total: false // optional
|
|
13
15
|
});
|
|
14
16
|
|
|
15
17
|
console.log(result);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Client, TablesDB } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const tablesDB = new TablesDB(client);
|
|
8
|
+
|
|
9
|
+
const result = await tablesDB.listTransactions({
|
|
10
|
+
queries: [] // optional
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
console.log(result);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Client, TablesDB } from "react-native-appwrite";
|
|
1
|
+
import { Client, TablesDB, Permission, Role } from "react-native-appwrite";
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
@@ -11,7 +11,8 @@ const result = await tablesDB.updateRow({
|
|
|
11
11
|
tableId: '<TABLE_ID>',
|
|
12
12
|
rowId: '<ROW_ID>',
|
|
13
13
|
data: {}, // optional
|
|
14
|
-
permissions: ["read("any")"] // optional
|
|
14
|
+
permissions: ["read("any")"], // optional
|
|
15
|
+
transactionId: '<TRANSACTION_ID>' // optional
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
console.log(result);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Client, TablesDB } from "react-native-appwrite";
|
|
2
|
+
|
|
3
|
+
const client = new Client()
|
|
4
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
5
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
6
|
+
|
|
7
|
+
const tablesDB = new TablesDB(client);
|
|
8
|
+
|
|
9
|
+
const result = await tablesDB.updateTransaction({
|
|
10
|
+
transactionId: '<TRANSACTION_ID>',
|
|
11
|
+
commit: false, // optional
|
|
12
|
+
rollback: false // optional
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
console.log(result);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Client, TablesDB } from "react-native-appwrite";
|
|
1
|
+
import { Client, TablesDB, Permission, Role } from "react-native-appwrite";
|
|
2
2
|
|
|
3
3
|
const client = new Client()
|
|
4
4
|
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
@@ -11,7 +11,8 @@ const result = await tablesDB.upsertRow({
|
|
|
11
11
|
tableId: '<TABLE_ID>',
|
|
12
12
|
rowId: '<ROW_ID>',
|
|
13
13
|
data: {}, // optional
|
|
14
|
-
permissions: ["read("any")"] // optional
|
|
14
|
+
permissions: ["read("any")"], // optional
|
|
15
|
+
transactionId: '<TRANSACTION_ID>' // optional
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
console.log(result);
|
|
@@ -9,7 +9,8 @@ const teams = new Teams(client);
|
|
|
9
9
|
const result = await teams.listMemberships({
|
|
10
10
|
teamId: '<TEAM_ID>',
|
|
11
11
|
queries: [], // optional
|
|
12
|
-
search: '<SEARCH>' // optional
|
|
12
|
+
search: '<SEARCH>', // optional
|
|
13
|
+
total: false // optional
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
console.log(result);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "react-native-appwrite",
|
|
3
3
|
"homepage": "https://appwrite.io/support",
|
|
4
4
|
"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",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.18.0",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
"react-native": ">=0.76.7 <1.0.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"expo": "*"
|
|
41
|
-
"react-native": "*"
|
|
40
|
+
"expo": "*"
|
|
42
41
|
}
|
|
43
42
|
}
|
package/src/client.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ export { Query } from './query';
|
|
|
15
15
|
export { Permission } from './permission';
|
|
16
16
|
export { Role } from './role';
|
|
17
17
|
export { ID } from './id';
|
|
18
|
+
export { Operator, Condition } from './operator';
|
|
18
19
|
export { AuthenticatorType } from './enums/authenticator-type';
|
|
19
20
|
export { AuthenticationFactor } from './enums/authentication-factor';
|
|
20
21
|
export { OAuthProvider } from './enums/o-auth-provider';
|
|
@@ -24,3 +25,5 @@ export { Flag } from './enums/flag';
|
|
|
24
25
|
export { ExecutionMethod } from './enums/execution-method';
|
|
25
26
|
export { ImageGravity } from './enums/image-gravity';
|
|
26
27
|
export { ImageFormat } from './enums/image-format';
|
|
28
|
+
export { ExecutionTrigger } from './enums/execution-trigger';
|
|
29
|
+
export { ExecutionStatus } from './enums/execution-status';
|
package/src/models.ts
CHANGED
|
@@ -215,6 +215,20 @@ export namespace Models {
|
|
|
215
215
|
localeCodes: LocaleCode[];
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
/**
|
|
219
|
+
* Transaction List
|
|
220
|
+
*/
|
|
221
|
+
export type TransactionList = {
|
|
222
|
+
/**
|
|
223
|
+
* Total number of transactions that matched your query.
|
|
224
|
+
*/
|
|
225
|
+
total: number;
|
|
226
|
+
/**
|
|
227
|
+
* List of transactions.
|
|
228
|
+
*/
|
|
229
|
+
transactions: Transaction[];
|
|
230
|
+
}
|
|
231
|
+
|
|
218
232
|
/**
|
|
219
233
|
* Row
|
|
220
234
|
*/
|
|
@@ -1013,7 +1027,7 @@ export namespace Models {
|
|
|
1013
1027
|
*/
|
|
1014
1028
|
trigger: ExecutionTrigger;
|
|
1015
1029
|
/**
|
|
1016
|
-
* The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `
|
|
1030
|
+
* The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, `failed`, or `scheduled`.
|
|
1017
1031
|
*/
|
|
1018
1032
|
status: ExecutionStatus;
|
|
1019
1033
|
/**
|
|
@@ -1238,6 +1252,36 @@ export namespace Models {
|
|
|
1238
1252
|
recoveryCode: boolean;
|
|
1239
1253
|
}
|
|
1240
1254
|
|
|
1255
|
+
/**
|
|
1256
|
+
* Transaction
|
|
1257
|
+
*/
|
|
1258
|
+
export type Transaction = {
|
|
1259
|
+
/**
|
|
1260
|
+
* Transaction ID.
|
|
1261
|
+
*/
|
|
1262
|
+
$id: string;
|
|
1263
|
+
/**
|
|
1264
|
+
* Transaction creation time in ISO 8601 format.
|
|
1265
|
+
*/
|
|
1266
|
+
$createdAt: string;
|
|
1267
|
+
/**
|
|
1268
|
+
* Transaction update date in ISO 8601 format.
|
|
1269
|
+
*/
|
|
1270
|
+
$updatedAt: string;
|
|
1271
|
+
/**
|
|
1272
|
+
* Current status of the transaction. One of: pending, committing, committed, rolled_back, failed.
|
|
1273
|
+
*/
|
|
1274
|
+
status: string;
|
|
1275
|
+
/**
|
|
1276
|
+
* Number of operations in the transaction.
|
|
1277
|
+
*/
|
|
1278
|
+
operations: number;
|
|
1279
|
+
/**
|
|
1280
|
+
* Expiration time in ISO 8601 format.
|
|
1281
|
+
*/
|
|
1282
|
+
expiresAt: string;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1241
1285
|
/**
|
|
1242
1286
|
* Subscriber
|
|
1243
1287
|
*/
|