@cubos/agent-sdk 0.0.1152175 → 0.0.1152796
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.
- package/dist/admin/index.d.ts +3 -3
- package/dist/admin/metrics.d.ts +172 -0
- package/dist/generated/schema.d.ts +643 -345
- package/dist/index.d.ts +1 -2
- package/dist/index.js +73 -44
- package/dist/index.js.map +6 -6
- package/package.json +1 -1
- package/dist/admin/cost-metrics.d.ts +0 -61
package/package.json
CHANGED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { Transport } from "../http.js";
|
|
2
|
-
import type { Schemas } from "../schemas.js";
|
|
3
|
-
export type CostMetrics = Schemas["CostMetrics"];
|
|
4
|
-
export type CostDimension = Schemas["CostDimension"];
|
|
5
|
-
export type CostGranularity = Schemas["CostGranularity"];
|
|
6
|
-
/** Filter value selecting the spend where a dimension is empty — no user, no
|
|
7
|
-
* agent, no provider. Pass `null` in a filter list and it is sent as this. */
|
|
8
|
-
export declare const COST_NONE = "__none__";
|
|
9
|
-
export interface CostMetricsQuery {
|
|
10
|
-
/** Inclusive start. Defaults to 30 days before `to`. */
|
|
11
|
-
from?: Date | string;
|
|
12
|
-
/** Exclusive end. Defaults to now. */
|
|
13
|
-
to?: Date | string;
|
|
14
|
-
granularity?: CostGranularity;
|
|
15
|
-
/** IANA zone the buckets are cut in. Defaults to UTC. */
|
|
16
|
-
timezone?: string;
|
|
17
|
-
groupBy?: CostDimension[];
|
|
18
|
-
/** Per dimension, the values to keep; `null` keeps the spend with none.
|
|
19
|
-
* `tenant` only applies to the whole-instance route. */
|
|
20
|
-
filters?: Partial<Record<CostDimension, (string | null)[]>>;
|
|
21
|
-
}
|
|
22
|
-
/** Spend over time across the whole instance. Root only. */
|
|
23
|
-
export declare function instanceCostMetricsApi(t: Transport): {
|
|
24
|
-
get: (query?: CostMetricsQuery, signal?: AbortSignal) => Promise<{
|
|
25
|
-
backfill_cutover: string | null;
|
|
26
|
-
backfill_pending: boolean;
|
|
27
|
-
buckets: string[];
|
|
28
|
-
facets: import("../generated/schema.js").components["schemas"]["CostFacets"];
|
|
29
|
-
from: string;
|
|
30
|
-
granularity: import("../generated/schema.js").components["schemas"]["CostGranularity"];
|
|
31
|
-
group_by: import("../generated/schema.js").components["schemas"]["CostDimension"][];
|
|
32
|
-
groups: import("../generated/schema.js").components["schemas"]["CostGroup"][];
|
|
33
|
-
groups_truncated: boolean;
|
|
34
|
-
labels: import("../generated/schema.js").components["schemas"]["CostLabels"];
|
|
35
|
-
series: import("../generated/schema.js").components["schemas"]["CostSeriesPoint"][];
|
|
36
|
-
timezone: string;
|
|
37
|
-
to: string;
|
|
38
|
-
totals: import("../generated/schema.js").components["schemas"]["CostMeasures"];
|
|
39
|
-
unclassified_tokens: number;
|
|
40
|
-
}>;
|
|
41
|
-
};
|
|
42
|
-
/** One tenant's spend over time. Needs `conversations:read`. */
|
|
43
|
-
export declare function costMetricsApi(t: Transport, tenantSlug: string): {
|
|
44
|
-
get: (query?: CostMetricsQuery, signal?: AbortSignal) => Promise<{
|
|
45
|
-
backfill_cutover: string | null;
|
|
46
|
-
backfill_pending: boolean;
|
|
47
|
-
buckets: string[];
|
|
48
|
-
facets: import("../generated/schema.js").components["schemas"]["CostFacets"];
|
|
49
|
-
from: string;
|
|
50
|
-
granularity: import("../generated/schema.js").components["schemas"]["CostGranularity"];
|
|
51
|
-
group_by: import("../generated/schema.js").components["schemas"]["CostDimension"][];
|
|
52
|
-
groups: import("../generated/schema.js").components["schemas"]["CostGroup"][];
|
|
53
|
-
groups_truncated: boolean;
|
|
54
|
-
labels: import("../generated/schema.js").components["schemas"]["CostLabels"];
|
|
55
|
-
series: import("../generated/schema.js").components["schemas"]["CostSeriesPoint"][];
|
|
56
|
-
timezone: string;
|
|
57
|
-
to: string;
|
|
58
|
-
totals: import("../generated/schema.js").components["schemas"]["CostMeasures"];
|
|
59
|
-
unclassified_tokens: number;
|
|
60
|
-
}>;
|
|
61
|
-
};
|