@naturali/cli 0.235.0 → 0.236.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.
Files changed (2) hide show
  1. package/dist/index.mjs +41 -12
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
17
17
  };
18
18
  //#endregion
19
19
  //#region package.json
20
- var version = "0.235.0";
20
+ var version = "0.236.0";
21
21
  //#endregion
22
22
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
23
23
  const serializeFormDataPair = (data, key, value) => {
@@ -940,6 +940,7 @@ var Channels = class {
940
940
  *
941
941
  * Connect a channel. The required fields depend on `channel`; no credential is ever returned.
942
942
  * **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, `502 discord_unavailable` when Discord cannot be read. Returns `501` when this deployment does not enable Discord channels.
943
+ * **X** (`channel: x`) — supply the bot's `bot_token` (X developer portal, Chat bots) and the `consumer_key` and `consumer_secret` of the app that issued it. naturali then registers its own webhook on that app, subscribes it to the bot's incoming direct messages and registers the bot's chat encryption key, keeping the private key sealed: replies are end-to-end encrypted, and the project never handles keys, webhooks or ciphertext. Pass `chat_private_keys` and `chat_key_version` instead to keep a key the bot already registered. `400 invalid_bot_token` or `400 invalid_consumer_credentials` when X rejects a credential, `409 bot_in_use` when another channel holds the bot, `502 x_provisioning_failed` when X refuses the webhook or the subscription (an app holds a limited number of webhooks), `429 x_key_registration_limited` when the bot used its few daily key registrations, `502 x_unavailable` when X cannot be reached. Returns `501` when this deployment does not enable X channels.
943
944
  * **WhatsApp** (default) — one of two credential paths, both filling the same write-only secret:
944
945
  * * **BYOT** (`credential_source: byot`, default) — supply
945
946
  * `phone_number_id` and `access_token` from your own Meta app. The
@@ -1047,7 +1048,7 @@ var Channels = class {
1047
1048
  * List the channel's conversations
1048
1049
  *
1049
1050
  * 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 runtime 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.
1050
- * Conversations are created by the inbound path (the WhatsApp webhook, the Discord gateway worker) when a real message arrives; there is no way to create one directly.
1051
+ * 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.
1051
1052
  *
1052
1053
  */
1053
1054
  static listChannelConversations(options) {
@@ -8409,7 +8410,7 @@ const routes = {
8409
8410
  "in": "path"
8410
8411
  }, {
8411
8412
  "name": "identifier",
8412
- "description": "The prefixed, self-describing channel identifier (`whatsapp:dm:<phone>`, `discord:dm:<user_id>`, `discord:thread:<guild_id>:<channel_id>`), URL-encoded.\n",
8413
+ "description": "The prefixed, self-describing channel identifier (`whatsapp:dm:<phone>`, `discord:dm:<user_id>`, `discord:thread:<guild_id>:<channel_id>`, `x:dm:<user_id>`), URL-encoded.\n",
8413
8414
  "required": true,
8414
8415
  "type": "string",
8415
8416
  "in": "path"
@@ -8435,7 +8436,7 @@ const routes = {
8435
8436
  },
8436
8437
  {
8437
8438
  "name": "identifier",
8438
- "description": "The prefixed, self-describing channel identifier (`whatsapp:dm:<phone>`, `discord:dm:<user_id>`, `discord:thread:<guild_id>:<channel_id>`), URL-encoded.\n",
8439
+ "description": "The prefixed, self-describing channel identifier (`whatsapp:dm:<phone>`, `discord:dm:<user_id>`, `discord:thread:<guild_id>:<channel_id>`, `x:dm:<user_id>`), URL-encoded.\n",
8439
8440
  "required": true,
8440
8441
  "type": "string",
8441
8442
  "in": "path"
@@ -8516,7 +8517,7 @@ const routes = {
8516
8517
  "in": "path"
8517
8518
  }, {
8518
8519
  "name": "identifier",
8519
- "description": "The prefixed, self-describing channel identifier (`whatsapp:dm:<phone>`, `discord:dm:<user_id>`, `discord:thread:<guild_id>:<channel_id>`), URL-encoded.\n",
8520
+ "description": "The prefixed, self-describing channel identifier (`whatsapp:dm:<phone>`, `discord:dm:<user_id>`, `discord:thread:<guild_id>:<channel_id>`, `x:dm:<user_id>`), URL-encoded.\n",
8520
8521
  "required": true,
8521
8522
  "type": "string",
8522
8523
  "in": "path"
@@ -8542,7 +8543,7 @@ const routes = {
8542
8543
  },
8543
8544
  {
8544
8545
  "name": "identifier",
8545
- "description": "The prefixed, self-describing channel identifier (`whatsapp:dm:<phone>`, `discord:dm:<user_id>`, `discord:thread:<guild_id>:<channel_id>`), URL-encoded.\n",
8546
+ "description": "The prefixed, self-describing channel identifier (`whatsapp:dm:<phone>`, `discord:dm:<user_id>`, `discord:thread:<guild_id>:<channel_id>`, `x:dm:<user_id>`), URL-encoded.\n",
8546
8547
  "required": true,
8547
8548
  "type": "string",
8548
8549
  "in": "path"
@@ -11700,7 +11701,7 @@ const routes = {
11700
11701
  "create-channel": {
11701
11702
  serviceClass: "Channels",
11702
11703
  operationId: "createChannel",
11703
- description: "Connect a channel. The required fields depend on `channel`; no credential is ever returned. **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, `502 discord_unavailable` when Discord cannot be read. Returns `501` when this deployment does not enable Discord channels. **WhatsApp** (default) — one of two credential paths, both filling the same write-only secret: * **BYOT** (`credential_source: byot`, default) — supply `phone_number_id` and `access_token` from your own Meta app. The number is read with the token first: `400 invalid_access_token` when Meta rejects the token, `400 phone_number_not_accessible` when it cannot reach that number, `502 meta_unavailable` when Meta fails. The token's app is then subscribed to the WABA Meta reports as the number's owner, which is the `waba_id` stored: `400 waba_not_manageable` when the token cannot subscribe to it. * **Embedded signup** (`credential_source: embedded_signup`) — supply `code` and `waba_id` from the Meta popup; naturali exchanges the `code` for the token, subscribes its app to the WABA and registers the number for sending when it is not yet, so the customer never hands over a token. Returns `501` on deployments where Meta App credentials are not configured. The project's plan limits how many channels it may hold. At the limit this responds `403` with `plan_limit_reached`, whose `details` carry the `plan` and the `limit`, before any credential is acquired. Only `active` channels count, so disabling one frees allowance without deleting it.",
11704
+ description: "Connect a channel. The required fields depend on `channel`; no credential is ever returned. **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, `502 discord_unavailable` when Discord cannot be read. Returns `501` when this deployment does not enable Discord channels. **X** (`channel: x`) — supply the bot's `bot_token` (X developer portal, Chat bots) and the `consumer_key` and `consumer_secret` of the app that issued it. naturali then registers its own webhook on that app, subscribes it to the bot's incoming direct messages and registers the bot's chat encryption key, keeping the private key sealed: replies are end-to-end encrypted, and the project never handles keys, webhooks or ciphertext. Pass `chat_private_keys` and `chat_key_version` instead to keep a key the bot already registered. `400 invalid_bot_token` or `400 invalid_consumer_credentials` when X rejects a credential, `409 bot_in_use` when another channel holds the bot, `502 x_provisioning_failed` when X refuses the webhook or the subscription (an app holds a limited number of webhooks), `429 x_key_registration_limited` when the bot used its few daily key registrations, `502 x_unavailable` when X cannot be reached. Returns `501` when this deployment does not enable X channels. **WhatsApp** (default) — one of two credential paths, both filling the same write-only secret: * **BYOT** (`credential_source: byot`, default) — supply `phone_number_id` and `access_token` from your own Meta app. The number is read with the token first: `400 invalid_access_token` when Meta rejects the token, `400 phone_number_not_accessible` when it cannot reach that number, `502 meta_unavailable` when Meta fails. The token's app is then subscribed to the WABA Meta reports as the number's owner, which is the `waba_id` stored: `400 waba_not_manageable` when the token cannot subscribe to it. * **Embedded signup** (`credential_source: embedded_signup`) — supply `code` and `waba_id` from the Meta popup; naturali exchanges the `code` for the token, subscribes its app to the WABA and registers the number for sending when it is not yet, so the customer never hands over a token. Returns `501` on deployments where Meta App credentials are not configured. The project's plan limits how many channels it may hold. At the limit this responds `403` with `plan_limit_reached`, whose `details` carry the `plan` and the `limit`, before any credential is acquired. Only `active` channels count, so disabling one frees allowance without deleting it.",
11704
11705
  moduleDocsUrl: "https://naturali.ai/docs/modules/channels",
11705
11706
  httpMethod: "post",
11706
11707
  pathParams: ["project_id"],
@@ -11794,7 +11795,7 @@ const routes = {
11794
11795
  },
11795
11796
  {
11796
11797
  "name": "bot_token",
11797
- "description": "Write-only. Required for `discord`. The bot token, sealed in naturali's encrypted store so the gateway worker can authenticate its WebSocket. Accepted on write, never returned.\n",
11798
+ "description": "Write-only. Required for `discord` and `x`. The bot token, sealed in naturali's encrypted store. Accepted on write, never returned.\n",
11798
11799
  "required": false,
11799
11800
  "type": "string",
11800
11801
  "in": "body"
@@ -11805,6 +11806,34 @@ const routes = {
11805
11806
  "required": false,
11806
11807
  "type": "object",
11807
11808
  "in": "body"
11809
+ },
11810
+ {
11811
+ "name": "consumer_key",
11812
+ "description": "Write-only. Required for `x`. The consumer key (API key) of the X app that issued the bot. Accepted on write, never returned.\n",
11813
+ "required": false,
11814
+ "type": "string",
11815
+ "in": "body"
11816
+ },
11817
+ {
11818
+ "name": "consumer_secret",
11819
+ "description": "Write-only. Required for `x`. The app's consumer secret; X signs webhook deliveries with it. Accepted on write, never returned.\n",
11820
+ "required": false,
11821
+ "type": "string",
11822
+ "in": "body"
11823
+ },
11824
+ {
11825
+ "name": "chat_private_keys",
11826
+ "description": "Write-only. Optional for `x`, with `chat_key_version`: the bot's exported chat private keys (base64), to keep a key already registered instead of registering a new one.\n",
11827
+ "required": false,
11828
+ "type": "string",
11829
+ "in": "body"
11830
+ },
11831
+ {
11832
+ "name": "chat_key_version",
11833
+ "description": "Optional for `x`, with `chat_private_keys`. The registered key's version.",
11834
+ "required": false,
11835
+ "type": "string",
11836
+ "in": "body"
11808
11837
  }
11809
11838
  ]
11810
11839
  },
@@ -11936,7 +11965,7 @@ const routes = {
11936
11965
  },
11937
11966
  {
11938
11967
  "name": "bot_token",
11939
- "description": "Discord. Write-only. Rotates the sealed bot token.",
11968
+ "description": "Discord or X. Write-only. Rotates the sealed bot token.",
11940
11969
  "required": false,
11941
11970
  "type": "string",
11942
11971
  "in": "body"
@@ -11984,7 +12013,7 @@ const routes = {
11984
12013
  "list-channel-conversations": {
11985
12014
  serviceClass: "Channels",
11986
12015
  operationId: "listChannelConversations",
11987
- description: "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 runtime 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. Conversations are created by the inbound path (the WhatsApp webhook, the Discord gateway worker) when a real message arrives; there is no way to create one directly.",
12016
+ description: "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 runtime 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. 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.",
11988
12017
  moduleDocsUrl: "https://naturali.ai/docs/modules/channels",
11989
12018
  httpMethod: "get",
11990
12019
  pathParams: ["project_id", "channel_id"],
@@ -12026,7 +12055,7 @@ const routes = {
12026
12055
  },
12027
12056
  {
12028
12057
  "name": "identifier",
12029
- "description": "Filter to one address by the identifier conversations carry (`discord:dm:<user_id>`, `discord:thread:<guild_id>:<channel_id>`, `whatsapp:dm:<phone>`), in this channel's kind; any other form is `400`. At most one row matches.\n",
12058
+ "description": "Filter to one address by the identifier conversations carry (`discord:dm:<user_id>`, `discord:thread:<guild_id>:<channel_id>`, `whatsapp:dm:<phone>`, `x:dm:<user_id>`), in this channel's kind; any other form is `400`. At most one row matches.\n",
12030
12059
  "required": false,
12031
12060
  "type": "string",
12032
12061
  "in": "query"
@@ -12060,7 +12089,7 @@ const routes = {
12060
12089
  },
12061
12090
  {
12062
12091
  "name": "identifier",
12063
- "description": "The address identifier, in this channel's kind (`whatsapp:dm:<phone>`, `discord:dm:<user_id>`); any other form is `400`.",
12092
+ "description": "The address identifier, in this channel's kind (`whatsapp:dm:<phone>`, `discord:dm:<user_id>`, `x:dm:<user_id>`); any other form is `400`.",
12064
12093
  "required": true,
12065
12094
  "type": "string",
12066
12095
  "in": "body"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.235.0",
3
+ "version": "0.236.0",
4
4
  "description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -31,7 +31,7 @@
31
31
  "yaml": "^2.9.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@naturali/sdk": "0.235.0",
34
+ "@naturali/sdk": "0.236.0",
35
35
  "@ttoss/openapi-codegen": "^0.10.1",
36
36
  "@types/node": "^26.5.1",
37
37
  "tsdown": "^0.23.0",