@appwrite.io/console 11.0.0 → 12.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.
@@ -1076,7 +1076,7 @@ export declare class Account {
1076
1076
  * 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
1077
  *
1078
1078
  *
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, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
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.
1080
1080
  * @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
1081
  * @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
1082
  * @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 +1097,7 @@ export declare class Account {
1097
1097
  * 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
1098
  *
1099
1099
  *
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, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
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.
1101
1101
  * @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
1102
  * @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
1103
  * @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 +1353,7 @@ export declare class Account {
1353
1353
  *
1354
1354
  * 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
1355
  *
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, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
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.
1357
1357
  * @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
1358
  * @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
1359
  * @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 +1373,7 @@ export declare class Account {
1373
1373
  *
1374
1374
  * 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
1375
  *
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, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
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.
1377
1377
  * @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
1378
  * @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
1379
  * @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.
@@ -2,6 +2,7 @@ import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
3
  import { Platform } from '../enums/platform';
4
4
  import { ConsoleResourceType } from '../enums/console-resource-type';
5
+ import { QuerySuggestionResource } from '../enums/query-suggestion-resource';
5
6
  export declare class Console {
6
7
  client: Client;
7
8
  constructor(client: Client);
@@ -43,6 +44,13 @@ export declare class Console {
43
44
  * @deprecated Use the object parameter style method for a better developer experience.
44
45
  */
45
46
  getCoupon(couponId: string): Promise<Models.Coupon>;
47
+ /**
48
+ * List all OAuth2 providers supported by the Appwrite server, along with the parameters required to configure each provider. The response excludes mock providers but includes sandbox providers.
49
+ *
50
+ * @throws {AppwriteException}
51
+ * @returns {Promise<Models.ConsoleOAuth2ProviderList>}
52
+ */
53
+ listOAuth2Providers(): Promise<Models.ConsoleOAuth2ProviderList>;
46
54
  /**
47
55
  * Return a list of all available plans.
48
56
  *
@@ -148,6 +156,13 @@ export declare class Console {
148
156
  * @deprecated Use the object parameter style method for a better developer experience.
149
157
  */
150
158
  getResource(value: string, type: ConsoleResourceType): Promise<{}>;
159
+ /**
160
+ * List all scopes available for project API keys, along with a description for each scope.
161
+ *
162
+ * @throws {AppwriteException}
163
+ * @returns {Promise<Models.ConsoleKeyScopeList>}
164
+ */
165
+ listProjectScopes(): Promise<Models.ConsoleKeyScopeList>;
151
166
  /**
152
167
  * Create a new source.
153
168
  *
@@ -238,6 +253,36 @@ export declare class Console {
238
253
  * @deprecated Use the object parameter style method for a better developer experience.
239
254
  */
240
255
  suggestIndexes(databaseId: string, tableId: string, min?: number, max?: number): Promise<Models.ColumnIndexList>;
256
+ /**
257
+ * Suggest valid Appwrite query JSON objects for a supported list resource from free-text user intent. The endpoint picks a validator based on `resource` — for system resources it uses the static validator and its allowed attributes, and for user-owned table rows it loads the table schema and validates against those attributes at request time. The returned queries are guaranteed to parse and pass the relevant queries validator.
258
+ *
259
+ *
260
+ * @param {QuerySuggestionResource} params.resource - Resource to generate queries for.
261
+ * @param {string} params.input - Natural language query intent used to generate filters/sorting/pagination.
262
+ * @param {string} params.databaseId - Database ID. Required when resource is `tables` or `rows`.
263
+ * @param {string} params.tableId - Table ID. Required when resource is `rows`.
264
+ * @throws {AppwriteException}
265
+ * @returns {Promise<{}>}
266
+ */
267
+ suggestQueries(params: {
268
+ resource: QuerySuggestionResource;
269
+ input: string;
270
+ databaseId?: string;
271
+ tableId?: string;
272
+ }): Promise<{}>;
273
+ /**
274
+ * Suggest valid Appwrite query JSON objects for a supported list resource from free-text user intent. The endpoint picks a validator based on `resource` — for system resources it uses the static validator and its allowed attributes, and for user-owned table rows it loads the table schema and validates against those attributes at request time. The returned queries are guaranteed to parse and pass the relevant queries validator.
275
+ *
276
+ *
277
+ * @param {QuerySuggestionResource} resource - Resource to generate queries for.
278
+ * @param {string} input - Natural language query intent used to generate filters/sorting/pagination.
279
+ * @param {string} databaseId - Database ID. Required when resource is `tables` or `rows`.
280
+ * @param {string} tableId - Table ID. Required when resource is `rows`.
281
+ * @throws {AppwriteException}
282
+ * @returns {Promise<{}>}
283
+ * @deprecated Use the object parameter style method for a better developer experience.
284
+ */
285
+ suggestQueries(resource: QuerySuggestionResource, input: string, databaseId?: string, tableId?: string): Promise<{}>;
241
286
  /**
242
287
  * Get all Environment Variables that are relevant for the console.
243
288
  *
@@ -129,25 +129,25 @@ export declare class Domains {
129
129
  /**
130
130
  * Finalize a domain purchase initiated with Create Purchase. Verifies that any required 3D Secure authentication is complete, registers the domain, captures the payment, and provisions default DNS records. Returns a 402 error if authentication is still pending.
131
131
  *
132
- * @param {string} params.domainId - Domain ID to confirm purchase for.
132
+ * @param {string} params.invoiceId - Invoice ID.
133
133
  * @param {string} params.organizationId - Team ID that owns the domain.
134
134
  * @throws {AppwriteException}
135
135
  * @returns {Promise<Models.DomainPurchase>}
136
136
  */
137
137
  updatePurchase(params: {
138
- domainId: string;
138
+ invoiceId: string;
139
139
  organizationId: string;
140
140
  }): Promise<Models.DomainPurchase>;
141
141
  /**
142
142
  * Finalize a domain purchase initiated with Create Purchase. Verifies that any required 3D Secure authentication is complete, registers the domain, captures the payment, and provisions default DNS records. Returns a 402 error if authentication is still pending.
143
143
  *
144
- * @param {string} domainId - Domain ID to confirm purchase for.
144
+ * @param {string} invoiceId - Invoice ID.
145
145
  * @param {string} organizationId - Team ID that owns the domain.
146
146
  * @throws {AppwriteException}
147
147
  * @returns {Promise<Models.DomainPurchase>}
148
148
  * @deprecated Use the object parameter style method for a better developer experience.
149
149
  */
150
- updatePurchase(domainId: string, organizationId: string): Promise<Models.DomainPurchase>;
150
+ updatePurchase(invoiceId: string, organizationId: string): Promise<Models.DomainPurchase>;
151
151
  /**
152
152
  * List domain suggestions.
153
153
  *
@@ -216,25 +216,25 @@ export declare class Domains {
216
216
  /**
217
217
  * Finalize a domain transfer-in initiated with Create Transfer In. Verifies that any required 3D Secure authentication is complete, submits the transfer with the authorization code, captures the payment, and sends a confirmation email. Returns a 402 error if authentication is still pending.
218
218
  *
219
- * @param {string} params.domainId - Domain ID to confirm transfer for.
219
+ * @param {string} params.invoiceId - Invoice ID.
220
220
  * @param {string} params.organizationId - Team ID that owns the domain.
221
221
  * @throws {AppwriteException}
222
222
  * @returns {Promise<Models.DomainPurchase>}
223
223
  */
224
224
  updateTransferIn(params: {
225
- domainId: string;
225
+ invoiceId: string;
226
226
  organizationId: string;
227
227
  }): Promise<Models.DomainPurchase>;
228
228
  /**
229
229
  * Finalize a domain transfer-in initiated with Create Transfer In. Verifies that any required 3D Secure authentication is complete, submits the transfer with the authorization code, captures the payment, and sends a confirmation email. Returns a 402 error if authentication is still pending.
230
230
  *
231
- * @param {string} domainId - Domain ID to confirm transfer for.
231
+ * @param {string} invoiceId - Invoice ID.
232
232
  * @param {string} organizationId - Team ID that owns the domain.
233
233
  * @throws {AppwriteException}
234
234
  * @returns {Promise<Models.DomainPurchase>}
235
235
  * @deprecated Use the object parameter style method for a better developer experience.
236
236
  */
237
- updateTransferIn(domainId: string, organizationId: string): Promise<Models.DomainPurchase>;
237
+ updateTransferIn(invoiceId: string, organizationId: string): Promise<Models.DomainPurchase>;
238
238
  /**
239
239
  * Initiate a domain transfer-out by generating an authorization code for the specified domain. The returned `authCode` should be provided to the gaining provider to complete the transfer. If the domain has auto-renewal enabled, it will be automatically disabled as part of this operation.
240
240
  *
@@ -0,0 +1,110 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ import { ResourceType } from '../enums/resource-type';
4
+ export declare class Manager {
5
+ client: Client;
6
+ constructor(client: Client);
7
+ /**
8
+ * Creates a new resource block.
9
+ *
10
+ * @param {string} params.projectId - Project ID
11
+ * @param {ResourceType} params.resourceType - Resource type to block (e.g., projects, functions, databases, storage, etc.)
12
+ * @param {string} params.resourceId - Optional resource ID (if omitted, all resources of this type will be blocked)
13
+ * @param {string} params.reason - Optional reason why the resource is blocked
14
+ * @param {string} params.expiredAt - Optional expiration date for the block
15
+ * @throws {AppwriteException}
16
+ * @returns {Promise<Models.Block>}
17
+ */
18
+ createBlock(params: {
19
+ projectId: string;
20
+ resourceType: ResourceType;
21
+ resourceId?: string;
22
+ reason?: string;
23
+ expiredAt?: string;
24
+ }): Promise<Models.Block>;
25
+ /**
26
+ * Creates a new resource block.
27
+ *
28
+ * @param {string} projectId - Project ID
29
+ * @param {ResourceType} resourceType - Resource type to block (e.g., projects, functions, databases, storage, etc.)
30
+ * @param {string} resourceId - Optional resource ID (if omitted, all resources of this type will be blocked)
31
+ * @param {string} reason - Optional reason why the resource is blocked
32
+ * @param {string} expiredAt - Optional expiration date for the block
33
+ * @throws {AppwriteException}
34
+ * @returns {Promise<Models.Block>}
35
+ * @deprecated Use the object parameter style method for a better developer experience.
36
+ */
37
+ createBlock(projectId: string, resourceType: ResourceType, resourceId?: string, reason?: string, expiredAt?: string): Promise<Models.Block>;
38
+ /**
39
+ * Deletes resource blocks for a project.
40
+ *
41
+ * @param {string} params.projectId - Project ID
42
+ * @param {ResourceType} params.resourceType - Resource type to unblock
43
+ * @param {string} params.resourceId - Optional resource ID (if omitted, all blocks of this type will be removed)
44
+ * @throws {AppwriteException}
45
+ * @returns {Promise<Models.BlockDelete>}
46
+ */
47
+ deleteBlock(params: {
48
+ projectId: string;
49
+ resourceType: ResourceType;
50
+ resourceId?: string;
51
+ }): Promise<Models.BlockDelete>;
52
+ /**
53
+ * Deletes resource blocks for a project.
54
+ *
55
+ * @param {string} projectId - Project ID
56
+ * @param {ResourceType} resourceType - Resource type to unblock
57
+ * @param {string} resourceId - Optional resource ID (if omitted, all blocks of this type will be removed)
58
+ * @throws {AppwriteException}
59
+ * @returns {Promise<Models.BlockDelete>}
60
+ * @deprecated Use the object parameter style method for a better developer experience.
61
+ */
62
+ deleteBlock(projectId: string, resourceType: ResourceType, resourceId?: string): Promise<Models.BlockDelete>;
63
+ /**
64
+ * Lists all resource blocks for a project.
65
+ *
66
+ * @param {string} params.projectId - Project ID
67
+ * @throws {AppwriteException}
68
+ * @returns {Promise<Models.BlockList>}
69
+ */
70
+ listBlocks(params: {
71
+ projectId: string;
72
+ }): Promise<Models.BlockList>;
73
+ /**
74
+ * Lists all resource blocks for a project.
75
+ *
76
+ * @param {string} projectId - Project ID
77
+ * @throws {AppwriteException}
78
+ * @returns {Promise<Models.BlockList>}
79
+ * @deprecated Use the object parameter style method for a better developer experience.
80
+ */
81
+ listBlocks(projectId: string): Promise<Models.BlockList>;
82
+ /**
83
+ * Updates a console user status using a user ID or email address.
84
+ *
85
+ * @param {boolean} params.status - User status. Set to `false` to block and `true` to unblock.
86
+ * @param {string} params.userId - User ID.
87
+ * @param {string} params.email - User email address.
88
+ * @param {string} params.reason - Optional reason when blocking a user. Accepted for parity with the CLI task but not persisted.
89
+ * @throws {AppwriteException}
90
+ * @returns {Promise<Models.User<Preferences>>}
91
+ */
92
+ updateUserStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
93
+ status: boolean;
94
+ userId?: string;
95
+ email?: string;
96
+ reason?: string;
97
+ }): Promise<Models.User<Preferences>>;
98
+ /**
99
+ * Updates a console user status using a user ID or email address.
100
+ *
101
+ * @param {boolean} status - User status. Set to `false` to block and `true` to unblock.
102
+ * @param {string} userId - User ID.
103
+ * @param {string} email - User email address.
104
+ * @param {string} reason - Optional reason when blocking a user. Accepted for parity with the CLI task but not persisted.
105
+ * @throws {AppwriteException}
106
+ * @returns {Promise<Models.User<Preferences>>}
107
+ * @deprecated Use the object parameter style method for a better developer experience.
108
+ */
109
+ updateUserStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(status: boolean, userId?: string, email?: string, reason?: string): Promise<Models.User<Preferences>>;
110
+ }
@@ -1035,6 +1035,36 @@ export declare class Organizations {
1035
1035
  * @deprecated Use the object parameter style method for a better developer experience.
1036
1036
  */
1037
1037
  cancelDowngrade<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string): Promise<Models.Organization<Preferences>>;
1038
+ /**
1039
+ * Create a billing plan estimation for upgrading or downgrading an organization plan.
1040
+ *
1041
+ *
1042
+ * @param {string} params.organizationId - Organization ID
1043
+ * @param {string} params.billingPlan - Target billing plan
1044
+ * @param {string[]} params.invites - Additional member invites
1045
+ * @param {string} params.couponId - Coupon id
1046
+ * @throws {AppwriteException}
1047
+ * @returns {Promise<Models.EstimationPlanChange>}
1048
+ */
1049
+ createPlanEstimation(params: {
1050
+ organizationId: string;
1051
+ billingPlan: string;
1052
+ invites?: string[];
1053
+ couponId?: string;
1054
+ }): Promise<Models.EstimationPlanChange>;
1055
+ /**
1056
+ * Create a billing plan estimation for upgrading or downgrading an organization plan.
1057
+ *
1058
+ *
1059
+ * @param {string} organizationId - Organization ID
1060
+ * @param {string} billingPlan - Target billing plan
1061
+ * @param {string[]} invites - Additional member invites
1062
+ * @param {string} couponId - Coupon id
1063
+ * @throws {AppwriteException}
1064
+ * @returns {Promise<Models.EstimationPlanChange>}
1065
+ * @deprecated Use the object parameter style method for a better developer experience.
1066
+ */
1067
+ createPlanEstimation(organizationId: string, billingPlan: string, invites?: string[], couponId?: string): Promise<Models.EstimationPlanChange>;
1038
1068
  /**
1039
1069
  * Get all available regions for an organization.
1040
1070
  *