@naturali/sdk 0.125.0 → 0.126.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.
- package/dist/index.cjs +28 -0
- package/dist/index.d.cts +395 -1
- package/dist/index.d.mts +395 -1
- package/dist/index.mjs +28 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3648,6 +3648,34 @@ var Projects = class {
|
|
|
3648
3648
|
...options
|
|
3649
3649
|
});
|
|
3650
3650
|
}
|
|
3651
|
+
/**
|
|
3652
|
+
* List project usage events
|
|
3653
|
+
*
|
|
3654
|
+
* The rows a rollup summed — one per metered occurrence, most recent first. Takes the same narrowings [the meter](/docs/api/projects/get-project-usage) does, so a query that produced a bucket answers here unchanged and reads back what went into it. This is the audit and reconciliation view: what was measured, when, against which agent, session, actor and provider, and what each component was priced at.
|
|
3655
|
+
*
|
|
3656
|
+
* An id naming nothing in this project yields an empty page rather than dropping the filter, so a mistyped narrowing can never widen the list past what was asked for.
|
|
3657
|
+
*
|
|
3658
|
+
*/
|
|
3659
|
+
static listProjectUsageEvents(options) {
|
|
3660
|
+
return (options.client ?? client).get({
|
|
3661
|
+
url: "/v1/projects/{project_id}/usage/events",
|
|
3662
|
+
...options
|
|
3663
|
+
});
|
|
3664
|
+
}
|
|
3665
|
+
/**
|
|
3666
|
+
* Get a generation or orchestration-run billing receipt
|
|
3667
|
+
*
|
|
3668
|
+
* What one occurrence was billed, line by line: per-event line items with their measured components and unit prices, a per-meter-type split, and the totals. Pass generation_id for one generation, or orchestration_run_id for a receipt summed across every event the run metered. Exactly one of the two is required.
|
|
3669
|
+
*
|
|
3670
|
+
* This is the itemisation behind a single number — where [the meter](/docs/api/projects/get-project-usage) says a window cost $12.40, a receipt says which components of which call made up one occurrence of it. On an orchestration-run receipt every line carries node_id, so grouping by it gives the per-node cost the total hides; a retried node contributes one line per attempt, which is the intended reading for spend.
|
|
3671
|
+
*
|
|
3672
|
+
*/
|
|
3673
|
+
static getProjectUsageReceipt(options) {
|
|
3674
|
+
return (options.client ?? client).get({
|
|
3675
|
+
url: "/v1/projects/{project_id}/usage/receipt",
|
|
3676
|
+
...options
|
|
3677
|
+
});
|
|
3678
|
+
}
|
|
3651
3679
|
};
|
|
3652
3680
|
var Quotas = class {
|
|
3653
3681
|
/**
|