@naturali/sdk 0.314.0 → 0.314.2
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 +45 -8
- package/dist/index.d.cts +248 -53
- package/dist/index.d.mts +248 -53
- package/dist/index.mjs +45 -8
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1149,7 +1149,7 @@ var Channels = class {
|
|
|
1149
1149
|
/**
|
|
1150
1150
|
* List the channel's conversations
|
|
1151
1151
|
*
|
|
1152
|
-
* A cursor page of the channel's conversations, newest first. A conversation is one address's dialogue on the channel — the continuity anchor that resumes the same
|
|
1152
|
+
* A cursor page of the channel's conversations, newest first. A conversation is one address's dialogue on the channel — the continuity anchor that resumes the same session instead of starting fresh per message — so this is the read path for who has talked to the channel and which actor/session their dialogue resolved to.
|
|
1153
1153
|
* Conversations are created by the inbound path (the WhatsApp and X webhooks, the Discord gateway worker) when a real message arrives; there is no way to create one directly.
|
|
1154
1154
|
*
|
|
1155
1155
|
*/
|
|
@@ -1178,7 +1178,7 @@ var Channels = class {
|
|
|
1178
1178
|
/**
|
|
1179
1179
|
* Delete a conversation
|
|
1180
1180
|
*
|
|
1181
|
-
* Removes the conversation and the
|
|
1181
|
+
* Removes the conversation and the session it maps to. The address, its actor and its other conversations are left alone; the address's next message opens a fresh conversation. To erase the address itself, use [`DELETE /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/delete-address).
|
|
1182
1182
|
*
|
|
1183
1183
|
*/
|
|
1184
1184
|
static deleteChannelConversation(options) {
|
|
@@ -1190,7 +1190,7 @@ var Channels = class {
|
|
|
1190
1190
|
/**
|
|
1191
1191
|
* Get a conversation
|
|
1192
1192
|
*
|
|
1193
|
-
* Where the conversation points: the address it belongs to, the route (or sentinel) whose action opened it, and the
|
|
1193
|
+
* Where the conversation points: the address it belongs to, the route (or sentinel) whose action opened it, and the 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).
|
|
1194
1194
|
*
|
|
1195
1195
|
*/
|
|
1196
1196
|
static getChannelConversation(options) {
|
|
@@ -1202,7 +1202,7 @@ var Channels = class {
|
|
|
1202
1202
|
/**
|
|
1203
1203
|
* Read a conversation's transcript
|
|
1204
1204
|
*
|
|
1205
|
-
* The conversation's messages, oldest first
|
|
1205
|
+
* The conversation's messages, oldest first, read from the session the conversation maps to.
|
|
1206
1206
|
*
|
|
1207
1207
|
*/
|
|
1208
1208
|
static listChannelConversationMessages(options) {
|
|
@@ -1322,7 +1322,7 @@ var Admin = class {
|
|
|
1322
1322
|
/**
|
|
1323
1323
|
* Read the global price book
|
|
1324
1324
|
*
|
|
1325
|
-
* The
|
|
1325
|
+
* The global default prices — the rows carrying neither a provider nor a project, so no tenant's own rates appear here.
|
|
1326
1326
|
*
|
|
1327
1327
|
* These are a cost basis, not a tariff: what a customer pays is the plan they bought plus the multiplier in PRICING.md section 3, applied when spend is reconciled. This is the read behind the storage-rate assertion at boot and the pinned embedding rate.
|
|
1328
1328
|
*
|
|
@@ -4184,6 +4184,43 @@ var McpServers = class {
|
|
|
4184
4184
|
...options
|
|
4185
4185
|
});
|
|
4186
4186
|
}
|
|
4187
|
+
/**
|
|
4188
|
+
* List MCP server grants
|
|
4189
|
+
*
|
|
4190
|
+
* The clients actors signed in from on a `mode: actors` server, one active grant per actor and client, newest first. Empty on any other server. No token is returned.
|
|
4191
|
+
*/
|
|
4192
|
+
static listMcpServerGrants(options) {
|
|
4193
|
+
return (options.client ?? client).get({
|
|
4194
|
+
url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}/grants",
|
|
4195
|
+
...options
|
|
4196
|
+
});
|
|
4197
|
+
}
|
|
4198
|
+
/**
|
|
4199
|
+
* Revoke MCP server grants
|
|
4200
|
+
*
|
|
4201
|
+
* Revokes every active grant of `actor_id` on the server, or every active grant of the server without it; each client's next request is `401`. The actors are kept and may sign in again.
|
|
4202
|
+
*/
|
|
4203
|
+
static revokeMcpServerGrants(options) {
|
|
4204
|
+
return (options.client ?? client).post({
|
|
4205
|
+
url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}/grants/revoke",
|
|
4206
|
+
...options,
|
|
4207
|
+
headers: {
|
|
4208
|
+
"Content-Type": "application/json",
|
|
4209
|
+
...options.headers
|
|
4210
|
+
}
|
|
4211
|
+
});
|
|
4212
|
+
}
|
|
4213
|
+
/**
|
|
4214
|
+
* Revoke an MCP server grant
|
|
4215
|
+
*
|
|
4216
|
+
* Revokes the grant; that client's next request is `401`. The actor is kept and may sign in again.
|
|
4217
|
+
*/
|
|
4218
|
+
static revokeMcpServerGrant(options) {
|
|
4219
|
+
return (options.client ?? client).delete({
|
|
4220
|
+
url: "/v1/projects/{project_id}/mcp-servers/{mcp_server_id}/grants/{grant_id}",
|
|
4221
|
+
...options
|
|
4222
|
+
});
|
|
4223
|
+
}
|
|
4187
4224
|
};
|
|
4188
4225
|
var Memories = class {
|
|
4189
4226
|
/**
|
|
@@ -5617,7 +5654,7 @@ var Projects = class {
|
|
|
5617
5654
|
/**
|
|
5618
5655
|
* Delete a project
|
|
5619
5656
|
*
|
|
5620
|
-
* Permanently deletes the project
|
|
5657
|
+
* Permanently deletes the project. Fails with 409 if the project still has dependent resources — remove them first, or pass `force=true` to delete the project and all its dependents (agents, providers, tools, sessions, generations, traces). Forcing is destructive and irreversible. The managed conversion rules every project is created with are not dependents: they are removed with the project.
|
|
5621
5658
|
* Requires the `owner` role — an `admin` runs the project day to day, but destroying it is the billing owner's call.
|
|
5622
5659
|
* The project's spend so far is settled on the owner's balance first, and its runs this cycle stay on the owner's run allowance and statement.
|
|
5623
5660
|
*
|
|
@@ -5836,7 +5873,7 @@ var Projects = class {
|
|
|
5836
5873
|
/**
|
|
5837
5874
|
* Get per-project usage
|
|
5838
5875
|
*
|
|
5839
|
-
* The per-project meter — the re-billing view
|
|
5876
|
+
* The per-project meter — the re-billing view. Aggregates the project's usage over an optional [from, to] window, bucketed by a single dimension. Costs are the billing-grade cost_usd frozen at write time; null means nothing in the bucket was priced (never that it was free). Only managed providers are priced, so cost reflects managed usage; BYOK usage carries no LLM cost.
|
|
5840
5877
|
*
|
|
5841
5878
|
* 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.
|
|
5842
5879
|
*
|
|
@@ -6867,7 +6904,7 @@ var Users = class {
|
|
|
6867
6904
|
*
|
|
6868
6905
|
* **This route counts live; the refusal reads a figure counted every few minutes.** So the two can differ by a burst: this is the more current number, and a refusal quotes the one it actually enforced.
|
|
6869
6906
|
*
|
|
6870
|
-
* It is also more expensive than the balance read: it reads
|
|
6907
|
+
* It is also more expensive than the balance read: it reads several sources per project. Poll it on the order of minutes, not seconds. A figure that could not be read is `null` rather than failing the request.
|
|
6871
6908
|
*
|
|
6872
6909
|
*/
|
|
6873
6910
|
static getCurrentUserUsage(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.314.
|
|
3
|
+
"version": "0.314.2",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"naturali",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
41
|
-
"@naturali/api": "0.314.
|
|
41
|
+
"@naturali/api": "0.314.2",
|
|
42
42
|
"@ttoss/openapi-codegen": "^0.10.1",
|
|
43
43
|
"@types/node": "^26.5.1",
|
|
44
44
|
"tsdown": "^0.23.0",
|