react-native-appwrite 0.11.0 → 0.13.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/README.md +84 -3
- package/dist/cjs/sdk.js +1854 -1121
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1854 -1122
- 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 +7 -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 +13 -7
- package/docs/examples/databases/decrement-document-attribute.md +8 -8
- 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 +8 -8
- 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 +23 -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/enums/credit-card.ts +1 -1
- package/src/enums/execution-method.ts +1 -0
- package/src/index.ts +1 -0
- package/src/models.ts +72 -27
- package/src/query.ts +247 -4
- package/src/services/account.ts +1469 -315
- package/src/services/avatars.ts +289 -80
- package/src/services/databases.ts +345 -63
- package/src/services/functions.ts +115 -20
- package/src/services/graphql.ts +52 -4
- package/src/services/locale.ts +8 -19
- package/src/services/messaging.ts +66 -7
- package/src/services/storage.ts +345 -76
- package/src/services/tables-db.ts +621 -0
- package/src/services/teams.ts +454 -93
- package/types/enums/credit-card.d.ts +1 -1
- package/types/enums/execution-method.d.ts +2 -1
- package/types/index.d.ts +1 -0
- package/types/models.d.ts +69 -25
- package/types/query.d.ts +201 -4
- package/types/services/account.d.ts +734 -280
- package/types/services/avatars.d.ts +168 -73
- package/types/services/databases.d.ts +199 -58
- package/types/services/functions.d.ts +62 -17
- package/types/services/graphql.d.ts +24 -2
- package/types/services/locale.d.ts +8 -19
- package/types/services/messaging.d.ts +33 -5
- package/types/services/storage.d.ts +201 -68
- package/types/services/tables-db.d.ts +245 -0
- package/types/services/teams.d.ts +242 -80
- /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,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.createEmailPasswordSession(
|
|
10
|
-
'email@example.com',
|
|
11
|
-
'password'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.createEmailPasswordSession({
|
|
10
|
+
email: 'email@example.com',
|
|
11
|
+
password: 'password'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,10 +6,10 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.createEmailToken(
|
|
10
|
-
'<USER_ID>',
|
|
11
|
-
'email@example.com',
|
|
12
|
-
false //
|
|
13
|
-
);
|
|
9
|
+
const result = await account.createEmailToken({
|
|
10
|
+
userId: '<USER_ID>',
|
|
11
|
+
email: 'email@example.com',
|
|
12
|
+
phrase: false // optional
|
|
13
|
+
});
|
|
14
14
|
|
|
15
15
|
console.log(result);
|
|
@@ -6,11 +6,11 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.createMagicURLToken(
|
|
10
|
-
'<USER_ID>',
|
|
11
|
-
'email@example.com',
|
|
12
|
-
'https://example.com', //
|
|
13
|
-
false //
|
|
14
|
-
);
|
|
9
|
+
const result = await account.createMagicURLToken({
|
|
10
|
+
userId: '<USER_ID>',
|
|
11
|
+
email: 'email@example.com',
|
|
12
|
+
url: 'https://example.com', // optional
|
|
13
|
+
phrase: false // optional
|
|
14
|
+
});
|
|
15
15
|
|
|
16
16
|
console.log(result);
|
|
@@ -6,8 +6,8 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.
|
|
10
|
-
AuthenticatorType.Totp
|
|
11
|
-
);
|
|
9
|
+
const result = await account.createMFAAuthenticator({
|
|
10
|
+
type: AuthenticatorType.Totp
|
|
11
|
+
});
|
|
12
12
|
|
|
13
13
|
console.log(result);
|
|
@@ -6,8 +6,8 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.
|
|
10
|
-
AuthenticationFactor.Email
|
|
11
|
-
);
|
|
9
|
+
const result = await account.createMFAChallenge({
|
|
10
|
+
factor: AuthenticationFactor.Email
|
|
11
|
+
});
|
|
12
12
|
|
|
13
13
|
console.log(result);
|
|
@@ -6,10 +6,10 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
account.
|
|
10
|
-
OAuthProvider.Amazon,
|
|
11
|
-
'https://example.com', //
|
|
12
|
-
'https://example.com', //
|
|
13
|
-
[] //
|
|
14
|
-
);
|
|
9
|
+
account.createOAuth2Session({
|
|
10
|
+
provider: OAuthProvider.Amazon,
|
|
11
|
+
success: 'https://example.com', // optional
|
|
12
|
+
failure: 'https://example.com', // optional
|
|
13
|
+
scopes: [] // optional
|
|
14
|
+
});
|
|
15
15
|
|
|
@@ -6,10 +6,10 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
account.
|
|
10
|
-
OAuthProvider.Amazon,
|
|
11
|
-
'https://example.com', //
|
|
12
|
-
'https://example.com', //
|
|
13
|
-
[] //
|
|
14
|
-
);
|
|
9
|
+
account.createOAuth2Token({
|
|
10
|
+
provider: OAuthProvider.Amazon,
|
|
11
|
+
success: 'https://example.com', // optional
|
|
12
|
+
failure: 'https://example.com', // optional
|
|
13
|
+
scopes: [] // optional
|
|
14
|
+
});
|
|
15
15
|
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.createPhoneToken(
|
|
10
|
-
'<USER_ID>',
|
|
11
|
-
'+12065550100'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.createPhoneToken({
|
|
10
|
+
userId: '<USER_ID>',
|
|
11
|
+
phone: '+12065550100'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,10 +6,10 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.createPushTarget(
|
|
10
|
-
'<TARGET_ID>',
|
|
11
|
-
'<IDENTIFIER>',
|
|
12
|
-
'<PROVIDER_ID>' //
|
|
13
|
-
);
|
|
9
|
+
const result = await account.createPushTarget({
|
|
10
|
+
targetId: '<TARGET_ID>',
|
|
11
|
+
identifier: '<IDENTIFIER>',
|
|
12
|
+
providerId: '<PROVIDER_ID>' // optional
|
|
13
|
+
});
|
|
14
14
|
|
|
15
15
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.createRecovery(
|
|
10
|
-
'email@example.com',
|
|
11
|
-
'https://example.com'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.createRecovery({
|
|
10
|
+
email: 'email@example.com',
|
|
11
|
+
url: 'https://example.com'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.createSession(
|
|
10
|
-
'<USER_ID>',
|
|
11
|
-
'<SECRET>'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.createSession({
|
|
10
|
+
userId: '<USER_ID>',
|
|
11
|
+
secret: '<SECRET>'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,8 +6,8 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.createVerification(
|
|
10
|
-
'https://example.com'
|
|
11
|
-
);
|
|
9
|
+
const result = await account.createVerification({
|
|
10
|
+
url: 'https://example.com'
|
|
11
|
+
});
|
|
12
12
|
|
|
13
13
|
console.log(result);
|
|
@@ -6,11 +6,11 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.create(
|
|
10
|
-
'<USER_ID>',
|
|
11
|
-
'email@example.com',
|
|
12
|
-
'',
|
|
13
|
-
'<NAME>' //
|
|
14
|
-
);
|
|
9
|
+
const result = await account.create({
|
|
10
|
+
userId: '<USER_ID>',
|
|
11
|
+
email: 'email@example.com',
|
|
12
|
+
password: '',
|
|
13
|
+
name: '<NAME>' // optional
|
|
14
|
+
});
|
|
15
15
|
|
|
16
16
|
console.log(result);
|
|
@@ -6,8 +6,8 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.deleteIdentity(
|
|
10
|
-
'<IDENTITY_ID>'
|
|
11
|
-
);
|
|
9
|
+
const result = await account.deleteIdentity({
|
|
10
|
+
identityId: '<IDENTITY_ID>'
|
|
11
|
+
});
|
|
12
12
|
|
|
13
13
|
console.log(result);
|
|
@@ -6,8 +6,8 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.
|
|
10
|
-
AuthenticatorType.Totp
|
|
11
|
-
);
|
|
9
|
+
const result = await account.deleteMFAAuthenticator({
|
|
10
|
+
type: AuthenticatorType.Totp
|
|
11
|
+
});
|
|
12
12
|
|
|
13
13
|
console.log(result);
|
|
@@ -6,8 +6,8 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.deletePushTarget(
|
|
10
|
-
'<TARGET_ID>'
|
|
11
|
-
);
|
|
9
|
+
const result = await account.deletePushTarget({
|
|
10
|
+
targetId: '<TARGET_ID>'
|
|
11
|
+
});
|
|
12
12
|
|
|
13
13
|
console.log(result);
|
|
@@ -6,8 +6,8 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.deleteSession(
|
|
10
|
-
'<SESSION_ID>'
|
|
11
|
-
);
|
|
9
|
+
const result = await account.deleteSession({
|
|
10
|
+
sessionId: '<SESSION_ID>'
|
|
11
|
+
});
|
|
12
12
|
|
|
13
13
|
console.log(result);
|
|
@@ -6,8 +6,8 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.listIdentities(
|
|
10
|
-
[] //
|
|
11
|
-
);
|
|
9
|
+
const result = await account.listIdentities({
|
|
10
|
+
queries: [] // optional
|
|
11
|
+
});
|
|
12
12
|
|
|
13
13
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.updateEmail(
|
|
10
|
-
'email@example.com',
|
|
11
|
-
'password'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.updateEmail({
|
|
10
|
+
email: 'email@example.com',
|
|
11
|
+
password: 'password'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.updateMagicURLSession(
|
|
10
|
-
'<USER_ID>',
|
|
11
|
-
'<SECRET>'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.updateMagicURLSession({
|
|
10
|
+
userId: '<USER_ID>',
|
|
11
|
+
secret: '<SECRET>'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.
|
|
10
|
-
AuthenticatorType.Totp,
|
|
11
|
-
'<OTP>'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.updateMFAAuthenticator({
|
|
10
|
+
type: AuthenticatorType.Totp,
|
|
11
|
+
otp: '<OTP>'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.
|
|
10
|
-
'<CHALLENGE_ID>',
|
|
11
|
-
'<OTP>'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.updateMFAChallenge({
|
|
10
|
+
challengeId: '<CHALLENGE_ID>',
|
|
11
|
+
otp: '<OTP>'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.updatePassword(
|
|
10
|
-
'',
|
|
11
|
-
'password' //
|
|
12
|
-
);
|
|
9
|
+
const result = await account.updatePassword({
|
|
10
|
+
password: '',
|
|
11
|
+
oldPassword: 'password' // optional
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.updatePhoneSession(
|
|
10
|
-
'<USER_ID>',
|
|
11
|
-
'<SECRET>'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.updatePhoneSession({
|
|
10
|
+
userId: '<USER_ID>',
|
|
11
|
+
secret: '<SECRET>'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.updatePhoneVerification(
|
|
10
|
-
'<USER_ID>',
|
|
11
|
-
'<SECRET>'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.updatePhoneVerification({
|
|
10
|
+
userId: '<USER_ID>',
|
|
11
|
+
secret: '<SECRET>'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.updatePhone(
|
|
10
|
-
'+12065550100',
|
|
11
|
-
'password'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.updatePhone({
|
|
10
|
+
phone: '+12065550100',
|
|
11
|
+
password: 'password'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,8 +6,12 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.updatePrefs(
|
|
10
|
-
{
|
|
11
|
-
|
|
9
|
+
const result = await account.updatePrefs({
|
|
10
|
+
prefs: {
|
|
11
|
+
"language": "en",
|
|
12
|
+
"timezone": "UTC",
|
|
13
|
+
"darkTheme": true
|
|
14
|
+
}
|
|
15
|
+
});
|
|
12
16
|
|
|
13
17
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.updatePushTarget(
|
|
10
|
-
'<TARGET_ID>',
|
|
11
|
-
'<IDENTIFIER>'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.updatePushTarget({
|
|
10
|
+
targetId: '<TARGET_ID>',
|
|
11
|
+
identifier: '<IDENTIFIER>'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,10 +6,10 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.updateRecovery(
|
|
10
|
-
'<USER_ID>',
|
|
11
|
-
'<SECRET>',
|
|
12
|
-
''
|
|
13
|
-
);
|
|
9
|
+
const result = await account.updateRecovery({
|
|
10
|
+
userId: '<USER_ID>',
|
|
11
|
+
secret: '<SECRET>',
|
|
12
|
+
password: ''
|
|
13
|
+
});
|
|
14
14
|
|
|
15
15
|
console.log(result);
|
|
@@ -6,8 +6,8 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.updateSession(
|
|
10
|
-
'<SESSION_ID>'
|
|
11
|
-
);
|
|
9
|
+
const result = await account.updateSession({
|
|
10
|
+
sessionId: '<SESSION_ID>'
|
|
11
|
+
});
|
|
12
12
|
|
|
13
13
|
console.log(result);
|
|
@@ -6,9 +6,9 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const account = new Account(client);
|
|
8
8
|
|
|
9
|
-
const result = await account.updateVerification(
|
|
10
|
-
'<USER_ID>',
|
|
11
|
-
'<SECRET>'
|
|
12
|
-
);
|
|
9
|
+
const result = await account.updateVerification({
|
|
10
|
+
userId: '<USER_ID>',
|
|
11
|
+
secret: '<SECRET>'
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
console.log(result);
|
|
@@ -6,11 +6,11 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const avatars = new Avatars(client);
|
|
8
8
|
|
|
9
|
-
const result = avatars.getBrowser(
|
|
10
|
-
Browser.AvantBrowser,
|
|
11
|
-
0, //
|
|
12
|
-
0, //
|
|
13
|
-
-1 //
|
|
14
|
-
);
|
|
9
|
+
const result = avatars.getBrowser({
|
|
10
|
+
code: Browser.AvantBrowser,
|
|
11
|
+
width: 0, // optional
|
|
12
|
+
height: 0, // optional
|
|
13
|
+
quality: -1 // optional
|
|
14
|
+
});
|
|
15
15
|
|
|
16
16
|
console.log(result);
|
|
@@ -6,11 +6,11 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const avatars = new Avatars(client);
|
|
8
8
|
|
|
9
|
-
const result = avatars.getCreditCard(
|
|
10
|
-
CreditCard.AmericanExpress,
|
|
11
|
-
0, //
|
|
12
|
-
0, //
|
|
13
|
-
-1 //
|
|
14
|
-
);
|
|
9
|
+
const result = avatars.getCreditCard({
|
|
10
|
+
code: CreditCard.AmericanExpress,
|
|
11
|
+
width: 0, // optional
|
|
12
|
+
height: 0, // optional
|
|
13
|
+
quality: -1 // optional
|
|
14
|
+
});
|
|
15
15
|
|
|
16
16
|
console.log(result);
|
|
@@ -6,11 +6,11 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const avatars = new Avatars(client);
|
|
8
8
|
|
|
9
|
-
const result = avatars.getFlag(
|
|
10
|
-
Flag.Afghanistan,
|
|
11
|
-
0, //
|
|
12
|
-
0, //
|
|
13
|
-
-1 //
|
|
14
|
-
);
|
|
9
|
+
const result = avatars.getFlag({
|
|
10
|
+
code: Flag.Afghanistan,
|
|
11
|
+
width: 0, // optional
|
|
12
|
+
height: 0, // optional
|
|
13
|
+
quality: -1 // optional
|
|
14
|
+
});
|
|
15
15
|
|
|
16
16
|
console.log(result);
|
|
@@ -6,10 +6,10 @@ const client = new Client()
|
|
|
6
6
|
|
|
7
7
|
const avatars = new Avatars(client);
|
|
8
8
|
|
|
9
|
-
const result = avatars.getImage(
|
|
10
|
-
'https://example.com',
|
|
11
|
-
0, //
|
|
12
|
-
0 //
|
|
13
|
-
);
|
|
9
|
+
const result = avatars.getImage({
|
|
10
|
+
url: 'https://example.com',
|
|
11
|
+
width: 0, // optional
|
|
12
|
+
height: 0 // optional
|
|
13
|
+
});
|
|
14
14
|
|
|
15
15
|
console.log(result);
|