@appwrite.io/console 15.3.0-rc.1 → 15.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cjs/sdk.js +2524 -2066
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2524 -2066
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2524 -2066
- package/package.json +4 -4
- package/types/enums/database-status.d.ts +12 -1
- package/types/enums/database-type.d.ts +4 -1
- package/types/enums/o-auth-provider.d.ts +1 -0
- package/types/enums/project-key-scopes.d.ts +5 -2
- package/types/enums/project-o-auth-provider-id.d.ts +1 -0
- package/types/enums/query-suggestion-resource.d.ts +6 -1
- package/types/enums/waf-rule-action.d.ts +7 -0
- package/types/index.d.ts +3 -5
- package/types/models.d.ts +3260 -3404
- package/types/services/account.d.ts +133 -4
- package/types/services/apps.d.ts +39 -10
- package/types/services/backups.d.ts +17 -8
- package/types/services/databases.d.ts +0 -70
- package/types/services/documents-db.d.ts +75 -2
- package/types/services/functions.d.ts +4 -43
- package/types/services/locale.d.ts +2 -2
- package/types/services/migrations.d.ts +30 -18
- package/types/services/mongo.d.ts +13 -4
- package/types/services/mysql.d.ts +13 -4
- package/types/services/oauth-2.d.ts +119 -15
- package/types/services/postgresql.d.ts +13 -4
- package/types/services/project.d.ts +29 -1
- package/types/services/sites.d.ts +4 -43
- package/types/services/storage.d.ts +0 -46
- package/types/services/tables-db.d.ts +75 -69
- package/types/services/usage.d.ts +10 -10
- package/types/services/vectors-db.d.ts +75 -2
- package/types/services/waf.d.ts +435 -0
- package/types/enums/health-antivirus-status.d.ts +0 -5
- package/types/enums/health-check-status.d.ts +0 -4
- package/types/enums/health-queue-name.d.ts +0 -16
- package/types/services/health.d.ts +0 -483
|
@@ -177,6 +177,135 @@ export declare class Account {
|
|
|
177
177
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
178
178
|
*/
|
|
179
179
|
deleteBillingAddress(billingAddressId: string): Promise<{}>;
|
|
180
|
+
/**
|
|
181
|
+
* Get a list of the OAuth2 consents the current user has given to third-party apps.
|
|
182
|
+
*
|
|
183
|
+
* @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.
|
|
184
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
185
|
+
* @throws {AppwriteException}
|
|
186
|
+
* @returns {Promise<Models.Oauth2ConsentList>}
|
|
187
|
+
*/
|
|
188
|
+
listConsents(params?: {
|
|
189
|
+
queries?: string[];
|
|
190
|
+
total?: boolean;
|
|
191
|
+
}): Promise<Models.Oauth2ConsentList>;
|
|
192
|
+
/**
|
|
193
|
+
* Get a list of the OAuth2 consents the current user has given to third-party apps.
|
|
194
|
+
*
|
|
195
|
+
* @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.
|
|
196
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
197
|
+
* @throws {AppwriteException}
|
|
198
|
+
* @returns {Promise<Models.Oauth2ConsentList>}
|
|
199
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
200
|
+
*/
|
|
201
|
+
listConsents(queries?: string[], total?: boolean): Promise<Models.Oauth2ConsentList>;
|
|
202
|
+
/**
|
|
203
|
+
* Get an OAuth2 consent the current user has given to a third-party app by its unique ID.
|
|
204
|
+
*
|
|
205
|
+
* @param {string} params.consentId - Consent unique ID.
|
|
206
|
+
* @throws {AppwriteException}
|
|
207
|
+
* @returns {Promise<Models.Oauth2Consent>}
|
|
208
|
+
*/
|
|
209
|
+
getConsent(params: {
|
|
210
|
+
consentId: string;
|
|
211
|
+
}): Promise<Models.Oauth2Consent>;
|
|
212
|
+
/**
|
|
213
|
+
* Get an OAuth2 consent the current user has given to a third-party app by its unique ID.
|
|
214
|
+
*
|
|
215
|
+
* @param {string} consentId - Consent unique ID.
|
|
216
|
+
* @throws {AppwriteException}
|
|
217
|
+
* @returns {Promise<Models.Oauth2Consent>}
|
|
218
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
219
|
+
*/
|
|
220
|
+
getConsent(consentId: string): Promise<Models.Oauth2Consent>;
|
|
221
|
+
/**
|
|
222
|
+
* Delete an OAuth2 consent by its unique ID. All token families issued under the consent are revoked, and the app must ask for consent again to regain access.
|
|
223
|
+
*
|
|
224
|
+
* @param {string} params.consentId - Consent unique ID.
|
|
225
|
+
* @throws {AppwriteException}
|
|
226
|
+
* @returns {Promise<{}>}
|
|
227
|
+
*/
|
|
228
|
+
deleteConsent(params: {
|
|
229
|
+
consentId: string;
|
|
230
|
+
}): Promise<{}>;
|
|
231
|
+
/**
|
|
232
|
+
* Delete an OAuth2 consent by its unique ID. All token families issued under the consent are revoked, and the app must ask for consent again to regain access.
|
|
233
|
+
*
|
|
234
|
+
* @param {string} consentId - Consent unique ID.
|
|
235
|
+
* @throws {AppwriteException}
|
|
236
|
+
* @returns {Promise<{}>}
|
|
237
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
238
|
+
*/
|
|
239
|
+
deleteConsent(consentId: string): Promise<{}>;
|
|
240
|
+
/**
|
|
241
|
+
* Get a list of the token families issued under an OAuth2 consent. Each entry represents one authorized device or session; the token secrets themselves are never returned.
|
|
242
|
+
*
|
|
243
|
+
* @param {string} params.consentId - Consent unique ID.
|
|
244
|
+
* @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.
|
|
245
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
246
|
+
* @throws {AppwriteException}
|
|
247
|
+
* @returns {Promise<Models.Oauth2ConsentTokenList>}
|
|
248
|
+
*/
|
|
249
|
+
listConsentTokens(params: {
|
|
250
|
+
consentId: string;
|
|
251
|
+
queries?: string[];
|
|
252
|
+
total?: boolean;
|
|
253
|
+
}): Promise<Models.Oauth2ConsentTokenList>;
|
|
254
|
+
/**
|
|
255
|
+
* Get a list of the token families issued under an OAuth2 consent. Each entry represents one authorized device or session; the token secrets themselves are never returned.
|
|
256
|
+
*
|
|
257
|
+
* @param {string} consentId - Consent unique ID.
|
|
258
|
+
* @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.
|
|
259
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
260
|
+
* @throws {AppwriteException}
|
|
261
|
+
* @returns {Promise<Models.Oauth2ConsentTokenList>}
|
|
262
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
263
|
+
*/
|
|
264
|
+
listConsentTokens(consentId: string, queries?: string[], total?: boolean): Promise<Models.Oauth2ConsentTokenList>;
|
|
265
|
+
/**
|
|
266
|
+
* Get a token family issued under an OAuth2 consent by its unique ID. The token secrets themselves are never returned.
|
|
267
|
+
*
|
|
268
|
+
* @param {string} params.consentId - Consent unique ID.
|
|
269
|
+
* @param {string} params.tokenId - Token unique ID.
|
|
270
|
+
* @throws {AppwriteException}
|
|
271
|
+
* @returns {Promise<Models.Oauth2ConsentToken>}
|
|
272
|
+
*/
|
|
273
|
+
getConsentToken(params: {
|
|
274
|
+
consentId: string;
|
|
275
|
+
tokenId: string;
|
|
276
|
+
}): Promise<Models.Oauth2ConsentToken>;
|
|
277
|
+
/**
|
|
278
|
+
* Get a token family issued under an OAuth2 consent by its unique ID. The token secrets themselves are never returned.
|
|
279
|
+
*
|
|
280
|
+
* @param {string} consentId - Consent unique ID.
|
|
281
|
+
* @param {string} tokenId - Token unique ID.
|
|
282
|
+
* @throws {AppwriteException}
|
|
283
|
+
* @returns {Promise<Models.Oauth2ConsentToken>}
|
|
284
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
285
|
+
*/
|
|
286
|
+
getConsentToken(consentId: string, tokenId: string): Promise<Models.Oauth2ConsentToken>;
|
|
287
|
+
/**
|
|
288
|
+
* Delete a token family issued under an OAuth2 consent by its unique ID. The access and refresh tokens of the family stop working immediately; other token families and the consent itself are unaffected.
|
|
289
|
+
*
|
|
290
|
+
* @param {string} params.consentId - Consent unique ID.
|
|
291
|
+
* @param {string} params.tokenId - Token unique ID.
|
|
292
|
+
* @throws {AppwriteException}
|
|
293
|
+
* @returns {Promise<{}>}
|
|
294
|
+
*/
|
|
295
|
+
deleteConsentToken(params: {
|
|
296
|
+
consentId: string;
|
|
297
|
+
tokenId: string;
|
|
298
|
+
}): Promise<{}>;
|
|
299
|
+
/**
|
|
300
|
+
* Delete a token family issued under an OAuth2 consent by its unique ID. The access and refresh tokens of the family stop working immediately; other token families and the consent itself are unaffected.
|
|
301
|
+
*
|
|
302
|
+
* @param {string} consentId - Consent unique ID.
|
|
303
|
+
* @param {string} tokenId - Token unique ID.
|
|
304
|
+
* @throws {AppwriteException}
|
|
305
|
+
* @returns {Promise<{}>}
|
|
306
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
307
|
+
*/
|
|
308
|
+
deleteConsentToken(consentId: string, tokenId: string): Promise<{}>;
|
|
180
309
|
/**
|
|
181
310
|
* Get coupon details for an account.
|
|
182
311
|
*
|
|
@@ -1076,7 +1205,7 @@ export declare class Account {
|
|
|
1076
1205
|
* 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).
|
|
1077
1206
|
*
|
|
1078
1207
|
*
|
|
1079
|
-
* @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
|
|
1208
|
+
* @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
|
|
1080
1209
|
* @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1081
1210
|
* @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1082
1211
|
* @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
|
|
@@ -1097,7 +1226,7 @@ export declare class Account {
|
|
|
1097
1226
|
* 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).
|
|
1098
1227
|
*
|
|
1099
1228
|
*
|
|
1100
|
-
* @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
|
|
1229
|
+
* @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
|
|
1101
1230
|
* @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1102
1231
|
* @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1103
1232
|
* @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
|
|
@@ -1353,7 +1482,7 @@ export declare class Account {
|
|
|
1353
1482
|
*
|
|
1354
1483
|
* 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).
|
|
1355
1484
|
*
|
|
1356
|
-
* @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
|
|
1485
|
+
* @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
|
|
1357
1486
|
* @param {string} params.success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1358
1487
|
* @param {string} params.failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1359
1488
|
* @param {string[]} params.scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
|
|
@@ -1373,7 +1502,7 @@ export declare class Account {
|
|
|
1373
1502
|
*
|
|
1374
1503
|
* 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).
|
|
1375
1504
|
*
|
|
1376
|
-
* @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
|
|
1505
|
+
* @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
|
|
1377
1506
|
* @param {string} success - URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1378
1507
|
* @param {string} failure - URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
1379
1508
|
* @param {string[]} scopes - A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
|
package/types/services/apps.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare class Apps {
|
|
|
30
30
|
*
|
|
31
31
|
* @param {string} params.appId - Application 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.
|
|
32
32
|
* @param {string} params.name - Application name.
|
|
33
|
-
* @param {string[]} params.redirectUris - Redirect URIs (
|
|
33
|
+
* @param {string[]} params.redirectUris - Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:/oauth), and must not contain a fragment.
|
|
34
34
|
* @param {string} params.description - Application description shown to users during OAuth2 consent.
|
|
35
35
|
* @param {string} params.clientUri - Application homepage URL shown to users during OAuth2 consent.
|
|
36
36
|
* @param {string} params.logoUri - Application logo URL shown to users during OAuth2 consent.
|
|
@@ -42,7 +42,7 @@ export declare class Apps {
|
|
|
42
42
|
* @param {string[]} params.images - Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.
|
|
43
43
|
* @param {string} params.supportUrl - Application support URL shown to users during OAuth2 consent.
|
|
44
44
|
* @param {string} params.dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent.
|
|
45
|
-
* @param {string[]} params.postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout
|
|
45
|
+
* @param {string[]} params.postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.
|
|
46
46
|
* @param {boolean} params.enabled - Is application enabled?
|
|
47
47
|
* @param {string} params.type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.
|
|
48
48
|
* @param {boolean} params.deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.
|
|
@@ -76,7 +76,7 @@ export declare class Apps {
|
|
|
76
76
|
*
|
|
77
77
|
* @param {string} appId - Application 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.
|
|
78
78
|
* @param {string} name - Application name.
|
|
79
|
-
* @param {string[]} redirectUris - Redirect URIs (
|
|
79
|
+
* @param {string[]} redirectUris - Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:/oauth), and must not contain a fragment.
|
|
80
80
|
* @param {string} description - Application description shown to users during OAuth2 consent.
|
|
81
81
|
* @param {string} clientUri - Application homepage URL shown to users during OAuth2 consent.
|
|
82
82
|
* @param {string} logoUri - Application logo URL shown to users during OAuth2 consent.
|
|
@@ -88,7 +88,7 @@ export declare class Apps {
|
|
|
88
88
|
* @param {string[]} images - Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.
|
|
89
89
|
* @param {string} supportUrl - Application support URL shown to users during OAuth2 consent.
|
|
90
90
|
* @param {string} dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent.
|
|
91
|
-
* @param {string[]} postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout
|
|
91
|
+
* @param {string[]} postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.
|
|
92
92
|
* @param {boolean} enabled - Is application enabled?
|
|
93
93
|
* @param {string} type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.
|
|
94
94
|
* @param {boolean} deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.
|
|
@@ -98,10 +98,17 @@ export declare class Apps {
|
|
|
98
98
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
99
99
|
*/
|
|
100
100
|
create(appId: string, name: string, redirectUris: string[], description?: string, clientUri?: string, logoUri?: string, privacyPolicyUrl?: string, termsUrl?: string, contacts?: string[], tagline?: string, tags?: string[], images?: string[], supportUrl?: string, dataDeletionUrl?: string, postLogoutRedirectUris?: string[], enabled?: boolean, type?: string, deviceFlow?: boolean, teamId?: string): Promise<Models.App>;
|
|
101
|
+
/**
|
|
102
|
+
* List scopes an application can request during the OAuth2 flow.
|
|
103
|
+
*
|
|
104
|
+
* @throws {AppwriteException}
|
|
105
|
+
* @returns {Promise<Models.AppScopeList>}
|
|
106
|
+
*/
|
|
107
|
+
listOAuth2Scopes(): Promise<Models.AppScopeList>;
|
|
101
108
|
/**
|
|
102
109
|
* Get an application by its unique ID.
|
|
103
110
|
*
|
|
104
|
-
* @param {string} params.appId - Application unique ID.
|
|
111
|
+
* @param {string} params.appId - Application unique ID or HTTPS client ID metadata document URL.
|
|
105
112
|
* @throws {AppwriteException}
|
|
106
113
|
* @returns {Promise<Models.App>}
|
|
107
114
|
*/
|
|
@@ -111,7 +118,7 @@ export declare class Apps {
|
|
|
111
118
|
/**
|
|
112
119
|
* Get an application by its unique ID.
|
|
113
120
|
*
|
|
114
|
-
* @param {string} appId - Application unique ID.
|
|
121
|
+
* @param {string} appId - Application unique ID or HTTPS client ID metadata document URL.
|
|
115
122
|
* @throws {AppwriteException}
|
|
116
123
|
* @returns {Promise<Models.App>}
|
|
117
124
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
@@ -134,8 +141,8 @@ export declare class Apps {
|
|
|
134
141
|
* @param {string} params.supportUrl - Application support URL shown to users during OAuth2 consent.
|
|
135
142
|
* @param {string} params.dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent.
|
|
136
143
|
* @param {boolean} params.enabled - Is application enabled?
|
|
137
|
-
* @param {string[]} params.redirectUris - Redirect URIs (
|
|
138
|
-
* @param {string[]} params.postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout
|
|
144
|
+
* @param {string[]} params.redirectUris - Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:/oauth), and must not contain a fragment.
|
|
145
|
+
* @param {string[]} params.postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.
|
|
139
146
|
* @param {string} params.type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.
|
|
140
147
|
* @param {boolean} params.deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.
|
|
141
148
|
* @throws {AppwriteException}
|
|
@@ -178,8 +185,8 @@ export declare class Apps {
|
|
|
178
185
|
* @param {string} supportUrl - Application support URL shown to users during OAuth2 consent.
|
|
179
186
|
* @param {string} dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent.
|
|
180
187
|
* @param {boolean} enabled - Is application enabled?
|
|
181
|
-
* @param {string[]} redirectUris - Redirect URIs (
|
|
182
|
-
* @param {string[]} postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout
|
|
188
|
+
* @param {string[]} redirectUris - Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:/oauth), and must not contain a fragment.
|
|
189
|
+
* @param {string[]} postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.
|
|
183
190
|
* @param {string} type - OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.
|
|
184
191
|
* @param {boolean} deviceFlow - Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.
|
|
185
192
|
* @throws {AppwriteException}
|
|
@@ -206,6 +213,28 @@ export declare class Apps {
|
|
|
206
213
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
207
214
|
*/
|
|
208
215
|
delete(appId: string): Promise<{}>;
|
|
216
|
+
/**
|
|
217
|
+
* Update the labels of an application. Labels are read-only for clients; only a server SDK using a project API key can set them. Replaces the previous labels.
|
|
218
|
+
*
|
|
219
|
+
* @param {string} params.appId - Application unique ID.
|
|
220
|
+
* @param {string[]} params.labels - Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
|
|
221
|
+
* @throws {AppwriteException}
|
|
222
|
+
* @returns {Promise<Models.App>}
|
|
223
|
+
*/
|
|
224
|
+
updateLabels(params: {
|
|
225
|
+
appId: string;
|
|
226
|
+
labels: string[];
|
|
227
|
+
}): Promise<Models.App>;
|
|
228
|
+
/**
|
|
229
|
+
* Update the labels of an application. Labels are read-only for clients; only a server SDK using a project API key can set them. Replaces the previous labels.
|
|
230
|
+
*
|
|
231
|
+
* @param {string} appId - Application unique ID.
|
|
232
|
+
* @param {string[]} labels - Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
|
|
233
|
+
* @throws {AppwriteException}
|
|
234
|
+
* @returns {Promise<Models.App>}
|
|
235
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
236
|
+
*/
|
|
237
|
+
updateLabels(appId: string, labels: string[]): Promise<Models.App>;
|
|
209
238
|
/**
|
|
210
239
|
* List client secrets for an application.
|
|
211
240
|
*
|
|
@@ -211,14 +211,19 @@ export declare class Backups {
|
|
|
211
211
|
/**
|
|
212
212
|
* Create and trigger a new restoration for a backup on a project.
|
|
213
213
|
*
|
|
214
|
-
*
|
|
214
|
+
* For a backup of one database, the restoration resolves its destination before it is queued. Pass `newResourceId` to restore into that database ID, including the archived database ID to overwrite it. When `newResourceId` is omitted, a new database ID is generated and returned in `options`.
|
|
215
|
+
*
|
|
216
|
+
* The restoration migration records the archived database in `resourceId` and `resourceType`, and the resolved database in `destinationResourceId` and `destinationResourceType`. Database types are stored canonically as `database`, `documentsdb`, or `vectorsdb`. Project-wide restorations leave these fields empty because they do not have a single source or destination database.
|
|
217
|
+
*
|
|
218
|
+
* To list every migration related to one database, use its canonical type in a nested `OR(AND(...), AND(...), AND(...))` across the root, parent, and destination relation pairs: `(resourceType, resourceId)`, `(parentResourceType, parentResourceId)`, and `(destinationResourceType, destinationResourceId)`. Legacy and TablesDB databases use `database`; the operational `resourceType` of a table migration is not rewritten to `tablesdb`.
|
|
219
|
+
*
|
|
220
|
+
* When restoring a DocumentsDB or VectorsDB database to a new resource from a dedicated source, the restore provisions a fresh dedicated backing database at the source database's own specification.
|
|
215
221
|
*
|
|
216
222
|
*
|
|
217
223
|
* @param {string} params.archiveId - Backup archive ID to restore
|
|
218
224
|
* @param {BackupServices[]} params.services - Array of services to restore
|
|
219
|
-
* @param {string} params.newResourceId -
|
|
225
|
+
* @param {string} params.newResourceId - Destination resource ID. Omit to generate a new ID, or pass the archived resource ID to overwrite it. 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.
|
|
220
226
|
* @param {string} params.newResourceName - Database name. Max length: 128 chars.
|
|
221
|
-
* @param {string} params.newSpecification - Specification to provision the restored database on, when restoring a DocumentsDB or VectorsDB database to a new resource. Defaults to the archived database's specification. Use `serverless` for the shared pool or a dedicated specification slug.
|
|
222
227
|
* @throws {AppwriteException}
|
|
223
228
|
* @returns {Promise<Models.BackupRestoration>}
|
|
224
229
|
*/
|
|
@@ -227,24 +232,28 @@ export declare class Backups {
|
|
|
227
232
|
services: BackupServices[];
|
|
228
233
|
newResourceId?: string;
|
|
229
234
|
newResourceName?: string;
|
|
230
|
-
newSpecification?: string;
|
|
231
235
|
}): Promise<Models.BackupRestoration>;
|
|
232
236
|
/**
|
|
233
237
|
* Create and trigger a new restoration for a backup on a project.
|
|
234
238
|
*
|
|
235
|
-
*
|
|
239
|
+
* For a backup of one database, the restoration resolves its destination before it is queued. Pass `newResourceId` to restore into that database ID, including the archived database ID to overwrite it. When `newResourceId` is omitted, a new database ID is generated and returned in `options`.
|
|
240
|
+
*
|
|
241
|
+
* The restoration migration records the archived database in `resourceId` and `resourceType`, and the resolved database in `destinationResourceId` and `destinationResourceType`. Database types are stored canonically as `database`, `documentsdb`, or `vectorsdb`. Project-wide restorations leave these fields empty because they do not have a single source or destination database.
|
|
242
|
+
*
|
|
243
|
+
* To list every migration related to one database, use its canonical type in a nested `OR(AND(...), AND(...), AND(...))` across the root, parent, and destination relation pairs: `(resourceType, resourceId)`, `(parentResourceType, parentResourceId)`, and `(destinationResourceType, destinationResourceId)`. Legacy and TablesDB databases use `database`; the operational `resourceType` of a table migration is not rewritten to `tablesdb`.
|
|
244
|
+
*
|
|
245
|
+
* When restoring a DocumentsDB or VectorsDB database to a new resource from a dedicated source, the restore provisions a fresh dedicated backing database at the source database's own specification.
|
|
236
246
|
*
|
|
237
247
|
*
|
|
238
248
|
* @param {string} archiveId - Backup archive ID to restore
|
|
239
249
|
* @param {BackupServices[]} services - Array of services to restore
|
|
240
|
-
* @param {string} newResourceId -
|
|
250
|
+
* @param {string} newResourceId - Destination resource ID. Omit to generate a new ID, or pass the archived resource ID to overwrite it. 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.
|
|
241
251
|
* @param {string} newResourceName - Database name. Max length: 128 chars.
|
|
242
|
-
* @param {string} newSpecification - Specification to provision the restored database on, when restoring a DocumentsDB or VectorsDB database to a new resource. Defaults to the archived database's specification. Use `serverless` for the shared pool or a dedicated specification slug.
|
|
243
252
|
* @throws {AppwriteException}
|
|
244
253
|
* @returns {Promise<Models.BackupRestoration>}
|
|
245
254
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
246
255
|
*/
|
|
247
|
-
createRestoration(archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string
|
|
256
|
+
createRestoration(archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string): Promise<Models.BackupRestoration>;
|
|
248
257
|
/**
|
|
249
258
|
* List all backup restorations for a project.
|
|
250
259
|
*
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
-
import { UsageRange } from '../enums/usage-range';
|
|
4
3
|
import { RelationshipType } from '../enums/relationship-type';
|
|
5
4
|
import { RelationMutate } from '../enums/relation-mutate';
|
|
6
5
|
import { DatabasesIndexType } from '../enums/databases-index-type';
|
|
@@ -191,26 +190,6 @@ export declare class Databases {
|
|
|
191
190
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
192
191
|
*/
|
|
193
192
|
createOperations(transactionId: string, operations?: object[]): Promise<Models.Transaction>;
|
|
194
|
-
/**
|
|
195
|
-
* List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
196
|
-
*
|
|
197
|
-
* @param {UsageRange} params.range - Date range.
|
|
198
|
-
* @throws {AppwriteException}
|
|
199
|
-
* @returns {Promise<Models.UsageDatabases>}
|
|
200
|
-
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listUsage` instead.
|
|
201
|
-
*/
|
|
202
|
-
listUsage(params?: {
|
|
203
|
-
range?: UsageRange;
|
|
204
|
-
}): Promise<Models.UsageDatabases>;
|
|
205
|
-
/**
|
|
206
|
-
* List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
207
|
-
*
|
|
208
|
-
* @param {UsageRange} range - Date range.
|
|
209
|
-
* @throws {AppwriteException}
|
|
210
|
-
* @returns {Promise<Models.UsageDatabases>}
|
|
211
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
212
|
-
*/
|
|
213
|
-
listUsage(range?: UsageRange): Promise<Models.UsageDatabases>;
|
|
214
193
|
/**
|
|
215
194
|
* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
|
|
216
195
|
*
|
|
@@ -2408,53 +2387,4 @@ export declare class Databases {
|
|
|
2408
2387
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2409
2388
|
*/
|
|
2410
2389
|
deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
2411
|
-
/**
|
|
2412
|
-
* Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
2413
|
-
*
|
|
2414
|
-
* @param {string} params.databaseId - Database ID.
|
|
2415
|
-
* @param {string} params.collectionId - Collection ID.
|
|
2416
|
-
* @param {UsageRange} params.range - Date range.
|
|
2417
|
-
* @throws {AppwriteException}
|
|
2418
|
-
* @returns {Promise<Models.UsageCollection>}
|
|
2419
|
-
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getTableUsage` instead.
|
|
2420
|
-
*/
|
|
2421
|
-
getCollectionUsage(params: {
|
|
2422
|
-
databaseId: string;
|
|
2423
|
-
collectionId: string;
|
|
2424
|
-
range?: UsageRange;
|
|
2425
|
-
}): Promise<Models.UsageCollection>;
|
|
2426
|
-
/**
|
|
2427
|
-
* Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
2428
|
-
*
|
|
2429
|
-
* @param {string} databaseId - Database ID.
|
|
2430
|
-
* @param {string} collectionId - Collection ID.
|
|
2431
|
-
* @param {UsageRange} range - Date range.
|
|
2432
|
-
* @throws {AppwriteException}
|
|
2433
|
-
* @returns {Promise<Models.UsageCollection>}
|
|
2434
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2435
|
-
*/
|
|
2436
|
-
getCollectionUsage(databaseId: string, collectionId: string, range?: UsageRange): Promise<Models.UsageCollection>;
|
|
2437
|
-
/**
|
|
2438
|
-
* Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
2439
|
-
*
|
|
2440
|
-
* @param {string} params.databaseId - Database ID.
|
|
2441
|
-
* @param {UsageRange} params.range - Date range.
|
|
2442
|
-
* @throws {AppwriteException}
|
|
2443
|
-
* @returns {Promise<Models.UsageDatabase>}
|
|
2444
|
-
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getUsage` instead.
|
|
2445
|
-
*/
|
|
2446
|
-
getUsage(params: {
|
|
2447
|
-
databaseId: string;
|
|
2448
|
-
range?: UsageRange;
|
|
2449
|
-
}): Promise<Models.UsageDatabase>;
|
|
2450
|
-
/**
|
|
2451
|
-
* Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
2452
|
-
*
|
|
2453
|
-
* @param {string} databaseId - Database ID.
|
|
2454
|
-
* @param {UsageRange} range - Date range.
|
|
2455
|
-
* @throws {AppwriteException}
|
|
2456
|
-
* @returns {Promise<Models.UsageDatabase>}
|
|
2457
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2458
|
-
*/
|
|
2459
|
-
getUsage(databaseId: string, range?: UsageRange): Promise<Models.UsageDatabase>;
|
|
2460
2390
|
}
|
|
@@ -35,6 +35,7 @@ export declare class DocumentsDB {
|
|
|
35
35
|
* @param {string} params.name - Database name. Max length: 128 chars.
|
|
36
36
|
* @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
37
37
|
* @param {string} params.specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.
|
|
38
|
+
* @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.
|
|
38
39
|
* @throws {AppwriteException}
|
|
39
40
|
* @returns {Promise<Models.Database>}
|
|
40
41
|
*/
|
|
@@ -43,6 +44,7 @@ export declare class DocumentsDB {
|
|
|
43
44
|
name: string;
|
|
44
45
|
enabled?: boolean;
|
|
45
46
|
specification?: string;
|
|
47
|
+
replicas?: number;
|
|
46
48
|
}): Promise<Models.Database>;
|
|
47
49
|
/**
|
|
48
50
|
* Create a new Database.
|
|
@@ -52,11 +54,19 @@ export declare class DocumentsDB {
|
|
|
52
54
|
* @param {string} name - Database name. Max length: 128 chars.
|
|
53
55
|
* @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
54
56
|
* @param {string} specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.
|
|
57
|
+
* @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.
|
|
55
58
|
* @throws {AppwriteException}
|
|
56
59
|
* @returns {Promise<Models.Database>}
|
|
57
60
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
58
61
|
*/
|
|
59
|
-
create(databaseId: string, name: string, enabled?: boolean, specification?: string): Promise<Models.Database>;
|
|
62
|
+
create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
|
|
63
|
+
/**
|
|
64
|
+
* List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.
|
|
65
|
+
*
|
|
66
|
+
* @throws {AppwriteException}
|
|
67
|
+
* @returns {Promise<Models.DedicatedDatabaseSpecificationList>}
|
|
68
|
+
*/
|
|
69
|
+
listSpecifications(): Promise<Models.DedicatedDatabaseSpecificationList>;
|
|
60
70
|
/**
|
|
61
71
|
* List transactions across all databases.
|
|
62
72
|
*
|
|
@@ -183,6 +193,7 @@ export declare class DocumentsDB {
|
|
|
183
193
|
* @param {string} params.databaseId - Database ID.
|
|
184
194
|
* @param {string} params.name - Database name. Max length: 128 chars.
|
|
185
195
|
* @param {boolean} params.enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
196
|
+
* @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
|
|
186
197
|
* @throws {AppwriteException}
|
|
187
198
|
* @returns {Promise<Models.Database>}
|
|
188
199
|
*/
|
|
@@ -190,6 +201,7 @@ export declare class DocumentsDB {
|
|
|
190
201
|
databaseId: string;
|
|
191
202
|
name: string;
|
|
192
203
|
enabled?: boolean;
|
|
204
|
+
replicas?: number;
|
|
193
205
|
}): Promise<Models.Database>;
|
|
194
206
|
/**
|
|
195
207
|
* Update a database by its unique ID.
|
|
@@ -197,11 +209,12 @@ export declare class DocumentsDB {
|
|
|
197
209
|
* @param {string} databaseId - Database ID.
|
|
198
210
|
* @param {string} name - Database name. Max length: 128 chars.
|
|
199
211
|
* @param {boolean} enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
212
|
+
* @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
|
|
200
213
|
* @throws {AppwriteException}
|
|
201
214
|
* @returns {Promise<Models.Database>}
|
|
202
215
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
203
216
|
*/
|
|
204
|
-
update(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
217
|
+
update(databaseId: string, name: string, enabled?: boolean, replicas?: number): Promise<Models.Database>;
|
|
205
218
|
/**
|
|
206
219
|
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
207
220
|
*
|
|
@@ -867,4 +880,64 @@ export declare class DocumentsDB {
|
|
|
867
880
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
868
881
|
*/
|
|
869
882
|
deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
883
|
+
/**
|
|
884
|
+
* Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.
|
|
885
|
+
*
|
|
886
|
+
* @param {string} params.databaseId - Database ID.
|
|
887
|
+
* @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
|
|
888
|
+
* @throws {AppwriteException}
|
|
889
|
+
* @returns {Promise<Models.DedicatedDatabase>}
|
|
890
|
+
*/
|
|
891
|
+
createFailover(params: {
|
|
892
|
+
databaseId: string;
|
|
893
|
+
targetReplicaId?: string;
|
|
894
|
+
}): Promise<Models.DedicatedDatabase>;
|
|
895
|
+
/**
|
|
896
|
+
* Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.
|
|
897
|
+
*
|
|
898
|
+
* @param {string} databaseId - Database ID.
|
|
899
|
+
* @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
|
|
900
|
+
* @throws {AppwriteException}
|
|
901
|
+
* @returns {Promise<Models.DedicatedDatabase>}
|
|
902
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
903
|
+
*/
|
|
904
|
+
createFailover(databaseId: string, targetReplicaId?: string): Promise<Models.DedicatedDatabase>;
|
|
905
|
+
/**
|
|
906
|
+
* Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.
|
|
907
|
+
*
|
|
908
|
+
* @param {string} params.databaseId - Database ID.
|
|
909
|
+
* @throws {AppwriteException}
|
|
910
|
+
* @returns {Promise<Models.DedicatedDatabaseReplicas>}
|
|
911
|
+
*/
|
|
912
|
+
getReplicas(params: {
|
|
913
|
+
databaseId: string;
|
|
914
|
+
}): Promise<Models.DedicatedDatabaseReplicas>;
|
|
915
|
+
/**
|
|
916
|
+
* Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.
|
|
917
|
+
*
|
|
918
|
+
* @param {string} databaseId - Database ID.
|
|
919
|
+
* @throws {AppwriteException}
|
|
920
|
+
* @returns {Promise<Models.DedicatedDatabaseReplicas>}
|
|
921
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
922
|
+
*/
|
|
923
|
+
getReplicas(databaseId: string): Promise<Models.DedicatedDatabaseReplicas>;
|
|
924
|
+
/**
|
|
925
|
+
* Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.
|
|
926
|
+
*
|
|
927
|
+
* @param {string} params.databaseId - Database ID.
|
|
928
|
+
* @throws {AppwriteException}
|
|
929
|
+
* @returns {Promise<Models.DatabaseStatus>}
|
|
930
|
+
*/
|
|
931
|
+
getStatus(params: {
|
|
932
|
+
databaseId: string;
|
|
933
|
+
}): Promise<Models.DatabaseStatus>;
|
|
934
|
+
/**
|
|
935
|
+
* Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.
|
|
936
|
+
*
|
|
937
|
+
* @param {string} databaseId - Database ID.
|
|
938
|
+
* @throws {AppwriteException}
|
|
939
|
+
* @returns {Promise<Models.DatabaseStatus>}
|
|
940
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
941
|
+
*/
|
|
942
|
+
getStatus(databaseId: string): Promise<Models.DatabaseStatus>;
|
|
870
943
|
}
|