@naturali/sdk 0.209.2 → 0.209.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -786,6 +786,8 @@ var Channels = class {
786
786
  *
787
787
  * `actor_id` binds an actor of this project, so the address speaks as the same actor your own sessions use. A changed actor deletes the address's conversations and their sessions — a session's actor is fixed — and the next message opens a fresh one; the actor naturali created for the address is deleted with them. An actor you bind is never deleted here.
788
788
  *
789
+ * An identifier no channel kind produces is `400`.
790
+ *
789
791
  */
790
792
  static setAddress(options) {
791
793
  return (options.client ?? client).put({
@@ -892,7 +894,7 @@ var Channels = class {
892
894
  /**
893
895
  * Read the whole route table
894
896
  *
895
- * Every route across every channel in the project, one read — the table is small by construction (CHANNELS-ROUTING.md §3.6), so this is unpaginated.
897
+ * Every route across every channel in the project, one read — the table is small by construction, so this is unpaginated.
896
898
  *
897
899
  */
898
900
  static listProjectChannelRoutes(options) {
@@ -916,7 +918,7 @@ var Channels = class {
916
918
  * Connect a channel
917
919
  *
918
920
  * Connect a channel. The required fields depend on `channel`; no credential is ever returned.
919
- * **Discord** (`channel: discord`) — supply `application_id` and `bot_token`, plus the `modes` selecting which Gateway flows to serve (direct messages, and/or @mention-opens-a-thread). The token is checked with Discord first: `400 invalid_bot_token` when Discord rejects it, `400 application_mismatch` when it belongs to another application. Returns `501` when the deployment has no `CHANNEL_TOKEN_KEY` configured.
921
+ * **Discord** (`channel: discord`) — supply `application_id` and `bot_token`, plus the `modes` selecting which Gateway flows to serve (direct messages, and/or @mention-opens-a-thread). The token is checked with Discord first: `400 invalid_bot_token` when Discord rejects it, `400 application_mismatch` when it belongs to another application. Returns `501` when this deployment does not enable Discord channels.
920
922
  * **WhatsApp** (default) — one of two credential paths, both filling the same write-only secret:
921
923
  * * **BYOT** (`credential_source: byot`, default) — supply
922
924
  * `phone_number_id` and `access_token` from your own Meta app.
@@ -1487,7 +1489,7 @@ var AiProviders = class {
1487
1489
  *
1488
1490
  * Deletes an AI provider configuration.
1489
1491
  *
1490
- * Live references — chats, agents, and model routes whose targets name this provider — always block deletion with `409 AI_PROVIDER_HAS_DEPENDENTS`; `force` does not override them, so delete or repoint those resources first. Soft dependents — price overrides and usage/generation records — also block with `409` unless `force=true`, which deletes the provider's price overrides and unlinks its usage history, preserving those rows: each usage event keeps the provider's id as its `ai_provider_id`. The `409` body's `error.meta` reports the counts, a sample of offending IDs, and a `forcible` flag that is `true` when a `force=true` retry would succeed.
1492
+ * Live references — agents and model routes whose targets name this provider — always block deletion with `409 AI_PROVIDER_HAS_DEPENDENTS`; `force` does not override them, so delete or repoint those resources first. Soft dependents — price overrides and usage/generation records — also block with `409` unless `force=true`, which deletes the provider's price overrides and unlinks its usage history, preserving those rows: each usage event keeps the provider's id as its `ai_provider_id`. The `409` body's `error.meta` reports the counts, a sample of offending IDs, and a `forcible` flag that is `true` when a `force=true` retry would succeed.
1491
1493
  *
1492
1494
  */
1493
1495
  static deleteAiProvider(options) {
@@ -1949,7 +1951,7 @@ var Auth = class {
1949
1951
  /**
1950
1952
  * Refresh a session
1951
1953
  *
1952
- * Exchanges a valid refresh token for a new access JWT and a rotated refresh token, taken from the body or from the `refresh_token` cookie set at sign-in — a browser sends an empty body and the cookie carries the credential. Refresh tokens are single-use; presenting a previously-rotated token is treated as reuse and revokes the whole session family (createRefreshRotation reuse detection), except within a few seconds of the rotation, where it is treated as two tabs racing on one cookie and rotated again.
1954
+ * Exchanges a valid refresh token for a new access JWT and a rotated refresh token, taken from the body or from the `refresh_token` cookie set at sign-in — a browser sends an empty body and the cookie carries the credential. Refresh tokens are single-use; presenting a previously-rotated token is treated as reuse and revokes the whole session family, except within a few seconds of the rotation, where it is treated as two tabs racing on one cookie and rotated again.
1953
1955
  *
1954
1956
  */
1955
1957
  static refreshSession(options) {
@@ -2624,10 +2626,7 @@ var Embeddings = class {
2624
2626
  * Provide `input` for a single text or `inputs` for a batch. At least one is required.
2625
2627
  * Returns `embedding` when `input` is used, and `embeddings` when `inputs` is used.
2626
2628
  *
2627
- * `project_id` names the project the call's token usage is metered against, so
2628
- * embedding spend reaches the usage rollup and the project's `cost_usd` / `tokens`
2629
- * quotas. A project-scoped credential supplies its own project; a call that names
2630
- * none and is bound to none is `400 VALIDATION_FAILED`.
2629
+ * The call's token usage is metered against the project in the path, so embedding spend reaches the usage rollup and the project's `cost_usd` / `tokens` quotas. A body `project_id` is ignored.
2631
2630
  *
2632
2631
  */
2633
2632
  static createEmbeddings(options) {
@@ -3678,7 +3677,7 @@ var Listings = class {
3678
3677
  * Update a listing
3679
3678
  *
3680
3679
  * Change the title or description, or pause and resume the listing.
3681
- * `state: suspended` stops the listing for every installing project at once; their installs are kept. `state: listed` resumes a listing you suspended, provided naturali had listed it; nobody reinstalls. A listing naturali suspended cannot be resumed here, and an invalid move answers `409 invalid_listing_state`.
3680
+ * `state: suspended` stops a `listed` listing for every installing project at once; their installs are kept. `state: listed` resumes a listing you suspended, provided naturali had listed it; nobody reinstalls. A listing naturali suspended cannot be resumed here, and an invalid move answers `409 invalid_listing_state`.
3682
3681
  *
3683
3682
  */
3684
3683
  static updateListing(options) {
@@ -4282,8 +4281,8 @@ var Orchestrations = class {
4282
4281
  /**
4283
4282
  * Get orchestration queue stats
4284
4283
  *
4285
- * Returns a point-in-time snapshot of the orchestration run queue: how many tasks are waiting to be claimed (`queue_depth`), how many are currently claimed with a valid lease (`claimed_tasks`), the age of the oldest waiting task, recent claim-latency percentiles over a rolling in-process window. The per-project breakdown is listed by `GET /v1/projects/{project_id}/orchestrations/queue/stats/projects`. Intended for admin/operator policies; guarded by `orchestrations:GetQueueStats`.
4286
- * Every figure is scoped to what the caller may see. A project-scoped caller gets `queue_depth` and `claimed_tasks` summed over their own projects, and `null` for `oldest_queued_age_seconds` and the `claim_latency_ms` percentiles — both describe the whole deployment and cannot be narrowed, so they are withheld rather than approximated. An unrestricted caller (the action granted on every project) gets the deployment-wide figures.
4284
+ * Returns a point-in-time snapshot of the orchestration run queue: how many tasks are waiting to be claimed (`queue_depth`), how many are currently claimed with a valid lease (`claimed_tasks`), the age of the oldest waiting task, recent claim-latency percentiles over a rolling in-process window. The per-project breakdown is listed by `GET /v1/projects/{project_id}/orchestrations/queue/stats/projects`.
4285
+ * Every figure is scoped to what the caller may see. A project-scoped caller gets `queue_depth` and `claimed_tasks` summed over their own projects, and `null` for `oldest_queued_age_seconds` and the `claim_latency_ms` percentiles — both describe the whole deployment and cannot be narrowed, so they are withheld rather than approximated.
4287
4286
  *
4288
4287
  */
4289
4288
  static getQueueStats(options) {
@@ -4304,7 +4303,7 @@ var Orchestrations = class {
4304
4303
  /**
4305
4304
  * List the projects with queued orchestration work
4306
4305
  *
4307
- * One row per project with any queued or claimed task, ordered by project ID: the per-project breakdown of `GET /v1/projects/{project_id}/orchestrations/queue/stats`. A project-scoped caller sees its own projects only. Guarded by `orchestrations:GetQueueStats`.
4306
+ * One row per project with any queued or claimed task, ordered by project ID: the per-project breakdown of `GET /v1/projects/{project_id}/orchestrations/queue/stats`. A project-scoped caller sees its own projects only.
4308
4307
  *
4309
4308
  */
4310
4309
  static listQueueStatsProjects(options) {
@@ -5873,7 +5872,7 @@ var Triggers = class {
5873
5872
  /**
5874
5873
  * Update a trigger
5875
5874
  *
5876
- * Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks the target-start action (`orchestrations:StartRun`, `agents:CreateAgentGeneration` or `tools:CallTool`) against the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had.
5875
+ * Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks that the caller may start the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had.
5877
5876
  *
5878
5877
  */
5879
5878
  static updateTrigger(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.209.2",
3
+ "version": "0.209.4",
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.209.2",
41
+ "@naturali/api": "0.209.4",
42
42
  "@ttoss/openapi-codegen": "^0.10.0",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",