react-native-appwrite 0.10.1 → 0.12.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 +7 -1
- package/README.md +84 -3
- package/dist/cjs/sdk.js +1810 -1113
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1810 -1114
- package/dist/esm/sdk.js.map +1 -1
- package/docs/examples/account/create-email-password-session.md +4 -4
- package/docs/examples/account/create-email-token.md +5 -5
- package/docs/examples/account/{create-magic-u-r-l-token.md → create-magic-url-token.md} +6 -6
- package/docs/examples/account/create-mfa-authenticator.md +3 -3
- package/docs/examples/account/create-mfa-challenge.md +3 -3
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/{create-o-auth2token.md → create-o-auth-2-session.md} +6 -6
- package/docs/examples/account/{create-o-auth2session.md → create-o-auth-2-token.md} +6 -6
- package/docs/examples/account/create-phone-token.md +4 -4
- package/docs/examples/account/create-push-target.md +5 -5
- package/docs/examples/account/create-recovery.md +4 -4
- package/docs/examples/account/create-session.md +4 -4
- package/docs/examples/account/create-verification.md +3 -3
- package/docs/examples/account/create.md +6 -6
- package/docs/examples/account/delete-identity.md +3 -3
- package/docs/examples/account/delete-mfa-authenticator.md +3 -3
- package/docs/examples/account/delete-push-target.md +3 -3
- package/docs/examples/account/delete-session.md +3 -3
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/get-session.md +3 -3
- package/docs/examples/account/list-identities.md +3 -3
- package/docs/examples/account/list-logs.md +3 -3
- package/docs/examples/account/list-mfa-factors.md +1 -1
- package/docs/examples/account/update-email.md +4 -4
- package/docs/examples/account/{update-magic-u-r-l-session.md → update-magic-url-session.md} +4 -4
- package/docs/examples/account/update-mfa-authenticator.md +4 -4
- package/docs/examples/account/update-mfa-challenge.md +4 -4
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
- package/docs/examples/account/{update-m-f-a.md → update-mfa.md} +3 -3
- package/docs/examples/account/update-name.md +3 -3
- package/docs/examples/account/update-password.md +4 -4
- package/docs/examples/account/update-phone-session.md +4 -4
- package/docs/examples/account/update-phone-verification.md +4 -4
- package/docs/examples/account/update-phone.md +4 -4
- package/docs/examples/account/update-prefs.md +3 -3
- package/docs/examples/account/update-push-target.md +4 -4
- package/docs/examples/account/update-recovery.md +5 -5
- package/docs/examples/account/update-session.md +3 -3
- package/docs/examples/account/update-verification.md +4 -4
- package/docs/examples/avatars/get-browser.md +6 -6
- package/docs/examples/avatars/get-credit-card.md +6 -6
- package/docs/examples/avatars/get-favicon.md +3 -3
- package/docs/examples/avatars/get-flag.md +6 -6
- package/docs/examples/avatars/get-image.md +5 -5
- package/docs/examples/avatars/get-initials.md +6 -6
- package/docs/examples/avatars/{get-q-r.md → get-qr.md} +6 -6
- package/docs/examples/databases/create-document.md +8 -10
- package/docs/examples/databases/decrement-document-attribute.md +18 -0
- package/docs/examples/databases/delete-document.md +5 -5
- package/docs/examples/databases/get-document.md +6 -6
- package/docs/examples/databases/increment-document-attribute.md +18 -0
- package/docs/examples/databases/list-documents.md +5 -5
- package/docs/examples/databases/update-document.md +7 -7
- package/docs/examples/databases/upsert-document.md +7 -7
- package/docs/examples/functions/create-execution.md +9 -9
- package/docs/examples/functions/get-execution.md +4 -4
- package/docs/examples/functions/list-executions.md +4 -4
- package/docs/examples/graphql/mutation.md +3 -3
- package/docs/examples/graphql/query.md +3 -3
- package/docs/examples/messaging/create-subscriber.md +5 -5
- package/docs/examples/messaging/delete-subscriber.md +4 -4
- package/docs/examples/storage/create-file.md +6 -6
- package/docs/examples/storage/delete-file.md +4 -4
- package/docs/examples/storage/get-file-download.md +5 -5
- package/docs/examples/storage/get-file-preview.md +16 -16
- package/docs/examples/storage/get-file-view.md +5 -5
- package/docs/examples/storage/get-file.md +4 -4
- package/docs/examples/storage/list-files.md +5 -5
- package/docs/examples/storage/update-file.md +6 -6
- package/docs/examples/tablesdb/create-row.md +17 -0
- package/docs/examples/tablesdb/decrement-row-column.md +18 -0
- package/docs/examples/tablesdb/delete-row.md +15 -0
- package/docs/examples/tablesdb/get-row.md +16 -0
- package/docs/examples/tablesdb/increment-row-column.md +18 -0
- package/docs/examples/tablesdb/list-rows.md +15 -0
- package/docs/examples/tablesdb/update-row.md +17 -0
- package/docs/examples/tablesdb/upsert-row.md +17 -0
- package/docs/examples/teams/create-membership.md +9 -9
- package/docs/examples/teams/create.md +5 -5
- package/docs/examples/teams/delete-membership.md +4 -4
- package/docs/examples/teams/delete.md +3 -3
- package/docs/examples/teams/get-membership.md +4 -4
- package/docs/examples/teams/get-prefs.md +3 -3
- package/docs/examples/teams/get.md +3 -3
- package/docs/examples/teams/list-memberships.md +5 -5
- package/docs/examples/teams/list.md +4 -4
- package/docs/examples/teams/update-membership-status.md +6 -6
- package/docs/examples/teams/update-membership.md +5 -5
- package/docs/examples/teams/update-name.md +4 -4
- package/docs/examples/teams/update-prefs.md +4 -4
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/index.ts +1 -0
- package/src/models.ts +139 -21
- package/src/query.ts +95 -0
- package/src/services/account.ts +1518 -364
- package/src/services/avatars.ts +296 -87
- package/src/services/databases.ts +438 -55
- package/src/services/functions.ts +118 -23
- package/src/services/graphql.ts +54 -6
- package/src/services/locale.ts +16 -27
- package/src/services/messaging.ts +68 -9
- package/src/services/storage.ts +353 -84
- package/src/services/tables-db.ts +621 -0
- package/src/services/teams.ts +467 -106
- package/types/index.d.ts +1 -0
- package/types/models.d.ts +127 -62
- package/types/query.d.ts +77 -0
- package/types/services/account.d.ts +791 -337
- package/types/services/avatars.d.ts +175 -80
- package/types/services/databases.d.ts +220 -53
- package/types/services/functions.d.ts +65 -20
- package/types/services/graphql.d.ts +26 -4
- package/types/services/locale.d.ts +16 -27
- package/types/services/messaging.d.ts +35 -7
- package/types/services/storage.d.ts +209 -76
- package/types/services/tables-db.d.ts +245 -0
- package/types/services/teams.d.ts +261 -99
- /package/docs/examples/account/{create-j-w-t.md → create-jwt.md} +0 -0
- /package/docs/examples/locale/{list-countries-e-u.md → list-countries-eu.md} +0 -0
|
@@ -6,10 +6,10 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
9
|
-
const result = await teams.create(
|
|
10
|
-
'<TEAM_ID>',
|
|
11
|
-
'<NAME>',
|
|
12
|
-
[] //
|
|
13
|
-
);
|
|
9
|
+
const result = await teams.create({
|
|
10
|
+
teamId: '<TEAM_ID>',
|
|
11
|
+
name: '<NAME>',
|
|
12
|
+
roles: [] // optional
|
|
13
|
+
});
|
|
14
14
|
|
|
15
15
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
9
|
-
const result = await teams.deleteMembership(
|
|
10
|
-
'<TEAM_ID>',
|
|
11
|
-
'<MEMBERSHIP_ID>'
|
|
12
|
-
);
|
|
9
|
+
const result = await teams.deleteMembership({
|
|
10
|
+
teamId: '<TEAM_ID>',
|
|
11
|
+
membershipId: '<MEMBERSHIP_ID>'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
9
|
-
const result = await teams.getMembership(
|
|
10
|
-
'<TEAM_ID>',
|
|
11
|
-
'<MEMBERSHIP_ID>'
|
|
12
|
-
);
|
|
9
|
+
const result = await teams.getMembership({
|
|
10
|
+
teamId: '<TEAM_ID>',
|
|
11
|
+
membershipId: '<MEMBERSHIP_ID>'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,10 +6,10 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
9
|
-
const result = await teams.listMemberships(
|
|
10
|
-
'<TEAM_ID>',
|
|
11
|
-
[], //
|
|
12
|
-
'<SEARCH>' //
|
|
13
|
-
);
|
|
9
|
+
const result = await teams.listMemberships({
|
|
10
|
+
teamId: '<TEAM_ID>',
|
|
11
|
+
queries: [], // optional
|
|
12
|
+
search: '<SEARCH>' // optional
|
|
13
|
+
});
|
|
14
14
|
|
|
15
15
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
9
|
-
const result = await teams.list(
|
|
10
|
-
[], //
|
|
11
|
-
'<SEARCH>' //
|
|
12
|
-
);
|
|
9
|
+
const result = await teams.list({
|
|
10
|
+
queries: [], // optional
|
|
11
|
+
search: '<SEARCH>' // optional
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,11 +6,11 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
9
|
-
const result = await teams.updateMembershipStatus(
|
|
10
|
-
'<TEAM_ID>',
|
|
11
|
-
'<MEMBERSHIP_ID>',
|
|
12
|
-
'<USER_ID>',
|
|
13
|
-
'<SECRET>'
|
|
14
|
-
);
|
|
9
|
+
const result = await teams.updateMembershipStatus({
|
|
10
|
+
teamId: '<TEAM_ID>',
|
|
11
|
+
membershipId: '<MEMBERSHIP_ID>',
|
|
12
|
+
userId: '<USER_ID>',
|
|
13
|
+
secret: '<SECRET>'
|
|
14
|
+
});
|
|
15
15
|
|
|
16
16
|
console.log(result);
|
|
@@ -6,10 +6,10 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
9
|
-
const result = await teams.updateMembership(
|
|
10
|
-
'<TEAM_ID>',
|
|
11
|
-
'<MEMBERSHIP_ID>',
|
|
12
|
-
[]
|
|
13
|
-
);
|
|
9
|
+
const result = await teams.updateMembership({
|
|
10
|
+
teamId: '<TEAM_ID>',
|
|
11
|
+
membershipId: '<MEMBERSHIP_ID>',
|
|
12
|
+
roles: []
|
|
13
|
+
});
|
|
14
14
|
|
|
15
15
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
9
|
-
const result = await teams.updateName(
|
|
10
|
-
'<TEAM_ID>',
|
|
11
|
-
'<NAME>'
|
|
12
|
-
);
|
|
9
|
+
const result = await teams.updateName({
|
|
10
|
+
teamId: '<TEAM_ID>',
|
|
11
|
+
name: '<NAME>'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const teams = new Teams(client);
|
|
8
8
|
|
|
9
|
-
const result = await teams.updatePrefs(
|
|
10
|
-
'<TEAM_ID>',
|
|
11
|
-
{}
|
|
12
|
-
);
|
|
9
|
+
const result = await teams.updatePrefs({
|
|
10
|
+
teamId: '<TEAM_ID>',
|
|
11
|
+
prefs: {}
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
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.12.0",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
package/src/client.ts
CHANGED
|
@@ -115,8 +115,8 @@ class Client {
|
|
|
115
115
|
'x-sdk-name': 'React Native',
|
|
116
116
|
'x-sdk-platform': 'client',
|
|
117
117
|
'x-sdk-language': 'reactnative',
|
|
118
|
-
'x-sdk-version': '0.
|
|
119
|
-
'X-Appwrite-Response-Format': '1.
|
|
118
|
+
'x-sdk-version': '0.12.0',
|
|
119
|
+
'X-Appwrite-Response-Format': '1.8.0',
|
|
120
120
|
};
|
|
121
121
|
|
|
122
122
|
/**
|
package/src/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { Graphql } from './services/graphql';
|
|
|
7
7
|
export { Locale } from './services/locale';
|
|
8
8
|
export { Messaging } from './services/messaging';
|
|
9
9
|
export { Storage } from './services/storage';
|
|
10
|
+
export { TablesDB } from './services/tables-db';
|
|
10
11
|
export { Teams } from './services/teams';
|
|
11
12
|
export type { Models, Payload, RealtimeResponseEvent, UploadProgress } from './client';
|
|
12
13
|
export type { QueryTypes, QueryTypesList } from './query';
|