@appwrite.io/console 15.0.0 → 15.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.
@@ -4,15 +4,15 @@ export declare class Usage {
4
4
  client: Client;
5
5
  constructor(client: Client);
6
6
  /**
7
- * Aggregate usage event metrics. `metric` is required.
7
+ * Aggregate usage event metrics. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.
8
8
  *
9
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).
10
+ * - Omit `interval` for a flat top-N table — one point 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 point per (time bucket × dimension combination).
12
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).
13
+ * `dimensions[]` breaks each point down by one or more attributes (service, path, status, country, …). Pass multiple metrics to render stacked charts in one round-trip. `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
14
  *
15
- * @param {string} params.metric - Metric name (required). Example: executions, network.requests.
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.
16
16
  * @param {string} params.resource - Resource type filter (singular form). Common values: function, site, database, bucket, file, webhook, team, user, project.
17
17
  * @param {string} params.resourceId - Resource id filter.
18
18
  * @param {string} params.interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
@@ -27,7 +27,7 @@ export declare class Usage {
27
27
  * @returns {Promise<Models.UsageEventList>}
28
28
  */
29
29
  listEvents(params: {
30
- metric: string;
30
+ metrics: string[];
31
31
  resource?: string;
32
32
  resourceId?: string;
33
33
  interval?: string;
@@ -40,15 +40,15 @@ export declare class Usage {
40
40
  offset?: number;
41
41
  }): Promise<Models.UsageEventList>;
42
42
  /**
43
- * Aggregate usage event metrics. `metric` is required.
43
+ * Aggregate usage event metrics. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.
44
44
  *
45
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).
46
+ * - Omit `interval` for a flat top-N table — one point 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 point per (time bucket × dimension combination).
48
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).
49
+ * `dimensions[]` breaks each point down by one or more attributes (service, path, status, country, …). Pass multiple metrics to render stacked charts in one round-trip. `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).
50
50
  *
51
- * @param {string} metric - Metric name (required). Example: executions, network.requests.
51
+ * @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.
52
52
  * @param {string} resource - Resource type filter (singular form). Common values: function, site, database, bucket, file, webhook, team, user, project.
53
53
  * @param {string} resourceId - Resource id filter.
54
54
  * @param {string} interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
@@ -63,21 +63,21 @@ export declare class Usage {
63
63
  * @returns {Promise<Models.UsageEventList>}
64
64
  * @deprecated Use the object parameter style method for a better developer experience.
65
65
  */
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>;
66
+ listEvents(metrics: string[], resource?: string, resourceId?: string, interval?: string, dimensions?: string[], startAt?: string, endAt?: string, orderBy?: string, orderDir?: string, limit?: number, offset?: number): Promise<Models.UsageEventList>;
67
67
  /**
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.
68
+ * 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.
69
69
  *
70
70
  * **Two response shapes**:
71
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
72
  * - Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series — one snapshot per (time bucket × dimension combination).
73
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).
74
+ * `dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resource`. `service` and `resource` enable per-service / per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). Pass multiple metrics to render stacked charts in one round-trip. `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
75
  *
76
- * @param {string} params.metric - Metric name (required). Example: files.storage, deployments.storage.
76
+ * @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.
77
77
  * @param {string} params.resourceId - Resource id filter.
78
78
  * @param {string} params.teamId - Team id filter.
79
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.
80
+ * @param {string[]} params.dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resource.
81
81
  * @param {string} params.startAt - Range start in ISO 8601. Defaults to endAt - 7d.
82
82
  * @param {string} params.endAt - Range end in ISO 8601. Defaults to the current time.
83
83
  * @param {string} params.orderBy - Column to order by. Allowed: time, value. Default time.
@@ -88,7 +88,7 @@ export declare class Usage {
88
88
  * @returns {Promise<Models.UsageGaugeList>}
89
89
  */
90
90
  listGauges(params: {
91
- metric: string;
91
+ metrics: string[];
92
92
  resourceId?: string;
93
93
  teamId?: string;
94
94
  interval?: string;
@@ -101,19 +101,19 @@ export declare class Usage {
101
101
  offset?: number;
102
102
  }): Promise<Models.UsageGaugeList>;
103
103
  /**
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.
104
+ * 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.
105
105
  *
106
106
  * **Two response shapes**:
107
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
108
  * - Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series — one snapshot per (time bucket × dimension combination).
109
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).
110
+ * `dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resource`. `service` and `resource` enable per-service / per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). Pass multiple metrics to render stacked charts in one round-trip. `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).
111
111
  *
112
- * @param {string} metric - Metric name (required). Example: files.storage, deployments.storage.
112
+ * @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.
113
113
  * @param {string} resourceId - Resource id filter.
114
114
  * @param {string} teamId - Team id filter.
115
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.
116
+ * @param {string[]} dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resource.
117
117
  * @param {string} startAt - Range start in ISO 8601. Defaults to endAt - 7d.
118
118
  * @param {string} endAt - Range end in ISO 8601. Defaults to the current time.
119
119
  * @param {string} orderBy - Column to order by. Allowed: time, value. Default time.
@@ -124,5 +124,5 @@ export declare class Usage {
124
124
  * @returns {Promise<Models.UsageGaugeList>}
125
125
  * @deprecated Use the object parameter style method for a better developer experience.
126
126
  */
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>;
127
+ listGauges(metrics: string[], resourceId?: string, teamId?: string, interval?: string, dimensions?: string[], startAt?: string, endAt?: string, orderBy?: string, orderDir?: string, limit?: number, offset?: number): Promise<Models.UsageGaugeList>;
128
128
  }