react-native-appwrite 0.17.1 → 0.19.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 +10 -0
- package/dist/cjs/sdk.js +1009 -21
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1009 -22
- 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/avatars/get-screenshot.md +35 -0
- package/docs/examples/databases/create-document.md +1 -1
- package/docs/examples/databases/list-documents.md +2 -1
- package/docs/examples/databases/update-document.md +1 -1
- package/docs/examples/databases/upsert-document.md +1 -1
- 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-row.md +1 -1
- package/docs/examples/tablesdb/list-rows.md +2 -1
- package/docs/examples/tablesdb/update-row.md +1 -1
- package/docs/examples/tablesdb/upsert-row.md +1 -1
- package/docs/examples/teams/list-memberships.md +2 -1
- package/docs/examples/teams/list.md +2 -1
- package/package.json +3 -4
- package/src/client.ts +1 -1
- package/src/enums/execution-status.ts +1 -0
- package/src/enums/output.ts +9 -0
- package/src/enums/theme.ts +4 -0
- package/src/enums/timezone.ts +421 -0
- package/src/index.ts +6 -0
- package/src/models.ts +1 -1
- package/src/operator.ts +308 -0
- package/src/query.ts +6 -6
- package/src/services/account.ts +34 -16
- package/src/services/avatars.ts +347 -0
- package/src/services/databases.ts +15 -7
- package/src/services/functions.ts +15 -7
- package/src/services/storage.ts +15 -7
- package/src/services/tables-db.ts +15 -7
- package/src/services/teams.ts +30 -14
- package/types/enums/execution-status.d.ts +2 -1
- package/types/enums/output.d.ts +9 -0
- package/types/enums/theme.d.ts +4 -0
- package/types/enums/timezone.d.ts +421 -0
- package/types/index.d.ts +6 -0
- package/types/models.d.ts +1 -1
- package/types/operator.d.ts +180 -0
- package/types/services/account.d.ts +8 -2
- package/types/services/avatars.d.ts +123 -0
- package/types/services/databases.d.ts +4 -1
- package/types/services/functions.d.ts +4 -1
- package/types/services/storage.d.ts +4 -1
- package/types/services/tables-db.d.ts +4 -1
- package/types/services/teams.d.ts +8 -2
- package/.gitpod.yml +0 -10
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Client, Avatars, Theme, Timezone, Output } 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 avatars = new Avatars(client);
|
|
8
|
+
|
|
9
|
+
const result = avatars.getScreenshot({
|
|
10
|
+
url: 'https://example.com',
|
|
11
|
+
headers: {
|
|
12
|
+
"Authorization": "Bearer token123",
|
|
13
|
+
"X-Custom-Header": "value"
|
|
14
|
+
}, // optional
|
|
15
|
+
viewportWidth: 1920, // optional
|
|
16
|
+
viewportHeight: 1080, // optional
|
|
17
|
+
scale: 2, // optional
|
|
18
|
+
theme: Theme.Light, // optional
|
|
19
|
+
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional
|
|
20
|
+
fullpage: true, // optional
|
|
21
|
+
locale: 'en-US', // optional
|
|
22
|
+
timezone: Timezone.AfricaAbidjan, // optional
|
|
23
|
+
latitude: 37.7749, // optional
|
|
24
|
+
longitude: -122.4194, // optional
|
|
25
|
+
accuracy: 100, // optional
|
|
26
|
+
touch: true, // optional
|
|
27
|
+
permissions: ["geolocation","notifications"], // optional
|
|
28
|
+
sleep: 3, // optional
|
|
29
|
+
width: 800, // optional
|
|
30
|
+
height: 600, // optional
|
|
31
|
+
quality: 85, // optional
|
|
32
|
+
output: Output.Jpg // optional
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
console.log(result);
|
|
@@ -10,7 +10,8 @@ const result = await databases.listDocuments({
|
|
|
10
10
|
databaseId: '<DATABASE_ID>',
|
|
11
11
|
collectionId: '<COLLECTION_ID>',
|
|
12
12
|
queries: [], // optional
|
|
13
|
-
transactionId: '<TRANSACTION_ID>' // optional
|
|
13
|
+
transactionId: '<TRANSACTION_ID>', // optional
|
|
14
|
+
total: false // optional
|
|
14
15
|
});
|
|
15
16
|
|
|
16
17
|
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);
|
|
@@ -10,7 +10,8 @@ const result = await tablesDB.listRows({
|
|
|
10
10
|
databaseId: '<DATABASE_ID>',
|
|
11
11
|
tableId: '<TABLE_ID>',
|
|
12
12
|
queries: [], // optional
|
|
13
|
-
transactionId: '<TRANSACTION_ID>' // optional
|
|
13
|
+
transactionId: '<TRANSACTION_ID>', // optional
|
|
14
|
+
total: false // optional
|
|
14
15
|
});
|
|
15
16
|
|
|
16
17
|
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.19.0",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@rollup/plugin-typescript": "8.3.2",
|
|
29
|
-
"playwright": "1.
|
|
29
|
+
"playwright": "1.56.1",
|
|
30
30
|
"rollup": "2.75.4",
|
|
31
31
|
"serve-handler": "6.1.0",
|
|
32
32
|
"tslib": "2.4.0",
|
|
@@ -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