@appwrite.io/console 13.2.0 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -347,11 +347,16 @@ export declare class Project {
347
347
  * @param {boolean} params.enabled - Enable or disable the OAuth2 server.
348
348
  * @param {string} params.authorizationUrl - URL to your application with consent screen.
349
349
  * @param {string[]} params.scopes - List of allowed OAuth2 scopes. Maximum of 100 scopes are allowed, each up to 128 characters long.
350
+ * @param {string[]} params.authorizationDetailsTypes - List of accepted `authorization_details` types. Maximum of 100 types are allowed, each up to 128 characters long.
350
351
  * @param {number} params.accessTokenDuration - Access token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 8 hours.
351
352
  * @param {number} params.refreshTokenDuration - Refresh token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 1 year.
352
353
  * @param {number} params.publicAccessTokenDuration - Access token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 1 hour.
353
354
  * @param {number} params.publicRefreshTokenDuration - Refresh token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 30 days.
354
355
  * @param {boolean} params.confidentialPkce - When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.
356
+ * @param {string} params.verificationUrl - URL to your application page where users enter the device flow user code. Required to enable the Device Authorization Grant.
357
+ * @param {number} params.userCodeLength - Number of characters in the device flow user code, excluding the formatting separator. Shorter codes are easier to type but weaker; pair short codes with short expiry. Leave empty to use default 8.
358
+ * @param {string} params.userCodeFormat - Character set for device flow user codes: `numeric` (digits only — best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits — highest entropy per character). Defaults to `alphanumeric`.
359
+ * @param {number} params.deviceCodeDuration - Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600.
355
360
  * @throws {AppwriteException}
356
361
  * @returns {Promise<Models.Project>}
357
362
  */
@@ -359,11 +364,16 @@ export declare class Project {
359
364
  enabled: boolean;
360
365
  authorizationUrl: string;
361
366
  scopes?: string[];
367
+ authorizationDetailsTypes?: string[];
362
368
  accessTokenDuration?: number;
363
369
  refreshTokenDuration?: number;
364
370
  publicAccessTokenDuration?: number;
365
371
  publicRefreshTokenDuration?: number;
366
372
  confidentialPkce?: boolean;
373
+ verificationUrl?: string;
374
+ userCodeLength?: number;
375
+ userCodeFormat?: string;
376
+ deviceCodeDuration?: number;
367
377
  }): Promise<Models.Project>;
368
378
  /**
369
379
  * Update the OAuth2 server (OIDC provider) configuration.
@@ -371,16 +381,21 @@ export declare class Project {
371
381
  * @param {boolean} enabled - Enable or disable the OAuth2 server.
372
382
  * @param {string} authorizationUrl - URL to your application with consent screen.
373
383
  * @param {string[]} scopes - List of allowed OAuth2 scopes. Maximum of 100 scopes are allowed, each up to 128 characters long.
384
+ * @param {string[]} authorizationDetailsTypes - List of accepted `authorization_details` types. Maximum of 100 types are allowed, each up to 128 characters long.
374
385
  * @param {number} accessTokenDuration - Access token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 8 hours.
375
386
  * @param {number} refreshTokenDuration - Refresh token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 1 year.
376
387
  * @param {number} publicAccessTokenDuration - Access token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 1 hour.
377
388
  * @param {number} publicRefreshTokenDuration - Refresh token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 30 days.
378
389
  * @param {boolean} confidentialPkce - When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.
390
+ * @param {string} verificationUrl - URL to your application page where users enter the device flow user code. Required to enable the Device Authorization Grant.
391
+ * @param {number} userCodeLength - Number of characters in the device flow user code, excluding the formatting separator. Shorter codes are easier to type but weaker; pair short codes with short expiry. Leave empty to use default 8.
392
+ * @param {string} userCodeFormat - Character set for device flow user codes: `numeric` (digits only — best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits — highest entropy per character). Defaults to `alphanumeric`.
393
+ * @param {number} deviceCodeDuration - Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600.
379
394
  * @throws {AppwriteException}
380
395
  * @returns {Promise<Models.Project>}
381
396
  * @deprecated Use the object parameter style method for a better developer experience.
382
397
  */
383
- updateOAuth2Server(enabled: boolean, authorizationUrl: string, scopes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean): Promise<Models.Project>;
398
+ updateOAuth2Server(enabled: boolean, authorizationUrl: string, scopes?: string[], authorizationDetailsTypes?: string[], accessTokenDuration?: number, refreshTokenDuration?: number, publicAccessTokenDuration?: number, publicRefreshTokenDuration?: number, confidentialPkce?: boolean, verificationUrl?: string, userCodeLength?: number, userCodeFormat?: string, deviceCodeDuration?: number): Promise<Models.Project>;
384
399
  /**
385
400
  * Update the project OAuth2 Amazon configuration.
386
401
  *
@@ -1849,6 +1864,25 @@ export declare class Project {
1849
1864
  * @deprecated Use the object parameter style method for a better developer experience.
1850
1865
  */
1851
1866
  updateDenyAliasedEmailPolicy(enabled: boolean): Promise<Models.Project>;
1867
+ /**
1868
+ * Configures if only corporate email addresses (non-free and non-disposable domains) are allowed during new user sign-ups and email updates.
1869
+ *
1870
+ * @param {boolean} params.enabled - Set whether or not to restrict sign-ups and email updates to corporate email addresses only.
1871
+ * @throws {AppwriteException}
1872
+ * @returns {Promise<Models.Project>}
1873
+ */
1874
+ updateDenyCorporateEmailPolicy(params: {
1875
+ enabled: boolean;
1876
+ }): Promise<Models.Project>;
1877
+ /**
1878
+ * Configures if only corporate email addresses (non-free and non-disposable domains) are allowed during new user sign-ups and email updates.
1879
+ *
1880
+ * @param {boolean} enabled - Set whether or not to restrict sign-ups and email updates to corporate email addresses only.
1881
+ * @throws {AppwriteException}
1882
+ * @returns {Promise<Models.Project>}
1883
+ * @deprecated Use the object parameter style method for a better developer experience.
1884
+ */
1885
+ updateDenyCorporateEmailPolicy(enabled: boolean): Promise<Models.Project>;
1852
1886
  /**
1853
1887
  * Configures if disposable emails from known temporary domains are denied during new users sign-ups and email updates.
1854
1888
  *
@@ -1895,6 +1929,7 @@ export declare class Project {
1895
1929
  * @param {boolean} params.userPhone - Set to true if you want make user phone number visible to all team members, or false to hide it.
1896
1930
  * @param {boolean} params.userName - Set to true if you want make user name visible to all team members, or false to hide it.
1897
1931
  * @param {boolean} params.userMFA - Set to true if you want make user MFA status visible to all team members, or false to hide it.
1932
+ * @param {boolean} params.userAccessedAt - Set to true if you want make user last access time visible to all team members, or false to hide it.
1898
1933
  * @throws {AppwriteException}
1899
1934
  * @returns {Promise<Models.Project>}
1900
1935
  */
@@ -1904,6 +1939,7 @@ export declare class Project {
1904
1939
  userPhone?: boolean;
1905
1940
  userName?: boolean;
1906
1941
  userMFA?: boolean;
1942
+ userAccessedAt?: boolean;
1907
1943
  }): Promise<Models.Project>;
1908
1944
  /**
1909
1945
  * Updating this policy allows you to control if team members can see other members information. When enabled, all team members can see ID, name, email, phone number, and MFA status of other members..
@@ -1913,11 +1949,12 @@ export declare class Project {
1913
1949
  * @param {boolean} userPhone - Set to true if you want make user phone number visible to all team members, or false to hide it.
1914
1950
  * @param {boolean} userName - Set to true if you want make user name visible to all team members, or false to hide it.
1915
1951
  * @param {boolean} userMFA - Set to true if you want make user MFA status visible to all team members, or false to hide it.
1952
+ * @param {boolean} userAccessedAt - Set to true if you want make user last access time visible to all team members, or false to hide it.
1916
1953
  * @throws {AppwriteException}
1917
1954
  * @returns {Promise<Models.Project>}
1918
1955
  * @deprecated Use the object parameter style method for a better developer experience.
1919
1956
  */
1920
- updateMembershipPrivacyPolicy(userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean): Promise<Models.Project>;
1957
+ updateMembershipPrivacyPolicy(userId?: boolean, userEmail?: boolean, userPhone?: boolean, userName?: boolean, userMFA?: boolean, userAccessedAt?: boolean): Promise<Models.Project>;
1921
1958
  /**
1922
1959
  * Updating this policy allows you to control if new passwords are checked against most common passwords dictionary. When enabled, and user changes their password, password must not be contained in the dictionary.
1923
1960
  *
@@ -2108,22 +2145,22 @@ export declare class Project {
2108
2145
  /**
2109
2146
  * Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.
2110
2147
  *
2111
- * @param {ProjectPolicyId} params.policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email.
2148
+ * @param {ProjectPolicyId} params.policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email.
2112
2149
  * @throws {AppwriteException}
2113
- * @returns {Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail>}
2150
+ * @returns {Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail>}
2114
2151
  */
2115
2152
  getPolicy(params: {
2116
2153
  policyId: ProjectPolicyId;
2117
- }): Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail>;
2154
+ }): Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail>;
2118
2155
  /**
2119
2156
  * Get a policy by its unique ID. This endpoint returns the current configuration for the requested project policy.
2120
2157
  *
2121
- * @param {ProjectPolicyId} policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email.
2158
+ * @param {ProjectPolicyId} policyId - Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email.
2122
2159
  * @throws {AppwriteException}
2123
- * @returns {Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail>}
2160
+ * @returns {Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail>}
2124
2161
  * @deprecated Use the object parameter style method for a better developer experience.
2125
2162
  */
2126
- getPolicy(policyId: ProjectPolicyId): Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail>;
2163
+ getPolicy(policyId: ProjectPolicyId): Promise<Models.PolicyPasswordDictionary | Models.PolicyPasswordHistory | Models.PolicyPasswordStrength | Models.PolicyPasswordPersonalData | Models.PolicySessionAlert | Models.PolicySessionDuration | Models.PolicySessionInvalidation | Models.PolicySessionLimit | Models.PolicyUserLimit | Models.PolicyMembershipPrivacy | Models.PolicyDenyAliasedEmail | Models.PolicyDenyDisposableEmail | Models.PolicyDenyFreeEmail | Models.PolicyDenyCorporateEmail>;
2127
2164
  /**
2128
2165
  * Update properties of a specific protocol. Use this endpoint to enable or disable a protocol in your project.
2129
2166
  *
@@ -2149,7 +2186,7 @@ export declare class Project {
2149
2186
  /**
2150
2187
  * Update properties of a specific service. Use this endpoint to enable or disable a service in your project.
2151
2188
  *
2152
- * @param {ProjectServiceId} params.serviceId - Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor
2189
+ * @param {ProjectServiceId} params.serviceId - Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor, oauth2
2153
2190
  * @param {boolean} params.enabled - Service status.
2154
2191
  * @throws {AppwriteException}
2155
2192
  * @returns {Promise<Models.Project>}
@@ -2161,7 +2198,7 @@ export declare class Project {
2161
2198
  /**
2162
2199
  * Update properties of a specific service. Use this endpoint to enable or disable a service in your project.
2163
2200
  *
2164
- * @param {ProjectServiceId} serviceId - Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor
2201
+ * @param {ProjectServiceId} serviceId - Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor, oauth2
2165
2202
  * @param {boolean} enabled - Service status.
2166
2203
  * @throws {AppwriteException}
2167
2204
  * @returns {Promise<Models.Project>}
@@ -40,6 +40,7 @@ export declare class TablesDB {
40
40
  * @param {string} params.databaseId - 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.
41
41
  * @param {string} params.name - Database name. Max length: 128 chars.
42
42
  * @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
43
+ * @param {string} params.dedicatedDatabaseId - Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.
43
44
  * @throws {AppwriteException}
44
45
  * @returns {Promise<Models.Database>}
45
46
  */
@@ -47,6 +48,7 @@ export declare class TablesDB {
47
48
  databaseId: string;
48
49
  name: string;
49
50
  enabled?: boolean;
51
+ dedicatedDatabaseId?: string;
50
52
  }): Promise<Models.Database>;
51
53
  /**
52
54
  * Create a new Database.
@@ -55,11 +57,12 @@ export declare class TablesDB {
55
57
  * @param {string} databaseId - 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.
56
58
  * @param {string} name - Database name. Max length: 128 chars.
57
59
  * @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
60
+ * @param {string} dedicatedDatabaseId - Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.
58
61
  * @throws {AppwriteException}
59
62
  * @returns {Promise<Models.Database>}
60
63
  * @deprecated Use the object parameter style method for a better developer experience.
61
64
  */
62
- create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
65
+ create(databaseId: string, name: string, enabled?: boolean, dedicatedDatabaseId?: string): Promise<Models.Database>;
63
66
  /**
64
67
  * List transactions across all databases.
65
68
  *
@@ -1059,7 +1062,7 @@ export declare class TablesDB {
1059
1062
  * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1060
1063
  * @param {string} params.key - Column Key.
1061
1064
  * @param {boolean} params.required - Is column required?
1062
- * @param {any[]} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
1065
+ * @param {any[][]} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
1063
1066
  * @throws {AppwriteException}
1064
1067
  * @returns {Promise<Models.ColumnLine>}
1065
1068
  */
@@ -1068,7 +1071,7 @@ export declare class TablesDB {
1068
1071
  tableId: string;
1069
1072
  key: string;
1070
1073
  required: boolean;
1071
- xdefault?: any[];
1074
+ xdefault?: any[][];
1072
1075
  }): Promise<Models.ColumnLine>;
1073
1076
  /**
1074
1077
  * Create a geometric line column.
@@ -1077,12 +1080,12 @@ export declare class TablesDB {
1077
1080
  * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1078
1081
  * @param {string} key - Column Key.
1079
1082
  * @param {boolean} required - Is column required?
1080
- * @param {any[]} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
1083
+ * @param {any[][]} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
1081
1084
  * @throws {AppwriteException}
1082
1085
  * @returns {Promise<Models.ColumnLine>}
1083
1086
  * @deprecated Use the object parameter style method for a better developer experience.
1084
1087
  */
1085
- createLineColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.ColumnLine>;
1088
+ createLineColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][]): Promise<Models.ColumnLine>;
1086
1089
  /**
1087
1090
  * Update a line column. Changing the `default` value will not update already existing rows.
1088
1091
  *
@@ -1090,7 +1093,7 @@ export declare class TablesDB {
1090
1093
  * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1091
1094
  * @param {string} params.key - Column Key.
1092
1095
  * @param {boolean} params.required - Is column required?
1093
- * @param {any[]} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
1096
+ * @param {any[][]} params.xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
1094
1097
  * @param {string} params.newKey - New Column Key.
1095
1098
  * @throws {AppwriteException}
1096
1099
  * @returns {Promise<Models.ColumnLine>}
@@ -1100,7 +1103,7 @@ export declare class TablesDB {
1100
1103
  tableId: string;
1101
1104
  key: string;
1102
1105
  required: boolean;
1103
- xdefault?: any[];
1106
+ xdefault?: any[][];
1104
1107
  newKey?: string;
1105
1108
  }): Promise<Models.ColumnLine>;
1106
1109
  /**
@@ -1110,13 +1113,13 @@ export declare class TablesDB {
1110
1113
  * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1111
1114
  * @param {string} key - Column Key.
1112
1115
  * @param {boolean} required - Is column required?
1113
- * @param {any[]} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
1116
+ * @param {any[][]} xdefault - Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
1114
1117
  * @param {string} newKey - New Column Key.
1115
1118
  * @throws {AppwriteException}
1116
1119
  * @returns {Promise<Models.ColumnLine>}
1117
1120
  * @deprecated Use the object parameter style method for a better developer experience.
1118
1121
  */
1119
- updateLineColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.ColumnLine>;
1122
+ updateLineColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string): Promise<Models.ColumnLine>;
1120
1123
  /**
1121
1124
  * Create a longtext column.
1122
1125
  *
@@ -1274,7 +1277,7 @@ export declare class TablesDB {
1274
1277
  * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1275
1278
  * @param {string} params.key - Column Key.
1276
1279
  * @param {boolean} params.required - Is column required?
1277
- * @param {any[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
1280
+ * @param {number[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
1278
1281
  * @throws {AppwriteException}
1279
1282
  * @returns {Promise<Models.ColumnPoint>}
1280
1283
  */
@@ -1283,7 +1286,7 @@ export declare class TablesDB {
1283
1286
  tableId: string;
1284
1287
  key: string;
1285
1288
  required: boolean;
1286
- xdefault?: any[];
1289
+ xdefault?: number[];
1287
1290
  }): Promise<Models.ColumnPoint>;
1288
1291
  /**
1289
1292
  * Create a geometric point column.
@@ -1292,12 +1295,12 @@ export declare class TablesDB {
1292
1295
  * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1293
1296
  * @param {string} key - Column Key.
1294
1297
  * @param {boolean} required - Is column required?
1295
- * @param {any[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
1298
+ * @param {number[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
1296
1299
  * @throws {AppwriteException}
1297
1300
  * @returns {Promise<Models.ColumnPoint>}
1298
1301
  * @deprecated Use the object parameter style method for a better developer experience.
1299
1302
  */
1300
- createPointColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.ColumnPoint>;
1303
+ createPointColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[]): Promise<Models.ColumnPoint>;
1301
1304
  /**
1302
1305
  * Update a point column. Changing the `default` value will not update already existing rows.
1303
1306
  *
@@ -1305,7 +1308,7 @@ export declare class TablesDB {
1305
1308
  * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1306
1309
  * @param {string} params.key - Column Key.
1307
1310
  * @param {boolean} params.required - Is column required?
1308
- * @param {any[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
1311
+ * @param {number[]} params.xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
1309
1312
  * @param {string} params.newKey - New Column Key.
1310
1313
  * @throws {AppwriteException}
1311
1314
  * @returns {Promise<Models.ColumnPoint>}
@@ -1315,7 +1318,7 @@ export declare class TablesDB {
1315
1318
  tableId: string;
1316
1319
  key: string;
1317
1320
  required: boolean;
1318
- xdefault?: any[];
1321
+ xdefault?: number[];
1319
1322
  newKey?: string;
1320
1323
  }): Promise<Models.ColumnPoint>;
1321
1324
  /**
@@ -1325,13 +1328,13 @@ export declare class TablesDB {
1325
1328
  * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1326
1329
  * @param {string} key - Column Key.
1327
1330
  * @param {boolean} required - Is column required?
1328
- * @param {any[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
1331
+ * @param {number[]} xdefault - Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
1329
1332
  * @param {string} newKey - New Column Key.
1330
1333
  * @throws {AppwriteException}
1331
1334
  * @returns {Promise<Models.ColumnPoint>}
1332
1335
  * @deprecated Use the object parameter style method for a better developer experience.
1333
1336
  */
1334
- updatePointColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.ColumnPoint>;
1337
+ updatePointColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: number[], newKey?: string): Promise<Models.ColumnPoint>;
1335
1338
  /**
1336
1339
  * Create a geometric polygon column.
1337
1340
  *
@@ -1339,7 +1342,7 @@ export declare class TablesDB {
1339
1342
  * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1340
1343
  * @param {string} params.key - Column Key.
1341
1344
  * @param {boolean} params.required - Is column required?
1342
- * @param {any[]} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
1345
+ * @param {any[][]} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
1343
1346
  * @throws {AppwriteException}
1344
1347
  * @returns {Promise<Models.ColumnPolygon>}
1345
1348
  */
@@ -1348,7 +1351,7 @@ export declare class TablesDB {
1348
1351
  tableId: string;
1349
1352
  key: string;
1350
1353
  required: boolean;
1351
- xdefault?: any[];
1354
+ xdefault?: any[][];
1352
1355
  }): Promise<Models.ColumnPolygon>;
1353
1356
  /**
1354
1357
  * Create a geometric polygon column.
@@ -1357,12 +1360,12 @@ export declare class TablesDB {
1357
1360
  * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1358
1361
  * @param {string} key - Column Key.
1359
1362
  * @param {boolean} required - Is column required?
1360
- * @param {any[]} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
1363
+ * @param {any[][]} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
1361
1364
  * @throws {AppwriteException}
1362
1365
  * @returns {Promise<Models.ColumnPolygon>}
1363
1366
  * @deprecated Use the object parameter style method for a better developer experience.
1364
1367
  */
1365
- createPolygonColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[]): Promise<Models.ColumnPolygon>;
1368
+ createPolygonColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][]): Promise<Models.ColumnPolygon>;
1366
1369
  /**
1367
1370
  * Update a polygon column. Changing the `default` value will not update already existing rows.
1368
1371
  *
@@ -1370,7 +1373,7 @@ export declare class TablesDB {
1370
1373
  * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1371
1374
  * @param {string} params.key - Column Key.
1372
1375
  * @param {boolean} params.required - Is column required?
1373
- * @param {any[]} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
1376
+ * @param {any[][]} params.xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
1374
1377
  * @param {string} params.newKey - New Column Key.
1375
1378
  * @throws {AppwriteException}
1376
1379
  * @returns {Promise<Models.ColumnPolygon>}
@@ -1380,7 +1383,7 @@ export declare class TablesDB {
1380
1383
  tableId: string;
1381
1384
  key: string;
1382
1385
  required: boolean;
1383
- xdefault?: any[];
1386
+ xdefault?: any[][];
1384
1387
  newKey?: string;
1385
1388
  }): Promise<Models.ColumnPolygon>;
1386
1389
  /**
@@ -1390,13 +1393,13 @@ export declare class TablesDB {
1390
1393
  * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1391
1394
  * @param {string} key - Column Key.
1392
1395
  * @param {boolean} required - Is column required?
1393
- * @param {any[]} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
1396
+ * @param {any[][]} xdefault - Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
1394
1397
  * @param {string} newKey - New Column Key.
1395
1398
  * @throws {AppwriteException}
1396
1399
  * @returns {Promise<Models.ColumnPolygon>}
1397
1400
  * @deprecated Use the object parameter style method for a better developer experience.
1398
1401
  */
1399
- updatePolygonColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[], newKey?: string): Promise<Models.ColumnPolygon>;
1402
+ updatePolygonColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: any[][], newKey?: string): Promise<Models.ColumnPolygon>;
1400
1403
  /**
1401
1404
  * Create relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
1402
1405
  *
@@ -4,47 +4,125 @@ export declare class Usage {
4
4
  client: Client;
5
5
  constructor(client: Client);
6
6
  /**
7
- * Query usage event metrics from the usage database. Returns individual event rows with full metadata. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, path, method, status, resource, resourceId, country, userAgent, time (these match the underlying column names — note that the response surfaces `resource` as `resourceType` and `country` as `countryCode`). When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable — pass `total=false` to skip the count entirely.
7
+ * Aggregate usage event metrics. `metric` is required.
8
8
  *
9
- * @param {string[]} params.queries - Array of query strings as JSON. Supported: equal("metric", [...]), equal("path", [...]), equal("method", [...]), equal("status", [...]), equal("resource", [...]), equal("resourceId", [...]), equal("country", [...]), equal("userAgent", [...]), greaterThanEqual("time", "..."), lessThanEqual("time", "..."), orderAsc("time"), orderDesc("time"), limit(N), offset(N).
10
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
9
+ * **Two response shapes**:
10
+ * - Omit `interval` for a flat top-N table — one row per dimension combination, no time axis. Useful for "top 10 paths by bandwidth in the last 7 days".
11
+ * - Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series — one row per (time bucket × dimension combination).
12
+ *
13
+ * `dimensions[]` breaks each row down by one or more attributes (service, path, status, country, …). `resource` and `resourceId` filter the underlying events. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N by aggregated value. When `startAt` is omitted, the default window adapts to `interval` (or 7d when interval is omitted).
14
+ *
15
+ * @param {string} params.metric - Metric name (required). Example: executions, network.requests.
16
+ * @param {string} params.resource - Resource type filter (singular form). Common values: function, site, database, bucket, file, webhook, team, user, project.
17
+ * @param {string} params.resourceId - Resource id filter.
18
+ * @param {string} params.interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
19
+ * @param {string[]} params.dimensions - Break-down dimensions (max 10). Allowed: path, method, status, service, country, region, hostname, osName, clientType, clientName, deviceName, teamId, resourceId.
20
+ * @param {string} params.startAt - Range start in ISO 8601. Defaults adapt to interval (7d for the no-interval aggregate).
21
+ * @param {string} params.endAt - Range end in ISO 8601. Defaults to the current time.
22
+ * @param {string} params.orderBy - Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.
23
+ * @param {string} params.orderDir - Sort direction: asc or desc. Default desc — paired with the default limit, returns the most recent / highest-value groups first.
24
+ * @param {number} params.limit - Maximum rows to return (1-5000).
25
+ * @param {number} params.offset - Pagination offset (0-100000).
11
26
  * @throws {AppwriteException}
12
27
  * @returns {Promise<Models.UsageEventList>}
13
28
  */
14
- listEvents(params?: {
15
- queries?: string[];
16
- total?: boolean;
29
+ listEvents(params: {
30
+ metric: string;
31
+ resource?: string;
32
+ resourceId?: string;
33
+ interval?: string;
34
+ dimensions?: string[];
35
+ startAt?: string;
36
+ endAt?: string;
37
+ orderBy?: string;
38
+ orderDir?: string;
39
+ limit?: number;
40
+ offset?: number;
17
41
  }): Promise<Models.UsageEventList>;
18
42
  /**
19
- * Query usage event metrics from the usage database. Returns individual event rows with full metadata. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, path, method, status, resource, resourceId, country, userAgent, time (these match the underlying column names — note that the response surfaces `resource` as `resourceType` and `country` as `countryCode`). When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable — pass `total=false` to skip the count entirely.
43
+ * Aggregate usage event metrics. `metric` is required.
44
+ *
45
+ * **Two response shapes**:
46
+ * - Omit `interval` for a flat top-N table — one row per dimension combination, no time axis. Useful for "top 10 paths by bandwidth in the last 7 days".
47
+ * - Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series — one row per (time bucket × dimension combination).
48
+ *
49
+ * `dimensions[]` breaks each row down by one or more attributes (service, path, status, country, …). `resource` and `resourceId` filter the underlying events. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N by aggregated value. When `startAt` is omitted, the default window adapts to `interval` (or 7d when interval is omitted).
20
50
  *
21
- * @param {string[]} queries - Array of query strings as JSON. Supported: equal("metric", [...]), equal("path", [...]), equal("method", [...]), equal("status", [...]), equal("resource", [...]), equal("resourceId", [...]), equal("country", [...]), equal("userAgent", [...]), greaterThanEqual("time", "..."), lessThanEqual("time", "..."), orderAsc("time"), orderDesc("time"), limit(N), offset(N).
22
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
51
+ * @param {string} metric - Metric name (required). Example: executions, network.requests.
52
+ * @param {string} resource - Resource type filter (singular form). Common values: function, site, database, bucket, file, webhook, team, user, project.
53
+ * @param {string} resourceId - Resource id filter.
54
+ * @param {string} interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
55
+ * @param {string[]} dimensions - Break-down dimensions (max 10). Allowed: path, method, status, service, country, region, hostname, osName, clientType, clientName, deviceName, teamId, resourceId.
56
+ * @param {string} startAt - Range start in ISO 8601. Defaults adapt to interval (7d for the no-interval aggregate).
57
+ * @param {string} endAt - Range end in ISO 8601. Defaults to the current time.
58
+ * @param {string} orderBy - Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.
59
+ * @param {string} orderDir - Sort direction: asc or desc. Default desc — paired with the default limit, returns the most recent / highest-value groups first.
60
+ * @param {number} limit - Maximum rows to return (1-5000).
61
+ * @param {number} offset - Pagination offset (0-100000).
23
62
  * @throws {AppwriteException}
24
63
  * @returns {Promise<Models.UsageEventList>}
25
64
  * @deprecated Use the object parameter style method for a better developer experience.
26
65
  */
27
- listEvents(queries?: string[], total?: boolean): Promise<Models.UsageEventList>;
66
+ listEvents(metric: string, resource?: string, resourceId?: string, interval?: string, dimensions?: string[], startAt?: string, endAt?: string, orderBy?: string, orderDir?: string, limit?: number, offset?: number): Promise<Models.UsageEventList>;
28
67
  /**
29
- * Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc("time"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable — pass `total=false` to skip the count entirely.
68
+ * Aggregate usage gauge snapshots. Gauges are point-in-time values (storage totals, resource counts, …); each group carries the latest snapshot in its interval via `argMax(value, time)`. `metric` is required.
30
69
  *
31
- * @param {string[]} params.queries - Array of query strings as JSON. Supported: equal("metric", [...]), greaterThanEqual("time", "..."), lessThanEqual("time", "..."), orderAsc("time"), orderDesc("time"), limit(N), offset(N).
32
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
70
+ * **Two response shapes**:
71
+ * - Omit `interval` for a flat top-N table — `argMax(value, time)` per dimension combination over the whole window, no time axis. Useful for "top 10 resources by current storage".
72
+ * - Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series — one snapshot per (time bucket × dimension combination).
73
+ *
74
+ * `dimensions[]` breaks each row down further — only `resourceId` and `teamId` are supported on gauges. `resourceId` and `teamId` parameters filter the underlying rows. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N. When `startAt` is omitted, the default window adapts to interval (or 7d when interval is omitted).
75
+ *
76
+ * @param {string} params.metric - Metric name (required). Example: files.storage, deployments.storage.
77
+ * @param {string} params.resourceId - Resource id filter.
78
+ * @param {string} params.teamId - Team id filter.
79
+ * @param {string} params.interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
80
+ * @param {string[]} params.dimensions - Break-down dimensions. Allowed: resourceId, teamId.
81
+ * @param {string} params.startAt - Range start in ISO 8601. Defaults to endAt - 7d.
82
+ * @param {string} params.endAt - Range end in ISO 8601. Defaults to the current time.
83
+ * @param {string} params.orderBy - Column to order by. Allowed: time, value. Default time.
84
+ * @param {string} params.orderDir - Sort direction: asc or desc. Default desc — paired with the default limit, this returns the most recent groups first. Pass asc for chronological charting.
85
+ * @param {number} params.limit - Maximum rows to return (1-5000).
86
+ * @param {number} params.offset - Pagination offset (0-100000).
33
87
  * @throws {AppwriteException}
34
88
  * @returns {Promise<Models.UsageGaugeList>}
35
89
  */
36
- listGauges(params?: {
37
- queries?: string[];
38
- total?: boolean;
90
+ listGauges(params: {
91
+ metric: string;
92
+ resourceId?: string;
93
+ teamId?: string;
94
+ interval?: string;
95
+ dimensions?: string[];
96
+ startAt?: string;
97
+ endAt?: string;
98
+ orderBy?: string;
99
+ orderDir?: string;
100
+ limit?: number;
101
+ offset?: number;
39
102
  }): Promise<Models.UsageGaugeList>;
40
103
  /**
41
- * Query usage gauge metrics (point-in-time resource snapshots) from the usage database. Returns individual gauge snapshots with metric, value, timestamp, resourceType, and resourceId. Pass Query objects as JSON strings to filter, paginate, and order results. Supported query methods: equal, greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset. Supported filter attributes: metric, time. Use `orderDesc("time"), limit(1)` to fetch the most recent snapshot. When no time filter is supplied the endpoint defaults to the last 7 days. Default `limit(100)` is applied if none is given; user-supplied limits are capped at 500. The `total` field is capped at 5000 to keep counts predictable — pass `total=false` to skip the count entirely.
104
+ * Aggregate usage gauge snapshots. Gauges are point-in-time values (storage totals, resource counts, …); each group carries the latest snapshot in its interval via `argMax(value, time)`. `metric` is required.
105
+ *
106
+ * **Two response shapes**:
107
+ * - Omit `interval` for a flat top-N table — `argMax(value, time)` per dimension combination over the whole window, no time axis. Useful for "top 10 resources by current storage".
108
+ * - Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series — one snapshot per (time bucket × dimension combination).
109
+ *
110
+ * `dimensions[]` breaks each row down further — only `resourceId` and `teamId` are supported on gauges. `resourceId` and `teamId` parameters filter the underlying rows. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N. When `startAt` is omitted, the default window adapts to interval (or 7d when interval is omitted).
42
111
  *
43
- * @param {string[]} queries - Array of query strings as JSON. Supported: equal("metric", [...]), greaterThanEqual("time", "..."), lessThanEqual("time", "..."), orderAsc("time"), orderDesc("time"), limit(N), offset(N).
44
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
112
+ * @param {string} metric - Metric name (required). Example: files.storage, deployments.storage.
113
+ * @param {string} resourceId - Resource id filter.
114
+ * @param {string} teamId - Team id filter.
115
+ * @param {string} interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
116
+ * @param {string[]} dimensions - Break-down dimensions. Allowed: resourceId, teamId.
117
+ * @param {string} startAt - Range start in ISO 8601. Defaults to endAt - 7d.
118
+ * @param {string} endAt - Range end in ISO 8601. Defaults to the current time.
119
+ * @param {string} orderBy - Column to order by. Allowed: time, value. Default time.
120
+ * @param {string} orderDir - Sort direction: asc or desc. Default desc — paired with the default limit, this returns the most recent groups first. Pass asc for chronological charting.
121
+ * @param {number} limit - Maximum rows to return (1-5000).
122
+ * @param {number} offset - Pagination offset (0-100000).
45
123
  * @throws {AppwriteException}
46
124
  * @returns {Promise<Models.UsageGaugeList>}
47
125
  * @deprecated Use the object parameter style method for a better developer experience.
48
126
  */
49
- listGauges(queries?: string[], total?: boolean): Promise<Models.UsageGaugeList>;
127
+ listGauges(metric: string, resourceId?: string, teamId?: string, interval?: string, dimensions?: string[], startAt?: string, endAt?: string, orderBy?: string, orderDir?: string, limit?: number, offset?: number): Promise<Models.UsageGaugeList>;
50
128
  }
@@ -36,6 +36,7 @@ export declare class VectorsDB {
36
36
  * @param {string} params.databaseId - 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.
37
37
  * @param {string} params.name - Database name. Max length: 128 chars.
38
38
  * @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
39
+ * @param {string} params.dedicatedDatabaseId - Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.
39
40
  * @throws {AppwriteException}
40
41
  * @returns {Promise<Models.Database>}
41
42
  */
@@ -43,6 +44,7 @@ export declare class VectorsDB {
43
44
  databaseId: string;
44
45
  name: string;
45
46
  enabled?: boolean;
47
+ dedicatedDatabaseId?: string;
46
48
  }): Promise<Models.Database>;
47
49
  /**
48
50
  * Create a new Database.
@@ -51,11 +53,12 @@ export declare class VectorsDB {
51
53
  * @param {string} databaseId - 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.
52
54
  * @param {string} name - Database name. Max length: 128 chars.
53
55
  * @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
56
+ * @param {string} dedicatedDatabaseId - Optional dedicated database (compute) ID to attach this database to. Leave empty to create a database on the shared pool.
54
57
  * @throws {AppwriteException}
55
58
  * @returns {Promise<Models.Database>}
56
59
  * @deprecated Use the object parameter style method for a better developer experience.
57
60
  */
58
- create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
61
+ create(databaseId: string, name: string, enabled?: boolean, dedicatedDatabaseId?: string): Promise<Models.Database>;
59
62
  /**
60
63
  * 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.
61
64
  *