@naturali/sdk 0.209.3 → 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.cjs +10 -8
- package/dist/index.d.cts +418 -35
- package/dist/index.d.mts +418 -35
- package/dist/index.mjs +10 -8
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -787,6 +787,8 @@ var Channels = class {
|
|
|
787
787
|
*
|
|
788
788
|
* `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.
|
|
789
789
|
*
|
|
790
|
+
* An identifier no channel kind produces is `400`.
|
|
791
|
+
*
|
|
790
792
|
*/
|
|
791
793
|
static setAddress(options) {
|
|
792
794
|
return (options.client ?? client).put({
|
|
@@ -893,7 +895,7 @@ var Channels = class {
|
|
|
893
895
|
/**
|
|
894
896
|
* Read the whole route table
|
|
895
897
|
*
|
|
896
|
-
* Every route across every channel in the project, one read — the table is small by construction
|
|
898
|
+
* Every route across every channel in the project, one read — the table is small by construction, so this is unpaginated.
|
|
897
899
|
*
|
|
898
900
|
*/
|
|
899
901
|
static listProjectChannelRoutes(options) {
|
|
@@ -917,7 +919,7 @@ var Channels = class {
|
|
|
917
919
|
* Connect a channel
|
|
918
920
|
*
|
|
919
921
|
* Connect a channel. The required fields depend on `channel`; no credential is ever returned.
|
|
920
|
-
* **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
|
|
922
|
+
* **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.
|
|
921
923
|
* **WhatsApp** (default) — one of two credential paths, both filling the same write-only secret:
|
|
922
924
|
* * **BYOT** (`credential_source: byot`, default) — supply
|
|
923
925
|
* `phone_number_id` and `access_token` from your own Meta app.
|
|
@@ -1488,7 +1490,7 @@ var AiProviders = class {
|
|
|
1488
1490
|
*
|
|
1489
1491
|
* Deletes an AI provider configuration.
|
|
1490
1492
|
*
|
|
1491
|
-
* Live references —
|
|
1493
|
+
* 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.
|
|
1492
1494
|
*
|
|
1493
1495
|
*/
|
|
1494
1496
|
static deleteAiProvider(options) {
|
|
@@ -1950,7 +1952,7 @@ var Auth = class {
|
|
|
1950
1952
|
/**
|
|
1951
1953
|
* Refresh a session
|
|
1952
1954
|
*
|
|
1953
|
-
* 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
|
|
1955
|
+
* 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.
|
|
1954
1956
|
*
|
|
1955
1957
|
*/
|
|
1956
1958
|
static refreshSession(options) {
|
|
@@ -4280,8 +4282,8 @@ var Orchestrations = class {
|
|
|
4280
4282
|
/**
|
|
4281
4283
|
* Get orchestration queue stats
|
|
4282
4284
|
*
|
|
4283
|
-
* 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`.
|
|
4284
|
-
* 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.
|
|
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`.
|
|
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.
|
|
4285
4287
|
*
|
|
4286
4288
|
*/
|
|
4287
4289
|
static getQueueStats(options) {
|
|
@@ -4302,7 +4304,7 @@ var Orchestrations = class {
|
|
|
4302
4304
|
/**
|
|
4303
4305
|
* List the projects with queued orchestration work
|
|
4304
4306
|
*
|
|
4305
|
-
* 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.
|
|
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.
|
|
4306
4308
|
*
|
|
4307
4309
|
*/
|
|
4308
4310
|
static listQueueStatsProjects(options) {
|
|
@@ -5871,7 +5873,7 @@ var Triggers = class {
|
|
|
5871
5873
|
/**
|
|
5872
5874
|
* Update a trigger
|
|
5873
5875
|
*
|
|
5874
|
-
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks the
|
|
5876
|
+
* 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.
|
|
5875
5877
|
*
|
|
5876
5878
|
*/
|
|
5877
5879
|
static updateTrigger(options) {
|