@naturali/cli 0.123.1 → 0.125.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.mjs +144 -17
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region package.json
|
|
17
|
-
var version = "0.
|
|
17
|
+
var version = "0.125.0";
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
20
20
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -756,6 +756,9 @@ var Actors = class {
|
|
|
756
756
|
var Channels = class {
|
|
757
757
|
/**
|
|
758
758
|
* List addresses
|
|
759
|
+
*
|
|
760
|
+
* Every identifier this project has seen. An address appears the first time a message arrives from it, so this is what naturali has observed rather than a roster you maintain — most rows carry no `action` of their own and defer to the route table.
|
|
761
|
+
*
|
|
759
762
|
*/
|
|
760
763
|
static listAddresses(options) {
|
|
761
764
|
return (options.client ?? client).get({
|
|
@@ -777,6 +780,9 @@ var Channels = class {
|
|
|
777
780
|
}
|
|
778
781
|
/**
|
|
779
782
|
* Get an address
|
|
783
|
+
*
|
|
784
|
+
* Reads one identifier's own action, if it has one. An identifier naturali has never seen is a `404`; to set an action without knowing whether it exists, use [`PUT /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/set-address-action), which upserts.
|
|
785
|
+
*
|
|
780
786
|
*/
|
|
781
787
|
static getAddress(options) {
|
|
782
788
|
return (options.client ?? client).get({
|
|
@@ -826,6 +832,9 @@ var Channels = class {
|
|
|
826
832
|
}
|
|
827
833
|
/**
|
|
828
834
|
* List a channel's routes
|
|
835
|
+
*
|
|
836
|
+
* One channel's routes, newest first, `disabled` ones included — only `active` routes take part in resolution. For every route in the project in one read, use [`GET /v1/projects/{project_id}/channel-routes`](/docs/api/channel-routes/list-project-channel-routes).
|
|
837
|
+
*
|
|
829
838
|
*/
|
|
830
839
|
static listChannelRoutes(options) {
|
|
831
840
|
return (options.client ?? client).get({
|
|
@@ -851,6 +860,9 @@ var Channels = class {
|
|
|
851
860
|
}
|
|
852
861
|
/**
|
|
853
862
|
* Delete a route
|
|
863
|
+
*
|
|
864
|
+
* Conversations opened under this route keep its id and stay where they are; the next inbound resolves to the next most specific route, or the channel default, and opens a new conversation there. To stop a route from matching while keeping it readable, `PATCH` it to `status: disabled` instead.
|
|
865
|
+
*
|
|
854
866
|
*/
|
|
855
867
|
static deleteChannelRoute(options) {
|
|
856
868
|
return (options.client ?? client).delete({
|
|
@@ -860,6 +872,9 @@ var Channels = class {
|
|
|
860
872
|
}
|
|
861
873
|
/**
|
|
862
874
|
* Get a route
|
|
875
|
+
*
|
|
876
|
+
* A route id is only meaningful inside its own channel: the same id under another `channel_id` is a `404`. A conversation's `route_id` may instead be one of the two sentinels for the address's own action and the channel default — those name no route and are not readable here.
|
|
877
|
+
*
|
|
863
878
|
*/
|
|
864
879
|
static getChannelRoute(options) {
|
|
865
880
|
return (options.client ?? client).get({
|
|
@@ -948,6 +963,9 @@ var Channels = class {
|
|
|
948
963
|
}
|
|
949
964
|
/**
|
|
950
965
|
* Get a channel
|
|
966
|
+
*
|
|
967
|
+
* The channel's state, its transport modes and its default action. The access token is never returned — `has_credential` is all a read says about it.
|
|
968
|
+
*
|
|
951
969
|
*/
|
|
952
970
|
static getChannel(options) {
|
|
953
971
|
return (options.client ?? client).get({
|
|
@@ -1002,6 +1020,9 @@ var Channels = class {
|
|
|
1002
1020
|
}
|
|
1003
1021
|
/**
|
|
1004
1022
|
* Get a conversation
|
|
1023
|
+
*
|
|
1024
|
+
* Where the conversation points: the address it belongs to, the route (or sentinel) whose action opened it, and the runtime session it maps 1:1 to. The messages are not here — read them with [`GET /v1/projects/{project_id}/channels/{channel_id}/conversations/{conversation_id}/messages`](/docs/api/channels/list-channel-conversation-messages).
|
|
1025
|
+
*
|
|
1005
1026
|
*/
|
|
1006
1027
|
static getChannelConversation(options) {
|
|
1007
1028
|
return (options.client ?? client).get({
|
|
@@ -3234,6 +3255,9 @@ var Models = class {
|
|
|
3234
3255
|
}
|
|
3235
3256
|
/**
|
|
3236
3257
|
* Get a model
|
|
3258
|
+
*
|
|
3259
|
+
* `{model}` is naturali's own name for the model, the same value [`GET /v1/models`](/docs/api/models/list-models) returns — a vendor's invocation string is a `404`. A `deprecated` model still reads here, so a project already generating on one can see what happened to it.
|
|
3260
|
+
*
|
|
3237
3261
|
*/
|
|
3238
3262
|
static getModel(options) {
|
|
3239
3263
|
return (options.client ?? client).get({
|
|
@@ -3632,6 +3656,8 @@ var Projects = class {
|
|
|
3632
3656
|
*
|
|
3633
3657
|
* Every bucket also carries components — the amounts actually measured. The token counts describe LLM usage alone, so that is where a storage, api_request or compute_execution bucket reports its real quantity instead of zeroed token fields.
|
|
3634
3658
|
*
|
|
3659
|
+
* The rollup can also be narrowed to one session or one end user before it is bucketed. That is the question no dimension answers: group_by splits the project's whole spend, so "what did this conversation cost, per day" and "what has this end user spent across every session" are reachable only by narrowing. The narrowings intersect, apply to the totals as well as the buckets, and are echoed back complete — null for each one not applied — because a rollup of zeros is otherwise indistinguishable from a project that spent nothing.
|
|
3660
|
+
*
|
|
3635
3661
|
*/
|
|
3636
3662
|
static getProjectUsage(options) {
|
|
3637
3663
|
return (options.client ?? client).get({
|
|
@@ -3815,7 +3841,7 @@ var Sessions = class {
|
|
|
3815
3841
|
/**
|
|
3816
3842
|
* Get a session
|
|
3817
3843
|
*
|
|
3818
|
-
* Returns details of a single session, including a `usage` roll-up of what its generations cost. The listing omits `usage`; for a window,
|
|
3844
|
+
* Returns details of a single session, including a `usage` roll-up of what its generations cost. The listing omits `usage`; for a window, a split by day or model, or one end user across every session, narrow `GET /v1/projects/{project_id}/usage` with `session_id` / `actor_id` instead.
|
|
3819
3845
|
*/
|
|
3820
3846
|
static getSession(options) {
|
|
3821
3847
|
return (options.client ?? client).get({
|
|
@@ -4373,9 +4399,11 @@ var Users = class {
|
|
|
4373
4399
|
/**
|
|
4374
4400
|
* Get the current account's billing standing
|
|
4375
4401
|
*
|
|
4376
|
-
* The plan the account is on, how long its projects may keep content, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against.
|
|
4402
|
+
* The plan the account is on, how long its projects may keep content, how much indexed storage it is holding, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against.
|
|
4403
|
+
*
|
|
4404
|
+
* A managed-model generation is refused with `402 insufficient_credit` while `credit_balance_usd` is negative, and a feature or a resource count outside the plan is refused with `403`, as is a retention window wider than `retention_days` or an ingest past `storage_limit_gb`. Every refusal names what is missing; this is where the numbers behind them are read.
|
|
4377
4405
|
*
|
|
4378
|
-
*
|
|
4406
|
+
* Every figure here is a local read, which is what keeps this route cheap enough to poll — unlike `GET /v1/users/me/usage`, which asks the meter once per project.
|
|
4379
4407
|
*
|
|
4380
4408
|
* Answers for the caller's own account only, and always the account the credential resolves to — an API key answers for the user that minted it. The plan gating a *project* is that project's billing owner's, so a member of someone else's project reads their own rung here, not that project's.
|
|
4381
4409
|
*
|
|
@@ -4453,6 +4481,9 @@ var Webhooks = class {
|
|
|
4453
4481
|
}
|
|
4454
4482
|
/**
|
|
4455
4483
|
* Get a webhook
|
|
4484
|
+
*
|
|
4485
|
+
* The endpoint, the events it is subscribed to and whether deliveries are attempted. The signing secret is not returned: it is shown once by [`POST /v1/projects/{project_id}/webhooks`](/docs/api/webhooks/create-webhook) and again by [`POST /v1/projects/{project_id}/webhooks/{webhook_id}:rotate-secret`](/docs/api/webhooks/rotate-webhook-secret).
|
|
4486
|
+
*
|
|
4456
4487
|
*/
|
|
4457
4488
|
static getWebhook(options) {
|
|
4458
4489
|
return (options.client ?? client).get({
|
|
@@ -5586,7 +5617,7 @@ const routes = {
|
|
|
5586
5617
|
"list-addresses": {
|
|
5587
5618
|
serviceClass: "Channels",
|
|
5588
5619
|
operationId: "listAddresses",
|
|
5589
|
-
description: "
|
|
5620
|
+
description: "Every identifier this project has seen. An address appears the first time a message arrives from it, so this is what naturali has observed rather than a roster you maintain — most rows carry no `action` of their own and defer to the route table.",
|
|
5590
5621
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/addresses",
|
|
5591
5622
|
httpMethod: "get",
|
|
5592
5623
|
pathParams: ["project_id"],
|
|
@@ -5618,7 +5649,7 @@ const routes = {
|
|
|
5618
5649
|
"get-address": {
|
|
5619
5650
|
serviceClass: "Channels",
|
|
5620
5651
|
operationId: "getAddress",
|
|
5621
|
-
description: "
|
|
5652
|
+
description: "Reads one identifier's own action, if it has one. An identifier naturali has never seen is a `404`; to set an action without knowing whether it exists, use [`PUT /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/set-address-action), which upserts.",
|
|
5622
5653
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/addresses",
|
|
5623
5654
|
httpMethod: "get",
|
|
5624
5655
|
pathParams: ["project_id", "identifier"],
|
|
@@ -7964,7 +7995,7 @@ const routes = {
|
|
|
7964
7995
|
"list-channel-routes": {
|
|
7965
7996
|
serviceClass: "Channels",
|
|
7966
7997
|
operationId: "listChannelRoutes",
|
|
7967
|
-
description: "
|
|
7998
|
+
description: "One channel's routes, newest first, `disabled` ones included — only `active` routes take part in resolution. For every route in the project in one read, use [`GET /v1/projects/{project_id}/channel-routes`](/docs/api/channel-routes/list-project-channel-routes).",
|
|
7968
7999
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/channel-routes",
|
|
7969
8000
|
httpMethod: "get",
|
|
7970
8001
|
pathParams: ["project_id", "channel_id"],
|
|
@@ -8098,7 +8129,7 @@ const routes = {
|
|
|
8098
8129
|
"get-channel-route": {
|
|
8099
8130
|
serviceClass: "Channels",
|
|
8100
8131
|
operationId: "getChannelRoute",
|
|
8101
|
-
description: "
|
|
8132
|
+
description: "A route id is only meaningful inside its own channel: the same id under another `channel_id` is a `404`. A conversation's `route_id` may instead be one of the two sentinels for the address's own action and the channel default — those name no route and are not readable here.",
|
|
8102
8133
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/channel-routes",
|
|
8103
8134
|
httpMethod: "get",
|
|
8104
8135
|
pathParams: [
|
|
@@ -8240,7 +8271,7 @@ const routes = {
|
|
|
8240
8271
|
"delete-channel-route": {
|
|
8241
8272
|
serviceClass: "Channels",
|
|
8242
8273
|
operationId: "deleteChannelRoute",
|
|
8243
|
-
description: "
|
|
8274
|
+
description: "Conversations opened under this route keep its id and stay where they are; the next inbound resolves to the next most specific route, or the channel default, and opens a new conversation there. To stop a route from matching while keeping it readable, `PATCH` it to `status: disabled` instead.",
|
|
8244
8275
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/channel-routes",
|
|
8245
8276
|
httpMethod: "delete",
|
|
8246
8277
|
pathParams: [
|
|
@@ -8419,7 +8450,7 @@ const routes = {
|
|
|
8419
8450
|
"get-channel": {
|
|
8420
8451
|
serviceClass: "Channels",
|
|
8421
8452
|
operationId: "getChannel",
|
|
8422
|
-
description: "
|
|
8453
|
+
description: "The channel's state, its transport modes and its default action. The access token is never returned — `has_credential` is all a read says about it.",
|
|
8423
8454
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/channels",
|
|
8424
8455
|
httpMethod: "get",
|
|
8425
8456
|
pathParams: ["project_id", "channel_id"],
|
|
@@ -8619,7 +8650,7 @@ const routes = {
|
|
|
8619
8650
|
"get-channel-conversation": {
|
|
8620
8651
|
serviceClass: "Channels",
|
|
8621
8652
|
operationId: "getChannelConversation",
|
|
8622
|
-
description: "
|
|
8653
|
+
description: "Where the conversation points: the address it belongs to, the route (or sentinel) whose action opened it, and the runtime session it maps 1:1 to. The messages are not here — read them with [`GET /v1/projects/{project_id}/channels/{channel_id}/conversations/{conversation_id}/messages`](/docs/api/channels/list-channel-conversation-messages).",
|
|
8623
8654
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/channels",
|
|
8624
8655
|
httpMethod: "get",
|
|
8625
8656
|
pathParams: [
|
|
@@ -12693,7 +12724,7 @@ const routes = {
|
|
|
12693
12724
|
"get-model": {
|
|
12694
12725
|
serviceClass: "Models",
|
|
12695
12726
|
operationId: "getModel",
|
|
12696
|
-
description: "
|
|
12727
|
+
description: "`{model}` is naturali's own name for the model, the same value [`GET /v1/models`](/docs/api/models/list-models) returns — a vendor's invocation string is a `404`. A `deprecated` model still reads here, so a project already generating on one can see what happened to it.",
|
|
12697
12728
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/models",
|
|
12698
12729
|
httpMethod: "get",
|
|
12699
12730
|
pathParams: ["model"],
|
|
@@ -13580,13 +13611,25 @@ const routes = {
|
|
|
13580
13611
|
"get-project-usage": {
|
|
13581
13612
|
serviceClass: "Projects",
|
|
13582
13613
|
operationId: "getProjectUsage",
|
|
13583
|
-
description: "The per-project meter — the re-billing view (A11/C12/P3). Aggregates the project's usage over an optional [from, to] window, bucketed by a single dimension. Costs are the billing-grade cost_usd the runtime freezes at write time; null means nothing in the bucket was priced (never that it was free). Only managed providers are priced (on the runtime), so cost reflects managed usage; BYOK usage carries no LLM cost. Every bucket also carries components — the amounts actually measured. The token counts describe LLM usage alone, so that is where a storage, api_request or compute_execution bucket reports its real quantity instead of zeroed token fields.",
|
|
13614
|
+
description: "The per-project meter — the re-billing view (A11/C12/P3). Aggregates the project's usage over an optional [from, to] window, bucketed by a single dimension. Costs are the billing-grade cost_usd the runtime freezes at write time; null means nothing in the bucket was priced (never that it was free). Only managed providers are priced (on the runtime), so cost reflects managed usage; BYOK usage carries no LLM cost. Every bucket also carries components — the amounts actually measured. The token counts describe LLM usage alone, so that is where a storage, api_request or compute_execution bucket reports its real quantity instead of zeroed token fields. The rollup can also be narrowed to one session or one end user before it is bucketed. That is the question no dimension answers: group_by splits the project's whole spend, so \"what did this conversation cost, per day\" and \"what has this end user spent across every session\" are reachable only by narrowing. The narrowings intersect, apply to the totals as well as the buckets, and are echoed back complete — null for each one not applied — because a rollup of zeros is otherwise indistinguishable from a project that spent nothing.",
|
|
13584
13615
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/projects",
|
|
13585
13616
|
httpMethod: "get",
|
|
13586
13617
|
pathParams: ["project_id"],
|
|
13587
13618
|
queryParams: [
|
|
13588
13619
|
"group_by",
|
|
13589
13620
|
"meter_type",
|
|
13621
|
+
"session_id",
|
|
13622
|
+
"actor_id",
|
|
13623
|
+
"agent_id",
|
|
13624
|
+
"ai_provider_id",
|
|
13625
|
+
"orchestration_run_id",
|
|
13626
|
+
"orchestration_id",
|
|
13627
|
+
"generation_id",
|
|
13628
|
+
"trace_id",
|
|
13629
|
+
"source",
|
|
13630
|
+
"trigger_id",
|
|
13631
|
+
"action_id",
|
|
13632
|
+
"include",
|
|
13590
13633
|
"from",
|
|
13591
13634
|
"to",
|
|
13592
13635
|
"limit",
|
|
@@ -13602,7 +13645,7 @@ const routes = {
|
|
|
13602
13645
|
},
|
|
13603
13646
|
{
|
|
13604
13647
|
"name": "group_by",
|
|
13605
|
-
"description": "Dimension to bucket by. `day` buckets on the event's UTC calendar day; the others on the matching id. `model` buckets on the model *and* the provider that served it, so one model name served by two providers is two groups (see `ai_provider_id`). `ai_provider` buckets on the provider the spend was billed against — a routed generation's serving target, or the agent's pinned provider — which is the total a per-provider reconciliation wants, without summing the model dimension by hand. `run` buckets on the orchestration run an event belongs to; work that runs no orchestration collapses into the single null bucket, so the bucket count there is not a count of runs.\n",
|
|
13648
|
+
"description": "Dimension to bucket by. `day` buckets on the event's UTC calendar day; the others on the matching id. `model` buckets on the model *and* the provider that served it, so one model name served by two providers is two groups (see `ai_provider_id`). `ai_provider` buckets on the provider the spend was billed against — a routed generation's serving target, or the agent's pinned provider — which is the total a per-provider reconciliation wants, without summing the model dimension by hand. `run` buckets on the orchestration run an event belongs to; work that runs no orchestration collapses into the single null bucket, so the bucket count there is not a count of runs. `session` and `actor` bucket on the conversation and the end user behind the spend — what a customer re-billing their own users charges each of them for; traffic with no end user behind it collapses into the single null bucket on both. `source` buckets on what the spend was incurred for (`eval`, `eval_judge`), which is how verification spend is told apart from the traffic serving real users; ordinary traffic carries no source and is the null bucket.\n",
|
|
13606
13649
|
"required": false,
|
|
13607
13650
|
"type": "string",
|
|
13608
13651
|
"in": "query"
|
|
@@ -13614,6 +13657,90 @@ const routes = {
|
|
|
13614
13657
|
"type": "string",
|
|
13615
13658
|
"in": "query"
|
|
13616
13659
|
},
|
|
13660
|
+
{
|
|
13661
|
+
"name": "session_id",
|
|
13662
|
+
"description": "Narrow the whole rollup — every bucket and the top-level totals alike — to one session's traffic. Combines with group_by: group_by=day&session_id=... is one conversation's spend per day, group_by=model the same spend split by model. This is the figure behind the usage roll-up a single session read carries, broken down. An id naming no session in this project yields an empty rollup, never the project total.\n",
|
|
13663
|
+
"required": false,
|
|
13664
|
+
"type": "string",
|
|
13665
|
+
"in": "query"
|
|
13666
|
+
},
|
|
13667
|
+
{
|
|
13668
|
+
"name": "actor_id",
|
|
13669
|
+
"description": "The same narrowing, for one end user across every session they appear in — what a customer re-billing their own users charges each of them for. An id naming no actor in this project yields an empty rollup, never the project total.\n",
|
|
13670
|
+
"required": false,
|
|
13671
|
+
"type": "string",
|
|
13672
|
+
"in": "query"
|
|
13673
|
+
},
|
|
13674
|
+
{
|
|
13675
|
+
"name": "agent_id",
|
|
13676
|
+
"description": "Narrow to one agent's traffic, across every session, run and trigger that dispatched it.\n",
|
|
13677
|
+
"required": false,
|
|
13678
|
+
"type": "string",
|
|
13679
|
+
"in": "query"
|
|
13680
|
+
},
|
|
13681
|
+
{
|
|
13682
|
+
"name": "ai_provider_id",
|
|
13683
|
+
"description": "Narrow to the spend billed against one provider record — a routed generation's serving target, or the agent's pinned provider.\n",
|
|
13684
|
+
"required": false,
|
|
13685
|
+
"type": "string",
|
|
13686
|
+
"in": "query"
|
|
13687
|
+
},
|
|
13688
|
+
{
|
|
13689
|
+
"name": "orchestration_run_id",
|
|
13690
|
+
"description": "Narrow to the events one orchestration run metered.",
|
|
13691
|
+
"required": false,
|
|
13692
|
+
"type": "string",
|
|
13693
|
+
"in": "query"
|
|
13694
|
+
},
|
|
13695
|
+
{
|
|
13696
|
+
"name": "orchestration_id",
|
|
13697
|
+
"description": "Narrow to the runs of one orchestration — the ones it started itself, never the subtree a loop or sub-orchestration node started under it, which is metered against the child orchestration where it was incurred. Additive: summed across a project's orchestrations the figures reach the project total exactly once.\n",
|
|
13698
|
+
"required": false,
|
|
13699
|
+
"type": "string",
|
|
13700
|
+
"in": "query"
|
|
13701
|
+
},
|
|
13702
|
+
{
|
|
13703
|
+
"name": "generation_id",
|
|
13704
|
+
"description": "Narrow to one generation's events. A generation writes more than one when it meters several dimensions, such as tokens and compute.\n",
|
|
13705
|
+
"required": false,
|
|
13706
|
+
"type": "string",
|
|
13707
|
+
"in": "query"
|
|
13708
|
+
},
|
|
13709
|
+
{
|
|
13710
|
+
"name": "trace_id",
|
|
13711
|
+
"description": "Narrow to the events recorded under one trace.",
|
|
13712
|
+
"required": false,
|
|
13713
|
+
"type": "string",
|
|
13714
|
+
"in": "query"
|
|
13715
|
+
},
|
|
13716
|
+
{
|
|
13717
|
+
"name": "source",
|
|
13718
|
+
"description": "Narrow by what the spend was incurred for — eval and eval_judge are verification spend. Ordinary traffic carries no source, so it cannot be selected by this filter; omit the filter for everything.\n",
|
|
13719
|
+
"required": false,
|
|
13720
|
+
"type": "string",
|
|
13721
|
+
"in": "query"
|
|
13722
|
+
},
|
|
13723
|
+
{
|
|
13724
|
+
"name": "trigger_id",
|
|
13725
|
+
"description": "Narrow to the spend one trigger initiated. Matched as recorded rather than resolved, so it still selects the spend of a trigger that has since been deleted.\n",
|
|
13726
|
+
"required": false,
|
|
13727
|
+
"type": "string",
|
|
13728
|
+
"in": "query"
|
|
13729
|
+
},
|
|
13730
|
+
{
|
|
13731
|
+
"name": "action_id",
|
|
13732
|
+
"description": "Narrow to one caller-supplied action label, for per-action spend. Matched as recorded, like trigger_id.\n",
|
|
13733
|
+
"required": false,
|
|
13734
|
+
"type": "string",
|
|
13735
|
+
"in": "query"
|
|
13736
|
+
},
|
|
13737
|
+
{
|
|
13738
|
+
"name": "include",
|
|
13739
|
+
"description": "Optional extras to compute. The only value is distinct, which adds the distinct object — one count per kind of entity the window touched. Opt-in because each counter costs the window another sort, so a caller who does not ask keeps the cheap response whatever the event table grows to. Any other value is a 400.\n",
|
|
13740
|
+
"required": false,
|
|
13741
|
+
"type": "string",
|
|
13742
|
+
"in": "query"
|
|
13743
|
+
},
|
|
13617
13744
|
{
|
|
13618
13745
|
"name": "from",
|
|
13619
13746
|
"description": "Inclusive lower bound (ISO-8601) on event time. Omit for no lower bound.",
|
|
@@ -14126,7 +14253,7 @@ const routes = {
|
|
|
14126
14253
|
"get-session": {
|
|
14127
14254
|
serviceClass: "Sessions",
|
|
14128
14255
|
operationId: "getSession",
|
|
14129
|
-
description: "Returns details of a single session, including a `usage` roll-up of what its generations cost. The listing omits `usage`; for a window,
|
|
14256
|
+
description: "Returns details of a single session, including a `usage` roll-up of what its generations cost. The listing omits `usage`; for a window, a split by day or model, or one end user across every session, narrow `GET /v1/projects/{project_id}/usage` with `session_id` / `actor_id` instead.",
|
|
14130
14257
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/sessions",
|
|
14131
14258
|
httpMethod: "get",
|
|
14132
14259
|
pathParams: ["project_id", "session_id"],
|
|
@@ -15801,7 +15928,7 @@ const routes = {
|
|
|
15801
15928
|
"get-current-user-billing": {
|
|
15802
15929
|
serviceClass: "Users",
|
|
15803
15930
|
operationId: "getCurrentUserBilling",
|
|
15804
|
-
description: "The plan the account is on, how long its projects may keep content, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against. A managed-model generation is refused with `402 insufficient_credit` while `credit_balance_usd` is negative, and a feature or a resource count outside the plan is refused with `403`, as is a retention window wider than `retention_days`. Every refusal names what is missing; this is where the numbers behind them are read. Answers for the caller's own account only, and always the account the credential resolves to — an API key answers for the user that minted it. The plan gating a *project* is that project's billing owner's, so a member of someone else's project reads their own rung here, not that project's.",
|
|
15931
|
+
description: "The plan the account is on, how long its projects may keep content, how much indexed storage it is holding, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against. A managed-model generation is refused with `402 insufficient_credit` while `credit_balance_usd` is negative, and a feature or a resource count outside the plan is refused with `403`, as is a retention window wider than `retention_days` or an ingest past `storage_limit_gb`. Every refusal names what is missing; this is where the numbers behind them are read. Every figure here is a local read, which is what keeps this route cheap enough to poll — unlike `GET /v1/users/me/usage`, which asks the meter once per project. Answers for the caller's own account only, and always the account the credential resolves to — an API key answers for the user that minted it. The plan gating a *project* is that project's billing owner's, so a member of someone else's project reads their own rung here, not that project's.",
|
|
15805
15932
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
15806
15933
|
httpMethod: "get",
|
|
15807
15934
|
pathParams: [],
|
|
@@ -15899,7 +16026,7 @@ const routes = {
|
|
|
15899
16026
|
"get-webhook": {
|
|
15900
16027
|
serviceClass: "Webhooks",
|
|
15901
16028
|
operationId: "getWebhook",
|
|
15902
|
-
description: "
|
|
16029
|
+
description: "The endpoint, the events it is subscribed to and whether deliveries are attempted. The signing secret is not returned: it is shown once by [`POST /v1/projects/{project_id}/webhooks`](/docs/api/webhooks/create-webhook) and again by [`POST /v1/projects/{project_id}/webhooks/{webhook_id}:rotate-secret`](/docs/api/webhooks/rotate-webhook-secret).",
|
|
15903
16030
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/webhooks",
|
|
15904
16031
|
httpMethod: "get",
|
|
15905
16032
|
pathParams: ["project_id", "webhook_id"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.125.0",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"tsx": "^4.23.1",
|
|
31
31
|
"typescript": "~6.0.3",
|
|
32
32
|
"vitest": "^4.1.10",
|
|
33
|
-
"@naturali/sdk": "0.
|
|
33
|
+
"@naturali/sdk": "0.125.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"generate": "tsx scripts/generate.ts",
|