@naturali/sdk 0.37.0 → 0.38.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 CHANGED
@@ -1234,6 +1234,21 @@ var Generations = class {
1234
1234
  ...options
1235
1235
  });
1236
1236
  }
1237
+ /**
1238
+ * Get a generation's cost
1239
+ *
1240
+ * What this one generation cost, and the tokens it was charged on — the billing-grade receipt SOAT froze at write time, per model line item.
1241
+ * This is the per-generation grain that `GET /v1/projects/{project_id}/usage` cannot express: that meter buckets a whole project by model, agent, run, day or meter type, and a run can hold more than one generation. Use this to price a single turn, and the project meter to roll spend up.
1242
+ * `cost_usd` is `null` when nothing was priced — never that the work was free. Only naturali-managed providers are priced; a BYOK generation runs on your own provider account, so it carries no LLM cost here (its tokens are still reported).
1243
+ * A generation belonging to another project responds `404`, not `403`.
1244
+ *
1245
+ */
1246
+ static getGenerationUsage(options) {
1247
+ return (options.client ?? client).get({
1248
+ url: "/v1/projects/{project_id}/generations/{generation_id}/usage",
1249
+ ...options
1250
+ });
1251
+ }
1237
1252
  };
1238
1253
  var Knowledge = class {
1239
1254
  /**
@@ -1692,7 +1707,7 @@ var Tasks = class {
1692
1707
  /**
1693
1708
  * List the task's moves
1694
1709
  *
1695
- * The card's append-only history, oldest first: every move it made, what kind of actor made it, and what caused it. Returned whole — `next_cursor` is always null.
1710
+ * The card's append-only history, oldest first: every move it made, what kind of principal made it, and what caused it. Returned whole — `next_cursor` is always null.
1696
1711
  *
1697
1712
  */
1698
1713
  static listTaskTransitions(options) {
package/dist/index.d.cts CHANGED
@@ -604,7 +604,7 @@ type BoardDispatch = {
604
604
  };
605
605
  };
606
606
  /**
607
- * One routing rule. Rules are evaluated **in order** and the first match fires its move, as the `automation` actor, through the same single door a person uses. End with `{"when": true, …}` for a catch-all.
607
+ * One routing rule. Rules are evaluated **in order** and the first match fires its move, as the `automation` principal, through the same single door a person uses. End with `{"when": true, …}` for a catch-all.
608
608
  *
609
609
  */
610
610
  type BoardCompletionRule = {
@@ -1280,7 +1280,8 @@ type Generation = {
1280
1280
  [key: string]: unknown;
1281
1281
  } | null;
1282
1282
  /**
1283
- * Non-sensitive metadata recorded about the generation — whatever the caller attached, plus platform keys: `action_id` (the label supplied on the run, which is how spend rolls up per action), `trigger_id` when a trigger started it, and `extraction` when the agent's knowledge config produced a memory-extraction summary.
1283
+ * Non-sensitive metadata recorded about the generation — whatever the caller attached, plus platform keys added by the backing platform: the label supplied as `action_id` on the run (which is how spend rolls up per action), the trigger that started it, and an `extraction` summary when the agent's knowledge config produced one.
1284
+ * Platform keys come back **camelCase** (`actionId`, `triggerId`), unlike the snake_case request field they were set from — this object is passed through from the platform rather than re-cased, so read `metadata.actionId` when resolving what a run was labelled.
1284
1285
  *
1285
1286
  */
1286
1287
  metadata: {
@@ -1304,6 +1305,90 @@ type GenerationList = {
1304
1305
  limit: number;
1305
1306
  offset: number;
1306
1307
  };
1308
+ /**
1309
+ * One generation's billing receipt — the cost, the tokens it was charged on, and a line item per metered event explaining how the charge was reached.
1310
+ * Token names match `GET /v1/projects/{project_id}/usage` so the two cost surfaces read alike: `input_tokens` is the full prompt (uncached plus cached), and `total_tokens` is `input_tokens + output_tokens`.
1311
+ *
1312
+ */
1313
+ type GenerationUsage = {
1314
+ generation_id: string;
1315
+ /**
1316
+ * Currency the costs are expressed in.
1317
+ */
1318
+ currency: string;
1319
+ /**
1320
+ * Billing-grade cost for the whole generation, frozen at write time; null when nothing was priced (never that it was free).
1321
+ *
1322
+ */
1323
+ cost_usd: number | null;
1324
+ /**
1325
+ * Full prompt tokens — uncached input plus cached.
1326
+ */
1327
+ input_tokens: number;
1328
+ output_tokens: number;
1329
+ /**
1330
+ * The cached portion of input_tokens.
1331
+ */
1332
+ cached_tokens: number;
1333
+ /**
1334
+ * Reasoning tokens, a non-billable subset of output_tokens reported for visibility — never priced, never double-counted into the total.
1335
+ *
1336
+ */
1337
+ reasoning_tokens: number;
1338
+ /**
1339
+ * input_tokens + output_tokens.
1340
+ */
1341
+ total_tokens: number;
1342
+ /**
1343
+ * Cost split per meter type — the "tokens plus infra" view. A single-type receipt has one entry whose cost equals cost_usd.
1344
+ *
1345
+ */
1346
+ by_meter_type: Array<{
1347
+ /**
1348
+ * e.g. `llm_tokens`, `compute_execution`.
1349
+ */
1350
+ meter_type: string | null;
1351
+ cost_usd: number | null;
1352
+ }>;
1353
+ /**
1354
+ * One entry per metered event on this generation.
1355
+ */
1356
+ line_items: Array<{
1357
+ /**
1358
+ * Public ID of the usage event, for reconciliation.
1359
+ */
1360
+ event_id: string | null;
1361
+ meter_type: string | null;
1362
+ /**
1363
+ * The upstream provider that served the call.
1364
+ */
1365
+ provider: string | null;
1366
+ model: string | null;
1367
+ cost_usd: number | null;
1368
+ /**
1369
+ * The measured quantities behind this line item's cost — quantity × unit_price, per billable dimension.
1370
+ *
1371
+ */
1372
+ components: Array<{
1373
+ /**
1374
+ * The measured dimension.
1375
+ */
1376
+ component: string | null;
1377
+ quantity: number;
1378
+ unit: string | null;
1379
+ /**
1380
+ * Whether this component contributes to cost. Non-billable details (e.g. reasoning_tokens) are reported but never priced.
1381
+ *
1382
+ */
1383
+ billable: boolean;
1384
+ /**
1385
+ * USD per unit, frozen at write time.
1386
+ */
1387
+ unit_price: number | null;
1388
+ cost_usd: number | null;
1389
+ }>;
1390
+ }>;
1391
+ };
1307
1392
  type KnowledgeCollection = {
1308
1393
  /**
1309
1394
  * Public collection ID (kcol_ prefix).
@@ -1460,6 +1545,12 @@ type Model = {
1460
1545
  */
1461
1546
  inference_types: Array<string>;
1462
1547
  status: 'available' | 'deprecated';
1548
+ /**
1549
+ * Whether this model can back a managed provider (`kind: managed`).
1550
+ * Independent of `status`: `status: available` means the model is in the catalog, not that it is offerable as managed. A managed provider is priced at naturali's own cost, so only models with an authoritative published price qualify — the Anthropic Claude family has none today and is therefore BYOK-only. Creating a managed provider on a model where this is `false` returns 400.
1551
+ *
1552
+ */
1553
+ managed: boolean;
1463
1554
  };
1464
1555
  type ModelList = {
1465
1556
  data: Array<Model>;
@@ -4038,6 +4129,43 @@ type GetGenerationResponses = {
4038
4129
  200: Generation;
4039
4130
  };
4040
4131
  type GetGenerationResponse = GetGenerationResponses[keyof GetGenerationResponses];
4132
+ type GetGenerationUsageData = {
4133
+ body?: never;
4134
+ path: {
4135
+ /**
4136
+ * Project public ID (proj_ prefix).
4137
+ */
4138
+ project_id: string;
4139
+ /**
4140
+ * Generation public ID (gen_ prefix).
4141
+ */
4142
+ generation_id: string;
4143
+ };
4144
+ query?: never;
4145
+ url: '/v1/projects/{project_id}/generations/{generation_id}/usage';
4146
+ };
4147
+ type GetGenerationUsageErrors = {
4148
+ /**
4149
+ * Missing or invalid credentials.
4150
+ */
4151
+ 401: ErrorResponse;
4152
+ /**
4153
+ * The resource does not exist (existence is not leaked).
4154
+ */
4155
+ 404: ErrorResponse;
4156
+ /**
4157
+ * The backing SOAT platform could not complete the operation.
4158
+ */
4159
+ 502: ErrorResponse;
4160
+ };
4161
+ type GetGenerationUsageError = GetGenerationUsageErrors[keyof GetGenerationUsageErrors];
4162
+ type GetGenerationUsageResponses = {
4163
+ /**
4164
+ * The generation's usage receipt.
4165
+ */
4166
+ 200: GenerationUsage;
4167
+ };
4168
+ type GetGenerationUsageResponse = GetGenerationUsageResponses[keyof GetGenerationUsageResponses];
4041
4169
  type ListKnowledgeCollectionsData = {
4042
4170
  body?: never;
4043
4171
  path: {
@@ -4516,6 +4644,11 @@ type ListModelsData = {
4516
4644
  * Filter by lifecycle status.
4517
4645
  */
4518
4646
  status?: 'available' | 'deprecated';
4647
+ /**
4648
+ * Filter by whether the model can back a managed provider — `managed=true` is the set you can pass to `POST /v1/projects/{project_id}/providers` with `kind: managed`. Omit to leave the catalog unfiltered on this axis; `false` returns only the BYOK-only models. Any other value is a 400.
4649
+ *
4650
+ */
4651
+ managed?: boolean;
4519
4652
  };
4520
4653
  url: '/v1/models';
4521
4654
  };
@@ -6187,6 +6320,16 @@ declare class Generations {
6187
6320
  *
6188
6321
  */
6189
6322
  static getGeneration<ThrowOnError extends boolean = false>(options: Options<GetGenerationData, ThrowOnError>): RequestResult<GetGenerationResponses, GetGenerationErrors, ThrowOnError>;
6323
+ /**
6324
+ * Get a generation's cost
6325
+ *
6326
+ * What this one generation cost, and the tokens it was charged on — the billing-grade receipt SOAT froze at write time, per model line item.
6327
+ * This is the per-generation grain that `GET /v1/projects/{project_id}/usage` cannot express: that meter buckets a whole project by model, agent, run, day or meter type, and a run can hold more than one generation. Use this to price a single turn, and the project meter to roll spend up.
6328
+ * `cost_usd` is `null` when nothing was priced — never that the work was free. Only naturali-managed providers are priced; a BYOK generation runs on your own provider account, so it carries no LLM cost here (its tokens are still reported).
6329
+ * A generation belonging to another project responds `404`, not `403`.
6330
+ *
6331
+ */
6332
+ static getGenerationUsage<ThrowOnError extends boolean = false>(options: Options<GetGenerationUsageData, ThrowOnError>): RequestResult<GetGenerationUsageResponses, GetGenerationUsageErrors, ThrowOnError>;
6190
6333
  }
6191
6334
  declare class Knowledge {
6192
6335
  /**
@@ -6419,7 +6562,7 @@ declare class Tasks {
6419
6562
  /**
6420
6563
  * List the task's moves
6421
6564
  *
6422
- * The card's append-only history, oldest first: every move it made, what kind of actor made it, and what caused it. Returned whole — `next_cursor` is always null.
6565
+ * The card's append-only history, oldest first: every move it made, what kind of principal made it, and what caused it. Returned whole — `next_cursor` is always null.
6423
6566
  *
6424
6567
  */
6425
6568
  static listTaskTransitions<ThrowOnError extends boolean = false>(options: Options<ListTaskTransitionsData, ThrowOnError>): RequestResult<ListTaskTransitionsResponses, ListTaskTransitionsErrors, ThrowOnError>;
@@ -6549,4 +6692,4 @@ declare class NaturaliClient {
6549
6692
  constructor({ token, headers }?: NaturaliClientOptions);
6550
6693
  }
6551
6694
  //#endregion
6552
- export { type Acknowledgement, type AddSessionMessageData, type AddSessionMessageError, type AddSessionMessageErrors, type AddSessionMessageResponse, type AddSessionMessageResponses, type Agent, type AgentCreate, type AgentId, type AgentList, type AgentUpdate, Agents, type ApiKeyCreate, type ApiKeyCreated, type ApiKeyId, type ApiKeyList, type ApiKeyRecord, type ApiKeyUpdate, ApiKeys, type AssigneeFilter, Auth, type AuthSession, type Board, type BoardCompletionRule, type BoardCreate, type BoardDispatch, type BoardId, type BoardIdFilter, type BoardList, type BoardOnEnter, type BoardState, type BoardTransition, type BoardUpdate, Boards, type Channel, type ChannelBinding, type ChannelBindingSet, type ChannelCreate, type ChannelId, type ChannelList, type ChannelUpdate, Channels, type ClientOptions, type CollectionId, type Contact, type ContactConversation, type ContactConversationList, type ContactCreate, type ContactId, type ContactIdentity, type ContactIdentityCreate, type ContactList, type ContactMerge, type ContactMergeList, type ContactMergeRequest, type ContactMergeResult, type ContactUpdate, Contacts, type Conversation, type ConversationId, type ConversationList, type ConversationMessage, type ConversationMessageList, type CreateAgentData, type CreateAgentError, type CreateAgentErrors, type CreateAgentResponse, type CreateAgentResponses, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyErrors, type CreateApiKeyResponse, type CreateApiKeyResponses, type CreateBoardData, type CreateBoardError, type CreateBoardErrors, type CreateBoardResponse, type CreateBoardResponses, type CreateChannelData, type CreateChannelError, type CreateChannelErrors, type CreateChannelResponse, type CreateChannelResponses, type CreateContactData, type CreateContactError, type CreateContactErrors, type CreateContactIdentityData, type CreateContactIdentityError, type CreateContactIdentityErrors, type CreateContactIdentityResponse, type CreateContactIdentityResponses, type CreateContactResponse, type CreateContactResponses, type CreateGenerationData, type CreateGenerationError, type CreateGenerationErrors, type CreateGenerationResponse, type CreateGenerationResponses, type CreateKnowledgeCollectionData, type CreateKnowledgeCollectionError, type CreateKnowledgeCollectionErrors, type CreateKnowledgeCollectionResponse, type CreateKnowledgeCollectionResponses, type CreateKnowledgeDocumentData, type CreateKnowledgeDocumentError, type CreateKnowledgeDocumentErrors, type CreateKnowledgeDocumentResponse, type CreateKnowledgeDocumentResponses, type CreateProjectData, type CreateProjectError, type CreateProjectErrors, type CreateProjectResponse, type CreateProjectResponses, type CreateProviderData, type CreateProviderError, type CreateProviderErrors, type CreateProviderResponse, type CreateProviderResponses, type CreateSessionData, type CreateSessionError, type CreateSessionErrors, type CreateSessionResponse, type CreateSessionResponses, type CreateTaskData, type CreateTaskError, type CreateTaskErrors, type CreateTaskResponse, type CreateTaskResponses, type CreateToolData, type CreateToolError, type CreateToolErrors, type CreateToolResponse, type CreateToolResponses, type Cursor, type DeleteAgentData, type DeleteAgentError, type DeleteAgentErrors, type DeleteAgentResponse, type DeleteAgentResponses, type DeleteApiKeyData, type DeleteApiKeyError, type DeleteApiKeyErrors, type DeleteApiKeyResponse, type DeleteApiKeyResponses, type DeleteBoardData, type DeleteBoardError, type DeleteBoardErrors, type DeleteBoardResponse, type DeleteBoardResponses, type DeleteChannelBindingData, type DeleteChannelBindingError, type DeleteChannelBindingErrors, type DeleteChannelBindingResponse, type DeleteChannelBindingResponses, type DeleteChannelData, type DeleteChannelError, type DeleteChannelErrors, type DeleteChannelResponse, type DeleteChannelResponses, type DeleteContactData, type DeleteContactError, type DeleteContactErrors, type DeleteContactIdentityData, type DeleteContactIdentityError, type DeleteContactIdentityErrors, type DeleteContactIdentityResponse, type DeleteContactIdentityResponses, type DeleteContactResponse, type DeleteContactResponses, type DeleteKnowledgeCollectionData, type DeleteKnowledgeCollectionError, type DeleteKnowledgeCollectionErrors, type DeleteKnowledgeCollectionResponse, type DeleteKnowledgeCollectionResponses, type DeleteKnowledgeDocumentData, type DeleteKnowledgeDocumentError, type DeleteKnowledgeDocumentErrors, type DeleteKnowledgeDocumentResponse, type DeleteKnowledgeDocumentResponses, type DeleteProjectData, type DeleteProjectError, type DeleteProjectErrors, type DeleteProjectResponse, type DeleteProjectResponses, type DeleteProviderData, type DeleteProviderError, type DeleteProviderErrors, type DeleteProviderResponse, type DeleteProviderResponses, type DeleteTaskData, type DeleteTaskError, type DeleteTaskErrors, type DeleteTaskResponse, type DeleteTaskResponses, type DeleteToolData, type DeleteToolError, type DeleteToolErrors, type DeleteToolResponse, type DeleteToolResponses, type DiscordModes, type DocumentId, type ErrorResponse, type Force, type GenerateSessionResponseData, type GenerateSessionResponseError, type GenerateSessionResponseErrors, type GenerateSessionResponseResponse, type GenerateSessionResponseResponses, type Generation, type GenerationCreate, type GenerationId, type GenerationList, type GenerationResult, type GenerationStatus, Generations, type GetAgentData, type GetAgentError, type GetAgentErrors, type GetAgentResponse, type GetAgentResponses, type GetApiKeyData, type GetApiKeyError, type GetApiKeyErrors, type GetApiKeyResponse, type GetApiKeyResponses, type GetBoardData, type GetBoardError, type GetBoardErrors, type GetBoardResponse, type GetBoardResponses, type GetChannelBindingData, type GetChannelBindingError, type GetChannelBindingErrors, type GetChannelBindingResponse, type GetChannelBindingResponses, type GetChannelConversationData, type GetChannelConversationError, type GetChannelConversationErrors, type GetChannelConversationResponse, type GetChannelConversationResponses, type GetChannelData, type GetChannelError, type GetChannelErrors, type GetChannelResponse, type GetChannelResponses, type GetContactData, type GetContactError, type GetContactErrors, type GetContactResponse, type GetContactResponses, type GetCurrentUserData, type GetCurrentUserError, type GetCurrentUserErrors, type GetCurrentUserResponse, type GetCurrentUserResponses, type GetGenerationData, type GetGenerationError, type GetGenerationErrors, type GetGenerationResponse, type GetGenerationResponses, type GetKnowledgeCollectionData, type GetKnowledgeCollectionError, type GetKnowledgeCollectionErrors, type GetKnowledgeCollectionResponse, type GetKnowledgeCollectionResponses, type GetKnowledgeDocumentData, type GetKnowledgeDocumentError, type GetKnowledgeDocumentErrors, type GetKnowledgeDocumentResponse, type GetKnowledgeDocumentResponses, type GetModelData, type GetModelError, type GetModelErrors, type GetModelResponse, type GetModelResponses, type GetProjectData, type GetProjectError, type GetProjectErrors, type GetProjectResponse, type GetProjectResponses, type GetProjectUsageData, type GetProjectUsageError, type GetProjectUsageErrors, type GetProjectUsageResponse, type GetProjectUsageResponses, type GetProviderData, type GetProviderError, type GetProviderErrors, type GetProviderResponse, type GetProviderResponses, type GetSessionData, type GetSessionError, type GetSessionErrors, type GetSessionResponse, type GetSessionResponses, type GetTaskData, type GetTaskError, type GetTaskErrors, type GetTaskResponse, type GetTaskResponses, type GetToolData, type GetToolError, type GetToolErrors, type GetToolResponse, type GetToolResponses, type GetTraceData, type GetTraceError, type GetTraceErrors, type GetTraceResponse, type GetTraceResponses, type GetTraceTreeData, type GetTraceTreeError, type GetTraceTreeErrors, type GetTraceTreeResponse, type GetTraceTreeResponses, type HttpExecute, type IdempotencyKey, type IdentityId, Knowledge, type KnowledgeChunk, type KnowledgeCollection, type KnowledgeCollectionCreate, type KnowledgeCollectionList, type KnowledgeCollectionUpdate, type KnowledgeDocument, type KnowledgeDocumentCreate, type KnowledgeDocumentList, type KnowledgeQueryRequest, type KnowledgeQueryResult, type Limit, type ListAgentGenerationsData, type ListAgentGenerationsError, type ListAgentGenerationsErrors, type ListAgentGenerationsResponse, type ListAgentGenerationsResponses, type ListAgentsData, type ListAgentsError, type ListAgentsErrors, type ListAgentsResponse, type ListAgentsResponses, type ListApiKeysData, type ListApiKeysError, type ListApiKeysErrors, type ListApiKeysResponse, type ListApiKeysResponses, type ListBoardsData, type ListBoardsError, type ListBoardsErrors, type ListBoardsResponse, type ListBoardsResponses, type ListChannelConversationMessagesData, type ListChannelConversationMessagesError, type ListChannelConversationMessagesErrors, type ListChannelConversationMessagesResponse, type ListChannelConversationMessagesResponses, type ListChannelConversationsData, type ListChannelConversationsError, type ListChannelConversationsErrors, type ListChannelConversationsResponse, type ListChannelConversationsResponses, type ListChannelsData, type ListChannelsError, type ListChannelsErrors, type ListChannelsResponse, type ListChannelsResponses, type ListContactConversationsData, type ListContactConversationsError, type ListContactConversationsErrors, type ListContactConversationsResponse, type ListContactConversationsResponses, type ListContactMergesData, type ListContactMergesError, type ListContactMergesErrors, type ListContactMergesResponse, type ListContactMergesResponses, type ListContactsData, type ListContactsError, type ListContactsErrors, type ListContactsResponse, type ListContactsResponses, type ListKnowledgeCollectionsData, type ListKnowledgeCollectionsError, type ListKnowledgeCollectionsErrors, type ListKnowledgeCollectionsResponse, type ListKnowledgeCollectionsResponses, type ListKnowledgeDocumentsData, type ListKnowledgeDocumentsError, type ListKnowledgeDocumentsErrors, type ListKnowledgeDocumentsResponse, type ListKnowledgeDocumentsResponses, type ListModelsData, type ListModelsError, type ListModelsErrors, type ListModelsResponse, type ListModelsResponses, type ListProjectsData, type ListProjectsError, type ListProjectsErrors, type ListProjectsResponse, type ListProjectsResponses, type ListProvidersData, type ListProvidersError, type ListProvidersErrors, type ListProvidersResponse, type ListProvidersResponses, type ListTaskTransitionsData, type ListTaskTransitionsError, type ListTaskTransitionsErrors, type ListTaskTransitionsResponse, type ListTaskTransitionsResponses, type ListTasksData, type ListTasksError, type ListTasksErrors, type ListTasksResponse, type ListTasksResponses, type ListToolsData, type ListToolsError, type ListToolsErrors, type ListToolsResponse, type ListToolsResponses, type ListTraceGenerationsData, type ListTraceGenerationsError, type ListTraceGenerationsErrors, type ListTraceGenerationsResponse, type ListTraceGenerationsResponses, type ListTracesData, type ListTracesError, type ListTracesErrors, type ListTracesResponse, type ListTracesResponses, type LogoutData, type LogoutError, type LogoutErrors, type LogoutRequest, type LogoutResponse, type LogoutResponses, type McpConfig, type MergeContactData, type MergeContactError, type MergeContactErrors, type MergeContactResponse, type MergeContactResponses, type MergeId, type Message, type MessagesLimit, type Model, type ModelList, Models, NaturaliClient, type NaturaliClientOptions, type Offset, type Options, type Project, type ProjectCreate, type ProjectId, type ProjectList, type ProjectUpdate, type ProjectUsage, Projects, type Provider, type ProviderCreate, type ProviderId, type ProviderList, type ProviderUpdate, Providers, type QueryKnowledgeCollectionData, type QueryKnowledgeCollectionError, type QueryKnowledgeCollectionErrors, type QueryKnowledgeCollectionResponse, type QueryKnowledgeCollectionResponses, type RefreshRequest, type RefreshSessionData, type RefreshSessionError, type RefreshSessionErrors, type RefreshSessionResponse, type RefreshSessionResponses, type ReingestKnowledgeDocumentData, type ReingestKnowledgeDocumentError, type ReingestKnowledgeDocumentErrors, type ReingestKnowledgeDocumentResponse, type ReingestKnowledgeDocumentResponses, type RequestSignInCodeData, type RequestSignInCodeError, type RequestSignInCodeErrors, type RequestSignInCodeResponse, type RequestSignInCodeResponses, type RevertContactMergeData, type RevertContactMergeError, type RevertContactMergeErrors, type RevertContactMergeResponse, type RevertContactMergeResponses, type RotateApiKeyData, type RotateApiKeyError, type RotateApiKeyErrors, type RotateApiKeyResponse, type RotateApiKeyResponses, type Session, type SessionCreate, type SessionGenerate, type SessionGeneration, type SessionId, type SessionMessage, type SessionMessageCreate, Sessions, type SetChannelBindingData, type SetChannelBindingError, type SetChannelBindingErrors, type SetChannelBindingResponse, type SetChannelBindingResponses, type SignInCodeRequest, type SignInCodeVerify, type StateFilter, type StatusFilter, type Task, type TaskCreate, type TaskId, type TaskList, type TaskTransitionList, type TaskTransitionRecord, type TaskTransitionRequest, type TaskUpdate, Tasks, type Tool, type ToolChoice, type ToolContext, type ToolCreate, type ToolId, type ToolList, type ToolUpdate, Tools, type Trace, type TraceId, type TraceList, type TraceTreeNode, Traces, type TransitionTaskData, type TransitionTaskError, type TransitionTaskErrors, type TransitionTaskResponse, type TransitionTaskResponses, type UpdateAgentData, type UpdateAgentError, type UpdateAgentErrors, type UpdateAgentResponse, type UpdateAgentResponses, type UpdateApiKeyData, type UpdateApiKeyError, type UpdateApiKeyErrors, type UpdateApiKeyResponse, type UpdateApiKeyResponses, type UpdateBoardData, type UpdateBoardError, type UpdateBoardErrors, type UpdateBoardResponse, type UpdateBoardResponses, type UpdateChannelData, type UpdateChannelError, type UpdateChannelErrors, type UpdateChannelResponse, type UpdateChannelResponses, type UpdateContactData, type UpdateContactError, type UpdateContactErrors, type UpdateContactResponse, type UpdateContactResponses, type UpdateKnowledgeCollectionData, type UpdateKnowledgeCollectionError, type UpdateKnowledgeCollectionErrors, type UpdateKnowledgeCollectionResponse, type UpdateKnowledgeCollectionResponses, type UpdateProjectData, type UpdateProjectError, type UpdateProjectErrors, type UpdateProjectResponse, type UpdateProjectResponses, type UpdateProviderData, type UpdateProviderError, type UpdateProviderErrors, type UpdateProviderResponse, type UpdateProviderResponses, type UpdateTaskData, type UpdateTaskError, type UpdateTaskErrors, type UpdateTaskResponse, type UpdateTaskResponses, type UpdateToolData, type UpdateToolError, type UpdateToolErrors, type UpdateToolResponse, type UpdateToolResponses, type UsageGroup, type UsageTokens, type User, type VerifySignInCodeData, type VerifySignInCodeError, type VerifySignInCodeErrors, type VerifySignInCodeResponse, type VerifySignInCodeResponses, createClient, createConfig };
6695
+ export { type Acknowledgement, type AddSessionMessageData, type AddSessionMessageError, type AddSessionMessageErrors, type AddSessionMessageResponse, type AddSessionMessageResponses, type Agent, type AgentCreate, type AgentId, type AgentList, type AgentUpdate, Agents, type ApiKeyCreate, type ApiKeyCreated, type ApiKeyId, type ApiKeyList, type ApiKeyRecord, type ApiKeyUpdate, ApiKeys, type AssigneeFilter, Auth, type AuthSession, type Board, type BoardCompletionRule, type BoardCreate, type BoardDispatch, type BoardId, type BoardIdFilter, type BoardList, type BoardOnEnter, type BoardState, type BoardTransition, type BoardUpdate, Boards, type Channel, type ChannelBinding, type ChannelBindingSet, type ChannelCreate, type ChannelId, type ChannelList, type ChannelUpdate, Channels, type ClientOptions, type CollectionId, type Contact, type ContactConversation, type ContactConversationList, type ContactCreate, type ContactId, type ContactIdentity, type ContactIdentityCreate, type ContactList, type ContactMerge, type ContactMergeList, type ContactMergeRequest, type ContactMergeResult, type ContactUpdate, Contacts, type Conversation, type ConversationId, type ConversationList, type ConversationMessage, type ConversationMessageList, type CreateAgentData, type CreateAgentError, type CreateAgentErrors, type CreateAgentResponse, type CreateAgentResponses, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyErrors, type CreateApiKeyResponse, type CreateApiKeyResponses, type CreateBoardData, type CreateBoardError, type CreateBoardErrors, type CreateBoardResponse, type CreateBoardResponses, type CreateChannelData, type CreateChannelError, type CreateChannelErrors, type CreateChannelResponse, type CreateChannelResponses, type CreateContactData, type CreateContactError, type CreateContactErrors, type CreateContactIdentityData, type CreateContactIdentityError, type CreateContactIdentityErrors, type CreateContactIdentityResponse, type CreateContactIdentityResponses, type CreateContactResponse, type CreateContactResponses, type CreateGenerationData, type CreateGenerationError, type CreateGenerationErrors, type CreateGenerationResponse, type CreateGenerationResponses, type CreateKnowledgeCollectionData, type CreateKnowledgeCollectionError, type CreateKnowledgeCollectionErrors, type CreateKnowledgeCollectionResponse, type CreateKnowledgeCollectionResponses, type CreateKnowledgeDocumentData, type CreateKnowledgeDocumentError, type CreateKnowledgeDocumentErrors, type CreateKnowledgeDocumentResponse, type CreateKnowledgeDocumentResponses, type CreateProjectData, type CreateProjectError, type CreateProjectErrors, type CreateProjectResponse, type CreateProjectResponses, type CreateProviderData, type CreateProviderError, type CreateProviderErrors, type CreateProviderResponse, type CreateProviderResponses, type CreateSessionData, type CreateSessionError, type CreateSessionErrors, type CreateSessionResponse, type CreateSessionResponses, type CreateTaskData, type CreateTaskError, type CreateTaskErrors, type CreateTaskResponse, type CreateTaskResponses, type CreateToolData, type CreateToolError, type CreateToolErrors, type CreateToolResponse, type CreateToolResponses, type Cursor, type DeleteAgentData, type DeleteAgentError, type DeleteAgentErrors, type DeleteAgentResponse, type DeleteAgentResponses, type DeleteApiKeyData, type DeleteApiKeyError, type DeleteApiKeyErrors, type DeleteApiKeyResponse, type DeleteApiKeyResponses, type DeleteBoardData, type DeleteBoardError, type DeleteBoardErrors, type DeleteBoardResponse, type DeleteBoardResponses, type DeleteChannelBindingData, type DeleteChannelBindingError, type DeleteChannelBindingErrors, type DeleteChannelBindingResponse, type DeleteChannelBindingResponses, type DeleteChannelData, type DeleteChannelError, type DeleteChannelErrors, type DeleteChannelResponse, type DeleteChannelResponses, type DeleteContactData, type DeleteContactError, type DeleteContactErrors, type DeleteContactIdentityData, type DeleteContactIdentityError, type DeleteContactIdentityErrors, type DeleteContactIdentityResponse, type DeleteContactIdentityResponses, type DeleteContactResponse, type DeleteContactResponses, type DeleteKnowledgeCollectionData, type DeleteKnowledgeCollectionError, type DeleteKnowledgeCollectionErrors, type DeleteKnowledgeCollectionResponse, type DeleteKnowledgeCollectionResponses, type DeleteKnowledgeDocumentData, type DeleteKnowledgeDocumentError, type DeleteKnowledgeDocumentErrors, type DeleteKnowledgeDocumentResponse, type DeleteKnowledgeDocumentResponses, type DeleteProjectData, type DeleteProjectError, type DeleteProjectErrors, type DeleteProjectResponse, type DeleteProjectResponses, type DeleteProviderData, type DeleteProviderError, type DeleteProviderErrors, type DeleteProviderResponse, type DeleteProviderResponses, type DeleteTaskData, type DeleteTaskError, type DeleteTaskErrors, type DeleteTaskResponse, type DeleteTaskResponses, type DeleteToolData, type DeleteToolError, type DeleteToolErrors, type DeleteToolResponse, type DeleteToolResponses, type DiscordModes, type DocumentId, type ErrorResponse, type Force, type GenerateSessionResponseData, type GenerateSessionResponseError, type GenerateSessionResponseErrors, type GenerateSessionResponseResponse, type GenerateSessionResponseResponses, type Generation, type GenerationCreate, type GenerationId, type GenerationList, type GenerationResult, type GenerationStatus, type GenerationUsage, Generations, type GetAgentData, type GetAgentError, type GetAgentErrors, type GetAgentResponse, type GetAgentResponses, type GetApiKeyData, type GetApiKeyError, type GetApiKeyErrors, type GetApiKeyResponse, type GetApiKeyResponses, type GetBoardData, type GetBoardError, type GetBoardErrors, type GetBoardResponse, type GetBoardResponses, type GetChannelBindingData, type GetChannelBindingError, type GetChannelBindingErrors, type GetChannelBindingResponse, type GetChannelBindingResponses, type GetChannelConversationData, type GetChannelConversationError, type GetChannelConversationErrors, type GetChannelConversationResponse, type GetChannelConversationResponses, type GetChannelData, type GetChannelError, type GetChannelErrors, type GetChannelResponse, type GetChannelResponses, type GetContactData, type GetContactError, type GetContactErrors, type GetContactResponse, type GetContactResponses, type GetCurrentUserData, type GetCurrentUserError, type GetCurrentUserErrors, type GetCurrentUserResponse, type GetCurrentUserResponses, type GetGenerationData, type GetGenerationError, type GetGenerationErrors, type GetGenerationResponse, type GetGenerationResponses, type GetGenerationUsageData, type GetGenerationUsageError, type GetGenerationUsageErrors, type GetGenerationUsageResponse, type GetGenerationUsageResponses, type GetKnowledgeCollectionData, type GetKnowledgeCollectionError, type GetKnowledgeCollectionErrors, type GetKnowledgeCollectionResponse, type GetKnowledgeCollectionResponses, type GetKnowledgeDocumentData, type GetKnowledgeDocumentError, type GetKnowledgeDocumentErrors, type GetKnowledgeDocumentResponse, type GetKnowledgeDocumentResponses, type GetModelData, type GetModelError, type GetModelErrors, type GetModelResponse, type GetModelResponses, type GetProjectData, type GetProjectError, type GetProjectErrors, type GetProjectResponse, type GetProjectResponses, type GetProjectUsageData, type GetProjectUsageError, type GetProjectUsageErrors, type GetProjectUsageResponse, type GetProjectUsageResponses, type GetProviderData, type GetProviderError, type GetProviderErrors, type GetProviderResponse, type GetProviderResponses, type GetSessionData, type GetSessionError, type GetSessionErrors, type GetSessionResponse, type GetSessionResponses, type GetTaskData, type GetTaskError, type GetTaskErrors, type GetTaskResponse, type GetTaskResponses, type GetToolData, type GetToolError, type GetToolErrors, type GetToolResponse, type GetToolResponses, type GetTraceData, type GetTraceError, type GetTraceErrors, type GetTraceResponse, type GetTraceResponses, type GetTraceTreeData, type GetTraceTreeError, type GetTraceTreeErrors, type GetTraceTreeResponse, type GetTraceTreeResponses, type HttpExecute, type IdempotencyKey, type IdentityId, Knowledge, type KnowledgeChunk, type KnowledgeCollection, type KnowledgeCollectionCreate, type KnowledgeCollectionList, type KnowledgeCollectionUpdate, type KnowledgeDocument, type KnowledgeDocumentCreate, type KnowledgeDocumentList, type KnowledgeQueryRequest, type KnowledgeQueryResult, type Limit, type ListAgentGenerationsData, type ListAgentGenerationsError, type ListAgentGenerationsErrors, type ListAgentGenerationsResponse, type ListAgentGenerationsResponses, type ListAgentsData, type ListAgentsError, type ListAgentsErrors, type ListAgentsResponse, type ListAgentsResponses, type ListApiKeysData, type ListApiKeysError, type ListApiKeysErrors, type ListApiKeysResponse, type ListApiKeysResponses, type ListBoardsData, type ListBoardsError, type ListBoardsErrors, type ListBoardsResponse, type ListBoardsResponses, type ListChannelConversationMessagesData, type ListChannelConversationMessagesError, type ListChannelConversationMessagesErrors, type ListChannelConversationMessagesResponse, type ListChannelConversationMessagesResponses, type ListChannelConversationsData, type ListChannelConversationsError, type ListChannelConversationsErrors, type ListChannelConversationsResponse, type ListChannelConversationsResponses, type ListChannelsData, type ListChannelsError, type ListChannelsErrors, type ListChannelsResponse, type ListChannelsResponses, type ListContactConversationsData, type ListContactConversationsError, type ListContactConversationsErrors, type ListContactConversationsResponse, type ListContactConversationsResponses, type ListContactMergesData, type ListContactMergesError, type ListContactMergesErrors, type ListContactMergesResponse, type ListContactMergesResponses, type ListContactsData, type ListContactsError, type ListContactsErrors, type ListContactsResponse, type ListContactsResponses, type ListKnowledgeCollectionsData, type ListKnowledgeCollectionsError, type ListKnowledgeCollectionsErrors, type ListKnowledgeCollectionsResponse, type ListKnowledgeCollectionsResponses, type ListKnowledgeDocumentsData, type ListKnowledgeDocumentsError, type ListKnowledgeDocumentsErrors, type ListKnowledgeDocumentsResponse, type ListKnowledgeDocumentsResponses, type ListModelsData, type ListModelsError, type ListModelsErrors, type ListModelsResponse, type ListModelsResponses, type ListProjectsData, type ListProjectsError, type ListProjectsErrors, type ListProjectsResponse, type ListProjectsResponses, type ListProvidersData, type ListProvidersError, type ListProvidersErrors, type ListProvidersResponse, type ListProvidersResponses, type ListTaskTransitionsData, type ListTaskTransitionsError, type ListTaskTransitionsErrors, type ListTaskTransitionsResponse, type ListTaskTransitionsResponses, type ListTasksData, type ListTasksError, type ListTasksErrors, type ListTasksResponse, type ListTasksResponses, type ListToolsData, type ListToolsError, type ListToolsErrors, type ListToolsResponse, type ListToolsResponses, type ListTraceGenerationsData, type ListTraceGenerationsError, type ListTraceGenerationsErrors, type ListTraceGenerationsResponse, type ListTraceGenerationsResponses, type ListTracesData, type ListTracesError, type ListTracesErrors, type ListTracesResponse, type ListTracesResponses, type LogoutData, type LogoutError, type LogoutErrors, type LogoutRequest, type LogoutResponse, type LogoutResponses, type McpConfig, type MergeContactData, type MergeContactError, type MergeContactErrors, type MergeContactResponse, type MergeContactResponses, type MergeId, type Message, type MessagesLimit, type Model, type ModelList, Models, NaturaliClient, type NaturaliClientOptions, type Offset, type Options, type Project, type ProjectCreate, type ProjectId, type ProjectList, type ProjectUpdate, type ProjectUsage, Projects, type Provider, type ProviderCreate, type ProviderId, type ProviderList, type ProviderUpdate, Providers, type QueryKnowledgeCollectionData, type QueryKnowledgeCollectionError, type QueryKnowledgeCollectionErrors, type QueryKnowledgeCollectionResponse, type QueryKnowledgeCollectionResponses, type RefreshRequest, type RefreshSessionData, type RefreshSessionError, type RefreshSessionErrors, type RefreshSessionResponse, type RefreshSessionResponses, type ReingestKnowledgeDocumentData, type ReingestKnowledgeDocumentError, type ReingestKnowledgeDocumentErrors, type ReingestKnowledgeDocumentResponse, type ReingestKnowledgeDocumentResponses, type RequestSignInCodeData, type RequestSignInCodeError, type RequestSignInCodeErrors, type RequestSignInCodeResponse, type RequestSignInCodeResponses, type RevertContactMergeData, type RevertContactMergeError, type RevertContactMergeErrors, type RevertContactMergeResponse, type RevertContactMergeResponses, type RotateApiKeyData, type RotateApiKeyError, type RotateApiKeyErrors, type RotateApiKeyResponse, type RotateApiKeyResponses, type Session, type SessionCreate, type SessionGenerate, type SessionGeneration, type SessionId, type SessionMessage, type SessionMessageCreate, Sessions, type SetChannelBindingData, type SetChannelBindingError, type SetChannelBindingErrors, type SetChannelBindingResponse, type SetChannelBindingResponses, type SignInCodeRequest, type SignInCodeVerify, type StateFilter, type StatusFilter, type Task, type TaskCreate, type TaskId, type TaskList, type TaskTransitionList, type TaskTransitionRecord, type TaskTransitionRequest, type TaskUpdate, Tasks, type Tool, type ToolChoice, type ToolContext, type ToolCreate, type ToolId, type ToolList, type ToolUpdate, Tools, type Trace, type TraceId, type TraceList, type TraceTreeNode, Traces, type TransitionTaskData, type TransitionTaskError, type TransitionTaskErrors, type TransitionTaskResponse, type TransitionTaskResponses, type UpdateAgentData, type UpdateAgentError, type UpdateAgentErrors, type UpdateAgentResponse, type UpdateAgentResponses, type UpdateApiKeyData, type UpdateApiKeyError, type UpdateApiKeyErrors, type UpdateApiKeyResponse, type UpdateApiKeyResponses, type UpdateBoardData, type UpdateBoardError, type UpdateBoardErrors, type UpdateBoardResponse, type UpdateBoardResponses, type UpdateChannelData, type UpdateChannelError, type UpdateChannelErrors, type UpdateChannelResponse, type UpdateChannelResponses, type UpdateContactData, type UpdateContactError, type UpdateContactErrors, type UpdateContactResponse, type UpdateContactResponses, type UpdateKnowledgeCollectionData, type UpdateKnowledgeCollectionError, type UpdateKnowledgeCollectionErrors, type UpdateKnowledgeCollectionResponse, type UpdateKnowledgeCollectionResponses, type UpdateProjectData, type UpdateProjectError, type UpdateProjectErrors, type UpdateProjectResponse, type UpdateProjectResponses, type UpdateProviderData, type UpdateProviderError, type UpdateProviderErrors, type UpdateProviderResponse, type UpdateProviderResponses, type UpdateTaskData, type UpdateTaskError, type UpdateTaskErrors, type UpdateTaskResponse, type UpdateTaskResponses, type UpdateToolData, type UpdateToolError, type UpdateToolErrors, type UpdateToolResponse, type UpdateToolResponses, type UsageGroup, type UsageTokens, type User, type VerifySignInCodeData, type VerifySignInCodeError, type VerifySignInCodeErrors, type VerifySignInCodeResponse, type VerifySignInCodeResponses, createClient, createConfig };
package/dist/index.d.mts CHANGED
@@ -604,7 +604,7 @@ type BoardDispatch = {
604
604
  };
605
605
  };
606
606
  /**
607
- * One routing rule. Rules are evaluated **in order** and the first match fires its move, as the `automation` actor, through the same single door a person uses. End with `{"when": true, …}` for a catch-all.
607
+ * One routing rule. Rules are evaluated **in order** and the first match fires its move, as the `automation` principal, through the same single door a person uses. End with `{"when": true, …}` for a catch-all.
608
608
  *
609
609
  */
610
610
  type BoardCompletionRule = {
@@ -1280,7 +1280,8 @@ type Generation = {
1280
1280
  [key: string]: unknown;
1281
1281
  } | null;
1282
1282
  /**
1283
- * Non-sensitive metadata recorded about the generation — whatever the caller attached, plus platform keys: `action_id` (the label supplied on the run, which is how spend rolls up per action), `trigger_id` when a trigger started it, and `extraction` when the agent's knowledge config produced a memory-extraction summary.
1283
+ * Non-sensitive metadata recorded about the generation — whatever the caller attached, plus platform keys added by the backing platform: the label supplied as `action_id` on the run (which is how spend rolls up per action), the trigger that started it, and an `extraction` summary when the agent's knowledge config produced one.
1284
+ * Platform keys come back **camelCase** (`actionId`, `triggerId`), unlike the snake_case request field they were set from — this object is passed through from the platform rather than re-cased, so read `metadata.actionId` when resolving what a run was labelled.
1284
1285
  *
1285
1286
  */
1286
1287
  metadata: {
@@ -1304,6 +1305,90 @@ type GenerationList = {
1304
1305
  limit: number;
1305
1306
  offset: number;
1306
1307
  };
1308
+ /**
1309
+ * One generation's billing receipt — the cost, the tokens it was charged on, and a line item per metered event explaining how the charge was reached.
1310
+ * Token names match `GET /v1/projects/{project_id}/usage` so the two cost surfaces read alike: `input_tokens` is the full prompt (uncached plus cached), and `total_tokens` is `input_tokens + output_tokens`.
1311
+ *
1312
+ */
1313
+ type GenerationUsage = {
1314
+ generation_id: string;
1315
+ /**
1316
+ * Currency the costs are expressed in.
1317
+ */
1318
+ currency: string;
1319
+ /**
1320
+ * Billing-grade cost for the whole generation, frozen at write time; null when nothing was priced (never that it was free).
1321
+ *
1322
+ */
1323
+ cost_usd: number | null;
1324
+ /**
1325
+ * Full prompt tokens — uncached input plus cached.
1326
+ */
1327
+ input_tokens: number;
1328
+ output_tokens: number;
1329
+ /**
1330
+ * The cached portion of input_tokens.
1331
+ */
1332
+ cached_tokens: number;
1333
+ /**
1334
+ * Reasoning tokens, a non-billable subset of output_tokens reported for visibility — never priced, never double-counted into the total.
1335
+ *
1336
+ */
1337
+ reasoning_tokens: number;
1338
+ /**
1339
+ * input_tokens + output_tokens.
1340
+ */
1341
+ total_tokens: number;
1342
+ /**
1343
+ * Cost split per meter type — the "tokens plus infra" view. A single-type receipt has one entry whose cost equals cost_usd.
1344
+ *
1345
+ */
1346
+ by_meter_type: Array<{
1347
+ /**
1348
+ * e.g. `llm_tokens`, `compute_execution`.
1349
+ */
1350
+ meter_type: string | null;
1351
+ cost_usd: number | null;
1352
+ }>;
1353
+ /**
1354
+ * One entry per metered event on this generation.
1355
+ */
1356
+ line_items: Array<{
1357
+ /**
1358
+ * Public ID of the usage event, for reconciliation.
1359
+ */
1360
+ event_id: string | null;
1361
+ meter_type: string | null;
1362
+ /**
1363
+ * The upstream provider that served the call.
1364
+ */
1365
+ provider: string | null;
1366
+ model: string | null;
1367
+ cost_usd: number | null;
1368
+ /**
1369
+ * The measured quantities behind this line item's cost — quantity × unit_price, per billable dimension.
1370
+ *
1371
+ */
1372
+ components: Array<{
1373
+ /**
1374
+ * The measured dimension.
1375
+ */
1376
+ component: string | null;
1377
+ quantity: number;
1378
+ unit: string | null;
1379
+ /**
1380
+ * Whether this component contributes to cost. Non-billable details (e.g. reasoning_tokens) are reported but never priced.
1381
+ *
1382
+ */
1383
+ billable: boolean;
1384
+ /**
1385
+ * USD per unit, frozen at write time.
1386
+ */
1387
+ unit_price: number | null;
1388
+ cost_usd: number | null;
1389
+ }>;
1390
+ }>;
1391
+ };
1307
1392
  type KnowledgeCollection = {
1308
1393
  /**
1309
1394
  * Public collection ID (kcol_ prefix).
@@ -1460,6 +1545,12 @@ type Model = {
1460
1545
  */
1461
1546
  inference_types: Array<string>;
1462
1547
  status: 'available' | 'deprecated';
1548
+ /**
1549
+ * Whether this model can back a managed provider (`kind: managed`).
1550
+ * Independent of `status`: `status: available` means the model is in the catalog, not that it is offerable as managed. A managed provider is priced at naturali's own cost, so only models with an authoritative published price qualify — the Anthropic Claude family has none today and is therefore BYOK-only. Creating a managed provider on a model where this is `false` returns 400.
1551
+ *
1552
+ */
1553
+ managed: boolean;
1463
1554
  };
1464
1555
  type ModelList = {
1465
1556
  data: Array<Model>;
@@ -4038,6 +4129,43 @@ type GetGenerationResponses = {
4038
4129
  200: Generation;
4039
4130
  };
4040
4131
  type GetGenerationResponse = GetGenerationResponses[keyof GetGenerationResponses];
4132
+ type GetGenerationUsageData = {
4133
+ body?: never;
4134
+ path: {
4135
+ /**
4136
+ * Project public ID (proj_ prefix).
4137
+ */
4138
+ project_id: string;
4139
+ /**
4140
+ * Generation public ID (gen_ prefix).
4141
+ */
4142
+ generation_id: string;
4143
+ };
4144
+ query?: never;
4145
+ url: '/v1/projects/{project_id}/generations/{generation_id}/usage';
4146
+ };
4147
+ type GetGenerationUsageErrors = {
4148
+ /**
4149
+ * Missing or invalid credentials.
4150
+ */
4151
+ 401: ErrorResponse;
4152
+ /**
4153
+ * The resource does not exist (existence is not leaked).
4154
+ */
4155
+ 404: ErrorResponse;
4156
+ /**
4157
+ * The backing SOAT platform could not complete the operation.
4158
+ */
4159
+ 502: ErrorResponse;
4160
+ };
4161
+ type GetGenerationUsageError = GetGenerationUsageErrors[keyof GetGenerationUsageErrors];
4162
+ type GetGenerationUsageResponses = {
4163
+ /**
4164
+ * The generation's usage receipt.
4165
+ */
4166
+ 200: GenerationUsage;
4167
+ };
4168
+ type GetGenerationUsageResponse = GetGenerationUsageResponses[keyof GetGenerationUsageResponses];
4041
4169
  type ListKnowledgeCollectionsData = {
4042
4170
  body?: never;
4043
4171
  path: {
@@ -4516,6 +4644,11 @@ type ListModelsData = {
4516
4644
  * Filter by lifecycle status.
4517
4645
  */
4518
4646
  status?: 'available' | 'deprecated';
4647
+ /**
4648
+ * Filter by whether the model can back a managed provider — `managed=true` is the set you can pass to `POST /v1/projects/{project_id}/providers` with `kind: managed`. Omit to leave the catalog unfiltered on this axis; `false` returns only the BYOK-only models. Any other value is a 400.
4649
+ *
4650
+ */
4651
+ managed?: boolean;
4519
4652
  };
4520
4653
  url: '/v1/models';
4521
4654
  };
@@ -6187,6 +6320,16 @@ declare class Generations {
6187
6320
  *
6188
6321
  */
6189
6322
  static getGeneration<ThrowOnError extends boolean = false>(options: Options<GetGenerationData, ThrowOnError>): RequestResult<GetGenerationResponses, GetGenerationErrors, ThrowOnError>;
6323
+ /**
6324
+ * Get a generation's cost
6325
+ *
6326
+ * What this one generation cost, and the tokens it was charged on — the billing-grade receipt SOAT froze at write time, per model line item.
6327
+ * This is the per-generation grain that `GET /v1/projects/{project_id}/usage` cannot express: that meter buckets a whole project by model, agent, run, day or meter type, and a run can hold more than one generation. Use this to price a single turn, and the project meter to roll spend up.
6328
+ * `cost_usd` is `null` when nothing was priced — never that the work was free. Only naturali-managed providers are priced; a BYOK generation runs on your own provider account, so it carries no LLM cost here (its tokens are still reported).
6329
+ * A generation belonging to another project responds `404`, not `403`.
6330
+ *
6331
+ */
6332
+ static getGenerationUsage<ThrowOnError extends boolean = false>(options: Options<GetGenerationUsageData, ThrowOnError>): RequestResult<GetGenerationUsageResponses, GetGenerationUsageErrors, ThrowOnError>;
6190
6333
  }
6191
6334
  declare class Knowledge {
6192
6335
  /**
@@ -6419,7 +6562,7 @@ declare class Tasks {
6419
6562
  /**
6420
6563
  * List the task's moves
6421
6564
  *
6422
- * The card's append-only history, oldest first: every move it made, what kind of actor made it, and what caused it. Returned whole — `next_cursor` is always null.
6565
+ * The card's append-only history, oldest first: every move it made, what kind of principal made it, and what caused it. Returned whole — `next_cursor` is always null.
6423
6566
  *
6424
6567
  */
6425
6568
  static listTaskTransitions<ThrowOnError extends boolean = false>(options: Options<ListTaskTransitionsData, ThrowOnError>): RequestResult<ListTaskTransitionsResponses, ListTaskTransitionsErrors, ThrowOnError>;
@@ -6549,4 +6692,4 @@ declare class NaturaliClient {
6549
6692
  constructor({ token, headers }?: NaturaliClientOptions);
6550
6693
  }
6551
6694
  //#endregion
6552
- export { type Acknowledgement, type AddSessionMessageData, type AddSessionMessageError, type AddSessionMessageErrors, type AddSessionMessageResponse, type AddSessionMessageResponses, type Agent, type AgentCreate, type AgentId, type AgentList, type AgentUpdate, Agents, type ApiKeyCreate, type ApiKeyCreated, type ApiKeyId, type ApiKeyList, type ApiKeyRecord, type ApiKeyUpdate, ApiKeys, type AssigneeFilter, Auth, type AuthSession, type Board, type BoardCompletionRule, type BoardCreate, type BoardDispatch, type BoardId, type BoardIdFilter, type BoardList, type BoardOnEnter, type BoardState, type BoardTransition, type BoardUpdate, Boards, type Channel, type ChannelBinding, type ChannelBindingSet, type ChannelCreate, type ChannelId, type ChannelList, type ChannelUpdate, Channels, type ClientOptions, type CollectionId, type Contact, type ContactConversation, type ContactConversationList, type ContactCreate, type ContactId, type ContactIdentity, type ContactIdentityCreate, type ContactList, type ContactMerge, type ContactMergeList, type ContactMergeRequest, type ContactMergeResult, type ContactUpdate, Contacts, type Conversation, type ConversationId, type ConversationList, type ConversationMessage, type ConversationMessageList, type CreateAgentData, type CreateAgentError, type CreateAgentErrors, type CreateAgentResponse, type CreateAgentResponses, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyErrors, type CreateApiKeyResponse, type CreateApiKeyResponses, type CreateBoardData, type CreateBoardError, type CreateBoardErrors, type CreateBoardResponse, type CreateBoardResponses, type CreateChannelData, type CreateChannelError, type CreateChannelErrors, type CreateChannelResponse, type CreateChannelResponses, type CreateContactData, type CreateContactError, type CreateContactErrors, type CreateContactIdentityData, type CreateContactIdentityError, type CreateContactIdentityErrors, type CreateContactIdentityResponse, type CreateContactIdentityResponses, type CreateContactResponse, type CreateContactResponses, type CreateGenerationData, type CreateGenerationError, type CreateGenerationErrors, type CreateGenerationResponse, type CreateGenerationResponses, type CreateKnowledgeCollectionData, type CreateKnowledgeCollectionError, type CreateKnowledgeCollectionErrors, type CreateKnowledgeCollectionResponse, type CreateKnowledgeCollectionResponses, type CreateKnowledgeDocumentData, type CreateKnowledgeDocumentError, type CreateKnowledgeDocumentErrors, type CreateKnowledgeDocumentResponse, type CreateKnowledgeDocumentResponses, type CreateProjectData, type CreateProjectError, type CreateProjectErrors, type CreateProjectResponse, type CreateProjectResponses, type CreateProviderData, type CreateProviderError, type CreateProviderErrors, type CreateProviderResponse, type CreateProviderResponses, type CreateSessionData, type CreateSessionError, type CreateSessionErrors, type CreateSessionResponse, type CreateSessionResponses, type CreateTaskData, type CreateTaskError, type CreateTaskErrors, type CreateTaskResponse, type CreateTaskResponses, type CreateToolData, type CreateToolError, type CreateToolErrors, type CreateToolResponse, type CreateToolResponses, type Cursor, type DeleteAgentData, type DeleteAgentError, type DeleteAgentErrors, type DeleteAgentResponse, type DeleteAgentResponses, type DeleteApiKeyData, type DeleteApiKeyError, type DeleteApiKeyErrors, type DeleteApiKeyResponse, type DeleteApiKeyResponses, type DeleteBoardData, type DeleteBoardError, type DeleteBoardErrors, type DeleteBoardResponse, type DeleteBoardResponses, type DeleteChannelBindingData, type DeleteChannelBindingError, type DeleteChannelBindingErrors, type DeleteChannelBindingResponse, type DeleteChannelBindingResponses, type DeleteChannelData, type DeleteChannelError, type DeleteChannelErrors, type DeleteChannelResponse, type DeleteChannelResponses, type DeleteContactData, type DeleteContactError, type DeleteContactErrors, type DeleteContactIdentityData, type DeleteContactIdentityError, type DeleteContactIdentityErrors, type DeleteContactIdentityResponse, type DeleteContactIdentityResponses, type DeleteContactResponse, type DeleteContactResponses, type DeleteKnowledgeCollectionData, type DeleteKnowledgeCollectionError, type DeleteKnowledgeCollectionErrors, type DeleteKnowledgeCollectionResponse, type DeleteKnowledgeCollectionResponses, type DeleteKnowledgeDocumentData, type DeleteKnowledgeDocumentError, type DeleteKnowledgeDocumentErrors, type DeleteKnowledgeDocumentResponse, type DeleteKnowledgeDocumentResponses, type DeleteProjectData, type DeleteProjectError, type DeleteProjectErrors, type DeleteProjectResponse, type DeleteProjectResponses, type DeleteProviderData, type DeleteProviderError, type DeleteProviderErrors, type DeleteProviderResponse, type DeleteProviderResponses, type DeleteTaskData, type DeleteTaskError, type DeleteTaskErrors, type DeleteTaskResponse, type DeleteTaskResponses, type DeleteToolData, type DeleteToolError, type DeleteToolErrors, type DeleteToolResponse, type DeleteToolResponses, type DiscordModes, type DocumentId, type ErrorResponse, type Force, type GenerateSessionResponseData, type GenerateSessionResponseError, type GenerateSessionResponseErrors, type GenerateSessionResponseResponse, type GenerateSessionResponseResponses, type Generation, type GenerationCreate, type GenerationId, type GenerationList, type GenerationResult, type GenerationStatus, Generations, type GetAgentData, type GetAgentError, type GetAgentErrors, type GetAgentResponse, type GetAgentResponses, type GetApiKeyData, type GetApiKeyError, type GetApiKeyErrors, type GetApiKeyResponse, type GetApiKeyResponses, type GetBoardData, type GetBoardError, type GetBoardErrors, type GetBoardResponse, type GetBoardResponses, type GetChannelBindingData, type GetChannelBindingError, type GetChannelBindingErrors, type GetChannelBindingResponse, type GetChannelBindingResponses, type GetChannelConversationData, type GetChannelConversationError, type GetChannelConversationErrors, type GetChannelConversationResponse, type GetChannelConversationResponses, type GetChannelData, type GetChannelError, type GetChannelErrors, type GetChannelResponse, type GetChannelResponses, type GetContactData, type GetContactError, type GetContactErrors, type GetContactResponse, type GetContactResponses, type GetCurrentUserData, type GetCurrentUserError, type GetCurrentUserErrors, type GetCurrentUserResponse, type GetCurrentUserResponses, type GetGenerationData, type GetGenerationError, type GetGenerationErrors, type GetGenerationResponse, type GetGenerationResponses, type GetKnowledgeCollectionData, type GetKnowledgeCollectionError, type GetKnowledgeCollectionErrors, type GetKnowledgeCollectionResponse, type GetKnowledgeCollectionResponses, type GetKnowledgeDocumentData, type GetKnowledgeDocumentError, type GetKnowledgeDocumentErrors, type GetKnowledgeDocumentResponse, type GetKnowledgeDocumentResponses, type GetModelData, type GetModelError, type GetModelErrors, type GetModelResponse, type GetModelResponses, type GetProjectData, type GetProjectError, type GetProjectErrors, type GetProjectResponse, type GetProjectResponses, type GetProjectUsageData, type GetProjectUsageError, type GetProjectUsageErrors, type GetProjectUsageResponse, type GetProjectUsageResponses, type GetProviderData, type GetProviderError, type GetProviderErrors, type GetProviderResponse, type GetProviderResponses, type GetSessionData, type GetSessionError, type GetSessionErrors, type GetSessionResponse, type GetSessionResponses, type GetTaskData, type GetTaskError, type GetTaskErrors, type GetTaskResponse, type GetTaskResponses, type GetToolData, type GetToolError, type GetToolErrors, type GetToolResponse, type GetToolResponses, type GetTraceData, type GetTraceError, type GetTraceErrors, type GetTraceResponse, type GetTraceResponses, type GetTraceTreeData, type GetTraceTreeError, type GetTraceTreeErrors, type GetTraceTreeResponse, type GetTraceTreeResponses, type HttpExecute, type IdempotencyKey, type IdentityId, Knowledge, type KnowledgeChunk, type KnowledgeCollection, type KnowledgeCollectionCreate, type KnowledgeCollectionList, type KnowledgeCollectionUpdate, type KnowledgeDocument, type KnowledgeDocumentCreate, type KnowledgeDocumentList, type KnowledgeQueryRequest, type KnowledgeQueryResult, type Limit, type ListAgentGenerationsData, type ListAgentGenerationsError, type ListAgentGenerationsErrors, type ListAgentGenerationsResponse, type ListAgentGenerationsResponses, type ListAgentsData, type ListAgentsError, type ListAgentsErrors, type ListAgentsResponse, type ListAgentsResponses, type ListApiKeysData, type ListApiKeysError, type ListApiKeysErrors, type ListApiKeysResponse, type ListApiKeysResponses, type ListBoardsData, type ListBoardsError, type ListBoardsErrors, type ListBoardsResponse, type ListBoardsResponses, type ListChannelConversationMessagesData, type ListChannelConversationMessagesError, type ListChannelConversationMessagesErrors, type ListChannelConversationMessagesResponse, type ListChannelConversationMessagesResponses, type ListChannelConversationsData, type ListChannelConversationsError, type ListChannelConversationsErrors, type ListChannelConversationsResponse, type ListChannelConversationsResponses, type ListChannelsData, type ListChannelsError, type ListChannelsErrors, type ListChannelsResponse, type ListChannelsResponses, type ListContactConversationsData, type ListContactConversationsError, type ListContactConversationsErrors, type ListContactConversationsResponse, type ListContactConversationsResponses, type ListContactMergesData, type ListContactMergesError, type ListContactMergesErrors, type ListContactMergesResponse, type ListContactMergesResponses, type ListContactsData, type ListContactsError, type ListContactsErrors, type ListContactsResponse, type ListContactsResponses, type ListKnowledgeCollectionsData, type ListKnowledgeCollectionsError, type ListKnowledgeCollectionsErrors, type ListKnowledgeCollectionsResponse, type ListKnowledgeCollectionsResponses, type ListKnowledgeDocumentsData, type ListKnowledgeDocumentsError, type ListKnowledgeDocumentsErrors, type ListKnowledgeDocumentsResponse, type ListKnowledgeDocumentsResponses, type ListModelsData, type ListModelsError, type ListModelsErrors, type ListModelsResponse, type ListModelsResponses, type ListProjectsData, type ListProjectsError, type ListProjectsErrors, type ListProjectsResponse, type ListProjectsResponses, type ListProvidersData, type ListProvidersError, type ListProvidersErrors, type ListProvidersResponse, type ListProvidersResponses, type ListTaskTransitionsData, type ListTaskTransitionsError, type ListTaskTransitionsErrors, type ListTaskTransitionsResponse, type ListTaskTransitionsResponses, type ListTasksData, type ListTasksError, type ListTasksErrors, type ListTasksResponse, type ListTasksResponses, type ListToolsData, type ListToolsError, type ListToolsErrors, type ListToolsResponse, type ListToolsResponses, type ListTraceGenerationsData, type ListTraceGenerationsError, type ListTraceGenerationsErrors, type ListTraceGenerationsResponse, type ListTraceGenerationsResponses, type ListTracesData, type ListTracesError, type ListTracesErrors, type ListTracesResponse, type ListTracesResponses, type LogoutData, type LogoutError, type LogoutErrors, type LogoutRequest, type LogoutResponse, type LogoutResponses, type McpConfig, type MergeContactData, type MergeContactError, type MergeContactErrors, type MergeContactResponse, type MergeContactResponses, type MergeId, type Message, type MessagesLimit, type Model, type ModelList, Models, NaturaliClient, type NaturaliClientOptions, type Offset, type Options, type Project, type ProjectCreate, type ProjectId, type ProjectList, type ProjectUpdate, type ProjectUsage, Projects, type Provider, type ProviderCreate, type ProviderId, type ProviderList, type ProviderUpdate, Providers, type QueryKnowledgeCollectionData, type QueryKnowledgeCollectionError, type QueryKnowledgeCollectionErrors, type QueryKnowledgeCollectionResponse, type QueryKnowledgeCollectionResponses, type RefreshRequest, type RefreshSessionData, type RefreshSessionError, type RefreshSessionErrors, type RefreshSessionResponse, type RefreshSessionResponses, type ReingestKnowledgeDocumentData, type ReingestKnowledgeDocumentError, type ReingestKnowledgeDocumentErrors, type ReingestKnowledgeDocumentResponse, type ReingestKnowledgeDocumentResponses, type RequestSignInCodeData, type RequestSignInCodeError, type RequestSignInCodeErrors, type RequestSignInCodeResponse, type RequestSignInCodeResponses, type RevertContactMergeData, type RevertContactMergeError, type RevertContactMergeErrors, type RevertContactMergeResponse, type RevertContactMergeResponses, type RotateApiKeyData, type RotateApiKeyError, type RotateApiKeyErrors, type RotateApiKeyResponse, type RotateApiKeyResponses, type Session, type SessionCreate, type SessionGenerate, type SessionGeneration, type SessionId, type SessionMessage, type SessionMessageCreate, Sessions, type SetChannelBindingData, type SetChannelBindingError, type SetChannelBindingErrors, type SetChannelBindingResponse, type SetChannelBindingResponses, type SignInCodeRequest, type SignInCodeVerify, type StateFilter, type StatusFilter, type Task, type TaskCreate, type TaskId, type TaskList, type TaskTransitionList, type TaskTransitionRecord, type TaskTransitionRequest, type TaskUpdate, Tasks, type Tool, type ToolChoice, type ToolContext, type ToolCreate, type ToolId, type ToolList, type ToolUpdate, Tools, type Trace, type TraceId, type TraceList, type TraceTreeNode, Traces, type TransitionTaskData, type TransitionTaskError, type TransitionTaskErrors, type TransitionTaskResponse, type TransitionTaskResponses, type UpdateAgentData, type UpdateAgentError, type UpdateAgentErrors, type UpdateAgentResponse, type UpdateAgentResponses, type UpdateApiKeyData, type UpdateApiKeyError, type UpdateApiKeyErrors, type UpdateApiKeyResponse, type UpdateApiKeyResponses, type UpdateBoardData, type UpdateBoardError, type UpdateBoardErrors, type UpdateBoardResponse, type UpdateBoardResponses, type UpdateChannelData, type UpdateChannelError, type UpdateChannelErrors, type UpdateChannelResponse, type UpdateChannelResponses, type UpdateContactData, type UpdateContactError, type UpdateContactErrors, type UpdateContactResponse, type UpdateContactResponses, type UpdateKnowledgeCollectionData, type UpdateKnowledgeCollectionError, type UpdateKnowledgeCollectionErrors, type UpdateKnowledgeCollectionResponse, type UpdateKnowledgeCollectionResponses, type UpdateProjectData, type UpdateProjectError, type UpdateProjectErrors, type UpdateProjectResponse, type UpdateProjectResponses, type UpdateProviderData, type UpdateProviderError, type UpdateProviderErrors, type UpdateProviderResponse, type UpdateProviderResponses, type UpdateTaskData, type UpdateTaskError, type UpdateTaskErrors, type UpdateTaskResponse, type UpdateTaskResponses, type UpdateToolData, type UpdateToolError, type UpdateToolErrors, type UpdateToolResponse, type UpdateToolResponses, type UsageGroup, type UsageTokens, type User, type VerifySignInCodeData, type VerifySignInCodeError, type VerifySignInCodeErrors, type VerifySignInCodeResponse, type VerifySignInCodeResponses, createClient, createConfig };
6695
+ export { type Acknowledgement, type AddSessionMessageData, type AddSessionMessageError, type AddSessionMessageErrors, type AddSessionMessageResponse, type AddSessionMessageResponses, type Agent, type AgentCreate, type AgentId, type AgentList, type AgentUpdate, Agents, type ApiKeyCreate, type ApiKeyCreated, type ApiKeyId, type ApiKeyList, type ApiKeyRecord, type ApiKeyUpdate, ApiKeys, type AssigneeFilter, Auth, type AuthSession, type Board, type BoardCompletionRule, type BoardCreate, type BoardDispatch, type BoardId, type BoardIdFilter, type BoardList, type BoardOnEnter, type BoardState, type BoardTransition, type BoardUpdate, Boards, type Channel, type ChannelBinding, type ChannelBindingSet, type ChannelCreate, type ChannelId, type ChannelList, type ChannelUpdate, Channels, type ClientOptions, type CollectionId, type Contact, type ContactConversation, type ContactConversationList, type ContactCreate, type ContactId, type ContactIdentity, type ContactIdentityCreate, type ContactList, type ContactMerge, type ContactMergeList, type ContactMergeRequest, type ContactMergeResult, type ContactUpdate, Contacts, type Conversation, type ConversationId, type ConversationList, type ConversationMessage, type ConversationMessageList, type CreateAgentData, type CreateAgentError, type CreateAgentErrors, type CreateAgentResponse, type CreateAgentResponses, type CreateApiKeyData, type CreateApiKeyError, type CreateApiKeyErrors, type CreateApiKeyResponse, type CreateApiKeyResponses, type CreateBoardData, type CreateBoardError, type CreateBoardErrors, type CreateBoardResponse, type CreateBoardResponses, type CreateChannelData, type CreateChannelError, type CreateChannelErrors, type CreateChannelResponse, type CreateChannelResponses, type CreateContactData, type CreateContactError, type CreateContactErrors, type CreateContactIdentityData, type CreateContactIdentityError, type CreateContactIdentityErrors, type CreateContactIdentityResponse, type CreateContactIdentityResponses, type CreateContactResponse, type CreateContactResponses, type CreateGenerationData, type CreateGenerationError, type CreateGenerationErrors, type CreateGenerationResponse, type CreateGenerationResponses, type CreateKnowledgeCollectionData, type CreateKnowledgeCollectionError, type CreateKnowledgeCollectionErrors, type CreateKnowledgeCollectionResponse, type CreateKnowledgeCollectionResponses, type CreateKnowledgeDocumentData, type CreateKnowledgeDocumentError, type CreateKnowledgeDocumentErrors, type CreateKnowledgeDocumentResponse, type CreateKnowledgeDocumentResponses, type CreateProjectData, type CreateProjectError, type CreateProjectErrors, type CreateProjectResponse, type CreateProjectResponses, type CreateProviderData, type CreateProviderError, type CreateProviderErrors, type CreateProviderResponse, type CreateProviderResponses, type CreateSessionData, type CreateSessionError, type CreateSessionErrors, type CreateSessionResponse, type CreateSessionResponses, type CreateTaskData, type CreateTaskError, type CreateTaskErrors, type CreateTaskResponse, type CreateTaskResponses, type CreateToolData, type CreateToolError, type CreateToolErrors, type CreateToolResponse, type CreateToolResponses, type Cursor, type DeleteAgentData, type DeleteAgentError, type DeleteAgentErrors, type DeleteAgentResponse, type DeleteAgentResponses, type DeleteApiKeyData, type DeleteApiKeyError, type DeleteApiKeyErrors, type DeleteApiKeyResponse, type DeleteApiKeyResponses, type DeleteBoardData, type DeleteBoardError, type DeleteBoardErrors, type DeleteBoardResponse, type DeleteBoardResponses, type DeleteChannelBindingData, type DeleteChannelBindingError, type DeleteChannelBindingErrors, type DeleteChannelBindingResponse, type DeleteChannelBindingResponses, type DeleteChannelData, type DeleteChannelError, type DeleteChannelErrors, type DeleteChannelResponse, type DeleteChannelResponses, type DeleteContactData, type DeleteContactError, type DeleteContactErrors, type DeleteContactIdentityData, type DeleteContactIdentityError, type DeleteContactIdentityErrors, type DeleteContactIdentityResponse, type DeleteContactIdentityResponses, type DeleteContactResponse, type DeleteContactResponses, type DeleteKnowledgeCollectionData, type DeleteKnowledgeCollectionError, type DeleteKnowledgeCollectionErrors, type DeleteKnowledgeCollectionResponse, type DeleteKnowledgeCollectionResponses, type DeleteKnowledgeDocumentData, type DeleteKnowledgeDocumentError, type DeleteKnowledgeDocumentErrors, type DeleteKnowledgeDocumentResponse, type DeleteKnowledgeDocumentResponses, type DeleteProjectData, type DeleteProjectError, type DeleteProjectErrors, type DeleteProjectResponse, type DeleteProjectResponses, type DeleteProviderData, type DeleteProviderError, type DeleteProviderErrors, type DeleteProviderResponse, type DeleteProviderResponses, type DeleteTaskData, type DeleteTaskError, type DeleteTaskErrors, type DeleteTaskResponse, type DeleteTaskResponses, type DeleteToolData, type DeleteToolError, type DeleteToolErrors, type DeleteToolResponse, type DeleteToolResponses, type DiscordModes, type DocumentId, type ErrorResponse, type Force, type GenerateSessionResponseData, type GenerateSessionResponseError, type GenerateSessionResponseErrors, type GenerateSessionResponseResponse, type GenerateSessionResponseResponses, type Generation, type GenerationCreate, type GenerationId, type GenerationList, type GenerationResult, type GenerationStatus, type GenerationUsage, Generations, type GetAgentData, type GetAgentError, type GetAgentErrors, type GetAgentResponse, type GetAgentResponses, type GetApiKeyData, type GetApiKeyError, type GetApiKeyErrors, type GetApiKeyResponse, type GetApiKeyResponses, type GetBoardData, type GetBoardError, type GetBoardErrors, type GetBoardResponse, type GetBoardResponses, type GetChannelBindingData, type GetChannelBindingError, type GetChannelBindingErrors, type GetChannelBindingResponse, type GetChannelBindingResponses, type GetChannelConversationData, type GetChannelConversationError, type GetChannelConversationErrors, type GetChannelConversationResponse, type GetChannelConversationResponses, type GetChannelData, type GetChannelError, type GetChannelErrors, type GetChannelResponse, type GetChannelResponses, type GetContactData, type GetContactError, type GetContactErrors, type GetContactResponse, type GetContactResponses, type GetCurrentUserData, type GetCurrentUserError, type GetCurrentUserErrors, type GetCurrentUserResponse, type GetCurrentUserResponses, type GetGenerationData, type GetGenerationError, type GetGenerationErrors, type GetGenerationResponse, type GetGenerationResponses, type GetGenerationUsageData, type GetGenerationUsageError, type GetGenerationUsageErrors, type GetGenerationUsageResponse, type GetGenerationUsageResponses, type GetKnowledgeCollectionData, type GetKnowledgeCollectionError, type GetKnowledgeCollectionErrors, type GetKnowledgeCollectionResponse, type GetKnowledgeCollectionResponses, type GetKnowledgeDocumentData, type GetKnowledgeDocumentError, type GetKnowledgeDocumentErrors, type GetKnowledgeDocumentResponse, type GetKnowledgeDocumentResponses, type GetModelData, type GetModelError, type GetModelErrors, type GetModelResponse, type GetModelResponses, type GetProjectData, type GetProjectError, type GetProjectErrors, type GetProjectResponse, type GetProjectResponses, type GetProjectUsageData, type GetProjectUsageError, type GetProjectUsageErrors, type GetProjectUsageResponse, type GetProjectUsageResponses, type GetProviderData, type GetProviderError, type GetProviderErrors, type GetProviderResponse, type GetProviderResponses, type GetSessionData, type GetSessionError, type GetSessionErrors, type GetSessionResponse, type GetSessionResponses, type GetTaskData, type GetTaskError, type GetTaskErrors, type GetTaskResponse, type GetTaskResponses, type GetToolData, type GetToolError, type GetToolErrors, type GetToolResponse, type GetToolResponses, type GetTraceData, type GetTraceError, type GetTraceErrors, type GetTraceResponse, type GetTraceResponses, type GetTraceTreeData, type GetTraceTreeError, type GetTraceTreeErrors, type GetTraceTreeResponse, type GetTraceTreeResponses, type HttpExecute, type IdempotencyKey, type IdentityId, Knowledge, type KnowledgeChunk, type KnowledgeCollection, type KnowledgeCollectionCreate, type KnowledgeCollectionList, type KnowledgeCollectionUpdate, type KnowledgeDocument, type KnowledgeDocumentCreate, type KnowledgeDocumentList, type KnowledgeQueryRequest, type KnowledgeQueryResult, type Limit, type ListAgentGenerationsData, type ListAgentGenerationsError, type ListAgentGenerationsErrors, type ListAgentGenerationsResponse, type ListAgentGenerationsResponses, type ListAgentsData, type ListAgentsError, type ListAgentsErrors, type ListAgentsResponse, type ListAgentsResponses, type ListApiKeysData, type ListApiKeysError, type ListApiKeysErrors, type ListApiKeysResponse, type ListApiKeysResponses, type ListBoardsData, type ListBoardsError, type ListBoardsErrors, type ListBoardsResponse, type ListBoardsResponses, type ListChannelConversationMessagesData, type ListChannelConversationMessagesError, type ListChannelConversationMessagesErrors, type ListChannelConversationMessagesResponse, type ListChannelConversationMessagesResponses, type ListChannelConversationsData, type ListChannelConversationsError, type ListChannelConversationsErrors, type ListChannelConversationsResponse, type ListChannelConversationsResponses, type ListChannelsData, type ListChannelsError, type ListChannelsErrors, type ListChannelsResponse, type ListChannelsResponses, type ListContactConversationsData, type ListContactConversationsError, type ListContactConversationsErrors, type ListContactConversationsResponse, type ListContactConversationsResponses, type ListContactMergesData, type ListContactMergesError, type ListContactMergesErrors, type ListContactMergesResponse, type ListContactMergesResponses, type ListContactsData, type ListContactsError, type ListContactsErrors, type ListContactsResponse, type ListContactsResponses, type ListKnowledgeCollectionsData, type ListKnowledgeCollectionsError, type ListKnowledgeCollectionsErrors, type ListKnowledgeCollectionsResponse, type ListKnowledgeCollectionsResponses, type ListKnowledgeDocumentsData, type ListKnowledgeDocumentsError, type ListKnowledgeDocumentsErrors, type ListKnowledgeDocumentsResponse, type ListKnowledgeDocumentsResponses, type ListModelsData, type ListModelsError, type ListModelsErrors, type ListModelsResponse, type ListModelsResponses, type ListProjectsData, type ListProjectsError, type ListProjectsErrors, type ListProjectsResponse, type ListProjectsResponses, type ListProvidersData, type ListProvidersError, type ListProvidersErrors, type ListProvidersResponse, type ListProvidersResponses, type ListTaskTransitionsData, type ListTaskTransitionsError, type ListTaskTransitionsErrors, type ListTaskTransitionsResponse, type ListTaskTransitionsResponses, type ListTasksData, type ListTasksError, type ListTasksErrors, type ListTasksResponse, type ListTasksResponses, type ListToolsData, type ListToolsError, type ListToolsErrors, type ListToolsResponse, type ListToolsResponses, type ListTraceGenerationsData, type ListTraceGenerationsError, type ListTraceGenerationsErrors, type ListTraceGenerationsResponse, type ListTraceGenerationsResponses, type ListTracesData, type ListTracesError, type ListTracesErrors, type ListTracesResponse, type ListTracesResponses, type LogoutData, type LogoutError, type LogoutErrors, type LogoutRequest, type LogoutResponse, type LogoutResponses, type McpConfig, type MergeContactData, type MergeContactError, type MergeContactErrors, type MergeContactResponse, type MergeContactResponses, type MergeId, type Message, type MessagesLimit, type Model, type ModelList, Models, NaturaliClient, type NaturaliClientOptions, type Offset, type Options, type Project, type ProjectCreate, type ProjectId, type ProjectList, type ProjectUpdate, type ProjectUsage, Projects, type Provider, type ProviderCreate, type ProviderId, type ProviderList, type ProviderUpdate, Providers, type QueryKnowledgeCollectionData, type QueryKnowledgeCollectionError, type QueryKnowledgeCollectionErrors, type QueryKnowledgeCollectionResponse, type QueryKnowledgeCollectionResponses, type RefreshRequest, type RefreshSessionData, type RefreshSessionError, type RefreshSessionErrors, type RefreshSessionResponse, type RefreshSessionResponses, type ReingestKnowledgeDocumentData, type ReingestKnowledgeDocumentError, type ReingestKnowledgeDocumentErrors, type ReingestKnowledgeDocumentResponse, type ReingestKnowledgeDocumentResponses, type RequestSignInCodeData, type RequestSignInCodeError, type RequestSignInCodeErrors, type RequestSignInCodeResponse, type RequestSignInCodeResponses, type RevertContactMergeData, type RevertContactMergeError, type RevertContactMergeErrors, type RevertContactMergeResponse, type RevertContactMergeResponses, type RotateApiKeyData, type RotateApiKeyError, type RotateApiKeyErrors, type RotateApiKeyResponse, type RotateApiKeyResponses, type Session, type SessionCreate, type SessionGenerate, type SessionGeneration, type SessionId, type SessionMessage, type SessionMessageCreate, Sessions, type SetChannelBindingData, type SetChannelBindingError, type SetChannelBindingErrors, type SetChannelBindingResponse, type SetChannelBindingResponses, type SignInCodeRequest, type SignInCodeVerify, type StateFilter, type StatusFilter, type Task, type TaskCreate, type TaskId, type TaskList, type TaskTransitionList, type TaskTransitionRecord, type TaskTransitionRequest, type TaskUpdate, Tasks, type Tool, type ToolChoice, type ToolContext, type ToolCreate, type ToolId, type ToolList, type ToolUpdate, Tools, type Trace, type TraceId, type TraceList, type TraceTreeNode, Traces, type TransitionTaskData, type TransitionTaskError, type TransitionTaskErrors, type TransitionTaskResponse, type TransitionTaskResponses, type UpdateAgentData, type UpdateAgentError, type UpdateAgentErrors, type UpdateAgentResponse, type UpdateAgentResponses, type UpdateApiKeyData, type UpdateApiKeyError, type UpdateApiKeyErrors, type UpdateApiKeyResponse, type UpdateApiKeyResponses, type UpdateBoardData, type UpdateBoardError, type UpdateBoardErrors, type UpdateBoardResponse, type UpdateBoardResponses, type UpdateChannelData, type UpdateChannelError, type UpdateChannelErrors, type UpdateChannelResponse, type UpdateChannelResponses, type UpdateContactData, type UpdateContactError, type UpdateContactErrors, type UpdateContactResponse, type UpdateContactResponses, type UpdateKnowledgeCollectionData, type UpdateKnowledgeCollectionError, type UpdateKnowledgeCollectionErrors, type UpdateKnowledgeCollectionResponse, type UpdateKnowledgeCollectionResponses, type UpdateProjectData, type UpdateProjectError, type UpdateProjectErrors, type UpdateProjectResponse, type UpdateProjectResponses, type UpdateProviderData, type UpdateProviderError, type UpdateProviderErrors, type UpdateProviderResponse, type UpdateProviderResponses, type UpdateTaskData, type UpdateTaskError, type UpdateTaskErrors, type UpdateTaskResponse, type UpdateTaskResponses, type UpdateToolData, type UpdateToolError, type UpdateToolErrors, type UpdateToolResponse, type UpdateToolResponses, type UsageGroup, type UsageTokens, type User, type VerifySignInCodeData, type VerifySignInCodeError, type VerifySignInCodeErrors, type VerifySignInCodeResponse, type VerifySignInCodeResponses, createClient, createConfig };
package/dist/index.mjs CHANGED
@@ -1233,6 +1233,21 @@ var Generations = class {
1233
1233
  ...options
1234
1234
  });
1235
1235
  }
1236
+ /**
1237
+ * Get a generation's cost
1238
+ *
1239
+ * What this one generation cost, and the tokens it was charged on — the billing-grade receipt SOAT froze at write time, per model line item.
1240
+ * This is the per-generation grain that `GET /v1/projects/{project_id}/usage` cannot express: that meter buckets a whole project by model, agent, run, day or meter type, and a run can hold more than one generation. Use this to price a single turn, and the project meter to roll spend up.
1241
+ * `cost_usd` is `null` when nothing was priced — never that the work was free. Only naturali-managed providers are priced; a BYOK generation runs on your own provider account, so it carries no LLM cost here (its tokens are still reported).
1242
+ * A generation belonging to another project responds `404`, not `403`.
1243
+ *
1244
+ */
1245
+ static getGenerationUsage(options) {
1246
+ return (options.client ?? client).get({
1247
+ url: "/v1/projects/{project_id}/generations/{generation_id}/usage",
1248
+ ...options
1249
+ });
1250
+ }
1236
1251
  };
1237
1252
  var Knowledge = class {
1238
1253
  /**
@@ -1691,7 +1706,7 @@ var Tasks = class {
1691
1706
  /**
1692
1707
  * List the task's moves
1693
1708
  *
1694
- * The card's append-only history, oldest first: every move it made, what kind of actor made it, and what caused it. Returned whole — `next_cursor` is always null.
1709
+ * The card's append-only history, oldest first: every move it made, what kind of principal made it, and what caused it. Returned whole — `next_cursor` is always null.
1695
1710
  *
1696
1711
  */
1697
1712
  static listTaskTransitions(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -37,7 +37,7 @@
37
37
  "tsx": "^4.23.1",
38
38
  "typescript": "~6.0.3",
39
39
  "vitest": "^4.1.10",
40
- "@naturali/api": "0.37.0"
40
+ "@naturali/api": "0.38.0"
41
41
  },
42
42
  "scripts": {
43
43
  "generate": "tsx scripts/generate.ts",