@appwrite.io/console 18.4.0-rc.1 → 18.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 +2 -2
- package/dist/cjs/sdk.js +473 -2809
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +474 -2806
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +473 -2809
- package/package.json +1 -1
- package/types/enums/project-auth-method-id.d.ts +1 -2
- package/types/enums/project-key-scopes.d.ts +1 -5
- package/types/enums/project-policy-id.d.ts +1 -2
- package/types/enums/proxy-rule-deployment-resource-type.d.ts +1 -2
- package/types/enums/query-suggestion-resource.d.ts +0 -8
- package/types/enums/usage-event-metric.d.ts +0 -3
- package/types/enums/usage-gauge-metric.d.ts +0 -1
- package/types/index.d.ts +0 -11
- package/types/models.d.ts +85 -529
- package/types/service.d.ts +11 -0
- package/types/services/account.d.ts +9 -12
- package/types/services/project.d.ts +15 -18
- package/types/services/push.d.ts +2 -2
- package/types/services/users.d.ts +27 -2
- package/types/enums/analytics-dimension.d.ts +0 -24
- package/types/enums/analytics-interval.d.ts +0 -6
- package/types/enums/platform-resource-type.d.ts +0 -11
- package/types/enums/project-resource-type.d.ts +0 -13
- package/types/enums/video-output.d.ts +0 -5
- package/types/enums/video-rendition-status.d.ts +0 -9
- package/types/services/admin.d.ts +0 -80
- package/types/services/analytics-tracking.d.ts +0 -211
- package/types/services/analytics.d.ts +0 -254
- package/types/services/videos.d.ts +0 -860
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Client } from './client';
|
|
2
|
+
import type { Payload } from './client';
|
|
3
|
+
export declare class Service {
|
|
4
|
+
/**
|
|
5
|
+
* The size for chunked uploads in bytes.
|
|
6
|
+
*/
|
|
7
|
+
static CHUNK_SIZE: number;
|
|
8
|
+
client: Client;
|
|
9
|
+
constructor(client: Client);
|
|
10
|
+
static flatten(data: Payload, prefix?: string): Payload;
|
|
11
|
+
}
|
|
@@ -849,7 +849,7 @@ export declare class Account {
|
|
|
849
849
|
/**
|
|
850
850
|
* Get the list of verified passkeys registered by the currently logged in user.
|
|
851
851
|
*
|
|
852
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter and order on the following attributes: $id, $createdAt, $updatedAt
|
|
852
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter and order on the following attributes: $id, $createdAt, $updatedAt, name, accessedAt
|
|
853
853
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
854
854
|
* @throws {AppwriteException}
|
|
855
855
|
* @returns {Promise<Models.PasskeyList>}
|
|
@@ -861,7 +861,7 @@ export declare class Account {
|
|
|
861
861
|
/**
|
|
862
862
|
* Get the list of verified passkeys registered by the currently logged in user.
|
|
863
863
|
*
|
|
864
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter and order on the following attributes: $id, $createdAt, $updatedAt
|
|
864
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter and order on the following attributes: $id, $createdAt, $updatedAt, name, accessedAt
|
|
865
865
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
866
866
|
* @throws {AppwriteException}
|
|
867
867
|
* @returns {Promise<Models.PasskeyList>}
|
|
@@ -951,30 +951,27 @@ export declare class Account {
|
|
|
951
951
|
*/
|
|
952
952
|
deletePasskey(passkeyId: string): Promise<{}>;
|
|
953
953
|
/**
|
|
954
|
-
* Complete a passkey registration started with [Create passkey](/docs/references/cloud/client-web/account#createPasskey). Pass the
|
|
954
|
+
* Complete a passkey registration started with [Create passkey](/docs/references/cloud/client-web/account#createPasskey). Pass the JSON form of the credential returned by `navigator.credentials.create()`, for example `credential.toJSON()`. Each registration can be verified once; a failed attempt requires starting it again.
|
|
955
955
|
*
|
|
956
956
|
* @param {string} params.passkeyId - Passkey ID.
|
|
957
|
-
* @param {string} params.challengeId - Challenge ID returned when the passkey was created.
|
|
958
957
|
* @param {object} params.credential - Registration credential returned by the authenticator, in the JSON form produced by `PublicKeyCredential.toJSON()`.
|
|
959
958
|
* @throws {AppwriteException}
|
|
960
959
|
* @returns {Promise<Models.Passkey>}
|
|
961
960
|
*/
|
|
962
961
|
updatePasskeyVerification(params: {
|
|
963
962
|
passkeyId: string;
|
|
964
|
-
challengeId: string;
|
|
965
963
|
credential: object;
|
|
966
964
|
}): Promise<Models.Passkey>;
|
|
967
965
|
/**
|
|
968
|
-
* Complete a passkey registration started with [Create passkey](/docs/references/cloud/client-web/account#createPasskey). Pass the
|
|
966
|
+
* Complete a passkey registration started with [Create passkey](/docs/references/cloud/client-web/account#createPasskey). Pass the JSON form of the credential returned by `navigator.credentials.create()`, for example `credential.toJSON()`. Each registration can be verified once; a failed attempt requires starting it again.
|
|
969
967
|
*
|
|
970
968
|
* @param {string} passkeyId - Passkey ID.
|
|
971
|
-
* @param {string} challengeId - Challenge ID returned when the passkey was created.
|
|
972
969
|
* @param {object} credential - Registration credential returned by the authenticator, in the JSON form produced by `PublicKeyCredential.toJSON()`.
|
|
973
970
|
* @throws {AppwriteException}
|
|
974
971
|
* @returns {Promise<Models.Passkey>}
|
|
975
972
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
976
973
|
*/
|
|
977
|
-
updatePasskeyVerification(passkeyId: string,
|
|
974
|
+
updatePasskeyVerification(passkeyId: string, credential: object): Promise<Models.Passkey>;
|
|
978
975
|
/**
|
|
979
976
|
* Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth, Team Invites and Magic URL, oldPassword is optional.
|
|
980
977
|
*
|
|
@@ -1774,22 +1771,22 @@ export declare class Account {
|
|
|
1774
1771
|
* @param {string} params.challengeId - Challenge ID returned by createPasskeyToken.
|
|
1775
1772
|
* @param {object} params.credential - Authentication credential returned by the authenticator, in the JSON form produced by `PublicKeyCredential.toJSON()`.
|
|
1776
1773
|
* @throws {AppwriteException}
|
|
1777
|
-
* @returns {Promise<Models.
|
|
1774
|
+
* @returns {Promise<Models.TokenSecret>}
|
|
1778
1775
|
*/
|
|
1779
1776
|
updatePasskeyToken(params: {
|
|
1780
1777
|
challengeId: string;
|
|
1781
1778
|
credential: object;
|
|
1782
|
-
}): Promise<Models.
|
|
1779
|
+
}): Promise<Models.TokenSecret>;
|
|
1783
1780
|
/**
|
|
1784
1781
|
* Complete a passkey sign-in started with [Create passkey token](/docs/references/cloud/client-web/account#createPasskeyToken). Pass the challenge ID and the JSON form of the credential returned by `navigator.credentials.get()`, for example `credential.toJSON()`. The returned token includes its secret and expires after 1 minute: exchange it for a session with [Create session](/docs/references/cloud/client-web/account#createSession). Passkeys require user verification, so the session also satisfies MFA. Each challenge can only be used once.
|
|
1785
1782
|
*
|
|
1786
1783
|
* @param {string} challengeId - Challenge ID returned by createPasskeyToken.
|
|
1787
1784
|
* @param {object} credential - Authentication credential returned by the authenticator, in the JSON form produced by `PublicKeyCredential.toJSON()`.
|
|
1788
1785
|
* @throws {AppwriteException}
|
|
1789
|
-
* @returns {Promise<Models.
|
|
1786
|
+
* @returns {Promise<Models.TokenSecret>}
|
|
1790
1787
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1791
1788
|
*/
|
|
1792
|
-
updatePasskeyToken(challengeId: string, credential: object): Promise<Models.
|
|
1789
|
+
updatePasskeyToken(challengeId: string, credential: object): Promise<Models.TokenSecret>;
|
|
1793
1790
|
/**
|
|
1794
1791
|
* Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.
|
|
1795
1792
|
*
|
|
@@ -39,7 +39,7 @@ export declare class Project {
|
|
|
39
39
|
/**
|
|
40
40
|
* Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project.
|
|
41
41
|
*
|
|
42
|
-
* @param {ProjectAuthMethodId} params.methodId - Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
|
|
42
|
+
* @param {ProjectAuthMethodId} params.methodId - Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
|
|
43
43
|
* @param {boolean} params.enabled - Auth method status.
|
|
44
44
|
* @throws {AppwriteException}
|
|
45
45
|
* @returns {Promise<Models.Project>}
|
|
@@ -51,7 +51,7 @@ export declare class Project {
|
|
|
51
51
|
/**
|
|
52
52
|
* Update properties of a specific auth method. Use this endpoint to enable or disable a method in your project.
|
|
53
53
|
*
|
|
54
|
-
* @param {ProjectAuthMethodId} methodId - Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
|
|
54
|
+
* @param {ProjectAuthMethodId} methodId - Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
|
|
55
55
|
* @param {boolean} enabled - Auth method status.
|
|
56
56
|
* @throws {AppwriteException}
|
|
57
57
|
* @returns {Promise<Models.Project>}
|
|
@@ -2218,27 +2218,24 @@ export declare class Project {
|
|
|
2218
2218
|
*/
|
|
2219
2219
|
updateMFAFactorsPolicy(totp?: boolean, email?: boolean, phone?: boolean, custom?: boolean): Promise<Models.Project>;
|
|
2220
2220
|
/**
|
|
2221
|
-
*
|
|
2221
|
+
* Set the relying party ID passkeys are bound to: the domain of your application. Passkeys work on the project's web platforms on that domain or its subdomains, and on the domain itself for Apple apps. A localhost web platform enables passkeys for local development without a relying party ID. The relying party ID cannot change while users have passkeys, and any change invalidates ceremonies in progress.
|
|
2222
2222
|
*
|
|
2223
|
-
* @param {string} params.rpId - Relying party ID: the domain of your application, such as `example.com`. Use `localhost` for local development.
|
|
2224
|
-
* @param {string[]} params.origins - Web origins allowed to use passkeys, such as `https://example.com` or `https://app.example.com`. Each must be HTTPS on the relying party ID or one of its subdomains, without a path. HTTP is only allowed for `localhost`. Maximum of 10 origins.
|
|
2223
|
+
* @param {string} params.rpId - Relying party ID: the domain of your application, such as `example.com`. Use `localhost` for local development, or an empty string to unset it.
|
|
2225
2224
|
* @throws {AppwriteException}
|
|
2226
2225
|
* @returns {Promise<Models.Project>}
|
|
2227
2226
|
*/
|
|
2228
|
-
updatePasskeyPolicy(params
|
|
2229
|
-
rpId
|
|
2230
|
-
origins?: string[];
|
|
2227
|
+
updatePasskeyPolicy(params: {
|
|
2228
|
+
rpId: string;
|
|
2231
2229
|
}): Promise<Models.Project>;
|
|
2232
2230
|
/**
|
|
2233
|
-
*
|
|
2231
|
+
* Set the relying party ID passkeys are bound to: the domain of your application. Passkeys work on the project's web platforms on that domain or its subdomains, and on the domain itself for Apple apps. A localhost web platform enables passkeys for local development without a relying party ID. The relying party ID cannot change while users have passkeys, and any change invalidates ceremonies in progress.
|
|
2234
2232
|
*
|
|
2235
|
-
* @param {string} rpId - Relying party ID: the domain of your application, such as `example.com`. Use `localhost` for local development.
|
|
2236
|
-
* @param {string[]} origins - Web origins allowed to use passkeys, such as `https://example.com` or `https://app.example.com`. Each must be HTTPS on the relying party ID or one of its subdomains, without a path. HTTP is only allowed for `localhost`. Maximum of 10 origins.
|
|
2233
|
+
* @param {string} rpId - Relying party ID: the domain of your application, such as `example.com`. Use `localhost` for local development, or an empty string to unset it.
|
|
2237
2234
|
* @throws {AppwriteException}
|
|
2238
2235
|
* @returns {Promise<Models.Project>}
|
|
2239
2236
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2240
2237
|
*/
|
|
2241
|
-
updatePasskeyPolicy(rpId
|
|
2238
|
+
updatePasskeyPolicy(rpId: string): Promise<Models.Project>;
|
|
2242
2239
|
/**
|
|
2243
2240
|
* Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.
|
|
2244
2241
|
*
|
|
@@ -2454,22 +2451,22 @@ export declare class Project {
|
|
|
2454
2451
|
/**
|
|
2455
2452
|
* Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.
|
|
2456
2453
|
*
|
|
2457
|
-
* @param {ProjectPolicyId} params.policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, password-pwned, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, mfa-factors, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email
|
|
2454
|
+
* @param {ProjectPolicyId} params.policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, password-pwned, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, mfa-factors, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email.
|
|
2458
2455
|
* @throws {AppwriteException}
|
|
2459
|
-
* @returns {Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicyPasswordPwned | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyMfaFactors | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail
|
|
2456
|
+
* @returns {Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicyPasswordPwned | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyMfaFactors | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail>}
|
|
2460
2457
|
*/
|
|
2461
2458
|
getPolicy(params: {
|
|
2462
2459
|
policyId: ProjectPolicyId;
|
|
2463
|
-
}): Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicyPasswordPwned | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyMfaFactors | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail
|
|
2460
|
+
}): Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicyPasswordPwned | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyMfaFactors | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail>;
|
|
2464
2461
|
/**
|
|
2465
2462
|
* Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.
|
|
2466
2463
|
*
|
|
2467
|
-
* @param {ProjectPolicyId} policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, password-pwned, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, mfa-factors, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email
|
|
2464
|
+
* @param {ProjectPolicyId} policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, password-pwned, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, mfa-factors, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email.
|
|
2468
2465
|
* @throws {AppwriteException}
|
|
2469
|
-
* @returns {Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicyPasswordPwned | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyMfaFactors | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail
|
|
2466
|
+
* @returns {Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicyPasswordPwned | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyMfaFactors | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail>}
|
|
2470
2467
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2471
2468
|
*/
|
|
2472
|
-
getPolicy(policyId: ProjectPolicyId): Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicyPasswordPwned | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyMfaFactors | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail
|
|
2469
|
+
getPolicy(policyId: ProjectPolicyId): Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicyPasswordPwned | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyMfaFactors | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail>;
|
|
2473
2470
|
/**
|
|
2474
2471
|
* Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project.
|
|
2475
2472
|
*
|
package/types/services/push.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
|
+
import { Service } from '../service';
|
|
2
3
|
import type { ResolvedTopic, Topic } from '../topic';
|
|
3
4
|
/** A message delivered on a subscribed topic (the MQTT analog of a Realtime event). */
|
|
4
5
|
export interface PushMessage {
|
|
@@ -57,8 +58,7 @@ export interface PushSubscription {
|
|
|
57
58
|
* );
|
|
58
59
|
* // sub.update({ background: true }); sub.unsubscribe();
|
|
59
60
|
*/
|
|
60
|
-
export declare class Push {
|
|
61
|
-
client: Client;
|
|
61
|
+
export declare class Push extends Service {
|
|
62
62
|
private mqtt;
|
|
63
63
|
private connecting;
|
|
64
64
|
private Buffer;
|
|
@@ -808,7 +808,7 @@ export declare class Users {
|
|
|
808
808
|
* Get the list of verified passkeys registered by a user.
|
|
809
809
|
*
|
|
810
810
|
* @param {string} params.userId - User ID.
|
|
811
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter and order on the following attributes: $id, $createdAt, $updatedAt
|
|
811
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter and order on the following attributes: $id, $createdAt, $updatedAt, name, accessedAt
|
|
812
812
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
813
813
|
* @throws {AppwriteException}
|
|
814
814
|
* @returns {Promise<Models.PasskeyList>}
|
|
@@ -822,7 +822,7 @@ export declare class Users {
|
|
|
822
822
|
* Get the list of verified passkeys registered by a user.
|
|
823
823
|
*
|
|
824
824
|
* @param {string} userId - User ID.
|
|
825
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter and order on the following attributes: $id, $createdAt, $updatedAt
|
|
825
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter and order on the following attributes: $id, $createdAt, $updatedAt, name, accessedAt
|
|
826
826
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
827
827
|
* @throws {AppwriteException}
|
|
828
828
|
* @returns {Promise<Models.PasskeyList>}
|
|
@@ -851,6 +851,31 @@ export declare class Users {
|
|
|
851
851
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
852
852
|
*/
|
|
853
853
|
getPasskey(userId: string, passkeyId: string): Promise<Models.Passkey>;
|
|
854
|
+
/**
|
|
855
|
+
* Rename a passkey of a user.
|
|
856
|
+
*
|
|
857
|
+
* @param {string} params.userId - User ID.
|
|
858
|
+
* @param {string} params.passkeyId - Passkey ID.
|
|
859
|
+
* @param {string} params.name - Passkey name. Max length: 128 chars.
|
|
860
|
+
* @throws {AppwriteException}
|
|
861
|
+
* @returns {Promise<Models.Passkey>}
|
|
862
|
+
*/
|
|
863
|
+
updatePasskey(params: {
|
|
864
|
+
userId: string;
|
|
865
|
+
passkeyId: string;
|
|
866
|
+
name: string;
|
|
867
|
+
}): Promise<Models.Passkey>;
|
|
868
|
+
/**
|
|
869
|
+
* Rename a passkey of a user.
|
|
870
|
+
*
|
|
871
|
+
* @param {string} userId - User ID.
|
|
872
|
+
* @param {string} passkeyId - Passkey ID.
|
|
873
|
+
* @param {string} name - Passkey name. Max length: 128 chars.
|
|
874
|
+
* @throws {AppwriteException}
|
|
875
|
+
* @returns {Promise<Models.Passkey>}
|
|
876
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
877
|
+
*/
|
|
878
|
+
updatePasskey(userId: string, passkeyId: string, name: string): Promise<Models.Passkey>;
|
|
854
879
|
/**
|
|
855
880
|
* Delete a passkey from a user, for example when a device is lost. The passkey can no longer be used to sign in.
|
|
856
881
|
*
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare enum AnalyticsDimension {
|
|
2
|
-
Country = "country",
|
|
3
|
-
Region = "region",
|
|
4
|
-
City = "city",
|
|
5
|
-
Browser = "browser",
|
|
6
|
-
OperatingSystem = "operatingSystem",
|
|
7
|
-
Device = "device",
|
|
8
|
-
ScreenSize = "screenSize",
|
|
9
|
-
ReferrerSource = "referrerSource",
|
|
10
|
-
Channel = "channel",
|
|
11
|
-
UtmSource = "utmSource",
|
|
12
|
-
UtmMedium = "utmMedium",
|
|
13
|
-
UtmCampaign = "utmCampaign",
|
|
14
|
-
UtmContent = "utmContent",
|
|
15
|
-
UtmTerm = "utmTerm",
|
|
16
|
-
Page = "page",
|
|
17
|
-
Hostname = "hostname",
|
|
18
|
-
EntryPage = "entryPage",
|
|
19
|
-
ExitPage = "exitPage",
|
|
20
|
-
TrafficType = "trafficType",
|
|
21
|
-
BotName = "botName",
|
|
22
|
-
BotCategory = "botCategory",
|
|
23
|
-
EventName = "eventName"
|
|
24
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare enum PlatformResourceType {
|
|
2
|
-
Projects = "projects",
|
|
3
|
-
Organizations = "organizations",
|
|
4
|
-
Users = "users",
|
|
5
|
-
Memberships = "memberships",
|
|
6
|
-
Rules = "rules",
|
|
7
|
-
Keys = "keys",
|
|
8
|
-
Platforms = "platforms",
|
|
9
|
-
Webhooks = "webhooks",
|
|
10
|
-
Certificates = "certificates"
|
|
11
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare enum ProjectResourceType {
|
|
2
|
-
Users = "users",
|
|
3
|
-
Teams = "teams",
|
|
4
|
-
Memberships = "memberships",
|
|
5
|
-
Databases = "databases",
|
|
6
|
-
Buckets = "buckets",
|
|
7
|
-
Functions = "functions",
|
|
8
|
-
Sites = "sites",
|
|
9
|
-
Deployments = "deployments",
|
|
10
|
-
Topics = "topics",
|
|
11
|
-
Providers = "providers",
|
|
12
|
-
Messages = "messages"
|
|
13
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Client } from '../client';
|
|
2
|
-
import { PlatformResourceType } from '../enums/platform-resource-type';
|
|
3
|
-
import { ProjectResourceType } from '../enums/project-resource-type';
|
|
4
|
-
export declare class Admin {
|
|
5
|
-
client: Client;
|
|
6
|
-
constructor(client: Client);
|
|
7
|
-
/**
|
|
8
|
-
* Delete everything cached from the platform database in the region serving the request.
|
|
9
|
-
*
|
|
10
|
-
* @throws {AppwriteException}
|
|
11
|
-
* @returns {Promise<{}>}
|
|
12
|
-
*/
|
|
13
|
-
deletePlatformCache(): Promise<{}>;
|
|
14
|
-
/**
|
|
15
|
-
* Delete the cache of one platform resource, or of every resource of a type, in the region serving the request.
|
|
16
|
-
*
|
|
17
|
-
* @param {PlatformResourceType} params.resourceType - Resource type.
|
|
18
|
-
* @param {string} params.resourceId - Resource ID. Leave empty to delete the cache of every resource of this type.
|
|
19
|
-
* @throws {AppwriteException}
|
|
20
|
-
* @returns {Promise<{}>}
|
|
21
|
-
*/
|
|
22
|
-
deletePlatformResourceCache(params: {
|
|
23
|
-
resourceType: PlatformResourceType;
|
|
24
|
-
resourceId?: string;
|
|
25
|
-
}): Promise<{}>;
|
|
26
|
-
/**
|
|
27
|
-
* Delete the cache of one platform resource, or of every resource of a type, in the region serving the request.
|
|
28
|
-
*
|
|
29
|
-
* @param {PlatformResourceType} resourceType - Resource type.
|
|
30
|
-
* @param {string} resourceId - Resource ID. Leave empty to delete the cache of every resource of this type.
|
|
31
|
-
* @throws {AppwriteException}
|
|
32
|
-
* @returns {Promise<{}>}
|
|
33
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
34
|
-
*/
|
|
35
|
-
deletePlatformResourceCache(resourceType: PlatformResourceType, resourceId?: string): Promise<{}>;
|
|
36
|
-
/**
|
|
37
|
-
* Delete everything cached for a project. Send the request to the project's region.
|
|
38
|
-
*
|
|
39
|
-
* @param {string} params.projectId - Project ID.
|
|
40
|
-
* @throws {AppwriteException}
|
|
41
|
-
* @returns {Promise<{}>}
|
|
42
|
-
*/
|
|
43
|
-
deleteProjectCache(params: {
|
|
44
|
-
projectId: string;
|
|
45
|
-
}): Promise<{}>;
|
|
46
|
-
/**
|
|
47
|
-
* Delete everything cached for a project. Send the request to the project's region.
|
|
48
|
-
*
|
|
49
|
-
* @param {string} projectId - Project ID.
|
|
50
|
-
* @throws {AppwriteException}
|
|
51
|
-
* @returns {Promise<{}>}
|
|
52
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
53
|
-
*/
|
|
54
|
-
deleteProjectCache(projectId: string): Promise<{}>;
|
|
55
|
-
/**
|
|
56
|
-
* Delete the cache of one project resource, or of every resource of a type. Send the request to the project's region.
|
|
57
|
-
*
|
|
58
|
-
* @param {string} params.projectId - Project ID.
|
|
59
|
-
* @param {ProjectResourceType} params.resourceType - Resource type.
|
|
60
|
-
* @param {string} params.resourceId - Resource ID. Leave empty to delete the cache of every resource of this type.
|
|
61
|
-
* @throws {AppwriteException}
|
|
62
|
-
* @returns {Promise<{}>}
|
|
63
|
-
*/
|
|
64
|
-
deleteProjectResourceCache(params: {
|
|
65
|
-
projectId: string;
|
|
66
|
-
resourceType: ProjectResourceType;
|
|
67
|
-
resourceId?: string;
|
|
68
|
-
}): Promise<{}>;
|
|
69
|
-
/**
|
|
70
|
-
* Delete the cache of one project resource, or of every resource of a type. Send the request to the project's region.
|
|
71
|
-
*
|
|
72
|
-
* @param {string} projectId - Project ID.
|
|
73
|
-
* @param {ProjectResourceType} resourceType - Resource type.
|
|
74
|
-
* @param {string} resourceId - Resource ID. Leave empty to delete the cache of every resource of this type.
|
|
75
|
-
* @throws {AppwriteException}
|
|
76
|
-
* @returns {Promise<{}>}
|
|
77
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
78
|
-
*/
|
|
79
|
-
deleteProjectResourceCache(projectId: string, resourceType: ProjectResourceType, resourceId?: string): Promise<{}>;
|
|
80
|
-
}
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Analytics auto-tracking helpers.
|
|
3
|
-
*
|
|
4
|
-
* These are hand-written companions to the generated `Analytics` service.
|
|
5
|
-
* The generated service exposes `createEvent(params)` for arbitrary events;
|
|
6
|
-
* this module wires up common auto-tracking behaviours (pageviews, outbound
|
|
7
|
-
* links, downloads, scroll depth, active engagement) on top of it.
|
|
8
|
-
*
|
|
9
|
-
* The tracking helpers accept a plain event-emitter function so they do not
|
|
10
|
-
* hard-couple to the generated `Analytics` class. The emitter adapts this
|
|
11
|
-
* module's option shape to `createEvent`: `url` is required there, and `props`
|
|
12
|
-
* is a flat alternating key/value list rather than an object.
|
|
13
|
-
*
|
|
14
|
-
* ```ts
|
|
15
|
-
* const analytics = new Analytics(client);
|
|
16
|
-
* const tracking = new AnalyticsTracking(
|
|
17
|
-
* (name, options) => analytics.createEvent({
|
|
18
|
-
* propertyId: options?.propertyId ?? '<PROPERTY_ID>',
|
|
19
|
-
* name,
|
|
20
|
-
* url: options?.url ?? window.location.href,
|
|
21
|
-
* referrer: options?.referrer,
|
|
22
|
-
* scrollDepth: options?.scrollDepth,
|
|
23
|
-
* engagementTime: options?.engagementTime,
|
|
24
|
-
* props: Object.entries(options?.props ?? {}).flatMap(
|
|
25
|
-
* ([key, value]) => [key, String(value)],
|
|
26
|
-
* ),
|
|
27
|
-
* }),
|
|
28
|
-
* { propertyId: '<PROPERTY_ID>' }
|
|
29
|
-
* );
|
|
30
|
-
* tracking.enableAllAutoTracking();
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* `propertyId` is optional: when set it is merged into the options of every
|
|
34
|
-
* emitted event, so an emitter that forwards `options.propertyId` (as above)
|
|
35
|
-
* picks it up instead of every caller hand-rolling it into the closure.
|
|
36
|
-
* Per-event `propertyId` always wins over the configured default.
|
|
37
|
-
*
|
|
38
|
-
* All helpers respect `navigator.doNotTrack === '1'` by default; opt out with
|
|
39
|
-
* `respectDoNotTrack: false` in the constructor options.
|
|
40
|
-
*
|
|
41
|
-
* Engagement time follows Plausible's model: rather than one total at unload,
|
|
42
|
-
* a delta is emitted at every natural checkpoint of the visit (tab hidden, SPA
|
|
43
|
-
* route change, unload). See `enableAutoEngagementTime` for details.
|
|
44
|
-
*
|
|
45
|
-
* Auto-emitted event names follow `snake_case` + lowercase (`pageview`,
|
|
46
|
-
* `outbound_link`, `file_download`, `screen_view`, etc.). Any prop keys use
|
|
47
|
-
* camelCase to match the endpoint's parameter naming. Callers can pass any
|
|
48
|
-
* custom event name; the auto-track methods only own the events they emit
|
|
49
|
-
* themselves.
|
|
50
|
-
*/
|
|
51
|
-
export type AnalyticsEventOptions = {
|
|
52
|
-
props?: Record<string, unknown>;
|
|
53
|
-
url?: string;
|
|
54
|
-
referrer?: string;
|
|
55
|
-
propertyId?: string;
|
|
56
|
-
scrollDepth?: number;
|
|
57
|
-
engagementTime?: number;
|
|
58
|
-
};
|
|
59
|
-
export type AnalyticsEventEmitter = (name: string, options?: AnalyticsEventOptions) => unknown;
|
|
60
|
-
export type AnalyticsTrackingOptions = {
|
|
61
|
-
/**
|
|
62
|
-
* When true (default) the tracker becomes a no-op if `navigator.doNotTrack`
|
|
63
|
-
* is set to `'1'`. Set to false to always fire regardless of the DNT signal.
|
|
64
|
-
*/
|
|
65
|
-
respectDoNotTrack?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Analytics property (or snippet) ID to attach to every emitted event.
|
|
68
|
-
* Optional — omit it when the emitter closure already supplies one. A
|
|
69
|
-
* `propertyId` passed on an individual event takes precedence.
|
|
70
|
-
*/
|
|
71
|
-
propertyId?: string;
|
|
72
|
-
};
|
|
73
|
-
export type OutboundTrackingOptions = {
|
|
74
|
-
/**
|
|
75
|
-
* When true, links pointing at the current host's subdomains are treated
|
|
76
|
-
* as outbound. Defaults to false (subdomains are same-origin for tracking).
|
|
77
|
-
*/
|
|
78
|
-
includeSubdomains?: boolean;
|
|
79
|
-
};
|
|
80
|
-
export type DownloadTrackingOptions = {
|
|
81
|
-
/**
|
|
82
|
-
* File extensions (without the leading dot) that mark an anchor as a
|
|
83
|
-
* download. Defaults cover the common set.
|
|
84
|
-
*/
|
|
85
|
-
extensions?: string[];
|
|
86
|
-
};
|
|
87
|
-
export declare class AnalyticsTracking {
|
|
88
|
-
private readonly emit;
|
|
89
|
-
private readonly respectDoNotTrack;
|
|
90
|
-
private readonly propertyId?;
|
|
91
|
-
private pageviewCleanups;
|
|
92
|
-
private outboundCleanup?;
|
|
93
|
-
private downloadCleanup?;
|
|
94
|
-
private scrollCleanups;
|
|
95
|
-
private engagementCleanups;
|
|
96
|
-
private currentPath?;
|
|
97
|
-
private maxScrollDepth;
|
|
98
|
-
private scrollTicking;
|
|
99
|
-
private lastScrollReport;
|
|
100
|
-
private engagementStart;
|
|
101
|
-
private engagementAccumulatedMs;
|
|
102
|
-
private engagementActive;
|
|
103
|
-
constructor(emit: AnalyticsEventEmitter, options?: AnalyticsTrackingOptions);
|
|
104
|
-
/**
|
|
105
|
-
* Enable the opinionated default auto-tracking set: pageviews, outbound
|
|
106
|
-
* links, scroll depth and active engagement time. Downloads must be opted
|
|
107
|
-
* into separately via `enableAutoDownloadTracking()` because the extension
|
|
108
|
-
* list is application-specific.
|
|
109
|
-
*/
|
|
110
|
-
enableAllAutoTracking(): void;
|
|
111
|
-
/**
|
|
112
|
-
* Track an event manually. Respects the DNT setting and swallows emitter
|
|
113
|
-
* exceptions so tracking failures never surface to the host page.
|
|
114
|
-
*/
|
|
115
|
-
track(name: string, options?: AnalyticsEventOptions): void;
|
|
116
|
-
/**
|
|
117
|
-
* Convenience wrapper for pageview-shaped events.
|
|
118
|
-
*/
|
|
119
|
-
pageview(url?: string, referrer?: string): void;
|
|
120
|
-
/**
|
|
121
|
-
* Enable SPA-aware pageview tracking. Fires an initial pageview on
|
|
122
|
-
* enable, then again on every `pushState`, `replaceState`, `popstate`
|
|
123
|
-
* or hashchange. Idempotent — repeat calls no-op.
|
|
124
|
-
*/
|
|
125
|
-
enableAutoPageviews(): void;
|
|
126
|
-
/**
|
|
127
|
-
* Disable auto-pageview tracking installed by `enableAutoPageviews`.
|
|
128
|
-
* Safe to call when auto-pageviews were never enabled.
|
|
129
|
-
*/
|
|
130
|
-
disableAutoPageviews(): void;
|
|
131
|
-
/**
|
|
132
|
-
* Enable click-based outbound link tracking. Detects anchor clicks that
|
|
133
|
-
* navigate to a different origin and fires an `outbound_link` event
|
|
134
|
-
* (with `hostname` and `href` props) before the browser navigates.
|
|
135
|
-
*/
|
|
136
|
-
enableAutoOutboundTracking(options?: OutboundTrackingOptions): void;
|
|
137
|
-
/**
|
|
138
|
-
* Disable outbound-link tracking installed by `enableAutoOutboundTracking`.
|
|
139
|
-
* Safe to call when auto-outbound was never enabled.
|
|
140
|
-
*/
|
|
141
|
-
disableAutoOutboundTracking(): void;
|
|
142
|
-
/**
|
|
143
|
-
* Enable click-based download tracking. Detects anchor clicks that point
|
|
144
|
-
* at a file whose extension appears in the configured list and fires a
|
|
145
|
-
* `file_download` event with `filename`, `extension` and `href` props.
|
|
146
|
-
*/
|
|
147
|
-
enableAutoDownloadTracking(options?: DownloadTrackingOptions): void;
|
|
148
|
-
/**
|
|
149
|
-
* Disable file-download tracking installed by `enableAutoDownloadTracking`.
|
|
150
|
-
* Safe to call when auto-download was never enabled.
|
|
151
|
-
*/
|
|
152
|
-
disableAutoDownloadTracking(): void;
|
|
153
|
-
/**
|
|
154
|
-
* Enable passive scroll-depth tracking. Records the maximum percent of the
|
|
155
|
-
* document scrolled and reports it on `beforeunload` and on SPA route
|
|
156
|
-
* changes. Uses a throttled passive listener so it is safe on hot paths.
|
|
157
|
-
*/
|
|
158
|
-
enableAutoScrollDepth(): void;
|
|
159
|
-
/**
|
|
160
|
-
* Disable scroll-depth tracking installed by `enableAutoScrollDepth`. Safe
|
|
161
|
-
* to call when auto-scroll-depth was never enabled. Any accumulated depth
|
|
162
|
-
* for the current page is dropped.
|
|
163
|
-
*/
|
|
164
|
-
disableAutoScrollDepth(): void;
|
|
165
|
-
/**
|
|
166
|
-
* Enable active engagement-time tracking. Counts time the tab is visible
|
|
167
|
-
* and uses `visibilitychange` to exclude background time.
|
|
168
|
-
*
|
|
169
|
-
* Delivery follows Plausible's model rather than a single total at the
|
|
170
|
-
* end of the visit: an `engagement_time` event is emitted at every natural
|
|
171
|
-
* checkpoint — the tab going hidden, an SPA route change, and finally
|
|
172
|
-
* `beforeunload`/`pagehide`. Unload is kept only as a best-effort last
|
|
173
|
-
* flush; it is the least reliable moment to send anything (browsers
|
|
174
|
-
* routinely cancel in-flight requests there, and `sendBeacon` cannot set
|
|
175
|
-
* the `X-Appwrite-Project` header the endpoint requires), so it must never
|
|
176
|
-
* be the only delivery.
|
|
177
|
-
*
|
|
178
|
-
* Each event carries a **delta** — the seconds accrued since the previous
|
|
179
|
-
* flush, not a running total — so the values are additive per session and
|
|
180
|
-
* a lost event costs only its own slice.
|
|
181
|
-
*
|
|
182
|
-
* There is deliberately no periodic ping. The cadence is driven by
|
|
183
|
-
* navigation and tab switches, so request volume tracks what the visitor
|
|
184
|
-
* actually does instead of multiplying with time on page.
|
|
185
|
-
*/
|
|
186
|
-
enableAutoEngagementTime(): void;
|
|
187
|
-
/**
|
|
188
|
-
* Disable engagement-time tracking installed by `enableAutoEngagementTime`.
|
|
189
|
-
* Safe to call when auto-engagement was never enabled. Any accumulated
|
|
190
|
-
* engagement time is dropped without being emitted.
|
|
191
|
-
*/
|
|
192
|
-
disableAutoEngagementTime(): void;
|
|
193
|
-
/**
|
|
194
|
-
* Merge the configured `propertyId` into an event's options. Returns the
|
|
195
|
-
* caller's object untouched when no default is configured (or the event
|
|
196
|
-
* already carries one), so emitters written against the pre-`propertyId`
|
|
197
|
-
* shape keep receiving exactly what they received before.
|
|
198
|
-
*/
|
|
199
|
-
private withPropertyId;
|
|
200
|
-
private canTrack;
|
|
201
|
-
private currentPageUrl;
|
|
202
|
-
private findAnchor;
|
|
203
|
-
private parseUrl;
|
|
204
|
-
private isExternal;
|
|
205
|
-
private rootDomain;
|
|
206
|
-
private computeScrollDepth;
|
|
207
|
-
private flushScrollDepth;
|
|
208
|
-
private startEngagement;
|
|
209
|
-
private pauseEngagement;
|
|
210
|
-
private flushEngagement;
|
|
211
|
-
}
|