@appwrite.io/console 15.3.0 → 15.5.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.
Files changed (43) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/sdk.js +2568 -1656
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +2568 -1656
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +2568 -1656
  7. package/package.json +1 -1
  8. package/types/enums/database-status.d.ts +12 -1
  9. package/types/enums/database-type.d.ts +4 -1
  10. package/types/enums/o-auth-provider.d.ts +1 -0
  11. package/types/enums/organization-key-scopes.d.ts +2 -0
  12. package/types/enums/project-key-scopes.d.ts +5 -2
  13. package/types/enums/project-o-auth-provider-id.d.ts +1 -0
  14. package/types/enums/query-suggestion-resource.d.ts +8 -2
  15. package/types/enums/waf-rule-action.d.ts +7 -0
  16. package/types/index.d.ts +3 -5
  17. package/types/models.d.ts +3334 -3354
  18. package/types/services/account.d.ts +133 -4
  19. package/types/services/apps.d.ts +141 -11
  20. package/types/services/backups.d.ts +17 -8
  21. package/types/services/databases.d.ts +0 -70
  22. package/types/services/documents-db.d.ts +75 -2
  23. package/types/services/functions.d.ts +4 -43
  24. package/types/services/locale.d.ts +2 -2
  25. package/types/services/migrations.d.ts +30 -18
  26. package/types/services/mongo.d.ts +13 -4
  27. package/types/services/mysql.d.ts +13 -4
  28. package/types/services/oauth-2.d.ts +119 -15
  29. package/types/services/organization.d.ts +104 -0
  30. package/types/services/postgresql.d.ts +13 -4
  31. package/types/services/project.d.ts +32 -1
  32. package/types/services/projects.d.ts +0 -25
  33. package/types/services/sites.d.ts +4 -43
  34. package/types/services/storage.d.ts +0 -46
  35. package/types/services/tables-db.d.ts +75 -69
  36. package/types/services/teams.d.ts +119 -0
  37. package/types/services/usage.d.ts +10 -10
  38. package/types/services/vectors-db.d.ts +111 -2
  39. package/types/services/waf.d.ts +435 -0
  40. package/types/enums/health-antivirus-status.d.ts +0 -5
  41. package/types/enums/health-check-status.d.ts +0 -4
  42. package/types/enums/health-queue-name.d.ts +0 -16
  43. 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.
@@ -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 (array of valid URLs).
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 (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.
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 (array of valid URLs).
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 (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.
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,24 @@ 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 when installed on a team.
103
+ *
104
+ * @throws {AppwriteException}
105
+ * @returns {Promise<Models.AppScopeList>}
106
+ */
107
+ listInstallationScopes(): Promise<Models.AppScopeList>;
108
+ /**
109
+ * List scopes an application can request during the OAuth2 flow.
110
+ *
111
+ * @throws {AppwriteException}
112
+ * @returns {Promise<Models.AppScopeList>}
113
+ */
114
+ listOAuth2Scopes(): Promise<Models.AppScopeList>;
101
115
  /**
102
116
  * Get an application by its unique ID.
103
117
  *
104
- * @param {string} params.appId - Application unique ID.
118
+ * @param {string} params.appId - Application unique ID or HTTPS client ID metadata document URL.
105
119
  * @throws {AppwriteException}
106
120
  * @returns {Promise<Models.App>}
107
121
  */
@@ -111,7 +125,7 @@ export declare class Apps {
111
125
  /**
112
126
  * Get an application by its unique ID.
113
127
  *
114
- * @param {string} appId - Application unique ID.
128
+ * @param {string} appId - Application unique ID or HTTPS client ID metadata document URL.
115
129
  * @throws {AppwriteException}
116
130
  * @returns {Promise<Models.App>}
117
131
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -134,10 +148,12 @@ export declare class Apps {
134
148
  * @param {string} params.supportUrl - Application support URL shown to users during OAuth2 consent.
135
149
  * @param {string} params.dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent.
136
150
  * @param {boolean} params.enabled - Is application enabled?
137
- * @param {string[]} params.redirectUris - Redirect URIs (array of valid URLs).
138
- * @param {string[]} params.postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.
151
+ * @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.
152
+ * @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
153
  * @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
154
  * @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.
155
+ * @param {string[]} params.installationScopes - Scopes the application requests when installed on a team. Organization-level and project-level scopes only; use the list scopes endpoint with `type=installation` to discover available values. Maximum of 100 scopes are allowed.
156
+ * @param {string} params.installationRedirectUrl - URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect.
141
157
  * @throws {AppwriteException}
142
158
  * @returns {Promise<Models.App>}
143
159
  */
@@ -160,6 +176,8 @@ export declare class Apps {
160
176
  postLogoutRedirectUris?: string[];
161
177
  type?: string;
162
178
  deviceFlow?: boolean;
179
+ installationScopes?: string[];
180
+ installationRedirectUrl?: string;
163
181
  }): Promise<Models.App>;
164
182
  /**
165
183
  * Update an application by its unique ID.
@@ -178,15 +196,17 @@ export declare class Apps {
178
196
  * @param {string} supportUrl - Application support URL shown to users during OAuth2 consent.
179
197
  * @param {string} dataDeletionUrl - Application data deletion URL shown to users during OAuth2 consent.
180
198
  * @param {boolean} enabled - Is application enabled?
181
- * @param {string[]} redirectUris - Redirect URIs (array of valid URLs).
182
- * @param {string[]} postLogoutRedirectUris - Post-logout redirect URIs for OpenID Connect RP-Initiated Logout (array of valid URLs). After ending the user session, the logout endpoint only redirects to URIs in this list.
199
+ * @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.
200
+ * @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
201
  * @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
202
  * @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.
203
+ * @param {string[]} installationScopes - Scopes the application requests when installed on a team. Organization-level and project-level scopes only; use the list scopes endpoint with `type=installation` to discover available values. Maximum of 100 scopes are allowed.
204
+ * @param {string} installationRedirectUrl - URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect.
185
205
  * @throws {AppwriteException}
186
206
  * @returns {Promise<Models.App>}
187
207
  * @deprecated Use the object parameter style method for a better developer experience.
188
208
  */
189
- update(appId: string, name: string, description?: string, clientUri?: string, logoUri?: string, privacyPolicyUrl?: string, termsUrl?: string, contacts?: string[], tagline?: string, tags?: string[], images?: string[], supportUrl?: string, dataDeletionUrl?: string, enabled?: boolean, redirectUris?: string[], postLogoutRedirectUris?: string[], type?: string, deviceFlow?: boolean): Promise<Models.App>;
209
+ update(appId: string, name: string, description?: string, clientUri?: string, logoUri?: string, privacyPolicyUrl?: string, termsUrl?: string, contacts?: string[], tagline?: string, tags?: string[], images?: string[], supportUrl?: string, dataDeletionUrl?: string, enabled?: boolean, redirectUris?: string[], postLogoutRedirectUris?: string[], type?: string, deviceFlow?: boolean, installationScopes?: string[], installationRedirectUrl?: string): Promise<Models.App>;
190
210
  /**
191
211
  * Delete an application by its unique ID.
192
212
  *
@@ -206,6 +226,116 @@ export declare class Apps {
206
226
  * @deprecated Use the object parameter style method for a better developer experience.
207
227
  */
208
228
  delete(appId: string): Promise<{}>;
229
+ /**
230
+ * List app keys for an application.
231
+ *
232
+ * @param {string} params.appId - Application unique ID.
233
+ * @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.
234
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
235
+ * @throws {AppwriteException}
236
+ * @returns {Promise<Models.AppKeyList>}
237
+ */
238
+ listKeys(params: {
239
+ appId: string;
240
+ queries?: string[];
241
+ total?: boolean;
242
+ }): Promise<Models.AppKeyList>;
243
+ /**
244
+ * List app keys for an application.
245
+ *
246
+ * @param {string} appId - Application unique ID.
247
+ * @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.
248
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
249
+ * @throws {AppwriteException}
250
+ * @returns {Promise<Models.AppKeyList>}
251
+ * @deprecated Use the object parameter style method for a better developer experience.
252
+ */
253
+ listKeys(appId: string, queries?: string[], total?: boolean): Promise<Models.AppKeyList>;
254
+ /**
255
+ * Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens.
256
+ *
257
+ * @param {string} params.appId - Application unique ID.
258
+ * @throws {AppwriteException}
259
+ * @returns {Promise<Models.AppKey>}
260
+ */
261
+ createKey(params: {
262
+ appId: string;
263
+ }): Promise<Models.AppKey>;
264
+ /**
265
+ * Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens.
266
+ *
267
+ * @param {string} appId - Application unique ID.
268
+ * @throws {AppwriteException}
269
+ * @returns {Promise<Models.AppKey>}
270
+ * @deprecated Use the object parameter style method for a better developer experience.
271
+ */
272
+ createKey(appId: string): Promise<Models.AppKey>;
273
+ /**
274
+ * Get an app key by its unique ID.
275
+ *
276
+ * @param {string} params.appId - Application unique ID.
277
+ * @param {string} params.keyId - App key unique ID.
278
+ * @throws {AppwriteException}
279
+ * @returns {Promise<Models.AppKey>}
280
+ */
281
+ getKey(params: {
282
+ appId: string;
283
+ keyId: string;
284
+ }): Promise<Models.AppKey>;
285
+ /**
286
+ * Get an app key by its unique ID.
287
+ *
288
+ * @param {string} appId - Application unique ID.
289
+ * @param {string} keyId - App key unique ID.
290
+ * @throws {AppwriteException}
291
+ * @returns {Promise<Models.AppKey>}
292
+ * @deprecated Use the object parameter style method for a better developer experience.
293
+ */
294
+ getKey(appId: string, keyId: string): Promise<Models.AppKey>;
295
+ /**
296
+ * Delete an app key by its unique ID.
297
+ *
298
+ * @param {string} params.appId - Application unique ID.
299
+ * @param {string} params.keyId - App key unique ID.
300
+ * @throws {AppwriteException}
301
+ * @returns {Promise<{}>}
302
+ */
303
+ deleteKey(params: {
304
+ appId: string;
305
+ keyId: string;
306
+ }): Promise<{}>;
307
+ /**
308
+ * Delete an app key by its unique ID.
309
+ *
310
+ * @param {string} appId - Application unique ID.
311
+ * @param {string} keyId - App key unique ID.
312
+ * @throws {AppwriteException}
313
+ * @returns {Promise<{}>}
314
+ * @deprecated Use the object parameter style method for a better developer experience.
315
+ */
316
+ deleteKey(appId: string, keyId: string): Promise<{}>;
317
+ /**
318
+ * 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.
319
+ *
320
+ * @param {string} params.appId - Application unique ID.
321
+ * @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.
322
+ * @throws {AppwriteException}
323
+ * @returns {Promise<Models.App>}
324
+ */
325
+ updateLabels(params: {
326
+ appId: string;
327
+ labels: string[];
328
+ }): Promise<Models.App>;
329
+ /**
330
+ * 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.
331
+ *
332
+ * @param {string} appId - Application unique ID.
333
+ * @param {string[]} labels - Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
334
+ * @throws {AppwriteException}
335
+ * @returns {Promise<Models.App>}
336
+ * @deprecated Use the object parameter style method for a better developer experience.
337
+ */
338
+ updateLabels(appId: string, labels: string[]): Promise<Models.App>;
209
339
  /**
210
340
  * List client secrets for an application.
211
341
  *
@@ -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
- * When restoring a DocumentsDB or VectorsDB database to a new resource, pass `newSpecification` to provision the restored database on a different specification than the archived one (for example, restoring onto a larger or smaller dedicated database). Use `serverless` to restore onto the shared pool, or a dedicated specification slug to restore onto a dedicated database of that size. The specification must be permitted by the organization's plan. `newSpecification` is not supported for legacy/TablesDB databases or for bucket restores.
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 - Unique 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.
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
- * When restoring a DocumentsDB or VectorsDB database to a new resource, pass `newSpecification` to provision the restored database on a different specification than the archived one (for example, restoring onto a larger or smaller dedicated database). Use `serverless` to restore onto the shared pool, or a dedicated specification slug to restore onto a dedicated database of that size. The specification must be permitted by the organization's plan. `newSpecification` is not supported for legacy/TablesDB databases or for bucket restores.
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 - Unique 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.
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, newSpecification?: string): Promise<Models.BackupRestoration>;
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
  }