Skip to content

Commit 28d9574

Browse files
committed
Add 1.8.x support
1 parent a50fbed commit 28d9574

File tree

88 files changed

+809
-391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+809
-391
lines changed

docs/examples/account/create-email-password-session.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const result = await account.createEmailPasswordSession(
10-
'[email protected]', // email
11-
'password' // password
12-
);
9+
const result = await account.createEmailPasswordSession({
10+
11+
password: 'password'
12+
});
1313

1414
console.log(result);

docs/examples/account/create-email-token.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const result = await account.createEmailToken(
10-
'<USER_ID>', // userId
11-
'[email protected]', // email
12-
false // phrase (optional)
13-
);
9+
const result = await account.createEmailToken({
10+
userId: '<USER_ID>',
11+
12+
phrase: false
13+
});
1414

1515
console.log(result);

docs/examples/account/create-magic-u-r-l-token.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const result = await account.createMagicURLToken(
10-
'<USER_ID>', // userId
11-
'[email protected]', // email
12-
'https://example.com', // url (optional)
13-
false // phrase (optional)
14-
);
9+
const result = await account.createMagicURLToken({
10+
userId: '<USER_ID>',
11+
12+
url: 'https://example.com',
13+
phrase: false
14+
});
1515

1616
console.log(result);

docs/examples/account/create-mfa-authenticator.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const result = await account.createMfaAuthenticator(
10-
AuthenticatorType.Totp // type
11-
);
9+
const result = await account.createMfaAuthenticator({
10+
type: AuthenticatorType.Totp
11+
});
1212

1313
console.log(result);

docs/examples/account/create-mfa-challenge.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const result = await account.createMfaChallenge(
10-
AuthenticationFactor.Email // factor
11-
);
9+
const result = await account.createMfaChallenge({
10+
factor: AuthenticationFactor.Email
11+
});
1212

1313
console.log(result);

docs/examples/account/create-o-auth2session.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
account.createOAuth2Session(
10-
OAuthProvider.Amazon, // provider
11-
'https://example.com', // success (optional)
12-
'https://example.com', // failure (optional)
13-
[] // scopes (optional)
14-
);
9+
account.createOAuth2Session({
10+
provider: OAuthProvider.Amazon,
11+
success: 'https://example.com',
12+
failure: 'https://example.com',
13+
scopes: []
14+
});
1515

docs/examples/account/create-o-auth2token.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
account.createOAuth2Token(
10-
OAuthProvider.Amazon, // provider
11-
'https://example.com', // success (optional)
12-
'https://example.com', // failure (optional)
13-
[] // scopes (optional)
14-
);
9+
account.createOAuth2Token({
10+
provider: OAuthProvider.Amazon,
11+
success: 'https://example.com',
12+
failure: 'https://example.com',
13+
scopes: []
14+
});
1515

docs/examples/account/create-phone-token.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const result = await account.createPhoneToken(
10-
'<USER_ID>', // userId
11-
'+12065550100' // phone
12-
);
9+
const result = await account.createPhoneToken({
10+
userId: '<USER_ID>',
11+
phone: '+12065550100'
12+
});
1313

1414
console.log(result);

docs/examples/account/create-push-target.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const result = await account.createPushTarget(
10-
'<TARGET_ID>', // targetId
11-
'<IDENTIFIER>', // identifier
12-
'<PROVIDER_ID>' // providerId (optional)
13-
);
9+
const result = await account.createPushTarget({
10+
targetId: '<TARGET_ID>',
11+
identifier: '<IDENTIFIER>',
12+
providerId: '<PROVIDER_ID>'
13+
});
1414

1515
console.log(result);

docs/examples/account/create-recovery.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const result = await account.createRecovery(
10-
'[email protected]', // email
11-
'https://example.com' // url
12-
);
9+
const result = await account.createRecovery({
10+
11+
url: 'https://example.com'
12+
});
1313

1414
console.log(result);

0 commit comments

Comments
 (0)