@appwrite.io/console 0.2.0 → 0.4.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 +3 -3
- package/dist/cjs/sdk.js +3353 -1497
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +3350 -1498
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +3353 -1497
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-email-session.md +1 -1
- package/docs/examples/account/create-j-w-t.md +1 -1
- package/docs/examples/account/create-magic-u-r-l-session.md +1 -1
- package/docs/examples/account/create-o-auth2session.md +1 -1
- package/docs/examples/account/create-phone-session.md +1 -1
- package/docs/examples/account/create-phone-verification.md +1 -1
- package/docs/examples/account/create-recovery.md +1 -1
- package/docs/examples/account/create-verification.md +1 -1
- package/docs/examples/account/create.md +1 -1
- package/docs/examples/account/{create-with-invite-code.md → delete-identity.md} +2 -2
- package/docs/examples/account/delete-session.md +1 -1
- package/docs/examples/account/delete-sessions.md +1 -1
- package/docs/examples/account/get-prefs.md +1 -1
- package/docs/examples/account/get-session.md +1 -1
- package/docs/examples/account/get.md +1 -1
- package/docs/examples/account/list-identities.md +18 -0
- package/docs/examples/account/list-logs.md +1 -1
- package/docs/examples/account/list-sessions.md +1 -1
- package/docs/examples/account/update-email.md +1 -1
- package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
- package/docs/examples/account/update-name.md +1 -1
- package/docs/examples/account/update-password.md +1 -1
- package/docs/examples/account/update-phone-session.md +1 -1
- package/docs/examples/account/update-phone-verification.md +1 -1
- package/docs/examples/account/update-phone.md +1 -1
- package/docs/examples/account/update-prefs.md +1 -1
- package/docs/examples/account/update-recovery.md +1 -1
- package/docs/examples/account/update-session.md +1 -1
- package/docs/examples/account/update-status.md +1 -1
- package/docs/examples/account/update-verification.md +1 -1
- package/docs/examples/assistant/chat.md +18 -0
- package/docs/examples/avatars/get-browser.md +1 -1
- package/docs/examples/avatars/get-credit-card.md +1 -1
- package/docs/examples/avatars/get-favicon.md +1 -1
- package/docs/examples/avatars/get-flag.md +1 -1
- package/docs/examples/avatars/get-image.md +1 -1
- package/docs/examples/avatars/get-initials.md +1 -1
- package/docs/examples/avatars/get-q-r.md +1 -1
- package/docs/examples/console/variables.md +1 -1
- package/docs/examples/databases/create-boolean-attribute.md +1 -1
- package/docs/examples/databases/create-collection.md +1 -1
- package/docs/examples/databases/create-datetime-attribute.md +1 -1
- package/docs/examples/databases/create-document.md +1 -1
- package/docs/examples/databases/create-email-attribute.md +1 -1
- package/docs/examples/databases/create-enum-attribute.md +1 -1
- package/docs/examples/databases/create-float-attribute.md +1 -1
- package/docs/examples/databases/create-index.md +1 -1
- package/docs/examples/databases/create-integer-attribute.md +1 -1
- package/docs/examples/databases/create-ip-attribute.md +1 -1
- package/docs/examples/databases/create-relationship-attribute.md +1 -1
- package/docs/examples/databases/create-string-attribute.md +1 -1
- package/docs/examples/databases/create-url-attribute.md +1 -1
- package/docs/examples/databases/create.md +1 -1
- package/docs/examples/databases/delete-attribute.md +1 -1
- package/docs/examples/databases/delete-collection.md +1 -1
- package/docs/examples/databases/delete-document.md +1 -1
- package/docs/examples/databases/delete-index.md +1 -1
- package/docs/examples/databases/delete.md +1 -1
- package/docs/examples/databases/get-attribute.md +1 -1
- package/docs/examples/databases/get-collection-usage.md +1 -1
- package/docs/examples/databases/get-collection.md +1 -1
- package/docs/examples/databases/get-database-usage.md +1 -1
- package/docs/examples/databases/get-document.md +1 -1
- package/docs/examples/databases/get-index.md +1 -1
- package/docs/examples/databases/get-usage.md +1 -1
- package/docs/examples/databases/get.md +1 -1
- package/docs/examples/databases/list-attributes.md +1 -1
- package/docs/examples/databases/list-collection-logs.md +1 -1
- package/docs/examples/databases/list-collections.md +1 -1
- package/docs/examples/databases/list-document-logs.md +1 -1
- package/docs/examples/databases/list-documents.md +1 -1
- package/docs/examples/databases/list-indexes.md +1 -1
- package/docs/examples/databases/list-logs.md +1 -1
- package/docs/examples/databases/list.md +1 -1
- package/docs/examples/databases/update-boolean-attribute.md +1 -1
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-datetime-attribute.md +1 -1
- package/docs/examples/databases/update-document.md +1 -1
- package/docs/examples/databases/update-email-attribute.md +1 -1
- package/docs/examples/databases/update-enum-attribute.md +1 -1
- package/docs/examples/databases/update-float-attribute.md +1 -1
- package/docs/examples/databases/update-integer-attribute.md +1 -1
- package/docs/examples/databases/update-ip-attribute.md +1 -1
- package/docs/examples/databases/update-relationship-attribute.md +1 -1
- package/docs/examples/databases/update-string-attribute.md +1 -1
- package/docs/examples/databases/update-url-attribute.md +1 -1
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/functions/create-build.md +1 -1
- package/docs/examples/functions/create-deployment.md +2 -2
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/functions/create-variable.md +1 -1
- package/docs/examples/functions/create.md +2 -2
- package/docs/examples/functions/delete-deployment.md +1 -1
- package/docs/examples/functions/delete-variable.md +1 -1
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/download-deployment.md +14 -0
- package/docs/examples/functions/get-deployment.md +1 -1
- package/docs/examples/functions/get-execution.md +1 -1
- package/docs/examples/functions/get-function-usage.md +1 -1
- package/docs/examples/functions/get-usage.md +1 -1
- package/docs/examples/functions/get-variable.md +1 -1
- package/docs/examples/functions/get.md +1 -1
- package/docs/examples/functions/list-deployments.md +1 -1
- package/docs/examples/functions/list-executions.md +1 -1
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-variables.md +1 -1
- package/docs/examples/functions/list.md +1 -1
- package/docs/examples/functions/update-deployment.md +1 -1
- package/docs/examples/functions/update-variable.md +1 -1
- package/docs/examples/functions/update.md +1 -1
- package/docs/examples/graphql/mutation.md +1 -1
- package/docs/examples/graphql/query.md +1 -1
- package/docs/examples/health/get-antivirus.md +1 -1
- package/docs/examples/health/get-cache.md +1 -1
- package/docs/examples/health/get-d-b.md +1 -1
- package/docs/examples/health/get-pub-sub.md +1 -1
- package/docs/examples/health/get-queue-builds.md +18 -0
- package/docs/examples/health/get-queue-certificates.md +1 -1
- package/docs/examples/health/get-queue-databases.md +18 -0
- package/docs/examples/health/get-queue-deletes.md +18 -0
- package/docs/examples/health/get-queue-functions.md +1 -1
- package/docs/examples/health/get-queue-logs.md +1 -1
- package/docs/examples/health/get-queue-mails.md +18 -0
- package/docs/examples/health/get-queue-messaging.md +18 -0
- package/docs/examples/health/get-queue-migrations.md +18 -0
- package/docs/examples/health/get-queue-webhooks.md +1 -1
- package/docs/examples/health/get-queue.md +1 -1
- package/docs/examples/health/get-storage-local.md +1 -1
- package/docs/examples/health/get-time.md +1 -1
- package/docs/examples/health/get.md +1 -1
- package/docs/examples/locale/get.md +1 -1
- package/docs/examples/locale/list-codes.md +18 -0
- package/docs/examples/locale/list-continents.md +1 -1
- package/docs/examples/locale/list-countries-e-u.md +1 -1
- package/docs/examples/locale/list-countries-phones.md +1 -1
- package/docs/examples/locale/list-countries.md +1 -1
- package/docs/examples/locale/list-currencies.md +1 -1
- package/docs/examples/locale/list-languages.md +1 -1
- package/docs/examples/migrations/create-appwrite-migration.md +18 -0
- package/docs/examples/migrations/create-firebase-migration.md +18 -0
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +18 -0
- package/docs/examples/migrations/create-n-host-migration.md +18 -0
- package/docs/examples/migrations/create-supabase-migration.md +18 -0
- package/docs/examples/migrations/delete-firebase-auth.md +18 -0
- package/docs/examples/migrations/delete.md +18 -0
- package/docs/examples/migrations/get-appwrite-report.md +18 -0
- package/docs/examples/migrations/get-firebase-report-o-auth.md +18 -0
- package/docs/examples/migrations/get-firebase-report.md +18 -0
- package/docs/examples/migrations/get-n-host-report.md +18 -0
- package/docs/examples/migrations/get-supabase-report.md +18 -0
- package/docs/examples/migrations/get.md +18 -0
- package/docs/examples/migrations/list-firebase-projects.md +18 -0
- package/docs/examples/migrations/list.md +18 -0
- package/docs/examples/migrations/retry.md +18 -0
- package/docs/examples/project/create-variable.md +18 -0
- package/docs/examples/project/delete-variable.md +18 -0
- package/docs/examples/project/get-usage.md +2 -2
- package/docs/examples/project/get-variable.md +18 -0
- package/docs/examples/project/list-variables.md +18 -0
- package/docs/examples/project/update-variable.md +18 -0
- package/docs/examples/projects/create-key.md +1 -1
- package/docs/examples/projects/create-platform.md +1 -1
- package/docs/examples/projects/create-webhook.md +1 -1
- package/docs/examples/projects/create.md +2 -2
- package/docs/examples/projects/delete-email-template.md +18 -0
- package/docs/examples/projects/delete-key.md +1 -1
- package/docs/examples/projects/delete-platform.md +1 -1
- package/docs/examples/projects/delete-sms-template.md +18 -0
- package/docs/examples/projects/delete-webhook.md +1 -1
- package/docs/examples/projects/delete.md +2 -2
- package/docs/examples/projects/get-email-template.md +18 -0
- package/docs/examples/projects/get-key.md +1 -1
- package/docs/examples/projects/get-platform.md +1 -1
- package/docs/examples/projects/get-sms-template.md +18 -0
- package/docs/examples/projects/get-webhook.md +1 -1
- package/docs/examples/projects/get.md +1 -1
- package/docs/examples/projects/list-keys.md +1 -1
- package/docs/examples/projects/list-platforms.md +1 -1
- package/docs/examples/projects/list-webhooks.md +1 -1
- package/docs/examples/projects/list.md +1 -1
- package/docs/examples/projects/update-auth-duration.md +1 -1
- package/docs/examples/projects/update-auth-limit.md +1 -1
- package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
- package/docs/examples/projects/update-auth-password-history.md +1 -1
- package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
- package/docs/examples/projects/update-auth-status.md +1 -1
- package/docs/examples/projects/update-email-template.md +18 -0
- package/docs/examples/projects/update-key.md +1 -1
- package/docs/examples/projects/update-o-auth2.md +1 -1
- package/docs/examples/projects/{delete-domain.md → update-personal-data-check.md} +2 -2
- package/docs/examples/projects/update-platform.md +1 -1
- package/docs/examples/projects/{create-domain.md → update-service-status-all.md} +2 -2
- package/docs/examples/projects/update-service-status.md +1 -1
- package/docs/examples/projects/update-sms-template.md +18 -0
- package/docs/examples/projects/{get-domain.md → update-smtp-configuration.md} +2 -2
- package/docs/examples/projects/{list-domains.md → update-team.md} +2 -2
- package/docs/examples/projects/update-webhook-signature.md +1 -1
- package/docs/examples/projects/update-webhook.md +1 -1
- package/docs/examples/projects/update.md +1 -1
- package/docs/examples/proxy/create-rule.md +18 -0
- package/docs/examples/proxy/delete-rule.md +18 -0
- package/docs/examples/proxy/get-rule.md +18 -0
- package/docs/examples/proxy/list-rules.md +18 -0
- package/docs/examples/proxy/update-rule-verification.md +18 -0
- package/docs/examples/storage/create-bucket.md +1 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/storage/delete-bucket.md +1 -1
- package/docs/examples/storage/delete-file.md +1 -1
- package/docs/examples/storage/get-bucket-usage.md +1 -1
- package/docs/examples/storage/get-bucket.md +1 -1
- package/docs/examples/storage/get-file-download.md +1 -1
- package/docs/examples/storage/get-file-preview.md +1 -1
- package/docs/examples/storage/get-file-view.md +1 -1
- package/docs/examples/storage/get-file.md +1 -1
- package/docs/examples/storage/get-usage.md +1 -1
- package/docs/examples/storage/list-buckets.md +1 -1
- package/docs/examples/storage/list-files.md +1 -1
- package/docs/examples/storage/update-bucket.md +1 -1
- package/docs/examples/storage/update-file.md +1 -1
- package/docs/examples/teams/create-membership.md +2 -2
- package/docs/examples/teams/create.md +1 -1
- package/docs/examples/teams/delete-membership.md +1 -1
- package/docs/examples/teams/delete.md +1 -1
- package/docs/examples/teams/get-membership.md +1 -1
- package/docs/examples/teams/get-prefs.md +1 -1
- package/docs/examples/teams/get.md +1 -1
- package/docs/examples/teams/list-logs.md +1 -1
- package/docs/examples/teams/list-memberships.md +1 -1
- package/docs/examples/teams/list.md +1 -1
- package/docs/examples/teams/update-membership-status.md +1 -1
- package/docs/examples/teams/{update-membership-roles.md → update-membership.md} +2 -2
- package/docs/examples/teams/update-name.md +1 -1
- package/docs/examples/teams/update-prefs.md +1 -1
- package/docs/examples/users/create-argon2user.md +1 -1
- package/docs/examples/users/create-bcrypt-user.md +1 -1
- package/docs/examples/users/create-m-d5user.md +1 -1
- package/docs/examples/users/create-p-h-pass-user.md +1 -1
- package/docs/examples/users/create-s-h-a-user.md +1 -1
- package/docs/examples/users/create-scrypt-modified-user.md +1 -1
- package/docs/examples/users/create-scrypt-user.md +1 -1
- package/docs/examples/users/create.md +1 -1
- package/docs/examples/users/delete-identity.md +18 -0
- package/docs/examples/users/delete-session.md +1 -1
- package/docs/examples/users/delete-sessions.md +1 -1
- package/docs/examples/users/delete.md +1 -1
- package/docs/examples/users/get-prefs.md +1 -1
- package/docs/examples/users/get-usage.md +1 -1
- package/docs/examples/users/get.md +1 -1
- package/docs/examples/users/list-identities.md +18 -0
- package/docs/examples/users/list-logs.md +1 -1
- package/docs/examples/users/list-memberships.md +1 -1
- package/docs/examples/users/list-sessions.md +1 -1
- package/docs/examples/users/list.md +1 -1
- package/docs/examples/users/update-email-verification.md +1 -1
- package/docs/examples/users/update-email.md +1 -1
- package/docs/examples/users/update-labels.md +18 -0
- package/docs/examples/users/update-name.md +1 -1
- package/docs/examples/users/update-password.md +1 -1
- package/docs/examples/users/update-phone-verification.md +1 -1
- package/docs/examples/users/update-phone.md +1 -1
- package/docs/examples/users/update-prefs.md +1 -1
- package/docs/examples/users/update-status.md +1 -1
- package/docs/examples/vcs/create-repository-detection.md +18 -0
- package/docs/examples/vcs/create-repository.md +18 -0
- package/docs/examples/vcs/delete-installation.md +18 -0
- package/docs/examples/vcs/get-installation.md +18 -0
- package/docs/examples/vcs/get-repository.md +18 -0
- package/docs/examples/vcs/list-installations.md +18 -0
- package/docs/examples/vcs/list-repositories.md +18 -0
- package/docs/examples/vcs/list-repository-branches.md +18 -0
- package/docs/examples/vcs/update-external-deployments.md +18 -0
- package/package.json +3 -2
- package/src/client.ts +2 -2
- package/src/index.ts +4 -0
- package/src/models.ts +863 -233
- package/src/query.ts +1 -1
- package/src/role.ts +72 -6
- package/src/services/account.ts +1052 -1055
- package/src/services/assistant.ts +38 -0
- package/src/services/avatars.ts +338 -337
- package/src/services/console.ts +16 -16
- package/src/services/databases.ts +2170 -2140
- package/src/services/functions.ts +804 -657
- package/src/services/graphql.ts +47 -47
- package/src/services/health.ts +373 -204
- package/src/services/locale.ts +156 -137
- package/src/services/migrations.ts +707 -0
- package/src/services/project.ts +178 -20
- package/src/services/projects.ts +1511 -1256
- package/src/services/proxy.ts +150 -0
- package/src/services/storage.ts +572 -577
- package/src/services/teams.ts +498 -501
- package/src/services/users.ts +1091 -1001
- package/src/services/vcs.ts +272 -0
- package/types/index.d.ts +4 -0
- package/types/models.d.ts +863 -233
- package/types/role.d.ts +62 -0
- package/types/services/account.d.ts +116 -104
- package/types/services/assistant.d.ts +14 -0
- package/types/services/avatars.d.ts +18 -17
- package/types/services/console.d.ts +2 -2
- package/types/services/databases.d.ts +111 -105
- package/types/services/functions.d.ts +95 -55
- package/types/services/graphql.d.ts +4 -4
- package/types/services/health.d.ts +97 -26
- package/types/services/locale.d.ts +24 -14
- package/types/services/migrations.d.ts +185 -0
- package/types/services/project.d.ts +60 -3
- package/types/services/projects.d.ts +174 -104
- package/types/services/proxy.d.ts +59 -0
- package/types/services/storage.d.ts +29 -28
- package/types/services/teams.d.ts +36 -35
- package/types/services/users.d.ts +105 -66
- package/types/services/vcs.d.ts +97 -0
- package/docs/examples/projects/update-domain-verification.md +0 -18
package/types/role.d.ts
CHANGED
|
@@ -1,8 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper class to generate role strings for `Permission`.
|
|
3
|
+
*/
|
|
1
4
|
export declare class Role {
|
|
5
|
+
/**
|
|
6
|
+
* Grants access to anyone.
|
|
7
|
+
*
|
|
8
|
+
* This includes authenticated and unauthenticated users.
|
|
9
|
+
*
|
|
10
|
+
* @returns {string}
|
|
11
|
+
*/
|
|
2
12
|
static any(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Grants access to a specific user by user ID.
|
|
15
|
+
*
|
|
16
|
+
* You can optionally pass verified or unverified for
|
|
17
|
+
* `status` to target specific types of users.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} id
|
|
20
|
+
* @param {string} status
|
|
21
|
+
* @returns {string}
|
|
22
|
+
*/
|
|
3
23
|
static user(id: string, status?: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Grants access to any authenticated or anonymous user.
|
|
26
|
+
*
|
|
27
|
+
* You can optionally pass verified or unverified for
|
|
28
|
+
* `status` to target specific types of users.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} status
|
|
31
|
+
* @returns {string}
|
|
32
|
+
*/
|
|
4
33
|
static users(status?: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Grants access to any guest user without a session.
|
|
36
|
+
*
|
|
37
|
+
* Authenticated users don't have access to this role.
|
|
38
|
+
*
|
|
39
|
+
* @returns {string}
|
|
40
|
+
*/
|
|
5
41
|
static guests(): string;
|
|
42
|
+
/**
|
|
43
|
+
* Grants access to a team by team ID.
|
|
44
|
+
*
|
|
45
|
+
* You can optionally pass a role for `role` to target
|
|
46
|
+
* team members with the specified role.
|
|
47
|
+
*
|
|
48
|
+
* @param {string} id
|
|
49
|
+
* @param {string} role
|
|
50
|
+
* @returns {string}
|
|
51
|
+
*/
|
|
6
52
|
static team(id: string, role?: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Grants access to a specific member of a team.
|
|
55
|
+
*
|
|
56
|
+
* When the member is removed from the team, they will
|
|
57
|
+
* no longer have access.
|
|
58
|
+
*
|
|
59
|
+
* @param {string} id
|
|
60
|
+
* @returns {string}
|
|
61
|
+
*/
|
|
7
62
|
static member(id: string): string;
|
|
63
|
+
/**
|
|
64
|
+
* Grants access to a user with the specified label.
|
|
65
|
+
*
|
|
66
|
+
* @param {string} name
|
|
67
|
+
* @returns {string}
|
|
68
|
+
*/
|
|
69
|
+
static label(name: string): string;
|
|
8
70
|
}
|
|
@@ -4,23 +4,24 @@ import type { Models } from '../models';
|
|
|
4
4
|
export declare class Account extends Service {
|
|
5
5
|
constructor(client: Client);
|
|
6
6
|
/**
|
|
7
|
-
* Get
|
|
7
|
+
* Get account
|
|
8
8
|
*
|
|
9
|
-
* Get currently logged in user
|
|
9
|
+
* Get the currently logged in user.
|
|
10
10
|
*
|
|
11
11
|
* @throws {AppwriteException}
|
|
12
12
|
* @returns {Promise}
|
|
13
|
-
|
|
13
|
+
*/
|
|
14
14
|
get<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
|
|
15
15
|
/**
|
|
16
|
-
* Create
|
|
16
|
+
* Create account
|
|
17
17
|
*
|
|
18
18
|
* Use this endpoint to allow a new user to register a new account in your
|
|
19
19
|
* project. After the user registration completes successfully, you can use
|
|
20
|
-
* the
|
|
20
|
+
* the
|
|
21
|
+
* [/account/verfication](https://appwrite.io/docs/references/cloud/client-web/account#createVerification)
|
|
21
22
|
* route to start verifying the user email address. To allow the new user to
|
|
22
23
|
* login to their new account, you need to create a new [account
|
|
23
|
-
* session](/docs/client/account#
|
|
24
|
+
* session](https://appwrite.io/docs/references/cloud/client-web/account#createEmailSession).
|
|
24
25
|
*
|
|
25
26
|
* @param {string} userId
|
|
26
27
|
* @param {string} email
|
|
@@ -28,10 +29,10 @@ export declare class Account extends Service {
|
|
|
28
29
|
* @param {string} name
|
|
29
30
|
* @throws {AppwriteException}
|
|
30
31
|
* @returns {Promise}
|
|
31
|
-
|
|
32
|
+
*/
|
|
32
33
|
create<Preferences extends Models.Preferences>(userId: string, email: string, password: string, name?: string): Promise<Models.User<Preferences>>;
|
|
33
34
|
/**
|
|
34
|
-
* Update
|
|
35
|
+
* Update email
|
|
35
36
|
*
|
|
36
37
|
* Update currently logged in user account email address. After changing user
|
|
37
38
|
* address, the user confirmation status will get reset. A new confirmation
|
|
@@ -46,27 +47,28 @@ export declare class Account extends Service {
|
|
|
46
47
|
* @param {string} password
|
|
47
48
|
* @throws {AppwriteException}
|
|
48
49
|
* @returns {Promise}
|
|
49
|
-
|
|
50
|
+
*/
|
|
50
51
|
updateEmail<Preferences extends Models.Preferences>(email: string, password: string): Promise<Models.User<Preferences>>;
|
|
51
52
|
/**
|
|
52
|
-
*
|
|
53
|
+
* List Identities
|
|
53
54
|
*
|
|
54
|
-
*
|
|
55
|
-
* project. After the user registration completes successfully, you can use
|
|
56
|
-
* the [/account/verfication](/docs/client/account#accountCreateVerification)
|
|
57
|
-
* route to start verifying the user email address. To allow the new user to
|
|
58
|
-
* login to their new account, you need to create a new [account
|
|
59
|
-
* session](/docs/client/account#accountCreateSession).
|
|
55
|
+
* Get the list of identities for the currently logged in user.
|
|
60
56
|
*
|
|
61
|
-
* @param {string}
|
|
62
|
-
* @param {string} email
|
|
63
|
-
* @param {string} password
|
|
64
|
-
* @param {string} name
|
|
65
|
-
* @param {string} code
|
|
57
|
+
* @param {string} queries
|
|
66
58
|
* @throws {AppwriteException}
|
|
67
59
|
* @returns {Promise}
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
*/
|
|
61
|
+
listIdentities(queries?: string): Promise<Models.IdentityList>;
|
|
62
|
+
/**
|
|
63
|
+
* Delete Identity
|
|
64
|
+
*
|
|
65
|
+
* Delete an identity by its unique ID.
|
|
66
|
+
*
|
|
67
|
+
* @param {string} identityId
|
|
68
|
+
* @throws {AppwriteException}
|
|
69
|
+
* @returns {Promise}
|
|
70
|
+
*/
|
|
71
|
+
deleteIdentity(identityId: string): Promise<{}>;
|
|
70
72
|
/**
|
|
71
73
|
* Create JWT
|
|
72
74
|
*
|
|
@@ -78,31 +80,31 @@ export declare class Account extends Service {
|
|
|
78
80
|
*
|
|
79
81
|
* @throws {AppwriteException}
|
|
80
82
|
* @returns {Promise}
|
|
81
|
-
|
|
83
|
+
*/
|
|
82
84
|
createJWT(): Promise<Models.Jwt>;
|
|
83
85
|
/**
|
|
84
|
-
* List
|
|
86
|
+
* List logs
|
|
85
87
|
*
|
|
86
|
-
* Get
|
|
87
|
-
* log returns user IP address, location and date and time of log.
|
|
88
|
+
* Get the list of latest security activity logs for the currently logged in
|
|
89
|
+
* user. Each log returns user IP address, location and date and time of log.
|
|
88
90
|
*
|
|
89
91
|
* @param {string[]} queries
|
|
90
92
|
* @throws {AppwriteException}
|
|
91
93
|
* @returns {Promise}
|
|
92
|
-
|
|
94
|
+
*/
|
|
93
95
|
listLogs(queries?: string[]): Promise<Models.LogList>;
|
|
94
96
|
/**
|
|
95
|
-
* Update
|
|
97
|
+
* Update name
|
|
96
98
|
*
|
|
97
99
|
* Update currently logged in user account name.
|
|
98
100
|
*
|
|
99
101
|
* @param {string} name
|
|
100
102
|
* @throws {AppwriteException}
|
|
101
103
|
* @returns {Promise}
|
|
102
|
-
|
|
104
|
+
*/
|
|
103
105
|
updateName<Preferences extends Models.Preferences>(name: string): Promise<Models.User<Preferences>>;
|
|
104
106
|
/**
|
|
105
|
-
* Update
|
|
107
|
+
* Update password
|
|
106
108
|
*
|
|
107
109
|
* Update currently logged in user password. For validation, user is required
|
|
108
110
|
* to pass in the new password, and the old password. For users created with
|
|
@@ -112,34 +114,34 @@ export declare class Account extends Service {
|
|
|
112
114
|
* @param {string} oldPassword
|
|
113
115
|
* @throws {AppwriteException}
|
|
114
116
|
* @returns {Promise}
|
|
115
|
-
|
|
117
|
+
*/
|
|
116
118
|
updatePassword<Preferences extends Models.Preferences>(password: string, oldPassword?: string): Promise<Models.User<Preferences>>;
|
|
117
119
|
/**
|
|
118
|
-
* Update
|
|
120
|
+
* Update phone
|
|
119
121
|
*
|
|
120
122
|
* Update the currently logged in user's phone number. After updating the
|
|
121
123
|
* phone number, the phone verification status will be reset. A confirmation
|
|
122
124
|
* SMS is not sent automatically, however you can use the [POST
|
|
123
|
-
* /account/verification/phone](/docs/client/account#
|
|
125
|
+
* /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification)
|
|
124
126
|
* endpoint to send a confirmation SMS.
|
|
125
127
|
*
|
|
126
128
|
* @param {string} phone
|
|
127
129
|
* @param {string} password
|
|
128
130
|
* @throws {AppwriteException}
|
|
129
131
|
* @returns {Promise}
|
|
130
|
-
|
|
132
|
+
*/
|
|
131
133
|
updatePhone<Preferences extends Models.Preferences>(phone: string, password: string): Promise<Models.User<Preferences>>;
|
|
132
134
|
/**
|
|
133
|
-
* Get
|
|
135
|
+
* Get account preferences
|
|
134
136
|
*
|
|
135
|
-
* Get
|
|
137
|
+
* Get the preferences as a key-value object for the currently logged in user.
|
|
136
138
|
*
|
|
137
139
|
* @throws {AppwriteException}
|
|
138
140
|
* @returns {Promise}
|
|
139
|
-
|
|
141
|
+
*/
|
|
140
142
|
getPrefs<Preferences extends Models.Preferences>(): Promise<Preferences>;
|
|
141
143
|
/**
|
|
142
|
-
* Update
|
|
144
|
+
* Update preferences
|
|
143
145
|
*
|
|
144
146
|
* Update currently logged in user account preferences. The object you pass is
|
|
145
147
|
* stored as is, and replaces any previous value. The maximum allowed prefs
|
|
@@ -148,33 +150,34 @@ export declare class Account extends Service {
|
|
|
148
150
|
* @param {Partial<Preferences>} prefs
|
|
149
151
|
* @throws {AppwriteException}
|
|
150
152
|
* @returns {Promise}
|
|
151
|
-
|
|
153
|
+
*/
|
|
152
154
|
updatePrefs<Preferences extends Models.Preferences>(prefs: Partial<Preferences>): Promise<Models.User<Preferences>>;
|
|
153
155
|
/**
|
|
154
|
-
* Create
|
|
156
|
+
* Create password recovery
|
|
155
157
|
*
|
|
156
158
|
* Sends the user an email with a temporary secret key for password reset.
|
|
157
159
|
* When the user clicks the confirmation link he is redirected back to your
|
|
158
160
|
* app password reset URL with the secret key and email address values
|
|
159
161
|
* attached to the URL query string. Use the query string params to submit a
|
|
160
162
|
* request to the [PUT
|
|
161
|
-
* /account/recovery](/docs/client/account#
|
|
162
|
-
* complete the process. The verification link sent to the user's
|
|
163
|
-
* address is valid for 1 hour.
|
|
163
|
+
* /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#updateRecovery)
|
|
164
|
+
* endpoint to complete the process. The verification link sent to the user's
|
|
165
|
+
* email address is valid for 1 hour.
|
|
164
166
|
*
|
|
165
167
|
* @param {string} email
|
|
166
168
|
* @param {string} url
|
|
167
169
|
* @throws {AppwriteException}
|
|
168
170
|
* @returns {Promise}
|
|
169
|
-
|
|
171
|
+
*/
|
|
170
172
|
createRecovery(email: string, url: string): Promise<Models.Token>;
|
|
171
173
|
/**
|
|
172
|
-
* Create
|
|
174
|
+
* Create password recovery (confirmation)
|
|
173
175
|
*
|
|
174
176
|
* Use this endpoint to complete the user account password reset. Both the
|
|
175
177
|
* **userId** and **secret** arguments will be passed as query parameters to
|
|
176
178
|
* the redirect URL you have provided when sending your request to the [POST
|
|
177
|
-
* /account/recovery](/docs/client/account#
|
|
179
|
+
* /account/recovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery)
|
|
180
|
+
* endpoint.
|
|
178
181
|
*
|
|
179
182
|
* Please note that in order to avoid a [Redirect
|
|
180
183
|
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
|
|
@@ -187,90 +190,94 @@ export declare class Account extends Service {
|
|
|
187
190
|
* @param {string} passwordAgain
|
|
188
191
|
* @throws {AppwriteException}
|
|
189
192
|
* @returns {Promise}
|
|
190
|
-
|
|
193
|
+
*/
|
|
191
194
|
updateRecovery(userId: string, secret: string, password: string, passwordAgain: string): Promise<Models.Token>;
|
|
192
195
|
/**
|
|
193
|
-
* List
|
|
196
|
+
* List sessions
|
|
194
197
|
*
|
|
195
|
-
* Get
|
|
196
|
-
*
|
|
198
|
+
* Get the list of active sessions across different devices for the currently
|
|
199
|
+
* logged in user.
|
|
197
200
|
*
|
|
198
201
|
* @throws {AppwriteException}
|
|
199
202
|
* @returns {Promise}
|
|
200
|
-
|
|
203
|
+
*/
|
|
201
204
|
listSessions(): Promise<Models.SessionList>;
|
|
202
205
|
/**
|
|
203
|
-
* Delete
|
|
206
|
+
* Delete sessions
|
|
204
207
|
*
|
|
205
208
|
* Delete all sessions from the user account and remove any sessions cookies
|
|
206
209
|
* from the end client.
|
|
207
210
|
*
|
|
208
211
|
* @throws {AppwriteException}
|
|
209
212
|
* @returns {Promise}
|
|
210
|
-
|
|
213
|
+
*/
|
|
211
214
|
deleteSessions(): Promise<{}>;
|
|
212
215
|
/**
|
|
213
|
-
* Create
|
|
216
|
+
* Create anonymous session
|
|
214
217
|
*
|
|
215
218
|
* Use this endpoint to allow a new user to register an anonymous account in
|
|
216
219
|
* your project. This route will also create a new session for the user. To
|
|
217
220
|
* allow the new user to convert an anonymous account to a normal account, you
|
|
218
221
|
* need to update its [email and
|
|
219
|
-
* password](/docs/client/account#
|
|
220
|
-
*
|
|
222
|
+
* password](https://appwrite.io/docs/references/cloud/client-web/account#updateEmail)
|
|
223
|
+
* or create an [OAuth2
|
|
224
|
+
* session](https://appwrite.io/docs/references/cloud/client-web/account#CreateOAuth2Session).
|
|
221
225
|
*
|
|
222
226
|
* @throws {AppwriteException}
|
|
223
227
|
* @returns {Promise}
|
|
224
|
-
|
|
228
|
+
*/
|
|
225
229
|
createAnonymousSession(): Promise<Models.Session>;
|
|
226
230
|
/**
|
|
227
|
-
* Create
|
|
231
|
+
* Create email session
|
|
228
232
|
*
|
|
229
233
|
* Allow the user to login into their account by providing a valid email and
|
|
230
234
|
* password combination. This route will create a new session for the user.
|
|
231
235
|
*
|
|
232
236
|
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
233
|
-
* about session
|
|
237
|
+
* about session
|
|
238
|
+
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
234
239
|
*
|
|
235
240
|
* @param {string} email
|
|
236
241
|
* @param {string} password
|
|
237
242
|
* @throws {AppwriteException}
|
|
238
243
|
* @returns {Promise}
|
|
239
|
-
|
|
244
|
+
*/
|
|
240
245
|
createEmailSession(email: string, password: string): Promise<Models.Session>;
|
|
241
246
|
/**
|
|
242
|
-
* Create
|
|
247
|
+
* Create magic URL session
|
|
243
248
|
*
|
|
244
249
|
* Sends the user an email with a secret key for creating a session. If the
|
|
245
|
-
* provided user ID has not
|
|
250
|
+
* provided user ID has not been registered, a new user will be created. When
|
|
246
251
|
* the user clicks the link in the email, the user is redirected back to the
|
|
247
252
|
* URL you provided with the secret key and userId values attached to the URL
|
|
248
253
|
* query string. Use the query string parameters to submit a request to the
|
|
249
254
|
* [PUT
|
|
250
|
-
* /account/sessions/magic-url](/docs/client/account#
|
|
255
|
+
* /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#updateMagicURLSession)
|
|
251
256
|
* endpoint to complete the login process. The link sent to the user's email
|
|
252
257
|
* address is valid for 1 hour. If you are on a mobile device you can leave
|
|
253
258
|
* the URL parameter empty, so that the login completion will be handled by
|
|
254
259
|
* your Appwrite instance by default.
|
|
255
260
|
*
|
|
256
261
|
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
257
|
-
* about session
|
|
262
|
+
* about session
|
|
263
|
+
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
264
|
+
*
|
|
258
265
|
*
|
|
259
266
|
* @param {string} userId
|
|
260
267
|
* @param {string} email
|
|
261
268
|
* @param {string} url
|
|
262
269
|
* @throws {AppwriteException}
|
|
263
270
|
* @returns {Promise}
|
|
264
|
-
|
|
271
|
+
*/
|
|
265
272
|
createMagicURLSession(userId: string, email: string, url?: string): Promise<Models.Token>;
|
|
266
273
|
/**
|
|
267
|
-
* Create
|
|
274
|
+
* Create magic URL session (confirmation)
|
|
268
275
|
*
|
|
269
276
|
* Use this endpoint to complete creating the session with the Magic URL. Both
|
|
270
277
|
* the **userId** and **secret** arguments will be passed as query parameters
|
|
271
278
|
* to the redirect URL you have provided when sending your request to the
|
|
272
279
|
* [POST
|
|
273
|
-
* /account/sessions/magic-url](/docs/client/account#
|
|
280
|
+
* /account/sessions/magic-url](https://appwrite.io/docs/references/cloud/client-web/account#createMagicURLSession)
|
|
274
281
|
* endpoint.
|
|
275
282
|
*
|
|
276
283
|
* Please note that in order to avoid a [Redirect
|
|
@@ -282,10 +289,10 @@ export declare class Account extends Service {
|
|
|
282
289
|
* @param {string} secret
|
|
283
290
|
* @throws {AppwriteException}
|
|
284
291
|
* @returns {Promise}
|
|
285
|
-
|
|
292
|
+
*/
|
|
286
293
|
updateMagicURLSession(userId: string, secret: string): Promise<Models.Session>;
|
|
287
294
|
/**
|
|
288
|
-
* Create OAuth2
|
|
295
|
+
* Create OAuth2 session
|
|
289
296
|
*
|
|
290
297
|
* Allow the user to login to their account using the OAuth2 provider of their
|
|
291
298
|
* choice. Each OAuth2 provider should be enabled from the Appwrite console
|
|
@@ -300,7 +307,8 @@ export declare class Account extends Service {
|
|
|
300
307
|
* user.
|
|
301
308
|
*
|
|
302
309
|
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
303
|
-
* about session
|
|
310
|
+
* about session
|
|
311
|
+
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
304
312
|
*
|
|
305
313
|
*
|
|
306
314
|
* @param {string} provider
|
|
@@ -309,33 +317,34 @@ export declare class Account extends Service {
|
|
|
309
317
|
* @param {string[]} scopes
|
|
310
318
|
* @throws {AppwriteException}
|
|
311
319
|
* @returns {void|string}
|
|
312
|
-
|
|
320
|
+
*/
|
|
313
321
|
createOAuth2Session(provider: string, success?: string, failure?: string, scopes?: string[]): void | URL;
|
|
314
322
|
/**
|
|
315
|
-
* Create
|
|
323
|
+
* Create phone session
|
|
316
324
|
*
|
|
317
325
|
* Sends the user an SMS with a secret key for creating a session. If the
|
|
318
326
|
* provided user ID has not be registered, a new user will be created. Use the
|
|
319
327
|
* returned user ID and secret and submit a request to the [PUT
|
|
320
|
-
* /account/sessions/phone](/docs/client/account#
|
|
328
|
+
* /account/sessions/phone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneSession)
|
|
321
329
|
* endpoint to complete the login process. The secret sent to the user's phone
|
|
322
330
|
* is valid for 15 minutes.
|
|
323
331
|
*
|
|
324
332
|
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
325
|
-
* about session
|
|
333
|
+
* about session
|
|
334
|
+
* limits](https://appwrite.io/docs/authentication-security#limits).
|
|
326
335
|
*
|
|
327
336
|
* @param {string} userId
|
|
328
337
|
* @param {string} phone
|
|
329
338
|
* @throws {AppwriteException}
|
|
330
339
|
* @returns {Promise}
|
|
331
|
-
|
|
340
|
+
*/
|
|
332
341
|
createPhoneSession(userId: string, phone: string): Promise<Models.Token>;
|
|
333
342
|
/**
|
|
334
|
-
* Create
|
|
343
|
+
* Create phone session (confirmation)
|
|
335
344
|
*
|
|
336
345
|
* Use this endpoint to complete creating a session with SMS. Use the
|
|
337
346
|
* **userId** from the
|
|
338
|
-
* [createPhoneSession](/docs/client/account#
|
|
347
|
+
* [createPhoneSession](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneSession)
|
|
339
348
|
* endpoint and the **secret** received via SMS to successfully update and
|
|
340
349
|
* confirm the phone session.
|
|
341
350
|
*
|
|
@@ -343,10 +352,10 @@ export declare class Account extends Service {
|
|
|
343
352
|
* @param {string} secret
|
|
344
353
|
* @throws {AppwriteException}
|
|
345
354
|
* @returns {Promise}
|
|
346
|
-
|
|
355
|
+
*/
|
|
347
356
|
updatePhoneSession(userId: string, secret: string): Promise<Models.Session>;
|
|
348
357
|
/**
|
|
349
|
-
* Get
|
|
358
|
+
* Get session
|
|
350
359
|
*
|
|
351
360
|
* Use this endpoint to get a logged in user's session using a Session ID.
|
|
352
361
|
* Inputting 'current' will return the current session being used.
|
|
@@ -354,10 +363,10 @@ export declare class Account extends Service {
|
|
|
354
363
|
* @param {string} sessionId
|
|
355
364
|
* @throws {AppwriteException}
|
|
356
365
|
* @returns {Promise}
|
|
357
|
-
|
|
366
|
+
*/
|
|
358
367
|
getSession(sessionId: string): Promise<Models.Session>;
|
|
359
368
|
/**
|
|
360
|
-
* Update OAuth
|
|
369
|
+
* Update OAuth session (refresh tokens)
|
|
361
370
|
*
|
|
362
371
|
* Access tokens have limited lifespan and expire to mitigate security risks.
|
|
363
372
|
* If session was created using an OAuth provider, this route can be used to
|
|
@@ -366,23 +375,24 @@ export declare class Account extends Service {
|
|
|
366
375
|
* @param {string} sessionId
|
|
367
376
|
* @throws {AppwriteException}
|
|
368
377
|
* @returns {Promise}
|
|
369
|
-
|
|
378
|
+
*/
|
|
370
379
|
updateSession(sessionId: string): Promise<Models.Session>;
|
|
371
380
|
/**
|
|
372
|
-
* Delete
|
|
373
|
-
*
|
|
374
|
-
* Use this endpoint to log out the currently logged in user from all their
|
|
375
|
-
* account sessions across all of their different devices. When using the
|
|
376
|
-
* Session ID argument, only the unique session ID provided is deleted.
|
|
381
|
+
* Delete session
|
|
377
382
|
*
|
|
383
|
+
* Logout the user. Use 'current' as the session ID to logout on this device,
|
|
384
|
+
* use a session ID to logout on another device. If you're looking to logout
|
|
385
|
+
* the user on all devices, use [Delete
|
|
386
|
+
* Sessions](https://appwrite.io/docs/references/cloud/client-web/account#deleteSessions)
|
|
387
|
+
* instead.
|
|
378
388
|
*
|
|
379
389
|
* @param {string} sessionId
|
|
380
390
|
* @throws {AppwriteException}
|
|
381
391
|
* @returns {Promise}
|
|
382
|
-
|
|
392
|
+
*/
|
|
383
393
|
deleteSession(sessionId: string): Promise<{}>;
|
|
384
394
|
/**
|
|
385
|
-
* Update
|
|
395
|
+
* Update status
|
|
386
396
|
*
|
|
387
397
|
* Block the currently logged in user account. Behind the scene, the user
|
|
388
398
|
* record is not deleted but permanently blocked from any access. To
|
|
@@ -390,10 +400,10 @@ export declare class Account extends Service {
|
|
|
390
400
|
*
|
|
391
401
|
* @throws {AppwriteException}
|
|
392
402
|
* @returns {Promise}
|
|
393
|
-
|
|
403
|
+
*/
|
|
394
404
|
updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
|
|
395
405
|
/**
|
|
396
|
-
* Create
|
|
406
|
+
* Create email verification
|
|
397
407
|
*
|
|
398
408
|
* Use this endpoint to send a verification message to your user email address
|
|
399
409
|
* to confirm they are the valid owners of that address. Both the **userId**
|
|
@@ -402,8 +412,8 @@ export declare class Account extends Service {
|
|
|
402
412
|
* should redirect the user back to your app and allow you to complete the
|
|
403
413
|
* verification process by verifying both the **userId** and **secret**
|
|
404
414
|
* parameters. Learn more about how to [complete the verification
|
|
405
|
-
* process](/docs/client/account#
|
|
406
|
-
* verification link sent to the user's email address is valid for 7 days.
|
|
415
|
+
* process](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification).
|
|
416
|
+
* The verification link sent to the user's email address is valid for 7 days.
|
|
407
417
|
*
|
|
408
418
|
* Please note that in order to avoid a [Redirect
|
|
409
419
|
* Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md),
|
|
@@ -414,10 +424,10 @@ export declare class Account extends Service {
|
|
|
414
424
|
* @param {string} url
|
|
415
425
|
* @throws {AppwriteException}
|
|
416
426
|
* @returns {Promise}
|
|
417
|
-
|
|
427
|
+
*/
|
|
418
428
|
createVerification(url: string): Promise<Models.Token>;
|
|
419
429
|
/**
|
|
420
|
-
* Create
|
|
430
|
+
* Create email verification (confirmation)
|
|
421
431
|
*
|
|
422
432
|
* Use this endpoint to complete the user email verification process. Use both
|
|
423
433
|
* the **userId** and **secret** parameters that were attached to your app URL
|
|
@@ -428,24 +438,26 @@ export declare class Account extends Service {
|
|
|
428
438
|
* @param {string} secret
|
|
429
439
|
* @throws {AppwriteException}
|
|
430
440
|
* @returns {Promise}
|
|
431
|
-
|
|
441
|
+
*/
|
|
432
442
|
updateVerification(userId: string, secret: string): Promise<Models.Token>;
|
|
433
443
|
/**
|
|
434
|
-
* Create
|
|
444
|
+
* Create phone verification
|
|
435
445
|
*
|
|
436
446
|
* Use this endpoint to send a verification SMS to the currently logged in
|
|
437
447
|
* user. This endpoint is meant for use after updating a user's phone number
|
|
438
|
-
* using the
|
|
448
|
+
* using the
|
|
449
|
+
* [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone)
|
|
439
450
|
* endpoint. Learn more about how to [complete the verification
|
|
440
|
-
* process](/docs/client/account#
|
|
441
|
-
* verification code sent to the user's phone number is valid for 15
|
|
451
|
+
* process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification).
|
|
452
|
+
* The verification code sent to the user's phone number is valid for 15
|
|
453
|
+
* minutes.
|
|
442
454
|
*
|
|
443
455
|
* @throws {AppwriteException}
|
|
444
456
|
* @returns {Promise}
|
|
445
|
-
|
|
457
|
+
*/
|
|
446
458
|
createPhoneVerification(): Promise<Models.Token>;
|
|
447
459
|
/**
|
|
448
|
-
* Create
|
|
460
|
+
* Create phone verification (confirmation)
|
|
449
461
|
*
|
|
450
462
|
* Use this endpoint to complete the user phone verification process. Use the
|
|
451
463
|
* **userId** and **secret** that were sent to your user's phone number to
|
|
@@ -456,6 +468,6 @@ export declare class Account extends Service {
|
|
|
456
468
|
* @param {string} secret
|
|
457
469
|
* @throws {AppwriteException}
|
|
458
470
|
* @returns {Promise}
|
|
459
|
-
|
|
471
|
+
*/
|
|
460
472
|
updatePhoneVerification(userId: string, secret: string): Promise<Models.Token>;
|
|
461
473
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Service } from '../service';
|
|
2
|
+
import { Client } from '../client';
|
|
3
|
+
export declare class Assistant extends Service {
|
|
4
|
+
constructor(client: Client);
|
|
5
|
+
/**
|
|
6
|
+
* Ask Query
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* @param {string} prompt
|
|
10
|
+
* @throws {AppwriteException}
|
|
11
|
+
* @returns {Promise}
|
|
12
|
+
*/
|
|
13
|
+
chat(prompt: string): Promise<{}>;
|
|
14
|
+
}
|