@appwrite.io/console 0.0.1 → 0.1.0-preview-0.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/.travis.yml +32 -0
- package/README.md +2 -2
- package/dist/cjs/sdk.js +7743 -0
- package/dist/cjs/sdk.js.map +1 -0
- package/dist/esm/sdk.js +7725 -0
- package/dist/esm/sdk.js.map +1 -0
- package/dist/iife/sdk.js +7744 -0
- package/docs/examples/account/create.md +1 -1
- package/docs/examples/account/update-password.md +1 -1
- package/docs/examples/databases/update-boolean-attribute.md +18 -0
- package/docs/examples/databases/update-datetime-attribute.md +18 -0
- package/docs/examples/databases/update-email-attribute.md +18 -0
- package/docs/examples/databases/update-enum-attribute.md +18 -0
- package/docs/examples/databases/update-float-attribute.md +18 -0
- package/docs/examples/databases/update-integer-attribute.md +18 -0
- package/docs/examples/databases/update-ip-attribute.md +18 -0
- package/docs/examples/databases/update-string-attribute.md +18 -0
- package/docs/examples/databases/update-url-attribute.md +18 -0
- package/docs/examples/functions/create.md +1 -1
- package/docs/examples/functions/update.md +1 -1
- package/docs/examples/projects/update-auth-password-dictionary.md +18 -0
- package/docs/examples/projects/update-auth-password-history.md +18 -0
- package/docs/examples/teams/create-membership.md +1 -1
- package/docs/examples/teams/get-prefs.md +18 -0
- package/docs/examples/teams/update-name.md +18 -0
- package/docs/examples/teams/update-prefs.md +18 -0
- package/docs/examples/teams/update.md +1 -1
- package/docs/examples/users/update-password.md +1 -1
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/models.ts +15 -3
- package/src/services/account.ts +7 -7
- package/src/services/databases.ts +516 -0
- package/src/services/functions.ts +3 -11
- package/src/services/projects.ts +62 -0
- package/src/services/teams.ts +92 -22
- package/types/client.d.ts +135 -0
- package/types/id.d.ts +4 -0
- package/types/index.d.ts +17 -0
- package/types/models.d.ts +2552 -0
- package/types/permission.d.ts +7 -0
- package/types/query.d.ts +21 -0
- package/types/role.d.ts +8 -0
- package/types/service.d.ts +8 -0
- package/types/services/account.d.ts +442 -0
- package/types/services/avatars.d.ts +145 -0
- package/types/services/databases.d.ts +637 -0
- package/types/services/functions.d.ts +280 -0
- package/types/services/graphql.d.ts +25 -0
- package/types/services/health.d.ts +106 -0
- package/types/services/locale.d.ts +81 -0
- package/types/services/projects.d.ts +400 -0
- package/types/services/storage.d.ts +229 -0
- package/types/services/teams.d.ts +207 -0
- package/types/services/users.d.ts +340 -0
- package/.github/workflows/publish.yml +0 -18
|
@@ -9,7 +9,7 @@ client
|
|
|
9
9
|
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
10
|
;
|
|
11
11
|
|
|
12
|
-
const promise = account.create('[USER_ID]', 'email@example.com', '
|
|
12
|
+
const promise = account.create('[USER_ID]', 'email@example.com', '');
|
|
13
13
|
|
|
14
14
|
promise.then(function (response) {
|
|
15
15
|
console.log(response); // Success
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Databases } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const databases = new Databases(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = databases.updateBooleanAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, false);
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Databases } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const databases = new Databases(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = databases.updateDatetimeAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, '');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Databases } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const databases = new Databases(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = databases.updateEmailAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, 'email@example.com');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Databases } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const databases = new Databases(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = databases.updateEnumAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', [], false, '[DEFAULT]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Databases } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const databases = new Databases(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = databases.updateFloatAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, null, null, null);
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Databases } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const databases = new Databases(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = databases.updateIntegerAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, null, null, null);
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Databases } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const databases = new Databases(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = databases.updateIpAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, '');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Databases } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const databases = new Databases(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = databases.updateStringAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, '[DEFAULT]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Databases } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const databases = new Databases(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = databases.updateUrlAttribute('[DATABASE_ID]', '[COLLECTION_ID]', '', false, 'https://example.com');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -9,7 +9,7 @@ client
|
|
|
9
9
|
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
10
|
;
|
|
11
11
|
|
|
12
|
-
const promise = functions.create('[FUNCTION_ID]', '[NAME]',
|
|
12
|
+
const promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-14.5');
|
|
13
13
|
|
|
14
14
|
promise.then(function (response) {
|
|
15
15
|
console.log(response); // Success
|
|
@@ -9,7 +9,7 @@ client
|
|
|
9
9
|
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
10
|
;
|
|
11
11
|
|
|
12
|
-
const promise = functions.update('[FUNCTION_ID]', '[NAME]'
|
|
12
|
+
const promise = functions.update('[FUNCTION_ID]', '[NAME]');
|
|
13
13
|
|
|
14
14
|
promise.then(function (response) {
|
|
15
15
|
console.log(response); // Success
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Projects } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const projects = new Projects(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = projects.updateAuthPasswordDictionary('[PROJECT_ID]', false);
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Projects } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const projects = new Projects(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = projects.updateAuthPasswordHistory('[PROJECT_ID]', 0);
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -9,7 +9,7 @@ client
|
|
|
9
9
|
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
10
|
;
|
|
11
11
|
|
|
12
|
-
const promise = teams.createMembership('[TEAM_ID]',
|
|
12
|
+
const promise = teams.createMembership('[TEAM_ID]', [], 'https://example.com');
|
|
13
13
|
|
|
14
14
|
promise.then(function (response) {
|
|
15
15
|
console.log(response); // Success
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Teams } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const teams = new Teams(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = teams.getPrefs('[TEAM_ID]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Teams } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const teams = new Teams(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = teams.updateName('[TEAM_ID]', '[NAME]');
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, Teams } from "@appwrite.io/console";
|
|
2
|
+
|
|
3
|
+
const client = new Client();
|
|
4
|
+
|
|
5
|
+
const teams = new Teams(client);
|
|
6
|
+
|
|
7
|
+
client
|
|
8
|
+
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
|
9
|
+
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
|
+
;
|
|
11
|
+
|
|
12
|
+
const promise = teams.updatePrefs('[TEAM_ID]', {});
|
|
13
|
+
|
|
14
|
+
promise.then(function (response) {
|
|
15
|
+
console.log(response); // Success
|
|
16
|
+
}, function (error) {
|
|
17
|
+
console.log(error); // Failure
|
|
18
|
+
});
|
|
@@ -9,7 +9,7 @@ client
|
|
|
9
9
|
.setProject('5df5acd0d48c2') // Your project ID
|
|
10
10
|
;
|
|
11
11
|
|
|
12
|
-
const promise = users.updatePassword('[USER_ID]', '
|
|
12
|
+
const promise = users.updatePassword('[USER_ID]', '');
|
|
13
13
|
|
|
14
14
|
promise.then(function (response) {
|
|
15
15
|
console.log(response); // Success
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@appwrite.io/console",
|
|
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.0.
|
|
5
|
+
"version": "0.1.0-preview-0.0",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
package/src/client.ts
CHANGED
package/src/models.ts
CHANGED
|
@@ -119,7 +119,7 @@ export namespace Models {
|
|
|
119
119
|
/**
|
|
120
120
|
* Teams List
|
|
121
121
|
*/
|
|
122
|
-
export type TeamList = {
|
|
122
|
+
export type TeamList<Preferences extends Models.Preferences> = {
|
|
123
123
|
/**
|
|
124
124
|
* Total number of teams documents that matched your query.
|
|
125
125
|
*/
|
|
@@ -127,7 +127,7 @@ export namespace Models {
|
|
|
127
127
|
/**
|
|
128
128
|
* List of teams.
|
|
129
129
|
*/
|
|
130
|
-
teams: Team[];
|
|
130
|
+
teams: Team<Preferences>[];
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
133
|
* Memberships List
|
|
@@ -1369,7 +1369,7 @@ export namespace Models {
|
|
|
1369
1369
|
/**
|
|
1370
1370
|
* Team
|
|
1371
1371
|
*/
|
|
1372
|
-
export type Team = {
|
|
1372
|
+
export type Team<Preferences extends Models.Preferences> = {
|
|
1373
1373
|
/**
|
|
1374
1374
|
* Team ID.
|
|
1375
1375
|
*/
|
|
@@ -1390,6 +1390,10 @@ export namespace Models {
|
|
|
1390
1390
|
* Total number of team members.
|
|
1391
1391
|
*/
|
|
1392
1392
|
total: number;
|
|
1393
|
+
/**
|
|
1394
|
+
* Team preferences as a key-value object
|
|
1395
|
+
*/
|
|
1396
|
+
prefs: Preferences;
|
|
1393
1397
|
}
|
|
1394
1398
|
/**
|
|
1395
1399
|
* Membership
|
|
@@ -1720,6 +1724,14 @@ export namespace Models {
|
|
|
1720
1724
|
* Max sessions allowed per user. 100 maximum.
|
|
1721
1725
|
*/
|
|
1722
1726
|
authSessionsLimit: number;
|
|
1727
|
+
/**
|
|
1728
|
+
* Max allowed passwords in the history list per user. Max passwords limit allowed in history is 20. Use 0 for disabling password history.
|
|
1729
|
+
*/
|
|
1730
|
+
authPasswordHistory: number;
|
|
1731
|
+
/**
|
|
1732
|
+
* Whether or not to check user's password against most commonly used passwords.
|
|
1733
|
+
*/
|
|
1734
|
+
authPasswordDictionary: boolean;
|
|
1723
1735
|
/**
|
|
1724
1736
|
* List of Providers.
|
|
1725
1737
|
*/
|
package/src/services/account.ts
CHANGED
|
@@ -18,7 +18,7 @@ export class Account extends Service {
|
|
|
18
18
|
* @throws {AppwriteException}
|
|
19
19
|
* @returns {Promise}
|
|
20
20
|
*/
|
|
21
|
-
async get<Preferences extends Models.Preferences>(): Promise<Models.
|
|
21
|
+
async get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>> {
|
|
22
22
|
let path = '/account';
|
|
23
23
|
let payload: Payload = {};
|
|
24
24
|
|
|
@@ -45,7 +45,7 @@ export class Account extends Service {
|
|
|
45
45
|
* @throws {AppwriteException}
|
|
46
46
|
* @returns {Promise}
|
|
47
47
|
*/
|
|
48
|
-
async create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.
|
|
48
|
+
async create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>> {
|
|
49
49
|
if (typeof userId === 'undefined') {
|
|
50
50
|
throw new AppwriteException('Missing required parameter: "userId"');
|
|
51
51
|
}
|
|
@@ -100,7 +100,7 @@ export class Account extends Service {
|
|
|
100
100
|
* @throws {AppwriteException}
|
|
101
101
|
* @returns {Promise}
|
|
102
102
|
*/
|
|
103
|
-
async updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.
|
|
103
|
+
async updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>> {
|
|
104
104
|
if (typeof email === 'undefined') {
|
|
105
105
|
throw new AppwriteException('Missing required parameter: "email"');
|
|
106
106
|
}
|
|
@@ -181,7 +181,7 @@ export class Account extends Service {
|
|
|
181
181
|
* @throws {AppwriteException}
|
|
182
182
|
* @returns {Promise}
|
|
183
183
|
*/
|
|
184
|
-
async updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.
|
|
184
|
+
async updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>> {
|
|
185
185
|
if (typeof name === 'undefined') {
|
|
186
186
|
throw new AppwriteException('Missing required parameter: "name"');
|
|
187
187
|
}
|
|
@@ -247,7 +247,7 @@ export class Account extends Service {
|
|
|
247
247
|
* @throws {AppwriteException}
|
|
248
248
|
* @returns {Promise}
|
|
249
249
|
*/
|
|
250
|
-
async updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.
|
|
250
|
+
async updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.User<Preferences>> {
|
|
251
251
|
if (typeof phone === 'undefined') {
|
|
252
252
|
throw new AppwriteException('Missing required parameter: "phone"');
|
|
253
253
|
}
|
|
@@ -298,11 +298,11 @@ export class Account extends Service {
|
|
|
298
298
|
* stored as is, and replaces any previous value. The maximum allowed prefs
|
|
299
299
|
* size is 64kB and throws error if exceeded.
|
|
300
300
|
*
|
|
301
|
-
* @param {
|
|
301
|
+
* @param {Partial<Preferences>} prefs
|
|
302
302
|
* @throws {AppwriteException}
|
|
303
303
|
* @returns {Promise}
|
|
304
304
|
*/
|
|
305
|
-
async updatePrefs<Preferences extends Models.Preferences>(prefs:
|
|
305
|
+
async updatePrefs<Preferences extends Models.Preferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>> {
|
|
306
306
|
if (typeof prefs === 'undefined') {
|
|
307
307
|
throw new AppwriteException('Missing required parameter: "prefs"');
|
|
308
308
|
}
|