@appwrite.io/console 15.8.0 → 16.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.
@@ -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
+ }
@@ -0,0 +1,31 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ import { EmbeddingModel } from '../enums/embedding-model';
4
+ export declare class Embeddings {
5
+ client: Client;
6
+ constructor(client: Client);
7
+ /**
8
+ * Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.
9
+ *
10
+ *
11
+ * @param {string[]} params.texts - Array of text to generate embeddings.
12
+ * @param {EmbeddingModel} params.model - The embedding model to use for generating vector embeddings.
13
+ * @throws {AppwriteException}
14
+ * @returns {Promise<Models.EmbeddingList>}
15
+ */
16
+ createTextEmbeddings(params: {
17
+ texts: string[];
18
+ model?: EmbeddingModel;
19
+ }): Promise<Models.EmbeddingList>;
20
+ /**
21
+ * Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.
22
+ *
23
+ *
24
+ * @param {string[]} texts - Array of text to generate embeddings.
25
+ * @param {EmbeddingModel} model - The embedding model to use for generating vector embeddings.
26
+ * @throws {AppwriteException}
27
+ * @returns {Promise<Models.EmbeddingList>}
28
+ * @deprecated Use the object parameter style method for a better developer experience.
29
+ */
30
+ createTextEmbeddings(texts: string[], model?: EmbeddingModel): Promise<Models.EmbeddingList>;
31
+ }
@@ -1,10 +1,40 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
+ import { InvalidationType } from '../enums/invalidation-type';
3
4
  import { StatusCode } from '../enums/status-code';
4
5
  import { ProxyResourceType } from '../enums/proxy-resource-type';
5
6
  export declare class Proxy {
6
7
  client: Client;
7
8
  constructor(client: Client);
9
+ /**
10
+ * Create a new CDN cache invalidation for a domain. Executes a hard purge of cached content.
11
+ *
12
+ * Depending on type, the invalidation purges a single cache tag, a single URL path, or all cached content for the domain.
13
+ *
14
+ * @param {string} params.domain - Domain name.
15
+ * @param {InvalidationType} params.type - Type of reference passed. Allowed values are: tag, path, all
16
+ * @param {string} params.reference - Reference to invalidate. Depending on type this can be: cache tag name (up to 128 characters), URL path (up to 2048 characters). Not required when type is all.
17
+ * @throws {AppwriteException}
18
+ * @returns {Promise<Models.ProxyInvalidation>}
19
+ */
20
+ createInvalidation(params: {
21
+ domain: string;
22
+ type: InvalidationType;
23
+ reference?: string;
24
+ }): Promise<Models.ProxyInvalidation>;
25
+ /**
26
+ * Create a new CDN cache invalidation for a domain. Executes a hard purge of cached content.
27
+ *
28
+ * Depending on type, the invalidation purges a single cache tag, a single URL path, or all cached content for the domain.
29
+ *
30
+ * @param {string} domain - Domain name.
31
+ * @param {InvalidationType} type - Type of reference passed. Allowed values are: tag, path, all
32
+ * @param {string} reference - Reference to invalidate. Depending on type this can be: cache tag name (up to 128 characters), URL path (up to 2048 characters). Not required when type is all.
33
+ * @throws {AppwriteException}
34
+ * @returns {Promise<Models.ProxyInvalidation>}
35
+ * @deprecated Use the object parameter style method for a better developer experience.
36
+ */
37
+ createInvalidation(domain: string, type: InvalidationType, reference?: string): Promise<Models.ProxyInvalidation>;
8
38
  /**
9
39
  * Get a list of all the proxy rules. You can use the query params to filter your results.
10
40
  *
@@ -1,5 +1,10 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
+ import { UsageInterval } from '../enums/usage-interval';
4
+ import { UsageEventDimension } from '../enums/usage-event-dimension';
5
+ import { UsageOrderBy } from '../enums/usage-order-by';
6
+ import { UsageOrderDirection } from '../enums/usage-order-direction';
7
+ import { UsageGaugeDimension } from '../enums/usage-gauge-dimension';
3
8
  export declare class Usage {
4
9
  client: Client;
5
10
  constructor(client: Client);
@@ -12,14 +17,14 @@ export declare class Usage {
12
17
  *
13
18
  * `dimensions[]` breaks each point down by one or more attributes (service, path, status, country, …). `queries[]` filters the underlying events using the standard Utopia query syntax — `equal("path", ["/v1/storage/files"])`, `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `startsWith("path", ["/v1/storage"])`, `equal("status", ["200", "201"])`, `isNotNull("resourceId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `contains`, `startsWith`, `endsWith`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `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
19
  *
15
- * @param {string[]} params.metrics - One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=executions` or `metrics[]=executions&metrics[]=executions.compute` for stacked charts.
20
+ * @param {string[]} params.metrics - One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=executions` or `metrics[]=executions&metrics[]=executions.compute` for stacked charts. On console: `metrics[]=affiliates.clicks`.
16
21
  * @param {string[]} params.queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: path, method, status, service, resourceType, resourceId, teamId, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion. Allowed methods: equal, notEqual, contains, startsWith, endsWith, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
17
- * @param {string} params.interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
18
- * @param {string[]} params.dimensions - Break-down dimensions (max 10). Allowed: path, method, status, service, resourceType, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, teamId, resourceId.
22
+ * @param {UsageInterval} params.interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
23
+ * @param {UsageEventDimension[]} params.dimensions - Break-down dimensions (max 10). Allowed: path, method, status, service, resourceType, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, teamId, resourceId.
19
24
  * @param {string} params.startAt - Range start in ISO 8601. Defaults adapt to interval (7d for the no-interval aggregate).
20
25
  * @param {string} params.endAt - Range end in ISO 8601. Defaults to the current time.
21
- * @param {string} params.orderBy - Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.
22
- * @param {string} params.orderDir - Sort direction: asc or desc. Default desc — paired with the default limit, returns the most recent / highest-value groups first.
26
+ * @param {UsageOrderBy} params.orderBy - Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.
27
+ * @param {UsageOrderDirection} params.orderDir - Sort direction: asc or desc. Default desc — paired with the default limit, returns the most recent / highest-value groups first.
23
28
  * @param {number} params.limit - Maximum rows to return (1-5000).
24
29
  * @param {number} params.offset - Pagination offset (0-100000).
25
30
  * @throws {AppwriteException}
@@ -28,12 +33,12 @@ export declare class Usage {
28
33
  listEvents(params: {
29
34
  metrics: string[];
30
35
  queries?: string[];
31
- interval?: string;
32
- dimensions?: string[];
36
+ interval?: UsageInterval;
37
+ dimensions?: UsageEventDimension[];
33
38
  startAt?: string;
34
39
  endAt?: string;
35
- orderBy?: string;
36
- orderDir?: string;
40
+ orderBy?: UsageOrderBy;
41
+ orderDir?: UsageOrderDirection;
37
42
  limit?: number;
38
43
  offset?: number;
39
44
  }): Promise<Models.UsageEventList>;
@@ -46,21 +51,21 @@ export declare class Usage {
46
51
  *
47
52
  * `dimensions[]` breaks each point down by one or more attributes (service, path, status, country, …). `queries[]` filters the underlying events using the standard Utopia query syntax — `equal("path", ["/v1/storage/files"])`, `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `startsWith("path", ["/v1/storage"])`, `equal("status", ["200", "201"])`, `isNotNull("resourceId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `contains`, `startsWith`, `endsWith`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `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).
48
53
  *
49
- * @param {string[]} metrics - One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=executions` or `metrics[]=executions&metrics[]=executions.compute` for stacked charts.
54
+ * @param {string[]} metrics - One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=executions` or `metrics[]=executions&metrics[]=executions.compute` for stacked charts. On console: `metrics[]=affiliates.clicks`.
50
55
  * @param {string[]} queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: path, method, status, service, resourceType, resourceId, teamId, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion. Allowed methods: equal, notEqual, contains, startsWith, endsWith, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
51
- * @param {string} interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
52
- * @param {string[]} dimensions - Break-down dimensions (max 10). Allowed: path, method, status, service, resourceType, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, teamId, resourceId.
56
+ * @param {UsageInterval} interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
57
+ * @param {UsageEventDimension[]} dimensions - Break-down dimensions (max 10). Allowed: path, method, status, service, resourceType, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, teamId, resourceId.
53
58
  * @param {string} startAt - Range start in ISO 8601. Defaults adapt to interval (7d for the no-interval aggregate).
54
59
  * @param {string} endAt - Range end in ISO 8601. Defaults to the current time.
55
- * @param {string} orderBy - Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.
56
- * @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 {UsageOrderBy} orderBy - Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.
61
+ * @param {UsageOrderDirection} orderDir - Sort direction: asc or desc. Default desc — paired with the default limit, returns the most recent / highest-value groups first.
57
62
  * @param {number} limit - Maximum rows to return (1-5000).
58
63
  * @param {number} offset - Pagination offset (0-100000).
59
64
  * @throws {AppwriteException}
60
65
  * @returns {Promise<Models.UsageEventList>}
61
66
  * @deprecated Use the object parameter style method for a better developer experience.
62
67
  */
63
- listEvents(metrics: string[], queries?: string[], interval?: string, dimensions?: string[], startAt?: string, endAt?: string, orderBy?: string, orderDir?: string, limit?: number, offset?: number): Promise<Models.UsageEventList>;
68
+ listEvents(metrics: string[], queries?: string[], interval?: UsageInterval, dimensions?: UsageEventDimension[], startAt?: string, endAt?: string, orderBy?: UsageOrderBy, orderDir?: UsageOrderDirection, limit?: number, offset?: number): Promise<Models.UsageEventList>;
64
69
  /**
65
70
  * Aggregate usage gauge snapshots. Gauges are point-in-time values (storage totals, resource counts, …); each point carries the latest snapshot in its interval via `argMax(value, time)`. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.
66
71
  *
@@ -70,16 +75,16 @@ export declare class Usage {
70
75
  * - 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".
71
76
  * - Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series — one snapshot per (time bucket × dimension combination).
72
77
  *
73
- * `dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resourceType`, `ordinal`. `service` and `resourceType` enable per-service / per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). `ordinal` separates per-node series for multi-node resources such as dedicated databases (0 is the primary; 1+ are replicas). `queries[]` filters the underlying rows using the standard Utopia query syntax — `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `equal("teamId", ["team_x"])`, `equal("ordinal", ["0"])`, `isNotNull("teamId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `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).
78
+ * `dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resourceType`, `ordinal`. `service` and `resourceType` enable per-service / per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). `ordinal` separates per-node series for multi-node resources such as dedicated databases. It is a stable per-node identity, not a role — ordinal 0 is the first member created, and a failover can leave the primary on any ordinal, so read the role from the database's replicas endpoint rather than inferring it here. `queries[]` filters the underlying rows using the standard Utopia query syntax — `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `equal("teamId", ["team_x"])`, `equal("ordinal", ["0"])`, `isNotNull("teamId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `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).
74
79
  *
75
80
  * @param {string[]} params.metrics - One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=files.storage` or `metrics[]=files.storage&metrics[]=deployments.storage` for stacked charts.
76
81
  * @param {string[]} params.queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: service, resourceType, resourceId, teamId, ordinal. Allowed methods: equal, notEqual, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
77
- * @param {string} params.interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
78
- * @param {string[]} params.dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resourceType, ordinal.
82
+ * @param {UsageInterval} params.interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
83
+ * @param {UsageGaugeDimension[]} params.dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resourceType, ordinal.
79
84
  * @param {string} params.startAt - Range start in ISO 8601. Defaults to endAt - 7d.
80
85
  * @param {string} params.endAt - Range end in ISO 8601. Defaults to the current time.
81
- * @param {string} params.orderBy - Column to order by. Allowed: time, value. Default time.
82
- * @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.
86
+ * @param {UsageOrderBy} params.orderBy - Column to order by. Allowed: time, value. Default time.
87
+ * @param {UsageOrderDirection} 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.
83
88
  * @param {number} params.limit - Maximum rows to return (1-5000).
84
89
  * @param {number} params.offset - Pagination offset (0-100000).
85
90
  * @throws {AppwriteException}
@@ -88,12 +93,12 @@ export declare class Usage {
88
93
  listGauges(params: {
89
94
  metrics: string[];
90
95
  queries?: string[];
91
- interval?: string;
92
- dimensions?: string[];
96
+ interval?: UsageInterval;
97
+ dimensions?: UsageGaugeDimension[];
93
98
  startAt?: string;
94
99
  endAt?: string;
95
- orderBy?: string;
96
- orderDir?: string;
100
+ orderBy?: UsageOrderBy;
101
+ orderDir?: UsageOrderDirection;
97
102
  limit?: number;
98
103
  offset?: number;
99
104
  }): Promise<Models.UsageGaugeList>;
@@ -106,21 +111,21 @@ export declare class Usage {
106
111
  * - 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".
107
112
  * - Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series — one snapshot per (time bucket × dimension combination).
108
113
  *
109
- * `dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resourceType`, `ordinal`. `service` and `resourceType` enable per-service / per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). `ordinal` separates per-node series for multi-node resources such as dedicated databases (0 is the primary; 1+ are replicas). `queries[]` filters the underlying rows using the standard Utopia query syntax — `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `equal("teamId", ["team_x"])`, `equal("ordinal", ["0"])`, `isNotNull("teamId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `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).
114
+ * `dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resourceType`, `ordinal`. `service` and `resourceType` enable per-service / per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). `ordinal` separates per-node series for multi-node resources such as dedicated databases. It is a stable per-node identity, not a role — ordinal 0 is the first member created, and a failover can leave the primary on any ordinal, so read the role from the database's replicas endpoint rather than inferring it here. `queries[]` filters the underlying rows using the standard Utopia query syntax — `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `equal("teamId", ["team_x"])`, `equal("ordinal", ["0"])`, `isNotNull("teamId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `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).
110
115
  *
111
116
  * @param {string[]} metrics - One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=files.storage` or `metrics[]=files.storage&metrics[]=deployments.storage` for stacked charts.
112
117
  * @param {string[]} queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: service, resourceType, resourceId, teamId, ordinal. Allowed methods: equal, notEqual, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
113
- * @param {string} interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
114
- * @param {string[]} dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resourceType, ordinal.
118
+ * @param {UsageInterval} interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
119
+ * @param {UsageGaugeDimension[]} dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resourceType, ordinal.
115
120
  * @param {string} startAt - Range start in ISO 8601. Defaults to endAt - 7d.
116
121
  * @param {string} endAt - Range end in ISO 8601. Defaults to the current time.
117
- * @param {string} orderBy - Column to order by. Allowed: time, value. Default time.
118
- * @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.
122
+ * @param {UsageOrderBy} orderBy - Column to order by. Allowed: time, value. Default time.
123
+ * @param {UsageOrderDirection} 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.
119
124
  * @param {number} limit - Maximum rows to return (1-5000).
120
125
  * @param {number} offset - Pagination offset (0-100000).
121
126
  * @throws {AppwriteException}
122
127
  * @returns {Promise<Models.UsageGaugeList>}
123
128
  * @deprecated Use the object parameter style method for a better developer experience.
124
129
  */
125
- listGauges(metrics: string[], queries?: string[], interval?: string, dimensions?: string[], startAt?: string, endAt?: string, orderBy?: string, orderDir?: string, limit?: number, offset?: number): Promise<Models.UsageGaugeList>;
130
+ listGauges(metrics: string[], queries?: string[], interval?: UsageInterval, dimensions?: UsageGaugeDimension[], startAt?: string, endAt?: string, orderBy?: UsageOrderBy, orderDir?: UsageOrderDirection, limit?: number, offset?: number): Promise<Models.UsageGaugeList>;
126
131
  }
@@ -1,6 +1,5 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
- import { EmbeddingModel } from '../enums/embedding-model';
4
3
  import { VectorsDBIndexType } from '../enums/vectors-db-index-type';
5
4
  import { OrderBy } from '../enums/order-by';
6
5
  export declare class VectorsDB {
@@ -64,30 +63,6 @@ export declare class VectorsDB {
64
63
  * @deprecated Use the object parameter style method for a better developer experience.
65
64
  */
66
65
  create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
67
- /**
68
- * Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.
69
- *
70
- *
71
- * @param {string[]} params.texts - Array of text to generate embeddings.
72
- * @param {EmbeddingModel} params.model - The embedding model to use for generating vector embeddings.
73
- * @throws {AppwriteException}
74
- * @returns {Promise<Models.EmbeddingList>}
75
- */
76
- createTextEmbeddings(params: {
77
- texts: string[];
78
- model?: EmbeddingModel;
79
- }): Promise<Models.EmbeddingList>;
80
- /**
81
- * Generate vector embeddings for an array of text using the selected embedding model. Use the returned vectors to power semantic search and similarity queries against your vector collections.
82
- *
83
- *
84
- * @param {string[]} texts - Array of text to generate embeddings.
85
- * @param {EmbeddingModel} model - The embedding model to use for generating vector embeddings.
86
- * @throws {AppwriteException}
87
- * @returns {Promise<Models.EmbeddingList>}
88
- * @deprecated Use the object parameter style method for a better developer experience.
89
- */
90
- createTextEmbeddings(texts: string[], model?: EmbeddingModel): Promise<Models.EmbeddingList>;
91
66
  /**
92
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.
93
68
  *