@soat/sdk 0.39.0 → 0.40.1
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/index.cjs +11 -11
- package/dist/index.d.cts +87 -78
- package/dist/index.d.mts +87 -78
- package/dist/index.mjs +11 -11
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3169,7 +3169,7 @@ var Projects = class {
|
|
|
3169
3169
|
/**
|
|
3170
3170
|
* Update a project
|
|
3171
3171
|
*
|
|
3172
|
-
* Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`
|
|
3172
|
+
* Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`max_orchestration_run_depth`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
|
|
3173
3173
|
*/
|
|
3174
3174
|
static updateProject(options) {
|
|
3175
3175
|
return (options.client ?? client).patch({
|
|
@@ -3880,28 +3880,28 @@ var Triggers = class {
|
|
|
3880
3880
|
};
|
|
3881
3881
|
var Usage = class {
|
|
3882
3882
|
/**
|
|
3883
|
-
* List usage
|
|
3883
|
+
* List usage events
|
|
3884
3884
|
*
|
|
3885
|
-
* Returns the raw usage
|
|
3885
|
+
* Returns the raw usage events the caller can access, most recent first, optionally filtered by agent, generation, trace, actor, session, or `source`. Each event is the per-generation token usage as reported by the provider, for audit and reconciliation.
|
|
3886
3886
|
*
|
|
3887
3887
|
*/
|
|
3888
|
-
static
|
|
3888
|
+
static listUsageEvents(options) {
|
|
3889
3889
|
return (options?.client ?? client).get({
|
|
3890
|
-
url: "/api/v1/usage/
|
|
3890
|
+
url: "/api/v1/usage/events",
|
|
3891
3891
|
...options
|
|
3892
3892
|
});
|
|
3893
3893
|
}
|
|
3894
3894
|
/**
|
|
3895
3895
|
* Get aggregated usage for a project
|
|
3896
3896
|
*
|
|
3897
|
-
* Returns a project's usage rolled up over an optional `[from, to]` time window, bucketed by a single dimension and optionally narrowed to one `meter_type`. Each group and the grand total carry an `event_count`, summed token counts, a measured `quantity` per component (so infra meters report their real amount, not zeros), and `cost_usd` (null when no event in the bucket was priced). This is the per-project cost-by-range/by-category query — a monthly figure without scanning raw
|
|
3897
|
+
* Returns a project's usage rolled up over an optional `[from, to]` time window, bucketed by a single dimension and optionally narrowed to one `meter_type`. Each group and the grand total carry an `event_count`, summed token counts, a measured `quantity` per component (so infra meters report their real amount, not zeros), and `cost_usd` (null when no event in the bucket was priced). This is the per-project cost-by-range/by-category query — a monthly figure without scanning raw usage events client-side.
|
|
3898
3898
|
*
|
|
3899
|
-
* `groups` is paginated. Its `total` is the number of distinct buckets in the window,
|
|
3899
|
+
* `groups` is paginated. Its `total` is the number of distinct buckets in the window — bucket cardinality, including a null bucket for the events the dimension does not apply to, and never a count of entities. To count entities, send `include=distinct` and read `totals.distinct`. `totals` always describes the whole window — never the page above it.
|
|
3900
3900
|
*
|
|
3901
3901
|
*/
|
|
3902
|
-
static
|
|
3902
|
+
static getUsageAggregate(options) {
|
|
3903
3903
|
return (options.client ?? client).get({
|
|
3904
|
-
url: "/api/v1/usage",
|
|
3904
|
+
url: "/api/v1/usage/aggregate",
|
|
3905
3905
|
...options
|
|
3906
3906
|
});
|
|
3907
3907
|
}
|
|
@@ -3946,9 +3946,9 @@ var Usage = class {
|
|
|
3946
3946
|
});
|
|
3947
3947
|
}
|
|
3948
3948
|
/**
|
|
3949
|
-
* Get a generation or run billing receipt
|
|
3949
|
+
* Get a generation or orchestration-run billing receipt
|
|
3950
3950
|
*
|
|
3951
|
-
* Returns a billing receipt. Pass generation_id for a per-generation receipt, or orchestration_run_id for a
|
|
3951
|
+
* Returns a billing receipt. Pass generation_id for a per-generation receipt, or orchestration_run_id for a receipt summed across the orchestration run's events — both share the same shape (per-model line items with tokens, the price-book version that priced them, and cost, plus totals). Exactly one of generation_id or orchestration_run_id must be supplied.
|
|
3952
3952
|
*
|
|
3953
3953
|
*/
|
|
3954
3954
|
static getUsageReceipt(options) {
|