@appwrite.io/console 16.1.0 → 18.0.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 +1808 -412
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1805 -413
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +4339 -944
- package/package.json +5 -2
- package/types/client.d.ts +24 -11
- package/types/enums/billing-plan-group.d.ts +2 -1
- package/types/enums/build-runtime.d.ts +3 -0
- package/types/enums/cache-database.d.ts +1 -2
- package/types/enums/conversation-type.d.ts +9 -0
- package/types/enums/framework.d.ts +1 -0
- package/types/enums/id-token-provider.d.ts +4 -0
- package/types/enums/o-auth-2-auth-0-prompt.d.ts +5 -0
- package/types/enums/o-auth-2-discord-prompt.d.ts +4 -0
- package/types/enums/o-auth-2-github-prompt.d.ts +3 -0
- package/types/enums/o-auth-2-kakao-prompt.d.ts +6 -0
- package/types/enums/o-auth-2-microsoft-prompt.d.ts +6 -0
- package/types/enums/o-auth-2-okta-prompt.d.ts +5 -0
- package/types/enums/o-auth-2-salesforce-prompt.d.ts +4 -0
- package/types/enums/o-auth-2-zoho-prompt.d.ts +3 -0
- package/types/enums/organization-key-scopes.d.ts +2 -4
- package/types/enums/project-email-template-id.d.ts +3 -1
- package/types/enums/project-key-scopes.d.ts +1 -0
- package/types/enums/project-o-auth-2-auth-0-prompt.d.ts +5 -0
- package/types/enums/project-o-auth-2-discord-prompt.d.ts +4 -0
- package/types/enums/project-o-auth-2-git-hub-prompt.d.ts +3 -0
- package/types/enums/project-o-auth-2-kakao-prompt.d.ts +6 -0
- package/types/enums/project-o-auth-2-microsoft-prompt.d.ts +6 -0
- package/types/enums/project-o-auth-2-okta-prompt.d.ts +5 -0
- package/types/enums/project-o-auth-2-salesforce-prompt.d.ts +4 -0
- package/types/enums/project-o-auth-2-zoho-prompt.d.ts +3 -0
- package/types/enums/project-policy-id.d.ts +1 -0
- package/types/enums/query-suggestion-resource.d.ts +1 -3
- package/types/enums/runtime.d.ts +3 -0
- package/types/index.d.ts +23 -2
- package/types/models.d.ts +271 -562
- package/types/services/account.d.ts +167 -24
- package/types/services/console.d.ts +2 -2
- package/types/services/databases.d.ts +4 -4
- package/types/services/growth.d.ts +100 -0
- package/types/services/manager.d.ts +39 -14
- package/types/services/messaging.d.ts +94 -8
- package/types/services/organization.d.ts +165 -0
- package/types/services/organizations.d.ts +0 -19
- package/types/services/project.d.ts +93 -50
- package/types/services/projects.d.ts +0 -94
- package/types/services/push.d.ts +153 -0
- package/types/services/storage.d.ts +4 -4
- package/types/services/tables-db.d.ts +37 -37
- package/types/services/teams.d.ts +0 -25
- package/types/services/users.d.ts +4 -29
- package/types/topic.d.ts +34 -0
- package/types/enums/project-usage-range.d.ts +0 -4
|
@@ -3,6 +3,7 @@ import type { Models } from '../models';
|
|
|
3
3
|
import { AccountKeyScopes } from '../enums/account-key-scopes';
|
|
4
4
|
import { AuthenticatorType } from '../enums/authenticator-type';
|
|
5
5
|
import { AuthenticationFactor } from '../enums/authentication-factor';
|
|
6
|
+
import { IdTokenProvider } from '../enums/id-token-provider';
|
|
6
7
|
import { OAuthProvider } from '../enums/o-auth-provider';
|
|
7
8
|
export declare class Account {
|
|
8
9
|
client: Client;
|
|
@@ -540,28 +541,6 @@ export declare class Account {
|
|
|
540
541
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
541
542
|
*/
|
|
542
543
|
deleteKey(keyId: string): Promise<{}>;
|
|
543
|
-
/**
|
|
544
|
-
* Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
|
|
545
|
-
*
|
|
546
|
-
* @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). Only supported methods are limit and offset
|
|
547
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
548
|
-
* @throws {AppwriteException}
|
|
549
|
-
* @returns {Promise<Models.LogList>}
|
|
550
|
-
*/
|
|
551
|
-
listLogs(params?: {
|
|
552
|
-
queries?: string[];
|
|
553
|
-
total?: boolean;
|
|
554
|
-
}): Promise<Models.LogList>;
|
|
555
|
-
/**
|
|
556
|
-
* Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
|
|
557
|
-
*
|
|
558
|
-
* @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). Only supported methods are limit and offset
|
|
559
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
560
|
-
* @throws {AppwriteException}
|
|
561
|
-
* @returns {Promise<Models.LogList>}
|
|
562
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
563
|
-
*/
|
|
564
|
-
listLogs(queries?: string[], total?: boolean): Promise<Models.LogList>;
|
|
565
544
|
/**
|
|
566
545
|
* Enable or disable MFA on an account.
|
|
567
546
|
*
|
|
@@ -1127,6 +1106,61 @@ export declare class Account {
|
|
|
1127
1106
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1128
1107
|
*/
|
|
1129
1108
|
updateRecovery(userId: string, secret: string, password: string): Promise<Models.Token>;
|
|
1109
|
+
/**
|
|
1110
|
+
* Use this endpoint to send a 6-digit password recovery code to the user's email address. Unlike [createRecovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a recovery page. Learn more about how to [complete the recovery process](https://appwrite.io/docs/references/cloud/client-web/account#updateRecoveryOTP). The code sent to the user's email address is valid for 15 minutes.
|
|
1111
|
+
*
|
|
1112
|
+
* Enable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing.
|
|
1113
|
+
*
|
|
1114
|
+
*
|
|
1115
|
+
* @param {string} params.email - User email.
|
|
1116
|
+
* @param {boolean} params.phrase - Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
|
1117
|
+
* @throws {AppwriteException}
|
|
1118
|
+
* @returns {Promise<Models.Token>}
|
|
1119
|
+
*/
|
|
1120
|
+
createRecoveryOTP(params: {
|
|
1121
|
+
email: string;
|
|
1122
|
+
phrase?: boolean;
|
|
1123
|
+
}): Promise<Models.Token>;
|
|
1124
|
+
/**
|
|
1125
|
+
* Use this endpoint to send a 6-digit password recovery code to the user's email address. Unlike [createRecovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a recovery page. Learn more about how to [complete the recovery process](https://appwrite.io/docs/references/cloud/client-web/account#updateRecoveryOTP). The code sent to the user's email address is valid for 15 minutes.
|
|
1126
|
+
*
|
|
1127
|
+
* Enable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing.
|
|
1128
|
+
*
|
|
1129
|
+
*
|
|
1130
|
+
* @param {string} email - User email.
|
|
1131
|
+
* @param {boolean} phrase - Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
|
1132
|
+
* @throws {AppwriteException}
|
|
1133
|
+
* @returns {Promise<Models.Token>}
|
|
1134
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1135
|
+
*/
|
|
1136
|
+
createRecoveryOTP(email: string, phrase?: boolean): Promise<Models.Token>;
|
|
1137
|
+
/**
|
|
1138
|
+
* Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https://appwrite.io/docs/references/cloud/client-web/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated.
|
|
1139
|
+
*
|
|
1140
|
+
*
|
|
1141
|
+
* @param {string} params.userId - User ID.
|
|
1142
|
+
* @param {string} params.secret - Valid recovery OTP code.
|
|
1143
|
+
* @param {string} params.password - New user password. Must be between 8 and 256 chars.
|
|
1144
|
+
* @throws {AppwriteException}
|
|
1145
|
+
* @returns {Promise<Models.Token>}
|
|
1146
|
+
*/
|
|
1147
|
+
updateRecoveryOTP(params: {
|
|
1148
|
+
userId: string;
|
|
1149
|
+
secret: string;
|
|
1150
|
+
password: string;
|
|
1151
|
+
}): Promise<Models.Token>;
|
|
1152
|
+
/**
|
|
1153
|
+
* Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https://appwrite.io/docs/references/cloud/client-web/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated.
|
|
1154
|
+
*
|
|
1155
|
+
*
|
|
1156
|
+
* @param {string} userId - User ID.
|
|
1157
|
+
* @param {string} secret - Valid recovery OTP code.
|
|
1158
|
+
* @param {string} password - New user password. Must be between 8 and 256 chars.
|
|
1159
|
+
* @throws {AppwriteException}
|
|
1160
|
+
* @returns {Promise<Models.Token>}
|
|
1161
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1162
|
+
*/
|
|
1163
|
+
updateRecoveryOTP(userId: string, secret: string, password: string): Promise<Models.Token>;
|
|
1130
1164
|
/**
|
|
1131
1165
|
* Get the list of active sessions across different devices for the currently logged in user.
|
|
1132
1166
|
*
|
|
@@ -1174,6 +1208,62 @@ export declare class Account {
|
|
|
1174
1208
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1175
1209
|
*/
|
|
1176
1210
|
createEmailPasswordSession(email: string, password: string): Promise<Models.Session>;
|
|
1211
|
+
/**
|
|
1212
|
+
* Allow the user to login to their account using an OpenID Connect ID token obtained natively from the OAuth2 provider, for example via Google Credential Manager on Android or Sign in with Apple on iOS. No browser or redirect is involved: the ID token is verified against the provider's published signing keys and a session is created in a single request.
|
|
1213
|
+
*
|
|
1214
|
+
* Native sign-in is switched on per provider with its nativeEnabled setting. It is independent of the browser-based flow's enabled setting, which has no effect on this endpoint. The token's audience must match the provider's configured client ID or one of its native client IDs; tokens issued for any other client ID are rejected. For Sign in with Apple, register your app's bundle ID as a native client ID. For Google, the web client ID used by Credential Manager is usually the configured client ID; add your Android and iOS client IDs as native client IDs if your app requests tokens for them.
|
|
1215
|
+
*
|
|
1216
|
+
* Pass the raw nonce used when requesting the ID token so it can be validated against the token's nonce claim. When signing in with Apple, the nonce is required: hash it with SHA-256 before passing it to the Apple SDK, and send the raw value here - Apple tokens requested without a nonce are rejected. For Google the nonce is optional: it is validated whenever the token carries one, and ignored when the provider issued the token without one. Apple only returns the user's name on the first authorization, and never inside the ID token - capture it on the client and pass it via the name parameter.
|
|
1217
|
+
*
|
|
1218
|
+
* If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the verified email received from the provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.
|
|
1219
|
+
*
|
|
1220
|
+
* This flow does not return provider refresh tokens. You may pass an access token the provider handed your client, along with its lifetime, to store it on the session - but Appwrite cannot renew it once it expires. If your app needs long-lived access to provider APIs, use the browser-based OAuth2 flow instead.
|
|
1221
|
+
*
|
|
1222
|
+
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1223
|
+
*
|
|
1224
|
+
*
|
|
1225
|
+
* @param {IdTokenProvider} params.provider - OAuth2 provider that issued the ID token. Currently, supported providers are: apple, google.
|
|
1226
|
+
* @param {string} params.idToken - OpenID Connect ID token (JWT) obtained natively from the provider, for example via Google Credential Manager or Sign in with Apple.
|
|
1227
|
+
* @param {string} params.nonce - Raw nonce used when requesting the ID token. Required for Apple, and whenever the token carries a nonce claim, which must match it. Ignored when the provider issued the token without a nonce.
|
|
1228
|
+
* @param {string} params.accessToken - Provider access token to store alongside the session for calling provider APIs. Never used for authentication.
|
|
1229
|
+
* @param {number} params.accessTokenExpiry - Seconds until the provider access token expires, as reported by the provider. Stored so clients can tell when the stored token goes stale.
|
|
1230
|
+
* @param {string} params.name - User name. Only used when creating a new user and the ID token has no name claim, such as on the first Sign in with Apple authorization.
|
|
1231
|
+
* @throws {AppwriteException}
|
|
1232
|
+
* @returns {Promise<Models.Session>}
|
|
1233
|
+
*/
|
|
1234
|
+
createIdTokenSession(params: {
|
|
1235
|
+
provider: IdTokenProvider;
|
|
1236
|
+
idToken: string;
|
|
1237
|
+
nonce?: string;
|
|
1238
|
+
accessToken?: string;
|
|
1239
|
+
accessTokenExpiry?: number;
|
|
1240
|
+
name?: string;
|
|
1241
|
+
}): Promise<Models.Session>;
|
|
1242
|
+
/**
|
|
1243
|
+
* Allow the user to login to their account using an OpenID Connect ID token obtained natively from the OAuth2 provider, for example via Google Credential Manager on Android or Sign in with Apple on iOS. No browser or redirect is involved: the ID token is verified against the provider's published signing keys and a session is created in a single request.
|
|
1244
|
+
*
|
|
1245
|
+
* Native sign-in is switched on per provider with its nativeEnabled setting. It is independent of the browser-based flow's enabled setting, which has no effect on this endpoint. The token's audience must match the provider's configured client ID or one of its native client IDs; tokens issued for any other client ID are rejected. For Sign in with Apple, register your app's bundle ID as a native client ID. For Google, the web client ID used by Credential Manager is usually the configured client ID; add your Android and iOS client IDs as native client IDs if your app requests tokens for them.
|
|
1246
|
+
*
|
|
1247
|
+
* Pass the raw nonce used when requesting the ID token so it can be validated against the token's nonce claim. When signing in with Apple, the nonce is required: hash it with SHA-256 before passing it to the Apple SDK, and send the raw value here - Apple tokens requested without a nonce are rejected. For Google the nonce is optional: it is validated whenever the token carries one, and ignored when the provider issued the token without one. Apple only returns the user's name on the first authorization, and never inside the ID token - capture it on the client and pass it via the name parameter.
|
|
1248
|
+
*
|
|
1249
|
+
* If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the verified email received from the provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.
|
|
1250
|
+
*
|
|
1251
|
+
* This flow does not return provider refresh tokens. You may pass an access token the provider handed your client, along with its lifetime, to store it on the session - but Appwrite cannot renew it once it expires. If your app needs long-lived access to provider APIs, use the browser-based OAuth2 flow instead.
|
|
1252
|
+
*
|
|
1253
|
+
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1254
|
+
*
|
|
1255
|
+
*
|
|
1256
|
+
* @param {IdTokenProvider} provider - OAuth2 provider that issued the ID token. Currently, supported providers are: apple, google.
|
|
1257
|
+
* @param {string} idToken - OpenID Connect ID token (JWT) obtained natively from the provider, for example via Google Credential Manager or Sign in with Apple.
|
|
1258
|
+
* @param {string} nonce - Raw nonce used when requesting the ID token. Required for Apple, and whenever the token carries a nonce claim, which must match it. Ignored when the provider issued the token without a nonce.
|
|
1259
|
+
* @param {string} accessToken - Provider access token to store alongside the session for calling provider APIs. Never used for authentication.
|
|
1260
|
+
* @param {number} accessTokenExpiry - Seconds until the provider access token expires, as reported by the provider. Stored so clients can tell when the stored token goes stale.
|
|
1261
|
+
* @param {string} name - User name. Only used when creating a new user and the ID token has no name claim, such as on the first Sign in with Apple authorization.
|
|
1262
|
+
* @throws {AppwriteException}
|
|
1263
|
+
* @returns {Promise<Models.Session>}
|
|
1264
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1265
|
+
*/
|
|
1266
|
+
createIdTokenSession(provider: IdTokenProvider, idToken: string, nonce?: string, accessToken?: string, accessTokenExpiry?: number, name?: string): Promise<Models.Session>;
|
|
1177
1267
|
/**
|
|
1178
1268
|
* Use this endpoint to create a session from token. Provide the **userId** and **secret** parameters from the successful response of authentication flows initiated by token creation. For example, magic URL and phone login.
|
|
1179
1269
|
*
|
|
@@ -1345,7 +1435,7 @@ export declare class Account {
|
|
|
1345
1435
|
*/
|
|
1346
1436
|
updateStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(): Promise<Models.User<Preferences>>;
|
|
1347
1437
|
/**
|
|
1348
|
-
* Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.
|
|
1438
|
+
* Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. A session holds one push target per provider, so if one already exists this endpoint updates and returns that target instead of creating a second one, and a device that rotates its token is never notified twice.
|
|
1349
1439
|
*
|
|
1350
1440
|
* @param {string} params.targetId - Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1351
1441
|
* @param {string} params.identifier - The target identifier (token, email, phone etc.)
|
|
@@ -1359,7 +1449,7 @@ export declare class Account {
|
|
|
1359
1449
|
providerId?: string;
|
|
1360
1450
|
}): Promise<Models.Target>;
|
|
1361
1451
|
/**
|
|
1362
|
-
* Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.
|
|
1452
|
+
* Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. A session holds one push target per provider, so if one already exists this endpoint updates and returns that target instead of creating a second one, and a device that rotates its token is never notified twice.
|
|
1363
1453
|
*
|
|
1364
1454
|
* @param {string} targetId - Target ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1365
1455
|
* @param {string} identifier - The target identifier (token, email, phone etc.)
|
|
@@ -1480,6 +1570,8 @@ export declare class Account {
|
|
|
1480
1570
|
*
|
|
1481
1571
|
* If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.
|
|
1482
1572
|
*
|
|
1573
|
+
* If there is already an active session, the OAuth2 identity is attached to the logged-in account and that session stays active until the token is exchanged for a new one.
|
|
1574
|
+
*
|
|
1483
1575
|
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1484
1576
|
*
|
|
1485
1577
|
* @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
|
|
@@ -1500,6 +1592,8 @@ export declare class Account {
|
|
|
1500
1592
|
*
|
|
1501
1593
|
* If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint.
|
|
1502
1594
|
*
|
|
1595
|
+
* If there is already an active session, the OAuth2 identity is attached to the logged-in account and that session stays active until the token is exchanged for a new one.
|
|
1596
|
+
*
|
|
1503
1597
|
* A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1504
1598
|
*
|
|
1505
1599
|
* @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
|
|
@@ -1633,6 +1727,55 @@ export declare class Account {
|
|
|
1633
1727
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1634
1728
|
*/
|
|
1635
1729
|
updateVerification(userId: string, secret: string): Promise<Models.Token>;
|
|
1730
|
+
/**
|
|
1731
|
+
* Use this endpoint to send a 6-digit verification code to the currently logged in user's email address. Unlike [createEmailVerification](https://appwrite.io/docs/references/cloud/client-web/account#createEmailVerification), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a verification page. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateEmailVerificationOTP). The code sent to the user's email address is valid for 15 minutes.
|
|
1732
|
+
*
|
|
1733
|
+
* Enable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing.
|
|
1734
|
+
*
|
|
1735
|
+
*
|
|
1736
|
+
* @param {boolean} params.phrase - Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
|
1737
|
+
* @throws {AppwriteException}
|
|
1738
|
+
* @returns {Promise<Models.Token>}
|
|
1739
|
+
*/
|
|
1740
|
+
createEmailVerificationOTP(params?: {
|
|
1741
|
+
phrase?: boolean;
|
|
1742
|
+
}): Promise<Models.Token>;
|
|
1743
|
+
/**
|
|
1744
|
+
* Use this endpoint to send a 6-digit verification code to the currently logged in user's email address. Unlike [createEmailVerification](https://appwrite.io/docs/references/cloud/client-web/account#createEmailVerification), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a verification page. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updateEmailVerificationOTP). The code sent to the user's email address is valid for 15 minutes.
|
|
1745
|
+
*
|
|
1746
|
+
* Enable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing.
|
|
1747
|
+
*
|
|
1748
|
+
*
|
|
1749
|
+
* @param {boolean} phrase - Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
|
1750
|
+
* @throws {AppwriteException}
|
|
1751
|
+
* @returns {Promise<Models.Token>}
|
|
1752
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1753
|
+
*/
|
|
1754
|
+
createEmailVerificationOTP(phrase?: boolean): Promise<Models.Token>;
|
|
1755
|
+
/**
|
|
1756
|
+
* Use this endpoint to complete the user email verification process using the 6-digit code that was emailed by [createEmailVerificationOTP](https://appwrite.io/docs/references/cloud/client-web/account#createEmailVerificationOTP). Pass the **userId** of the user being verified along with the **secret** code from the email. If confirmed, this route will return a 200 status code and the code is consumed.
|
|
1757
|
+
*
|
|
1758
|
+
*
|
|
1759
|
+
* @param {string} params.userId - User ID.
|
|
1760
|
+
* @param {string} params.secret - Valid verification OTP code.
|
|
1761
|
+
* @throws {AppwriteException}
|
|
1762
|
+
* @returns {Promise<Models.Token>}
|
|
1763
|
+
*/
|
|
1764
|
+
updateEmailVerificationOTP(params: {
|
|
1765
|
+
userId: string;
|
|
1766
|
+
secret: string;
|
|
1767
|
+
}): Promise<Models.Token>;
|
|
1768
|
+
/**
|
|
1769
|
+
* Use this endpoint to complete the user email verification process using the 6-digit code that was emailed by [createEmailVerificationOTP](https://appwrite.io/docs/references/cloud/client-web/account#createEmailVerificationOTP). Pass the **userId** of the user being verified along with the **secret** code from the email. If confirmed, this route will return a 200 status code and the code is consumed.
|
|
1770
|
+
*
|
|
1771
|
+
*
|
|
1772
|
+
* @param {string} userId - User ID.
|
|
1773
|
+
* @param {string} secret - Valid verification OTP code.
|
|
1774
|
+
* @throws {AppwriteException}
|
|
1775
|
+
* @returns {Promise<Models.Token>}
|
|
1776
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1777
|
+
*/
|
|
1778
|
+
updateEmailVerificationOTP(userId: string, secret: string): Promise<Models.Token>;
|
|
1636
1779
|
/**
|
|
1637
1780
|
* Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes.
|
|
1638
1781
|
*
|
|
@@ -330,7 +330,7 @@ export declare class Console {
|
|
|
330
330
|
/**
|
|
331
331
|
* Get the Appwrite built-in default email template for the specified type and locale. Always returns the unmodified default, ignoring any custom project overrides.
|
|
332
332
|
*
|
|
333
|
-
* @param {ProjectEmailTemplateId} params.templateId - Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession
|
|
333
|
+
* @param {ProjectEmailTemplateId} params.templateId - Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification, otpRecovery
|
|
334
334
|
* @param {ProjectEmailTemplateLocale} params.locale - Template locale. If left empty, the fallback locale (en) will be used.
|
|
335
335
|
* @throws {AppwriteException}
|
|
336
336
|
* @returns {Promise<Models.EmailTemplate>}
|
|
@@ -342,7 +342,7 @@ export declare class Console {
|
|
|
342
342
|
/**
|
|
343
343
|
* Get the Appwrite built-in default email template for the specified type and locale. Always returns the unmodified default, ignoring any custom project overrides.
|
|
344
344
|
*
|
|
345
|
-
* @param {ProjectEmailTemplateId} templateId - Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession
|
|
345
|
+
* @param {ProjectEmailTemplateId} templateId - Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification, otpRecovery
|
|
346
346
|
* @param {ProjectEmailTemplateLocale} locale - Template locale. If left empty, the fallback locale (en) will be used.
|
|
347
347
|
* @throws {AppwriteException}
|
|
348
348
|
* @returns {Promise<Models.EmailTemplate>}
|
|
@@ -1823,14 +1823,14 @@ export declare class Databases {
|
|
|
1823
1823
|
* @param {string} params.collectionId - Collection ID.
|
|
1824
1824
|
* @param {string} params.key - Attribute Key.
|
|
1825
1825
|
* @throws {AppwriteException}
|
|
1826
|
-
* @returns {Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>}
|
|
1826
|
+
* @returns {Promise<Models.AttributeBoolean | Models.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString>}
|
|
1827
1827
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getColumn` instead.
|
|
1828
1828
|
*/
|
|
1829
1829
|
getAttribute(params: {
|
|
1830
1830
|
databaseId: string;
|
|
1831
1831
|
collectionId: string;
|
|
1832
1832
|
key: string;
|
|
1833
|
-
}): Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>;
|
|
1833
|
+
}): Promise<Models.AttributeBoolean | Models.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString>;
|
|
1834
1834
|
/**
|
|
1835
1835
|
* Get attribute by ID.
|
|
1836
1836
|
*
|
|
@@ -1838,10 +1838,10 @@ export declare class Databases {
|
|
|
1838
1838
|
* @param {string} collectionId - Collection ID.
|
|
1839
1839
|
* @param {string} key - Attribute Key.
|
|
1840
1840
|
* @throws {AppwriteException}
|
|
1841
|
-
* @returns {Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>}
|
|
1841
|
+
* @returns {Promise<Models.AttributeBoolean | Models.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString>}
|
|
1842
1842
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1843
1843
|
*/
|
|
1844
|
-
getAttribute(databaseId: string, collectionId: string, key: string): Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>;
|
|
1844
|
+
getAttribute(databaseId: string, collectionId: string, key: string): Promise<Models.AttributeBoolean | Models.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString>;
|
|
1845
1845
|
/**
|
|
1846
1846
|
* Deletes an attribute.
|
|
1847
1847
|
*
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Client, UploadProgress } from '../client';
|
|
2
|
+
import type { Models } from '../models';
|
|
3
|
+
import { ConversationType } from '../enums/conversation-type';
|
|
4
|
+
export declare class Growth {
|
|
5
|
+
client: Client;
|
|
6
|
+
constructor(client: Client);
|
|
7
|
+
/**
|
|
8
|
+
* Create a conversation with the Appwrite team: support requests, product and docs feedback, enterprise, startup and partner applications, and event sponsorship requests. Signed in console users are identified by their session or JWT; everyone else must pass an email. Attach a file of up to 5MB to support and feedback conversations.
|
|
9
|
+
*
|
|
10
|
+
* @param {ConversationType} params.type - Conversation type.
|
|
11
|
+
* @param {string} params.email - Email address to reply to. Required without a console session, ignored with one.
|
|
12
|
+
* @param {string} params.name - Name of the person filing the conversation. Required for enterprise, startup, partner and sponsorship.
|
|
13
|
+
* @param {string} params.subject - Conversation subject.
|
|
14
|
+
* @param {string} params.message - Conversation message. Required for support, feedback, enterprise and partner.
|
|
15
|
+
* @param {string} params.organizationId - Organization ID the conversation is about. Kept only when the session user is a member.
|
|
16
|
+
* @param {string} params.projectId - Project ID the conversation is about. Kept only when it belongs to the kept organization.
|
|
17
|
+
* @param {object} params.attributes - Additional attributes for the conversation type, as an object or a JSON string.
|
|
18
|
+
* @param {File} params.attachment - File attachment, support and feedback only, max 5MB.
|
|
19
|
+
* @throws {AppwriteException}
|
|
20
|
+
* @returns {Promise<Models.GrowthConversation>}
|
|
21
|
+
*/
|
|
22
|
+
createConversation(params: {
|
|
23
|
+
type: ConversationType;
|
|
24
|
+
email?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
subject?: string;
|
|
27
|
+
message?: string;
|
|
28
|
+
organizationId?: string;
|
|
29
|
+
projectId?: string;
|
|
30
|
+
attributes?: object;
|
|
31
|
+
attachment?: File;
|
|
32
|
+
onProgress?: (progress: UploadProgress) => void;
|
|
33
|
+
}): Promise<Models.GrowthConversation>;
|
|
34
|
+
/**
|
|
35
|
+
* Create a conversation with the Appwrite team: support requests, product and docs feedback, enterprise, startup and partner applications, and event sponsorship requests. Signed in console users are identified by their session or JWT; everyone else must pass an email. Attach a file of up to 5MB to support and feedback conversations.
|
|
36
|
+
*
|
|
37
|
+
* @param {ConversationType} type - Conversation type.
|
|
38
|
+
* @param {string} email - Email address to reply to. Required without a console session, ignored with one.
|
|
39
|
+
* @param {string} name - Name of the person filing the conversation. Required for enterprise, startup, partner and sponsorship.
|
|
40
|
+
* @param {string} subject - Conversation subject.
|
|
41
|
+
* @param {string} message - Conversation message. Required for support, feedback, enterprise and partner.
|
|
42
|
+
* @param {string} organizationId - Organization ID the conversation is about. Kept only when the session user is a member.
|
|
43
|
+
* @param {string} projectId - Project ID the conversation is about. Kept only when it belongs to the kept organization.
|
|
44
|
+
* @param {object} attributes - Additional attributes for the conversation type, as an object or a JSON string.
|
|
45
|
+
* @param {File} attachment - File attachment, support and feedback only, max 5MB.
|
|
46
|
+
* @throws {AppwriteException}
|
|
47
|
+
* @returns {Promise<Models.GrowthConversation>}
|
|
48
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
49
|
+
*/
|
|
50
|
+
createConversation(type: ConversationType, email?: string, name?: string, subject?: string, message?: string, organizationId?: string, projectId?: string, attributes?: object, attachment?: File, onProgress?: (progress: UploadProgress) => void): Promise<Models.GrowthConversation>;
|
|
51
|
+
/**
|
|
52
|
+
* Record a self-hosted installation. Every report is stored as its own row; the admin email is optional because headless CLI installs create no account.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} params.email - Admin email from the installation, when an account was created.
|
|
55
|
+
* @param {string} params.name - Admin name.
|
|
56
|
+
* @param {string} params.version - Appwrite version.
|
|
57
|
+
* @param {string} params.domain - Installation domain.
|
|
58
|
+
* @param {string} params.database - Database adapter.
|
|
59
|
+
* @param {string} params.hostIp - Resolved installation host IP address.
|
|
60
|
+
* @param {string} params.userAgent - Installation user agent.
|
|
61
|
+
* @param {string} params.os - Installation operating system.
|
|
62
|
+
* @param {string} params.arch - Installation CPU architecture.
|
|
63
|
+
* @param {number} params.cpus - Installation CPU count.
|
|
64
|
+
* @param {number} params.ram - Installation RAM in MB.
|
|
65
|
+
* @throws {AppwriteException}
|
|
66
|
+
* @returns {Promise<{}>}
|
|
67
|
+
*/
|
|
68
|
+
createInstallation(params?: {
|
|
69
|
+
email?: string;
|
|
70
|
+
name?: string;
|
|
71
|
+
version?: string;
|
|
72
|
+
domain?: string;
|
|
73
|
+
database?: string;
|
|
74
|
+
hostIp?: string;
|
|
75
|
+
userAgent?: string;
|
|
76
|
+
os?: string;
|
|
77
|
+
arch?: string;
|
|
78
|
+
cpus?: number;
|
|
79
|
+
ram?: number;
|
|
80
|
+
}): Promise<{}>;
|
|
81
|
+
/**
|
|
82
|
+
* Record a self-hosted installation. Every report is stored as its own row; the admin email is optional because headless CLI installs create no account.
|
|
83
|
+
*
|
|
84
|
+
* @param {string} email - Admin email from the installation, when an account was created.
|
|
85
|
+
* @param {string} name - Admin name.
|
|
86
|
+
* @param {string} version - Appwrite version.
|
|
87
|
+
* @param {string} domain - Installation domain.
|
|
88
|
+
* @param {string} database - Database adapter.
|
|
89
|
+
* @param {string} hostIp - Resolved installation host IP address.
|
|
90
|
+
* @param {string} userAgent - Installation user agent.
|
|
91
|
+
* @param {string} os - Installation operating system.
|
|
92
|
+
* @param {string} arch - Installation CPU architecture.
|
|
93
|
+
* @param {number} cpus - Installation CPU count.
|
|
94
|
+
* @param {number} ram - Installation RAM in MB.
|
|
95
|
+
* @throws {AppwriteException}
|
|
96
|
+
* @returns {Promise<{}>}
|
|
97
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
98
|
+
*/
|
|
99
|
+
createInstallation(email?: string, name?: string, version?: string, domain?: string, database?: string, hostIp?: string, userAgent?: string, os?: string, arch?: string, cpus?: number, ram?: number): Promise<{}>;
|
|
100
|
+
}
|
|
@@ -18,7 +18,7 @@ export declare class Manager {
|
|
|
18
18
|
* @param {string} params.reason - Optional reason why the resource is blocked
|
|
19
19
|
* @param {string} params.expiredAt - Optional expiration date for the block
|
|
20
20
|
* @throws {AppwriteException}
|
|
21
|
-
* @returns {Promise<Models.
|
|
21
|
+
* @returns {Promise<Models.ManagerBlock>}
|
|
22
22
|
*/
|
|
23
23
|
createBlock(params: {
|
|
24
24
|
projectId: string;
|
|
@@ -27,7 +27,7 @@ export declare class Manager {
|
|
|
27
27
|
mode?: BlockMode;
|
|
28
28
|
reason?: string;
|
|
29
29
|
expiredAt?: string;
|
|
30
|
-
}): Promise<Models.
|
|
30
|
+
}): Promise<Models.ManagerBlock>;
|
|
31
31
|
/**
|
|
32
32
|
* Creates a new resource block.
|
|
33
33
|
*
|
|
@@ -38,10 +38,10 @@ export declare class Manager {
|
|
|
38
38
|
* @param {string} reason - Optional reason why the resource is blocked
|
|
39
39
|
* @param {string} expiredAt - Optional expiration date for the block
|
|
40
40
|
* @throws {AppwriteException}
|
|
41
|
-
* @returns {Promise<Models.
|
|
41
|
+
* @returns {Promise<Models.ManagerBlock>}
|
|
42
42
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
43
43
|
*/
|
|
44
|
-
createBlock(projectId: string, resourceType: BlockResourceType, resourceId?: string, mode?: BlockMode, reason?: string, expiredAt?: string): Promise<Models.
|
|
44
|
+
createBlock(projectId: string, resourceType: BlockResourceType, resourceId?: string, mode?: BlockMode, reason?: string, expiredAt?: string): Promise<Models.ManagerBlock>;
|
|
45
45
|
/**
|
|
46
46
|
* Deletes resource blocks for a project.
|
|
47
47
|
*
|
|
@@ -49,13 +49,13 @@ export declare class Manager {
|
|
|
49
49
|
* @param {BlockResourceType} params.resourceType - Resource type to unblock
|
|
50
50
|
* @param {string} params.resourceId - Optional resource ID (if omitted, all blocks of this type will be removed)
|
|
51
51
|
* @throws {AppwriteException}
|
|
52
|
-
* @returns {Promise<Models.
|
|
52
|
+
* @returns {Promise<Models.ManagerBlockDelete>}
|
|
53
53
|
*/
|
|
54
54
|
deleteBlock(params: {
|
|
55
55
|
projectId: string;
|
|
56
56
|
resourceType: BlockResourceType;
|
|
57
57
|
resourceId?: string;
|
|
58
|
-
}): Promise<Models.
|
|
58
|
+
}): Promise<Models.ManagerBlockDelete>;
|
|
59
59
|
/**
|
|
60
60
|
* Deletes resource blocks for a project.
|
|
61
61
|
*
|
|
@@ -63,29 +63,29 @@ export declare class Manager {
|
|
|
63
63
|
* @param {BlockResourceType} resourceType - Resource type to unblock
|
|
64
64
|
* @param {string} resourceId - Optional resource ID (if omitted, all blocks of this type will be removed)
|
|
65
65
|
* @throws {AppwriteException}
|
|
66
|
-
* @returns {Promise<Models.
|
|
66
|
+
* @returns {Promise<Models.ManagerBlockDelete>}
|
|
67
67
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
68
68
|
*/
|
|
69
|
-
deleteBlock(projectId: string, resourceType: BlockResourceType, resourceId?: string): Promise<Models.
|
|
69
|
+
deleteBlock(projectId: string, resourceType: BlockResourceType, resourceId?: string): Promise<Models.ManagerBlockDelete>;
|
|
70
70
|
/**
|
|
71
71
|
* Lists all resource blocks for a project.
|
|
72
72
|
*
|
|
73
73
|
* @param {string} params.projectId - Project ID
|
|
74
74
|
* @throws {AppwriteException}
|
|
75
|
-
* @returns {Promise<Models.
|
|
75
|
+
* @returns {Promise<Models.ManagerBlockList>}
|
|
76
76
|
*/
|
|
77
77
|
listBlocks(params: {
|
|
78
78
|
projectId: string;
|
|
79
|
-
}): Promise<Models.
|
|
79
|
+
}): Promise<Models.ManagerBlockList>;
|
|
80
80
|
/**
|
|
81
81
|
* Lists all resource blocks for a project.
|
|
82
82
|
*
|
|
83
83
|
* @param {string} projectId - Project ID
|
|
84
84
|
* @throws {AppwriteException}
|
|
85
|
-
* @returns {Promise<Models.
|
|
85
|
+
* @returns {Promise<Models.ManagerBlockList>}
|
|
86
86
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
87
87
|
*/
|
|
88
|
-
listBlocks(projectId: string): Promise<Models.
|
|
88
|
+
listBlocks(projectId: string): Promise<Models.ManagerBlockList>;
|
|
89
89
|
/**
|
|
90
90
|
* Clears internal cache.
|
|
91
91
|
*
|
|
@@ -93,7 +93,7 @@ export declare class Manager {
|
|
|
93
93
|
* @param {CacheTarget} params.cache - Cache target.
|
|
94
94
|
* @param {boolean} params.all - Clear the entire selected cache target.
|
|
95
95
|
* @param {CacheDatabase} params.database - Database cache scope.
|
|
96
|
-
* @param {string} params.projectId - Project ID for project
|
|
96
|
+
* @param {string} params.projectId - Project ID for project database cache.
|
|
97
97
|
* @param {string} params.collectionId - Collection ID.
|
|
98
98
|
* @param {string} params.documentId - Document ID.
|
|
99
99
|
* @throws {AppwriteException}
|
|
@@ -115,7 +115,7 @@ export declare class Manager {
|
|
|
115
115
|
* @param {CacheTarget} cache - Cache target.
|
|
116
116
|
* @param {boolean} all - Clear the entire selected cache target.
|
|
117
117
|
* @param {CacheDatabase} database - Database cache scope.
|
|
118
|
-
* @param {string} projectId - Project ID for project
|
|
118
|
+
* @param {string} projectId - Project ID for project database cache.
|
|
119
119
|
* @param {string} collectionId - Collection ID.
|
|
120
120
|
* @param {string} documentId - Document ID.
|
|
121
121
|
* @throws {AppwriteException}
|
|
@@ -123,6 +123,31 @@ export declare class Manager {
|
|
|
123
123
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
124
124
|
*/
|
|
125
125
|
deleteCache(region?: Region, cache?: CacheTarget, all?: boolean, database?: CacheDatabase, projectId?: string, collectionId?: string, documentId?: string): Promise<{}>;
|
|
126
|
+
/**
|
|
127
|
+
* Blocks or unblocks an organization, the same way a billing-limit block does. Blocking makes the organization read-only, disables its backup policies and spins down its dedicated databases.
|
|
128
|
+
*
|
|
129
|
+
* @param {string} params.teamId - Organization ID.
|
|
130
|
+
* @param {boolean} params.status - Organization status. Set to `false` to block and `true` to unblock.
|
|
131
|
+
* @param {string} params.reason - Optional reason when blocking, kept in the audit trail.
|
|
132
|
+
* @throws {AppwriteException}
|
|
133
|
+
* @returns {Promise<Models.Organization<Preferences>>}
|
|
134
|
+
*/
|
|
135
|
+
updateOrganizationStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
|
|
136
|
+
teamId: string;
|
|
137
|
+
status: boolean;
|
|
138
|
+
reason?: string;
|
|
139
|
+
}): Promise<Models.Organization<Preferences>>;
|
|
140
|
+
/**
|
|
141
|
+
* Blocks or unblocks an organization, the same way a billing-limit block does. Blocking makes the organization read-only, disables its backup policies and spins down its dedicated databases.
|
|
142
|
+
*
|
|
143
|
+
* @param {string} teamId - Organization ID.
|
|
144
|
+
* @param {boolean} status - Organization status. Set to `false` to block and `true` to unblock.
|
|
145
|
+
* @param {string} reason - Optional reason when blocking, kept in the audit trail.
|
|
146
|
+
* @throws {AppwriteException}
|
|
147
|
+
* @returns {Promise<Models.Organization<Preferences>>}
|
|
148
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
149
|
+
*/
|
|
150
|
+
updateOrganizationStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(teamId: string, status: boolean, reason?: string): Promise<Models.Organization<Preferences>>;
|
|
126
151
|
/**
|
|
127
152
|
* Updates a console user status using a user ID or email address.
|
|
128
153
|
*
|