@naturali/cli 0.211.5 → 0.211.7
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 +16 -11
- 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.211.
|
|
20
|
+
var version = "0.211.7";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -942,7 +942,10 @@ var Channels = class {
|
|
|
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. Returns `501` when this deployment does not enable Discord channels.
|
|
943
943
|
* **WhatsApp** (default) — one of two credential paths, both filling the same write-only secret:
|
|
944
944
|
* * **BYOT** (`credential_source: byot`, default) — supply
|
|
945
|
-
* `phone_number_id` and `access_token` from your own Meta app.
|
|
945
|
+
* `phone_number_id` and `access_token` from your own Meta app. The
|
|
946
|
+
* number is read with the token first: `400 invalid_access_token` when
|
|
947
|
+
* Meta rejects the token, `400 phone_number_not_accessible` when it
|
|
948
|
+
* cannot reach that number, `502 meta_unavailable` when Meta fails.
|
|
946
949
|
*
|
|
947
950
|
* * **Embedded signup** (`credential_source: embedded_signup`) — supply
|
|
948
951
|
* `code` and `waba_id` from the Meta popup; naturali exchanges the
|
|
@@ -968,11 +971,11 @@ var Channels = class {
|
|
|
968
971
|
/**
|
|
969
972
|
* Create a WhatsApp signup link
|
|
970
973
|
*
|
|
971
|
-
* A Meta Embedded Signup URL for this project, to hand to the person who owns the WhatsApp number. They sign in with Meta
|
|
974
|
+
* A Meta Embedded Signup URL for this project, to hand to the person who owns the WhatsApp number. They sign in with Meta and pick or create the business account and number; no popup is needed. The dialog ends on naturali's app, where a signed-in member of this project confirms the number, and it is linked as a channel with `credential_source: embedded_signup` (`POST /v1/channels/whatsapp/signup/complete`).
|
|
972
975
|
*
|
|
973
976
|
* The link only links the number: the channel starts with `default: { action: silence }`, so it answers nothing until an agent is bound to it with `PATCH /v1/projects/{project_id}/channels/{channel_id}` or a route.
|
|
974
977
|
*
|
|
975
|
-
* The link is good for 30 minutes
|
|
978
|
+
* The link is good for 30 minutes. A number not yet registered for sending is registered with a two-step verification PIN naturali generates and does not keep; the owner can reset it in WhatsApp Manager. Returns `501` on deployments where Meta signup is not configured.
|
|
976
979
|
*
|
|
977
980
|
*/
|
|
978
981
|
static createWhatsappSignupLink(options) {
|
|
@@ -984,7 +987,7 @@ var Channels = class {
|
|
|
984
987
|
/**
|
|
985
988
|
* Complete a WhatsApp signup
|
|
986
989
|
*
|
|
987
|
-
* Finish a signup link
|
|
990
|
+
* Finish a signup link: the app's result page receives `pending` and the numbers Meta granted, and sends back the one to connect. The caller must be a member of the project the link was created for (`404` otherwise), so a link opened by anyone else connects nothing. `pending` expires 10 minutes after the dialog returns (`400 link_expired`).
|
|
988
991
|
*
|
|
989
992
|
*/
|
|
990
993
|
static completeWhatsappSignup(options) {
|
|
@@ -5025,7 +5028,7 @@ var Projects = class {
|
|
|
5025
5028
|
*
|
|
5026
5029
|
* An `owner` may grant `admin` or `member`; an `admin` may grant `member` only, so administration cannot hand out its own authority. `role: owner` is refused — that is the billing owner, and ownership moves only through a transfer the new owner accepts (`PUT /v1/projects/{project_id}/transfer`).
|
|
5027
5030
|
*
|
|
5028
|
-
* The invitation email is a courtesy, not the grant: if it cannot be sent the membership still stands, and the response still says `pending`. Requires an account-wide credential
|
|
5031
|
+
* The invitation email is a courtesy, not the grant: if it cannot be sent the membership still stands, and the response still says `pending`. Requires an account-wide credential and is refused to a connected app: neither may grant access that would outlive its own revocation.
|
|
5029
5032
|
*
|
|
5030
5033
|
*/
|
|
5031
5034
|
static addProjectMember(options) {
|
|
@@ -5061,6 +5064,8 @@ var Projects = class {
|
|
|
5061
5064
|
*
|
|
5062
5065
|
* The owner's own row is refused in either direction — it names who pays, so changing it is a transfer (`PUT /v1/projects/{project_id}/transfer`) rather than a role change.
|
|
5063
5066
|
*
|
|
5067
|
+
* Requires an account-wide credential and is refused to a connected app.
|
|
5068
|
+
*
|
|
5064
5069
|
*/
|
|
5065
5070
|
static updateProjectMember(options) {
|
|
5066
5071
|
return (options.client ?? client).patch({
|
|
@@ -11147,7 +11152,7 @@ const routes = {
|
|
|
11147
11152
|
"create-channel": {
|
|
11148
11153
|
serviceClass: "Channels",
|
|
11149
11154
|
operationId: "createChannel",
|
|
11150
|
-
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. 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. * **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.",
|
|
11155
|
+
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. 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. * **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.",
|
|
11151
11156
|
moduleDocsUrl: "https://naturali.ai/docs/modules/channels",
|
|
11152
11157
|
httpMethod: "post",
|
|
11153
11158
|
pathParams: ["project_id"],
|
|
@@ -11258,7 +11263,7 @@ const routes = {
|
|
|
11258
11263
|
"create-whatsapp-signup-link": {
|
|
11259
11264
|
serviceClass: "Channels",
|
|
11260
11265
|
operationId: "createWhatsappSignupLink",
|
|
11261
|
-
description: "A Meta Embedded Signup URL for this project, to hand to the person who owns the WhatsApp number. They sign in with Meta
|
|
11266
|
+
description: "A Meta Embedded Signup URL for this project, to hand to the person who owns the WhatsApp number. They sign in with Meta and pick or create the business account and number; no popup is needed. The dialog ends on naturali's app, where a signed-in member of this project confirms the number, and it is linked as a channel with `credential_source: embedded_signup` (`POST /v1/channels/whatsapp/signup/complete`). The link only links the number: the channel starts with `default: { action: silence }`, so it answers nothing until an agent is bound to it with `PATCH /v1/projects/{project_id}/channels/{channel_id}` or a route. The link is good for 30 minutes. A number not yet registered for sending is registered with a two-step verification PIN naturali generates and does not keep; the owner can reset it in WhatsApp Manager. Returns `501` on deployments where Meta signup is not configured.",
|
|
11262
11267
|
moduleDocsUrl: "https://naturali.ai/docs/modules/channels",
|
|
11263
11268
|
httpMethod: "post",
|
|
11264
11269
|
pathParams: ["project_id"],
|
|
@@ -11276,7 +11281,7 @@ const routes = {
|
|
|
11276
11281
|
"complete-whatsapp-signup": {
|
|
11277
11282
|
serviceClass: "Channels",
|
|
11278
11283
|
operationId: "completeWhatsappSignup",
|
|
11279
|
-
description: "Finish a signup link
|
|
11284
|
+
description: "Finish a signup link: the app's result page receives `pending` and the numbers Meta granted, and sends back the one to connect. The caller must be a member of the project the link was created for (`404` otherwise), so a link opened by anyone else connects nothing. `pending` expires 10 minutes after the dialog returns (`400 link_expired`).",
|
|
11280
11285
|
moduleDocsUrl: "https://naturali.ai/docs/modules/channels",
|
|
11281
11286
|
httpMethod: "post",
|
|
11282
11287
|
pathParams: [],
|
|
@@ -20727,7 +20732,7 @@ const routes = {
|
|
|
20727
20732
|
"add-project-member": {
|
|
20728
20733
|
serviceClass: "Projects",
|
|
20729
20734
|
operationId: "addProjectMember",
|
|
20730
|
-
description: "Adds a colleague to the project by email address. Free and uncapped on every plan: a member adds no run, no channel, no trigger and no byte, so every cost they cause is already billed through the project's owner. Members are counted nowhere. **The address does not need an account.** Inviting one that has none creates it unverified and records the membership beside it, so the invitee is already a member with status `pending`. Their first sign-in code — which they request themselves, from the link in the invitation — is what makes them `active`. There is no separate acceptance step and no invitation to expire: the address is the credential, and the invitation reached it. An `owner` may grant `admin` or `member`; an `admin` may grant `member` only, so administration cannot hand out its own authority. `role: owner` is refused — that is the billing owner, and ownership moves only through a transfer the new owner accepts (`PUT /v1/projects/{project_id}/transfer`). The invitation email is a courtesy, not the grant: if it cannot be sent the membership still stands, and the response still says `pending`. Requires an account-wide credential
|
|
20735
|
+
description: "Adds a colleague to the project by email address. Free and uncapped on every plan: a member adds no run, no channel, no trigger and no byte, so every cost they cause is already billed through the project's owner. Members are counted nowhere. **The address does not need an account.** Inviting one that has none creates it unverified and records the membership beside it, so the invitee is already a member with status `pending`. Their first sign-in code — which they request themselves, from the link in the invitation — is what makes them `active`. There is no separate acceptance step and no invitation to expire: the address is the credential, and the invitation reached it. An `owner` may grant `admin` or `member`; an `admin` may grant `member` only, so administration cannot hand out its own authority. `role: owner` is refused — that is the billing owner, and ownership moves only through a transfer the new owner accepts (`PUT /v1/projects/{project_id}/transfer`). The invitation email is a courtesy, not the grant: if it cannot be sent the membership still stands, and the response still says `pending`. Requires an account-wide credential and is refused to a connected app: neither may grant access that would outlive its own revocation.",
|
|
20731
20736
|
moduleDocsUrl: "https://naturali.ai/docs/modules/projects",
|
|
20732
20737
|
httpMethod: "post",
|
|
20733
20738
|
pathParams: ["project_id"],
|
|
@@ -20761,7 +20766,7 @@ const routes = {
|
|
|
20761
20766
|
"update-project-member": {
|
|
20762
20767
|
serviceClass: "Projects",
|
|
20763
20768
|
operationId: "updateProjectMember",
|
|
20764
|
-
description: "Moves a member between `admin` and `member`. The project `owner` only: promoting somebody to `admin` hands them every write in the project, and an `admin` who could do that could erase the difference between the two roles for themselves. The owner's own row is refused in either direction — it names who pays, so changing it is a transfer (`PUT /v1/projects/{project_id}/transfer`) rather than a role change.",
|
|
20769
|
+
description: "Moves a member between `admin` and `member`. The project `owner` only: promoting somebody to `admin` hands them every write in the project, and an `admin` who could do that could erase the difference between the two roles for themselves. The owner's own row is refused in either direction — it names who pays, so changing it is a transfer (`PUT /v1/projects/{project_id}/transfer`) rather than a role change. Requires an account-wide credential and is refused to a connected app.",
|
|
20765
20770
|
moduleDocsUrl: "https://naturali.ai/docs/modules/projects",
|
|
20766
20771
|
httpMethod: "patch",
|
|
20767
20772
|
pathParams: ["project_id", "member_id"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.211.
|
|
3
|
+
"version": "0.211.7",
|
|
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.211.
|
|
34
|
+
"@naturali/sdk": "0.211.7",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.10.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|