1
0
Fork 0
mirror of synced 2024-06-13 16:24:47 +12:00

chore: generate docs

This commit is contained in:
Torsten Dittmann 2024-03-04 10:08:13 +01:00
parent 0cb1fed43a
commit 2af73cb54e
314 changed files with 3305 additions and 37 deletions

View file

@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.Type;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createMfaAuthenticator(
type.TOTP, // type
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);

View file

@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.Factor;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createMfaChallenge(
factor.EMAIL, // factor
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);

View file

@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.createMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));

View file

@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.Type;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.deleteMfaAuthenticator(
type.TOTP, // type
"<OTP>", // otp
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);

View file

@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.getMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));

View file

@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.listMfaFactors(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));

View file

@ -0,0 +1,24 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
import io.appwrite.enums.Type;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateMfaAuthenticator(
type.TOTP, // type
"<OTP>", // otp
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);

View file

@ -0,0 +1,23 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateMfaChallenge(
"<CHALLENGE_ID>", // challengeId
"<OTP>", // otp
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);

View file

@ -0,0 +1,18 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2"); // Your project ID
Account account = new Account(client);
account.updateMfaRecoveryCodes(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
}));

View file

@ -0,0 +1,14 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
import io.appwrite.enums.Type
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val result = account.createMfaAuthenticator(
type = type.TOTP,
)

View file

@ -0,0 +1,14 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
import io.appwrite.enums.Factor
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val result = account.createMfaChallenge(
factor = factor.EMAIL,
)

View file

@ -0,0 +1,11 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val result = account.createMfaRecoveryCodes()

View file

@ -0,0 +1,15 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
import io.appwrite.enums.Type
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val result = account.deleteMfaAuthenticator(
type = type.TOTP,
otp = "<OTP>",
)

View file

@ -0,0 +1,11 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val result = account.getMfaRecoveryCodes()

View file

@ -0,0 +1,11 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val result = account.listMfaFactors()

View file

@ -0,0 +1,15 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
import io.appwrite.enums.Type
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val result = account.updateMfaAuthenticator(
type = type.TOTP,
otp = "<OTP>",
)

View file

@ -0,0 +1,14 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val result = account.updateMfaChallenge(
challengeId = "<CHALLENGE_ID>",
otp = "<OTP>",
)

View file

@ -0,0 +1,11 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Account
val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val account = Account(client)
val result = account.updateMfaRecoveryCodes()

View file

@ -0,0 +1,13 @@
import Appwrite
import AppwriteEnums
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
let mfaType = try await account.createMfaAuthenticator(
type: .totp
)

View file

@ -0,0 +1,13 @@
import Appwrite
import AppwriteEnums
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
let mfaChallenge = try await account.createMfaChallenge(
factor: .email
)

View file

@ -0,0 +1,10 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
let mfaRecoveryCodes = try await account.createMfaRecoveryCodes()

View file

@ -0,0 +1,14 @@
import Appwrite
import AppwriteEnums
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
let user = try await account.deleteMfaAuthenticator(
type: .totp,
otp: "<OTP>"
)

View file

@ -0,0 +1,10 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
let mfaRecoveryCodes = try await account.getMfaRecoveryCodes()

View file

@ -0,0 +1,10 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
let mfaFactors = try await account.listMfaFactors()

View file

@ -0,0 +1,14 @@
import Appwrite
import AppwriteEnums
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
let user = try await account.updateMfaAuthenticator(
type: .totp,
otp: "<OTP>"
)

View file

@ -0,0 +1,13 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
let result = try await account.updateMfaChallenge(
challengeId: "<CHALLENGE_ID>",
otp: "<OTP>"
)

View file

@ -0,0 +1,10 @@
import Appwrite
let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
let account = Account(client)
let mfaRecoveryCodes = try await account.updateMfaRecoveryCodes()

View file

@ -0,0 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
MfaType result = await account.createMfaAuthenticator(
type: .totp,
);

View file

@ -0,0 +1,11 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
MfaChallenge result = await account.createMfaChallenge(
factor: .email,
);

View file

@ -0,0 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
MfaRecoveryCodes result = await account.createMfaRecoveryCodes();

View file

@ -0,0 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
await account.deleteMfaAuthenticator(
type: .totp,
otp: '<OTP>',
);

View file

@ -0,0 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
MfaRecoveryCodes result = await account.getMfaRecoveryCodes();

View file

@ -0,0 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
MfaFactors result = await account.listMfaFactors();

View file

@ -0,0 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
User result = await account.updateMfaAuthenticator(
type: .totp,
otp: '<OTP>',
);

View file

@ -0,0 +1,12 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
result = await account.updateMfaChallenge(
challengeId: '<CHALLENGE_ID>',
otp: '<OTP>',
);

View file

@ -0,0 +1,9 @@
import 'package:appwrite/appwrite.dart';
Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
Account account = Account(client);
MfaRecoveryCodes result = await account.updateMfaRecoveryCodes();

View file

@ -27,5 +27,6 @@ mutation {
current
factors
secret
mfaUpdatedAt
}
}

View file

@ -30,5 +30,6 @@ mutation {
current
factors
secret
mfaUpdatedAt
}
}

View file

@ -0,0 +1,8 @@
mutation {
accountCreateMfaAuthenticator(
type: "totp"
) {
secret
uri
}
}

View file

@ -0,0 +1,10 @@
mutation {
accountCreateMfaChallenge(
factor: "email"
) {
_id
_createdAt
userId
expire
}
}

View file

@ -0,0 +1,5 @@
mutation {
accountCreateMfaRecoveryCodes {
recoveryCodes
}
}

View file

@ -30,5 +30,6 @@ mutation {
current
factors
secret
mfaUpdatedAt
}
}

View file

@ -21,7 +21,6 @@ mutation {
emailVerification
phoneVerification
mfa
totp
prefs {
data
}

View file

@ -0,0 +1,37 @@
mutation {
accountDeleteMfaAuthenticator(
type: "totp",
otp: "<OTP>"
) {
_id
_createdAt
_updatedAt
name
password
hash
hashOptions
registration
status
labels
passwordUpdate
email
phone
emailVerification
phoneVerification
mfa
prefs {
data
}
targets {
_id
_createdAt
_updatedAt
name
userId
providerId
providerType
identifier
}
accessedAt
}
}

View file

@ -0,0 +1,5 @@
query {
accountGetMfaRecoveryCodes {
recoveryCodes
}
}

View file

@ -29,5 +29,6 @@ query {
current
factors
secret
mfaUpdatedAt
}
}

View file

@ -16,7 +16,6 @@ query {
emailVerification
phoneVerification
mfa
totp
prefs {
data
}

View file

@ -0,0 +1,7 @@
query {
accountListMfaFactors {
totp
phone
email
}
}

View file

@ -29,6 +29,7 @@ query {
current
factors
secret
mfaUpdatedAt
}
}
}

View file

@ -19,7 +19,6 @@ mutation {
emailVerification
phoneVerification
mfa
totp
prefs {
data
}

View file

@ -18,7 +18,6 @@ mutation {
emailVerification
phoneVerification
mfa
totp
prefs {
data
}

View file

@ -30,5 +30,6 @@ mutation {
current
factors
secret
mfaUpdatedAt
}
}

View file

@ -0,0 +1,37 @@
mutation {
accountUpdateMfaAuthenticator(
type: "totp",
otp: "<OTP>"
) {
_id
_createdAt
_updatedAt
name
password
hash
hashOptions
registration
status
labels
passwordUpdate
email
phone
emailVerification
phoneVerification
mfa
prefs {
data
}
targets {
_id
_createdAt
_updatedAt
name
userId
providerId
providerType
identifier
}
accessedAt
}
}

View file

@ -0,0 +1,8 @@
mutation {
accountUpdateMfaChallenge(
challengeId: "<CHALLENGE_ID>",
otp: "<OTP>"
) {
status
}
}

View file

@ -0,0 +1,5 @@
mutation {
accountUpdateMfaRecoveryCodes {
recoveryCodes
}
}

View file

@ -18,7 +18,6 @@ mutation {
emailVerification
phoneVerification
mfa
totp
prefs {
data
}

View file

@ -19,7 +19,6 @@ mutation {
emailVerification
phoneVerification
mfa
totp
prefs {
data
}

View file

@ -30,5 +30,6 @@ mutation {
current
factors
secret
mfaUpdatedAt
}
}

View file

@ -19,7 +19,6 @@ mutation {
emailVerification
phoneVerification
mfa
totp
prefs {
data
}

View file

@ -18,7 +18,6 @@ mutation {
emailVerification
phoneVerification
mfa
totp
prefs {
data
}

View file

@ -29,5 +29,6 @@ mutation {
current
factors
secret
mfaUpdatedAt
}
}

View file

@ -16,7 +16,6 @@ mutation {
emailVerification
phoneVerification
mfa
totp
prefs {
data
}

View file

@ -0,0 +1,8 @@
POST /v1/account/mfa/authenticators/{type} HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.5.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-Session:
X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...

View file

@ -0,0 +1,9 @@
POST /v1/account/mfa/challenge HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.5.0
X-Appwrite-Project: 5df5acd0d48c2
{
"factor": "email"
}

View file

@ -0,0 +1,8 @@
POST /v1/account/mfa/recovery-codes HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.5.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-Session:
X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...

View file

@ -0,0 +1,11 @@
DELETE /v1/account/mfa/authenticators/{type} HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.5.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-Session:
X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...
{
"otp": "<OTP>"
}

View file

@ -0,0 +1,8 @@
GET /v1/account/mfa/recovery-codes HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.5.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-Session:
X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...

View file

@ -0,0 +1,8 @@
GET /v1/account/mfa/factors HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.5.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-Session:
X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...

View file

@ -0,0 +1,11 @@
PUT /v1/account/mfa/authenticators/{type} HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.5.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-Session:
X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...
{
"otp": "<OTP>"
}

View file

@ -0,0 +1,12 @@
PUT /v1/account/mfa/challenge HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.5.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-Session:
X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...
{
"challengeId": "<CHALLENGE_ID>",
"otp": "<OTP>"
}

View file

@ -0,0 +1,8 @@
PATCH /v1/account/mfa/recovery-codes HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.5.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-Session:
X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...

View file

@ -0,0 +1,13 @@
import { Client, Account, } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createMfaAuthenticator(
.Totp // type
);
console.log(response);

View file

@ -0,0 +1,13 @@
import { Client, Account, } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createMfaChallenge(
.Email // factor
);
console.log(response);

View file

@ -0,0 +1,11 @@
import { Client, Account } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createMfaRecoveryCodes();
console.log(response);

View file

@ -0,0 +1,14 @@
import { Client, Account, } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.deleteMfaAuthenticator(
.Totp, // type
'<OTP>' // otp
);
console.log(response);

View file

@ -0,0 +1,11 @@
import { Client, Account } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.getMfaRecoveryCodes();
console.log(response);

View file

@ -0,0 +1,11 @@
import { Client, Account } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.listMfaFactors();
console.log(response);

View file

@ -0,0 +1,14 @@
import { Client, Account, } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updateMfaAuthenticator(
.Totp, // type
'<OTP>' // otp
);
console.log(response);

View file

@ -0,0 +1,14 @@
import { Client, Account } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updateMfaChallenge(
'<CHALLENGE_ID>', // challengeId
'<OTP>' // otp
);
console.log(response);

View file

@ -0,0 +1,11 @@
import { Client, Account } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updateMfaRecoveryCodes();
console.log(response);

View file

@ -0,0 +1,2 @@
appwrite account createMfaAuthenticator \
--type totp

View file

@ -0,0 +1,2 @@
appwrite account createMfaChallenge \
--factor email

View file

@ -0,0 +1 @@
appwrite account createMfaRecoveryCodes

View file

@ -0,0 +1,3 @@
appwrite account deleteMfaAuthenticator \
--type totp \
--otp <OTP>

View file

@ -0,0 +1 @@
appwrite account getMfaRecoveryCodes

View file

@ -0,0 +1 @@
appwrite account listMfaFactors

View file

@ -0,0 +1,3 @@
appwrite account updateMfaAuthenticator \
--type totp \
--otp <OTP>

View file

@ -0,0 +1,3 @@
appwrite account updateMfaChallenge \
--challengeId <CHALLENGE_ID> \
--otp <OTP>

View file

@ -0,0 +1 @@
appwrite account updateMfaRecoveryCodes

View file

@ -0,0 +1,2 @@
appwrite users createMfaRecoveryCodes \
--userId <USER_ID>

View file

@ -0,0 +1,3 @@
appwrite users deleteMfaAuthenticator \
--userId <USER_ID> \
--type totp

View file

@ -0,0 +1,2 @@
appwrite users getMfaRecoveryCodes \
--userId <USER_ID>

View file

@ -0,0 +1,2 @@
appwrite users listMfaFactors \
--userId <USER_ID>

View file

@ -0,0 +1,2 @@
appwrite users updateMfaRecoveryCodes \
--userId <USER_ID>

View file

@ -0,0 +1,13 @@
import { Client, Account, } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createMfaAuthenticator(
.Totp // type
);
console.log(response);

View file

@ -0,0 +1,13 @@
import { Client, Account, } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createMfaChallenge(
.Email // factor
);
console.log(response);

View file

@ -0,0 +1,11 @@
import { Client, Account } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createMfaRecoveryCodes();
console.log(response);

View file

@ -0,0 +1,14 @@
import { Client, Account, } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.deleteMfaAuthenticator(
.Totp, // type
'<OTP>' // otp
);
console.log(response);

View file

@ -0,0 +1,11 @@
import { Client, Account } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.getMfaRecoveryCodes();
console.log(response);

View file

@ -0,0 +1,11 @@
import { Client, Account } from "@appwrite.io/console";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.listMfaFactors();
console.log(response);

Some files were not shown because too many files have changed in this diff Show more