@appwrite.io/console 15.8.0 → 16.1.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 (54) hide show
  1. package/README.md +5 -6
  2. package/dist/cjs/package.json +1 -1
  3. package/dist/cjs/sdk.js +8360 -4537
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/package.json +1 -1
  6. package/dist/esm/sdk.js +8359 -4538
  7. package/dist/esm/sdk.js.map +1 -1
  8. package/dist/iife/sdk.js +8360 -4537
  9. package/package.json +59 -50
  10. package/types/client.d.ts +13 -2
  11. package/types/enums/{addon.d.ts → addon-key.d.ts} +1 -1
  12. package/types/enums/authentication-factor.d.ts +2 -1
  13. package/types/enums/build-runtime.d.ts +4 -1
  14. package/types/enums/embedding-model.d.ts +1 -3
  15. package/types/enums/execution-resource-type.d.ts +4 -0
  16. package/types/enums/image-gravity.d.ts +1 -0
  17. package/types/enums/invalidation-type.d.ts +5 -0
  18. package/types/enums/o-auth-provider.d.ts +5 -0
  19. package/types/enums/project-key-scopes.d.ts +20 -3
  20. package/types/enums/project-o-auth-provider-id.d.ts +5 -0
  21. package/types/enums/project-policy-id.d.ts +1 -0
  22. package/types/enums/query-suggestion-resource.d.ts +5 -1
  23. package/types/enums/runtime.d.ts +4 -1
  24. package/types/enums/usage-event-dimension.d.ts +27 -0
  25. package/types/enums/usage-event-metric.d.ts +55 -0
  26. package/types/enums/usage-gauge-dimension.d.ts +7 -0
  27. package/types/enums/usage-gauge-metric.d.ts +50 -0
  28. package/types/enums/usage-interval.d.ts +7 -0
  29. package/types/enums/usage-order-by.d.ts +4 -0
  30. package/types/enums/usage-order-direction.d.ts +4 -0
  31. package/types/index.d.ts +19 -6
  32. package/types/models.d.ts +764 -313
  33. package/types/services/account.d.ts +8 -8
  34. package/types/services/affiliates.d.ts +162 -0
  35. package/types/services/apps.d.ts +6 -6
  36. package/types/services/avatars.d.ts +44 -0
  37. package/types/services/databases.d.ts +8 -8
  38. package/types/services/documents-db.d.ts +13 -7
  39. package/types/services/domains.d.ts +82 -54
  40. package/types/services/embeddings.d.ts +31 -0
  41. package/types/services/functions.d.ts +6 -6
  42. package/types/services/mongo.d.ts +17 -23
  43. package/types/services/mysql.d.ts +17 -23
  44. package/types/services/organizations.d.ts +5 -5
  45. package/types/services/postgresql.d.ts +17 -23
  46. package/types/services/project.d.ts +171 -15
  47. package/types/services/proxy.d.ts +30 -0
  48. package/types/services/sites.d.ts +15 -8
  49. package/types/services/storage.d.ts +6 -6
  50. package/types/services/tables-db.d.ts +37 -12
  51. package/types/services/usage.d.ts +52 -38
  52. package/types/services/users.d.ts +24 -2
  53. package/types/services/vectors-db.d.ts +15 -34
  54. package/types/services/waf.d.ts +11 -2
@@ -707,7 +707,7 @@ export declare class Account {
707
707
  /**
708
708
  * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
709
709
  *
710
- * @param {AuthenticationFactor} params.factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.
710
+ * @param {AuthenticationFactor} params.factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`, `custom`.
711
711
  * @throws {AppwriteException}
712
712
  * @returns {Promise<Models.MfaChallenge>}
713
713
  * @deprecated This API has been deprecated since 1.8.0. Please use `Account.createMFAChallenge` instead.
@@ -718,7 +718,7 @@ export declare class Account {
718
718
  /**
719
719
  * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
720
720
  *
721
- * @param {AuthenticationFactor} factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.
721
+ * @param {AuthenticationFactor} factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`, `custom`.
722
722
  * @throws {AppwriteException}
723
723
  * @returns {Promise<Models.MfaChallenge>}
724
724
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -727,7 +727,7 @@ export declare class Account {
727
727
  /**
728
728
  * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
729
729
  *
730
- * @param {AuthenticationFactor} params.factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.
730
+ * @param {AuthenticationFactor} params.factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`, `custom`.
731
731
  * @throws {AppwriteException}
732
732
  * @returns {Promise<Models.MfaChallenge>}
733
733
  */
@@ -737,7 +737,7 @@ export declare class Account {
737
737
  /**
738
738
  * Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
739
739
  *
740
- * @param {AuthenticationFactor} factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.
740
+ * @param {AuthenticationFactor} factor - Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`, `custom`.
741
741
  * @throws {AppwriteException}
742
742
  * @returns {Promise<Models.MfaChallenge>}
743
743
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -1205,7 +1205,7 @@ export declare class Account {
1205
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).
1206
1206
  *
1207
1207
  *
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.
1208
+ * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
1209
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.
1210
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.
1211
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.
@@ -1226,7 +1226,7 @@ export declare class Account {
1226
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).
1227
1227
  *
1228
1228
  *
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.
1229
+ * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
1230
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.
1231
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.
1232
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.
@@ -1482,7 +1482,7 @@ export declare class Account {
1482
1482
  *
1483
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).
1484
1484
  *
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.
1485
+ * @param {OAuthProvider} params.provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
1486
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.
1487
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.
1488
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.
@@ -1502,7 +1502,7 @@ export declare class Account {
1502
1502
  *
1503
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).
1504
1504
  *
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.
1505
+ * @param {OAuthProvider} provider - OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
1506
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.
1507
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.
1508
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.
@@ -0,0 +1,162 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ export declare class Affiliates {
4
+ client: Client;
5
+ constructor(client: Client);
6
+ /**
7
+ * List affiliate links for the current account.
8
+ *
9
+ *
10
+ * @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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, status
11
+ * @throws {AppwriteException}
12
+ * @returns {Promise<Models.AffiliateLinkList>}
13
+ */
14
+ listLinks(params?: {
15
+ queries?: string[];
16
+ }): Promise<Models.AffiliateLinkList>;
17
+ /**
18
+ * List affiliate links for the current account.
19
+ *
20
+ *
21
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, status
22
+ * @throws {AppwriteException}
23
+ * @returns {Promise<Models.AffiliateLinkList>}
24
+ * @deprecated Use the object parameter style method for a better developer experience.
25
+ */
26
+ listLinks(queries?: string[]): Promise<Models.AffiliateLinkList>;
27
+ /**
28
+ * Create a shareable affiliate link for the current account. Every console user is automatically in the affiliates program.
29
+ *
30
+ *
31
+ * @param {string} params.linkId - Link 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. This ID is the shareable referral code.
32
+ * @param {string} params.name - Link name. Max length: 128 chars.
33
+ * @throws {AppwriteException}
34
+ * @returns {Promise<Models.AffiliateLink>}
35
+ */
36
+ createLink(params: {
37
+ linkId: string;
38
+ name?: string;
39
+ }): Promise<Models.AffiliateLink>;
40
+ /**
41
+ * Create a shareable affiliate link for the current account. Every console user is automatically in the affiliates program.
42
+ *
43
+ *
44
+ * @param {string} linkId - Link 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. This ID is the shareable referral code.
45
+ * @param {string} name - Link name. Max length: 128 chars.
46
+ * @throws {AppwriteException}
47
+ * @returns {Promise<Models.AffiliateLink>}
48
+ * @deprecated Use the object parameter style method for a better developer experience.
49
+ */
50
+ createLink(linkId: string, name?: string): Promise<Models.AffiliateLink>;
51
+ /**
52
+ * Get a single affiliate link owned by the current account.
53
+ *
54
+ *
55
+ * @param {string} params.linkId - Link ID.
56
+ * @throws {AppwriteException}
57
+ * @returns {Promise<Models.AffiliateLink>}
58
+ */
59
+ getLink(params: {
60
+ linkId: string;
61
+ }): Promise<Models.AffiliateLink>;
62
+ /**
63
+ * Get a single affiliate link owned by the current account.
64
+ *
65
+ *
66
+ * @param {string} linkId - Link ID.
67
+ * @throws {AppwriteException}
68
+ * @returns {Promise<Models.AffiliateLink>}
69
+ * @deprecated Use the object parameter style method for a better developer experience.
70
+ */
71
+ getLink(linkId: string): Promise<Models.AffiliateLink>;
72
+ /**
73
+ * Delete an affiliate link owned by the current account. Existing referrals and rewards keep their stored link IDs for history.
74
+ *
75
+ *
76
+ * @param {string} params.linkId - Link ID.
77
+ * @throws {AppwriteException}
78
+ * @returns {Promise<{}>}
79
+ */
80
+ deleteLink(params: {
81
+ linkId: string;
82
+ }): Promise<{}>;
83
+ /**
84
+ * Delete an affiliate link owned by the current account. Existing referrals and rewards keep their stored link IDs for history.
85
+ *
86
+ *
87
+ * @param {string} linkId - Link ID.
88
+ * @throws {AppwriteException}
89
+ * @returns {Promise<{}>}
90
+ * @deprecated Use the object parameter style method for a better developer experience.
91
+ */
92
+ deleteLink(linkId: string): Promise<{}>;
93
+ /**
94
+ * List referrals attributed to the current account's affiliate links. Responses include privacy-safe metadata only (truncated user ID and signup country), never email or name. Referrals are created automatically on signup when the invite cookie is present.
95
+ *
96
+ *
97
+ * @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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referredUserMaskedId, referredUserCountry, status, attributedAt, expiresAt, convertedAt
98
+ * @throws {AppwriteException}
99
+ * @returns {Promise<Models.AffiliateReferralList>}
100
+ */
101
+ listReferrals(params?: {
102
+ queries?: string[];
103
+ }): Promise<Models.AffiliateReferralList>;
104
+ /**
105
+ * List referrals attributed to the current account's affiliate links. Responses include privacy-safe metadata only (truncated user ID and signup country), never email or name. Referrals are created automatically on signup when the invite cookie is present.
106
+ *
107
+ *
108
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referredUserMaskedId, referredUserCountry, status, attributedAt, expiresAt, convertedAt
109
+ * @throws {AppwriteException}
110
+ * @returns {Promise<Models.AffiliateReferralList>}
111
+ * @deprecated Use the object parameter style method for a better developer experience.
112
+ */
113
+ listReferrals(queries?: string[]): Promise<Models.AffiliateReferralList>;
114
+ /**
115
+ * List rewards earned by the current account from affiliate link conversions.
116
+ *
117
+ *
118
+ * @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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referralId, amount, status, teamId, creditId
119
+ * @throws {AppwriteException}
120
+ * @returns {Promise<Models.AffiliateRewardList>}
121
+ */
122
+ listRewards(params?: {
123
+ queries?: string[];
124
+ }): Promise<Models.AffiliateRewardList>;
125
+ /**
126
+ * List rewards earned by the current account from affiliate link conversions.
127
+ *
128
+ *
129
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: linkId, referralId, amount, status, teamId, creditId
130
+ * @throws {AppwriteException}
131
+ * @returns {Promise<Models.AffiliateRewardList>}
132
+ * @deprecated Use the object parameter style method for a better developer experience.
133
+ */
134
+ listRewards(queries?: string[]): Promise<Models.AffiliateRewardList>;
135
+ /**
136
+ * Claim a pending affiliate reward by setting its status to `claimed`. Creates organization credits for the target organization. The current user must be an owner of that organization.
137
+ *
138
+ *
139
+ * @param {string} params.rewardId - Reward ID
140
+ * @param {string} params.status - New reward status. Use `claimed` to claim the reward as organization credits.
141
+ * @param {string} params.organizationId - Organization ID to apply credits to when claiming.
142
+ * @throws {AppwriteException}
143
+ * @returns {Promise<Models.AffiliateReward>}
144
+ */
145
+ updateReward(params: {
146
+ rewardId: string;
147
+ status: string;
148
+ organizationId: string;
149
+ }): Promise<Models.AffiliateReward>;
150
+ /**
151
+ * Claim a pending affiliate reward by setting its status to `claimed`. Creates organization credits for the target organization. The current user must be an owner of that organization.
152
+ *
153
+ *
154
+ * @param {string} rewardId - Reward ID
155
+ * @param {string} status - New reward status. Use `claimed` to claim the reward as organization credits.
156
+ * @param {string} organizationId - Organization ID to apply credits to when claiming.
157
+ * @throws {AppwriteException}
158
+ * @returns {Promise<Models.AffiliateReward>}
159
+ * @deprecated Use the object parameter style method for a better developer experience.
160
+ */
161
+ updateReward(rewardId: string, status: string, organizationId: string): Promise<Models.AffiliateReward>;
162
+ }
@@ -115,7 +115,7 @@ export declare class Apps {
115
115
  /**
116
116
  * Get an application by its unique ID.
117
117
  *
118
- * @param {string} params.appId - Application unique ID or HTTPS client ID metadata document URL.
118
+ * @param {string} params.appId - Application unique ID.
119
119
  * @throws {AppwriteException}
120
120
  * @returns {Promise<Models.App>}
121
121
  */
@@ -125,7 +125,7 @@ export declare class Apps {
125
125
  /**
126
126
  * Get an application by its unique ID.
127
127
  *
128
- * @param {string} appId - Application unique ID or HTTPS client ID metadata document URL.
128
+ * @param {string} appId - Application unique ID.
129
129
  * @throws {AppwriteException}
130
130
  * @returns {Promise<Models.App>}
131
131
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -152,7 +152,7 @@ export declare class Apps {
152
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.
153
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`.
154
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.
155
+ * @param {string[]} params.installationScopes - Scopes the application requests when installed on a team. Only scopes allowed by the project's OAuth2 server installation scopes configuration are accepted; use the list installation scopes endpoint to discover available values. Maximum of 100 scopes are allowed.
156
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.
157
157
  * @throws {AppwriteException}
158
158
  * @returns {Promise<Models.App>}
@@ -200,7 +200,7 @@ export declare class Apps {
200
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.
201
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`.
202
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.
203
+ * @param {string[]} installationScopes - Scopes the application requests when installed on a team. Only scopes allowed by the project's OAuth2 server installation scopes configuration are accepted; use the list installation scopes endpoint to discover available values. Maximum of 100 scopes are allowed.
204
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.
205
205
  * @throws {AppwriteException}
206
206
  * @returns {Promise<Models.App>}
@@ -409,7 +409,7 @@ export declare class Apps {
409
409
  * 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.
410
410
  *
411
411
  * @param {string} params.appId - Application unique ID.
412
- * @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.
412
+ * @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. Reserved labels are rejected.
413
413
  * @throws {AppwriteException}
414
414
  * @returns {Promise<Models.App>}
415
415
  */
@@ -421,7 +421,7 @@ export declare class Apps {
421
421
  * 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.
422
422
  *
423
423
  * @param {string} appId - Application unique ID.
424
- * @param {string[]} labels - Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
424
+ * @param {string[]} labels - Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long. Reserved labels are rejected.
425
425
  * @throws {AppwriteException}
426
426
  * @returns {Promise<Models.App>}
427
427
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -203,6 +203,50 @@ export declare class Avatars {
203
203
  * @deprecated Use the object parameter style method for a better developer experience.
204
204
  */
205
205
  getInitials(name?: string, width?: number, height?: number, background?: string): string;
206
+ /**
207
+ * Returns the best available profile photo for a user. The endpoint tries each source in priority order and returns the first successful result: OAuth2 identity photo, Gravatar, Libravatar, Appwrite Initials, built-in static fallback.
208
+ *
209
+ * Passing `userId` — `current()` for the authenticated user — resolves the photo from everything known about that user: identity photos, email, and name. An explicit `emailHash` or `name` then overrides just that value, and the user's remaining sources stay in the chain. Without `userId`, passing `emailHash` and/or `name` resolves the avatar from those values alone: the hash is looked up on Gravatar and Libravatar, the name is rendered as initials, and the session user stays out of the chain so their own photo never shadows the avatar being asked for. When nothing is passed, the photo resolves for the currently authenticated user. Emails are only ever accepted pre-hashed, so no address ends up in a URL.
210
+ *
211
+ * @param {number} params.width - Output image width in pixels. Pass an integer between 0 and 2000. Defaults to 256.
212
+ * @param {number} params.height - Output image height in pixels. Pass an integer between 0 and 2000. Defaults to 256.
213
+ * @param {number} params.quality - Output image quality between 0 and 100. Defaults to 100.
214
+ * @param {string} params.output - Output image format. Defaults to 'png'.
215
+ * @param {string} params.rating - Maximum image rating to fetch from Gravatar/Libravatar. Defaults to 'g'.
216
+ * @param {string} params.userId - User ID to resolve the photo for. Pass 'current()' for the currently authenticated user. When omitted, the session user is used only if no emailHash and no name is passed.
217
+ * @param {string} params.emailHash - SHA256 hash of the lowercase, trimmed email address to look up on Gravatar and Libravatar instead of the user's own email. Pass the hash, never the address itself.
218
+ * @param {string} params.name - Name to render initials from instead of the user's own name. Max length: 128 chars.
219
+ * @throws {AppwriteException}
220
+ * @returns {string}
221
+ */
222
+ getPhoto(params?: {
223
+ width?: number;
224
+ height?: number;
225
+ quality?: number;
226
+ output?: string;
227
+ rating?: string;
228
+ userId?: string;
229
+ emailHash?: string;
230
+ name?: string;
231
+ }): string;
232
+ /**
233
+ * Returns the best available profile photo for a user. The endpoint tries each source in priority order and returns the first successful result: OAuth2 identity photo, Gravatar, Libravatar, Appwrite Initials, built-in static fallback.
234
+ *
235
+ * Passing `userId` — `current()` for the authenticated user — resolves the photo from everything known about that user: identity photos, email, and name. An explicit `emailHash` or `name` then overrides just that value, and the user's remaining sources stay in the chain. Without `userId`, passing `emailHash` and/or `name` resolves the avatar from those values alone: the hash is looked up on Gravatar and Libravatar, the name is rendered as initials, and the session user stays out of the chain so their own photo never shadows the avatar being asked for. When nothing is passed, the photo resolves for the currently authenticated user. Emails are only ever accepted pre-hashed, so no address ends up in a URL.
236
+ *
237
+ * @param {number} width - Output image width in pixels. Pass an integer between 0 and 2000. Defaults to 256.
238
+ * @param {number} height - Output image height in pixels. Pass an integer between 0 and 2000. Defaults to 256.
239
+ * @param {number} quality - Output image quality between 0 and 100. Defaults to 100.
240
+ * @param {string} output - Output image format. Defaults to 'png'.
241
+ * @param {string} rating - Maximum image rating to fetch from Gravatar/Libravatar. Defaults to 'g'.
242
+ * @param {string} userId - User ID to resolve the photo for. Pass 'current()' for the currently authenticated user. When omitted, the session user is used only if no emailHash and no name is passed.
243
+ * @param {string} emailHash - SHA256 hash of the lowercase, trimmed email address to look up on Gravatar and Libravatar instead of the user's own email. Pass the hash, never the address itself.
244
+ * @param {string} name - Name to render initials from instead of the user's own name. Max length: 128 chars.
245
+ * @throws {AppwriteException}
246
+ * @returns {string}
247
+ * @deprecated Use the object parameter style method for a better developer experience.
248
+ */
249
+ getPhoto(width?: number, height?: number, quality?: number, output?: string, rating?: string, userId?: string, emailHash?: string, name?: string): string;
206
250
  /**
207
251
  * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.
208
252
  *
@@ -294,7 +294,7 @@ export declare class Databases {
294
294
  * @param {string[]} params.permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
295
295
  * @param {boolean} params.documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
296
296
  * @param {boolean} params.enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
297
- * @param {object[]} params.attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
297
+ * @param {object[]} params.attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
298
298
  * @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
299
299
  * @throws {AppwriteException}
300
300
  * @returns {Promise<Models.Collection>}
@@ -319,7 +319,7 @@ export declare class Databases {
319
319
  * @param {string[]} permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
320
320
  * @param {boolean} documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
321
321
  * @param {boolean} enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
322
- * @param {object[]} attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
322
+ * @param {object[]} attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
323
323
  * @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
324
324
  * @throws {AppwriteException}
325
325
  * @returns {Promise<Models.Collection>}
@@ -1429,11 +1429,11 @@ export declare class Databases {
1429
1429
  * @param {string} params.databaseId - Database ID.
1430
1430
  * @param {string} params.collectionId - Collection ID.
1431
1431
  * @param {string} params.relatedCollectionId - Related Collection ID.
1432
- * @param {RelationshipType} params.type - Relation type
1432
+ * @param {RelationshipType} params.type - Relationship type. Possible values are: oneToOne, oneToMany, manyToOne, manyToMany.
1433
1433
  * @param {boolean} params.twoWay - Is Two Way?
1434
1434
  * @param {string} params.key - Attribute Key.
1435
1435
  * @param {string} params.twoWayKey - Two Way Attribute Key.
1436
- * @param {RelationMutate} params.onDelete - Constraints option
1436
+ * @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
1437
1437
  * @throws {AppwriteException}
1438
1438
  * @returns {Promise<Models.AttributeRelationship>}
1439
1439
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRelationshipColumn` instead.
@@ -1455,11 +1455,11 @@ export declare class Databases {
1455
1455
  * @param {string} databaseId - Database ID.
1456
1456
  * @param {string} collectionId - Collection ID.
1457
1457
  * @param {string} relatedCollectionId - Related Collection ID.
1458
- * @param {RelationshipType} type - Relation type
1458
+ * @param {RelationshipType} type - Relationship type. Possible values are: oneToOne, oneToMany, manyToOne, manyToMany.
1459
1459
  * @param {boolean} twoWay - Is Two Way?
1460
1460
  * @param {string} key - Attribute Key.
1461
1461
  * @param {string} twoWayKey - Two Way Attribute Key.
1462
- * @param {RelationMutate} onDelete - Constraints option
1462
+ * @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
1463
1463
  * @throws {AppwriteException}
1464
1464
  * @returns {Promise<Models.AttributeRelationship>}
1465
1465
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -1472,7 +1472,7 @@ export declare class Databases {
1472
1472
  * @param {string} params.databaseId - Database ID.
1473
1473
  * @param {string} params.collectionId - Collection ID.
1474
1474
  * @param {string} params.key - Attribute Key.
1475
- * @param {RelationMutate} params.onDelete - Constraints option
1475
+ * @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
1476
1476
  * @param {string} params.newKey - New Attribute Key.
1477
1477
  * @throws {AppwriteException}
1478
1478
  * @returns {Promise<Models.AttributeRelationship>}
@@ -1492,7 +1492,7 @@ export declare class Databases {
1492
1492
  * @param {string} databaseId - Database ID.
1493
1493
  * @param {string} collectionId - Collection ID.
1494
1494
  * @param {string} key - Attribute Key.
1495
- * @param {RelationMutate} onDelete - Constraints option
1495
+ * @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
1496
1496
  * @param {string} newKey - New Attribute Key.
1497
1497
  * @throws {AppwriteException}
1498
1498
  * @returns {Promise<Models.AttributeRelationship>}
@@ -64,7 +64,7 @@ export declare class DocumentsDB {
64
64
  */
65
65
  create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
66
66
  /**
67
- * 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.
67
+ * List the dedicated database specifications available on the current plan. Each specification reports its resource limits, its own prices and overage rates, and whether it is enabled for the organization.
68
68
  *
69
69
  * @throws {AppwriteException}
70
70
  * @returns {Promise<Models.DedicatedDatabaseSpecificationList>}
@@ -280,7 +280,7 @@ export declare class DocumentsDB {
280
280
  * @param {string[]} params.permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
281
281
  * @param {boolean} params.documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
282
282
  * @param {boolean} params.enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
283
- * @param {object[]} params.attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
283
+ * @param {object[]} params.attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
284
284
  * @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
285
285
  * @throws {AppwriteException}
286
286
  * @returns {Promise<Models.Collection>}
@@ -304,7 +304,7 @@ export declare class DocumentsDB {
304
304
  * @param {string[]} permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
305
305
  * @param {boolean} documentSecurity - Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
306
306
  * @param {boolean} enabled - Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
307
- * @param {object[]} attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
307
+ * @param {object[]} attributes - Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
308
308
  * @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
309
309
  * @throws {AppwriteException}
310
310
  * @returns {Promise<Models.Collection>}
@@ -434,6 +434,7 @@ export declare class DocumentsDB {
434
434
  * @param {string} params.documentId - Document 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.
435
435
  * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} params.data - Document data as JSON object.
436
436
  * @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
437
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
437
438
  * @throws {AppwriteException}
438
439
  * @returns {Promise<Document>}
439
440
  */
@@ -443,6 +444,7 @@ export declare class DocumentsDB {
443
444
  documentId: string;
444
445
  data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>;
445
446
  permissions?: string[];
447
+ transactionId?: string;
446
448
  }): Promise<Document>;
447
449
  /**
448
450
  * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
@@ -452,17 +454,19 @@ export declare class DocumentsDB {
452
454
  * @param {string} documentId - Document 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.
453
455
  * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} data - Document data as JSON object.
454
456
  * @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
457
+ * @param {string} transactionId - Transaction ID for staging the operation.
455
458
  * @throws {AppwriteException}
456
459
  * @returns {Promise<Document>}
457
460
  * @deprecated Use the object parameter style method for a better developer experience.
458
461
  */
459
- createDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
462
+ createDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>, permissions?: string[], transactionId?: string): Promise<Document>;
460
463
  /**
461
464
  * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
462
465
  *
463
466
  * @param {string} params.databaseId - Database ID.
464
467
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
465
468
  * @param {object[]} params.documents - Array of documents data as JSON objects.
469
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
466
470
  * @throws {AppwriteException}
467
471
  * @returns {Promise<Models.DocumentList<Document>>}
468
472
  */
@@ -470,6 +474,7 @@ export declare class DocumentsDB {
470
474
  databaseId: string;
471
475
  collectionId: string;
472
476
  documents: object[];
477
+ transactionId?: string;
473
478
  }): Promise<Models.DocumentList<Document>>;
474
479
  /**
475
480
  * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
@@ -477,11 +482,12 @@ export declare class DocumentsDB {
477
482
  * @param {string} databaseId - Database ID.
478
483
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
479
484
  * @param {object[]} documents - Array of documents data as JSON objects.
485
+ * @param {string} transactionId - Transaction ID for staging the operation.
480
486
  * @throws {AppwriteException}
481
487
  * @returns {Promise<Models.DocumentList<Document>>}
482
488
  * @deprecated Use the object parameter style method for a better developer experience.
483
489
  */
484
- createDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
490
+ createDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[], transactionId?: string): Promise<Models.DocumentList<Document>>;
485
491
  /**
486
492
  * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
487
493
  *
@@ -890,7 +896,7 @@ export declare class DocumentsDB {
890
896
  */
891
897
  deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
892
898
  /**
893
- * 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. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.
899
+ * 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. A database left mid-operation also accepts this call as a repair once nothing is driving the operation it is stuck in. Repairing a failover that did not finish, a `failed` database, a stranded upgrade or migrate, or a stranded compute resize additionally requires `targetReplicaId` to name the member to promote, because the default target may be the member that operation already promoted.
894
900
  *
895
901
  * @param {string} params.databaseId - Database ID.
896
902
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -902,7 +908,7 @@ export declare class DocumentsDB {
902
908
  targetReplicaId?: string;
903
909
  }): Promise<Models.DedicatedDatabase>;
904
910
  /**
905
- * 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. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.
911
+ * 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. A database left mid-operation also accepts this call as a repair once nothing is driving the operation it is stuck in. Repairing a failover that did not finish, a `failed` database, a stranded upgrade or migrate, or a stranded compute resize additionally requires `targetReplicaId` to name the member to promote, because the default target may be the member that operation already promoted.
906
912
  *
907
913
  * @param {string} databaseId - Database ID.
908
914
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.