@arbol-ai/cli 3.46.0 → 3.47.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.js +360 -77
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -18431,6 +18431,25 @@ var commands = {
18431
18431
  required: false,
18432
18432
  description: "With `expand=recipients`: `definitionKey=optionKey`, only those whose latest answer is that option; `definitionKey=`, only those with no answer yet."
18433
18433
  },
18434
+ {
18435
+ name: "recipientsButton",
18436
+ flag: "recipients-button",
18437
+ kind: "string",
18438
+ required: false,
18439
+ description: "With `expand=recipients`: only those whose last pressed button is this one, by its exact text."
18440
+ },
18441
+ {
18442
+ name: "recipientsReply",
18443
+ flag: "recipients-reply",
18444
+ kind: "string",
18445
+ required: false,
18446
+ description: "With `expand=recipients`, WhatsApp: how the people a message reached answered it. `button`: they pressed one of its buttons. `written`: they wrote and pressed none. `none`: they did neither (`progress.noReply`).",
18447
+ choices: [
18448
+ "button",
18449
+ "written",
18450
+ "none"
18451
+ ]
18452
+ },
18434
18453
  {
18435
18454
  name: "recipientsStatus",
18436
18455
  flag: "recipients-status",
@@ -18502,6 +18521,29 @@ var commands = {
18502
18521
  description: "With `expand=recipients`: `definitionKey=optionKey`, only those whose latest answer is that option; `definitionKey=`, only those with no answer yet.",
18503
18522
  pattern: "^[a-z][a-z0-9_]{0,63}=([a-z][a-z0-9_]{0,63})?$"
18504
18523
  },
18524
+ recipientsButton: {
18525
+ type: "string",
18526
+ maxLength: 256,
18527
+ minLength: 1,
18528
+ description: "With `expand=recipients`: only those whose last pressed button is this one, by its exact text."
18529
+ },
18530
+ recipientsReply: {
18531
+ anyOf: [
18532
+ {
18533
+ type: "string",
18534
+ const: "button"
18535
+ },
18536
+ {
18537
+ type: "string",
18538
+ const: "written"
18539
+ },
18540
+ {
18541
+ type: "string",
18542
+ const: "none"
18543
+ }
18544
+ ],
18545
+ description: "With `expand=recipients`, WhatsApp: how the people a message reached answered it. `button`: they pressed one of its buttons. `written`: they wrote and pressed none. `none`: they did neither (`progress.noReply`)."
18546
+ },
18505
18547
  recipientsStatus: {
18506
18548
  anyOf: [
18507
18549
  {
@@ -18724,7 +18766,7 @@ var commands = {
18724
18766
  ]
18725
18767
  },
18726
18768
  title: "Start a campaign",
18727
- description: "Start reaching people: from now on the campaign's due recipients are called, at most `settings.channels.maxConcurrentOutboundCalls` (five by default) at once across the organization, or sent their message, one after another, about 30 a minute. A call campaign needs an active, published voice Agent (VOICE_AGENT_NOT_READY). A WhatsApp campaign needs an active text Agent (CAMPAIGN_AGENT_NOT_READY), a line that can send (CHANNEL_NOT_READY), an approved template whose parameters fit (a `TEMPLATE_*` code), a value for every variable (CAMPAIGN_VARIABLE_MISSING) and, when the template's header is a document, image or video, the first pending recipient's own `header` file (CAMPAIGN_HEADER_MISSING). A recipient must be pending (CAMPAIGN_NO_RECIPIENTS). `get_campaign` with `expand=readiness` lists all of this beforehand. A campaign starts once: starting a running one changes nothing, and a paused one resumes with `update_campaign` and `paused: false`. Not an AI tool: it reaches real people.",
18769
+ description: "Start reaching people: from now on the campaign's due recipients are called, at most `settings.channels.maxConcurrentOutboundCalls` (five by default) at once across the organization, or sent their message, a few a second. A call campaign needs an active, published voice Agent (VOICE_AGENT_NOT_READY). A WhatsApp campaign needs an active text Agent (CAMPAIGN_AGENT_NOT_READY), a line that can send (CHANNEL_NOT_READY), an approved template whose parameters fit (a `TEMPLATE_*` code), a value for every variable (CAMPAIGN_VARIABLE_MISSING) and, when the template's header is a document, image or video, the first pending recipient's own `header` file (CAMPAIGN_HEADER_MISSING). A recipient must be pending (CAMPAIGN_NO_RECIPIENTS). `get_campaign` with `expand=readiness` lists all of this beforehand. A campaign starts once: starting a running one changes nothing, and a paused one resumes with `update_campaign` and `paused: false`. Not an AI tool: it reaches real people.",
18728
18770
  effect: "write",
18729
18771
  confirmation: null,
18730
18772
  hidden: false
@@ -31088,7 +31130,7 @@ var commands = {
31088
31130
  additionalProperties: false
31089
31131
  },
31090
31132
  title: "List assigned appointments",
31091
- description: "Read assigned appointments for one day at a cost centre, ordered by moment and reference, with the contact phone and the state (`status`) SIIPS records. Never cached. A full upstream page that cannot prove completeness is PROVIDER_UNAVAILABLE; narrow by professionalId rather than treating a partial agenda as complete. This operation changes no appointment and sends no message.",
31133
+ description: "Read assigned appointments for one day at a cost centre, ordered by moment and reference, with the patient's document number, the contact phone and the state (`status`) SIIPS records. Never cached. A full upstream page that cannot prove completeness is PROVIDER_UNAVAILABLE; narrow by professionalId rather than treating a partial agenda as complete. This operation changes no appointment and sends no message.",
31092
31134
  effect: "read",
31093
31135
  confirmation: null,
31094
31136
  hidden: false
@@ -33372,7 +33414,8 @@ var schemaComponents = {
33372
33414
  "verifiedAt",
33373
33415
  "updatedAt",
33374
33416
  "fields",
33375
- "logins"
33417
+ "logins",
33418
+ "reminders"
33376
33419
  ],
33377
33420
  properties: {
33378
33421
  id: {
@@ -33797,6 +33840,54 @@ var schemaComponents = {
33797
33840
  },
33798
33841
  maxItems: 20,
33799
33842
  description: "Staff only; empty for other callers."
33843
+ },
33844
+ reminders: {
33845
+ anyOf: [
33846
+ {
33847
+ type: "object",
33848
+ required: [
33849
+ "mode",
33850
+ "sendAt",
33851
+ "daysBefore"
33852
+ ],
33853
+ properties: {
33854
+ mode: {
33855
+ anyOf: [
33856
+ {
33857
+ type: "string",
33858
+ const: "off"
33859
+ },
33860
+ {
33861
+ type: "string",
33862
+ const: "review"
33863
+ },
33864
+ {
33865
+ type: "string",
33866
+ const: "automatic"
33867
+ }
33868
+ ],
33869
+ description: "off: nothing is prepared or sent. review: each day the list is prepared as a campaign that has not started, for a person to review and start. automatic: each day the list is prepared and sent by itself at sendAt."
33870
+ },
33871
+ sendAt: {
33872
+ type: "string",
33873
+ pattern: "^(?:(?:0[6-9]|1[0-9]):(?:00|15|30|45)|20:00)$",
33874
+ description: "When the day's reminders go out: HH:MM, 24-hour, in the clinic's local time, every 15 minutes from 06:00 to 20:00. Every day, weekends and holidays included."
33875
+ },
33876
+ daysBefore: {
33877
+ type: "integer",
33878
+ minimum: 1,
33879
+ maximum: 7,
33880
+ description: "On a given day, the appointments this many days ahead are reminded: 1 is the day before."
33881
+ }
33882
+ },
33883
+ additionalProperties: false,
33884
+ description: "Whether, when and how far ahead this connection's appointments are reminded on WhatsApp."
33885
+ },
33886
+ {
33887
+ type: "null"
33888
+ }
33889
+ ],
33890
+ description: "Its WhatsApp appointment reminders, or null when its integration cannot feed them. Until someone changes them they are off, at 09:00, the day before."
33800
33891
  }
33801
33892
  },
33802
33893
  additionalProperties: false
@@ -36106,6 +36197,10 @@ var schemaComponents = {
36106
36197
  type: "string",
36107
36198
  const: "sanitas"
36108
36199
  },
36200
+ {
36201
+ type: "string",
36202
+ const: "gmedic"
36203
+ },
36109
36204
  {
36110
36205
  type: "string",
36111
36206
  const: "account"
@@ -149416,7 +149511,7 @@ var schemaComponents = {
149416
149511
  opportunityIndicator: {
149417
149512
  anyOf: [
149418
149513
  {
149419
- minimum: 0,
149514
+ minimum: -9007199254740991,
149420
149515
  maximum: 9007199254740991,
149421
149516
  type: "integer"
149422
149517
  },
@@ -149761,24 +149856,9 @@ var schemaComponents = {
149761
149856
  modality: {
149762
149857
  anyOf: [
149763
149858
  {
149764
- anyOf: [
149765
- {
149766
- const: "FACE_TO_FACE",
149767
- type: "string"
149768
- },
149769
- {
149770
- const: "VIRTUAL",
149771
- type: "string"
149772
- },
149773
- {
149774
- const: "HOME_VISIT",
149775
- type: "string"
149776
- },
149777
- {
149778
- const: "NOT_APPLICABLE",
149779
- type: "string"
149780
- }
149781
- ]
149859
+ maxLength: 20000,
149860
+ description: "How the appointment is attended, as gMedic names it. Known values: FACE_TO_FACE, VIRTUAL, HOME_VISIT and NOT_APPLICABLE; gMedic may answer others, so treat any other value as unknown.",
149861
+ type: "string"
149782
149862
  },
149783
149863
  {
149784
149864
  type: "null"
@@ -151552,7 +151632,7 @@ var schemaComponents = {
151552
151632
  opportunityIndicator: {
151553
151633
  anyOf: [
151554
151634
  {
151555
- minimum: 0,
151635
+ minimum: -9007199254740991,
151556
151636
  maximum: 9007199254740991,
151557
151637
  type: "integer"
151558
151638
  },
@@ -151897,24 +151977,9 @@ var schemaComponents = {
151897
151977
  modality: {
151898
151978
  anyOf: [
151899
151979
  {
151900
- anyOf: [
151901
- {
151902
- const: "FACE_TO_FACE",
151903
- type: "string"
151904
- },
151905
- {
151906
- const: "VIRTUAL",
151907
- type: "string"
151908
- },
151909
- {
151910
- const: "HOME_VISIT",
151911
- type: "string"
151912
- },
151913
- {
151914
- const: "NOT_APPLICABLE",
151915
- type: "string"
151916
- }
151917
- ]
151980
+ maxLength: 20000,
151981
+ description: "How the appointment is attended, as gMedic names it. Known values: FACE_TO_FACE, VIRTUAL, HOME_VISIT and NOT_APPLICABLE; gMedic may answer others, so treat any other value as unknown.",
151982
+ type: "string"
151918
151983
  },
151919
151984
  {
151920
151985
  type: "null"
@@ -154831,7 +154896,7 @@ var schemaComponents = {
154831
154896
  availableSessions: {
154832
154897
  anyOf: [
154833
154898
  {
154834
- minimum: 0,
154899
+ minimum: -9007199254740991,
154835
154900
  maximum: 9007199254740991,
154836
154901
  type: "integer"
154837
154902
  },
@@ -161693,7 +161758,7 @@ var schemaComponents = {
161693
161758
  availableSessions: {
161694
161759
  anyOf: [
161695
161760
  {
161696
- minimum: 0,
161761
+ minimum: -9007199254740991,
161697
161762
  maximum: 9007199254740991,
161698
161763
  type: "integer"
161699
161764
  },
@@ -162226,7 +162291,7 @@ var schemaComponents = {
162226
162291
  opportunityIndicator: {
162227
162292
  anyOf: [
162228
162293
  {
162229
- minimum: 0,
162294
+ minimum: -9007199254740991,
162230
162295
  maximum: 9007199254740991,
162231
162296
  type: "integer"
162232
162297
  },
@@ -162571,24 +162636,9 @@ var schemaComponents = {
162571
162636
  modality: {
162572
162637
  anyOf: [
162573
162638
  {
162574
- anyOf: [
162575
- {
162576
- const: "FACE_TO_FACE",
162577
- type: "string"
162578
- },
162579
- {
162580
- const: "VIRTUAL",
162581
- type: "string"
162582
- },
162583
- {
162584
- const: "HOME_VISIT",
162585
- type: "string"
162586
- },
162587
- {
162588
- const: "NOT_APPLICABLE",
162589
- type: "string"
162590
- }
162591
- ]
162639
+ maxLength: 20000,
162640
+ description: "How the appointment is attended, as gMedic names it. Known values: FACE_TO_FACE, VIRTUAL, HOME_VISIT and NOT_APPLICABLE; gMedic may answer others, so treat any other value as unknown.",
162641
+ type: "string"
162592
162642
  },
162593
162643
  {
162594
162644
  type: "null"
@@ -186921,11 +186971,14 @@ var schemaComponents = {
186921
186971
  type: "object",
186922
186972
  required: [
186923
186973
  "answered",
186974
+ "buttons",
186924
186975
  "completed",
186925
186976
  "delivered",
186926
186977
  "failed",
186927
186978
  "inProgress",
186928
186979
  "noAnswer",
186980
+ "noButton",
186981
+ "noReply",
186929
186982
  "pending",
186930
186983
  "read",
186931
186984
  "recipients",
@@ -186938,6 +186991,32 @@ var schemaComponents = {
186938
186991
  description: "Calls: recipients whose latest call someone answered and its analysis judged.",
186939
186992
  minimum: 0
186940
186993
  },
186994
+ buttons: {
186995
+ type: "array",
186996
+ items: {
186997
+ type: "object",
186998
+ required: [
186999
+ "recipients",
187000
+ "text"
187001
+ ],
187002
+ properties: {
187003
+ recipients: {
187004
+ type: "integer",
187005
+ description: "How many recipients have it as their last press.",
187006
+ minimum: 0
187007
+ },
187008
+ text: {
187009
+ type: "string",
187010
+ description: "The button's text, as the template shows it.",
187011
+ maxLength: 256,
187012
+ minLength: 1
187013
+ }
187014
+ },
187015
+ additionalProperties: false
187016
+ },
187017
+ description: "WhatsApp: the template's quick-reply buttons people pressed, most pressed first, each with how many recipients pressed it last. A recipient counts once, under their latest press. A button nobody pressed is not listed. Read from the reply itself: a written answer is not a button.",
187018
+ maxItems: 50
187019
+ },
186941
187020
  completed: {
186942
187021
  type: "integer",
186943
187022
  minimum: 0
@@ -186960,6 +187039,16 @@ var schemaComponents = {
186960
187039
  description: "Calls: recipients who failed because their calls ran out without anyone answering. A voicemail counts here.",
186961
187040
  minimum: 0
186962
187041
  },
187042
+ noButton: {
187043
+ type: "integer",
187044
+ description: "WhatsApp: recipients a message reached (`deliveredAt`) who pressed none of its buttons, whether or not they wrote. People still pending, or whose message never arrived, are not counted.",
187045
+ minimum: 0
187046
+ },
187047
+ noReply: {
187048
+ type: "integer",
187049
+ description: "WhatsApp: recipients a message reached who neither pressed a button nor wrote: `noButton` less those who answered in writing.",
187050
+ minimum: 0
187051
+ },
186963
187052
  pending: {
186964
187053
  type: "integer",
186965
187054
  minimum: 0
@@ -187123,6 +187212,7 @@ var schemaComponents = {
187123
187212
  required: [
187124
187213
  "address",
187125
187214
  "attemptCount",
187215
+ "button",
187126
187216
  "contact",
187127
187217
  "contactId",
187128
187218
  "createdAt",
@@ -187150,6 +187240,35 @@ var schemaComponents = {
187150
187240
  type: "integer",
187151
187241
  minimum: 0
187152
187242
  },
187243
+ button: {
187244
+ anyOf: [
187245
+ {
187246
+ type: "object",
187247
+ required: [
187248
+ "pressedAt",
187249
+ "text"
187250
+ ],
187251
+ properties: {
187252
+ pressedAt: {
187253
+ type: "string",
187254
+ description: "An instant in RFC 3339 format, in UTC.",
187255
+ format: "date-time"
187256
+ },
187257
+ text: {
187258
+ type: "string",
187259
+ description: "The button's text, as the template shows it.",
187260
+ maxLength: 256,
187261
+ minLength: 1
187262
+ }
187263
+ },
187264
+ description: "WhatsApp: the last button of the template this person pressed, and when. A later press replaces an earlier one, also after their conversation closed. Null when they pressed none: a written answer is not a button.",
187265
+ additionalProperties: false
187266
+ },
187267
+ {
187268
+ type: "null"
187269
+ }
187270
+ ]
187271
+ },
187153
187272
  contact: {
187154
187273
  anyOf: [
187155
187274
  {
@@ -190378,7 +190497,7 @@ var schemaComponents = {
190378
190497
  },
190379
190498
  operatorReplied: {
190380
190499
  type: "boolean",
190381
- description: "A person of the organization wrote to the contact, in Raíz or in the WhatsApp Business app."
190500
+ description: "The organization's team wrote to the contact, in Raíz or in the WhatsApp Business app. The message a campaign or a machine client opens a conversation with is not the team's (a message's `origin`)."
190382
190501
  },
190383
190502
  origin: {
190384
190503
  anyOf: [
@@ -190407,7 +190526,7 @@ var schemaComponents = {
190407
190526
  const: "test"
190408
190527
  }
190409
190528
  ],
190410
- description: "How it started: the contact reached out (`inbound`), a person of the organization started it (`manual`: in the Dashboard, or on WhatsApp in the WhatsApp Business app), a client through the API (`api`), a campaign, an import or a person-owned WhatsApp Agent trial (`test`)."
190529
+ description: "How it started: the contact reached out (`inbound`), a person of the organization started it (`manual`: in the Dashboard, or on WhatsApp in the WhatsApp Business app), a client through the API (`api`), a campaign, an import or a person-owned WhatsApp Agent trial (`test`). On WhatsApp, `campaign` and `api` with `direction: inbound` are the contact answering such a message after its conversation closed, which continues it."
190411
190530
  },
190412
190531
  outcome: {
190413
190532
  anyOf: [
@@ -190616,7 +190735,7 @@ var schemaComponents = {
190616
190735
  $ref: "#/components/schemas/RaizConversationWorker",
190617
190736
  description: "Who works the conversation for the organization."
190618
190737
  },
190619
- description: "Who works the conversation for the organization, in the order each first wrote something the contact saw (those who have not yet, last): each Agent and the team that wrote in it and, while it is open or when nobody answered it, whoever has it (the assigned Agent while the AI handles it, the team otherwise). `agentId` is the Agent assigned now."
190738
+ description: "Who works the conversation for the organization, in the order each first wrote something the contact saw (those who have not yet, last): each Agent and the team that wrote in it and, while it is open or when nobody answered it, whoever has it (the assigned Agent while the AI handles it, the team otherwise). A campaign's message and a machine client's opening make nobody a worker: read who sent them from the message's `origin`. `agentId` is the Agent assigned now."
190620
190739
  },
190621
190740
  toolCalls: {
190622
190741
  $ref: "#/components/schemas/RaizConversationToolCalls"
@@ -192035,7 +192154,7 @@ var schemaComponents = {
192035
192154
  },
192036
192155
  additionalProperties: false
192037
192156
  },
192038
- description: "The people Raíz knows wrote, in the order they first did. What the WhatsApp Business app sends counts for the team without naming anyone."
192157
+ description: "The people Raíz knows wrote, in the order they first did. What the WhatsApp Business app sends counts for the team without naming anyone; what a campaign or a machine client's opening sends does not count for the team."
192039
192158
  },
192040
192159
  firstMessageAt: {
192041
192160
  anyOf: [
@@ -193754,6 +193873,9 @@ var schemaComponents = {
193754
193873
  {
193755
193874
  $ref: "#/components/schemas/RaizConversationViewAuthorOnlyFailure"
193756
193875
  },
193876
+ {
193877
+ $ref: "#/components/schemas/RaizOutboundChannelRefusedFailure"
193878
+ },
193757
193879
  {
193758
193880
  $ref: "#/components/schemas/RaizWhatsappChannelRefusedFailure"
193759
193881
  },
@@ -193767,6 +193889,7 @@ var schemaComponents = {
193767
193889
  FORBIDDEN: "#/components/schemas/ForbiddenFailure",
193768
193890
  CHANNEL_CREATION_IN_APP: "#/components/schemas/RaizChannelCreationInAppFailure",
193769
193891
  CONVERSATION_VIEW_AUTHOR_ONLY: "#/components/schemas/RaizConversationViewAuthorOnlyFailure",
193892
+ OUTBOUND_CHANNEL_REFUSED: "#/components/schemas/RaizOutboundChannelRefusedFailure",
193770
193893
  WHATSAPP_CHANNEL_REFUSED: "#/components/schemas/RaizWhatsappChannelRefusedFailure",
193771
193894
  WIDGET_REFUSED: "#/components/schemas/RaizWidgetRefusedFailure"
193772
193895
  }
@@ -193850,6 +193973,9 @@ var schemaComponents = {
193850
193973
  {
193851
193974
  $ref: "#/components/schemas/InternalFailure"
193852
193975
  },
193976
+ {
193977
+ $ref: "#/components/schemas/RaizOutboundChannelInternalFailure"
193978
+ },
193853
193979
  {
193854
193980
  $ref: "#/components/schemas/RaizWhatsappChannelInternalFailure"
193855
193981
  },
@@ -193864,6 +193990,7 @@ var schemaComponents = {
193864
193990
  propertyName: "code",
193865
193991
  mapping: {
193866
193992
  INTERNAL_ERROR: "#/components/schemas/InternalFailure",
193993
+ OUTBOUND_CHANNEL_INTERNAL: "#/components/schemas/RaizOutboundChannelInternalFailure",
193867
193994
  WHATSAPP_CHANNEL_INTERNAL: "#/components/schemas/RaizWhatsappChannelInternalFailure",
193868
193995
  WHATSAPP_NOT_SENT: "#/components/schemas/RaizWhatsappNotSentFailure",
193869
193996
  WIDGET_INTERNAL: "#/components/schemas/RaizWidgetInternalFailure"
@@ -194718,6 +194845,12 @@ var schemaComponents = {
194718
194845
  type: "string",
194719
194846
  const: "whatsapp"
194720
194847
  },
194848
+ instructions: {
194849
+ type: "string",
194850
+ maxLength: 8000,
194851
+ minLength: 1,
194852
+ description: "What the Agent should know and do if the person replies (what the message is about, what each answer means, how to speak), as a campaign recipient's `instructions`. Kept with the conversation and never sent to the person."
194853
+ },
194721
194854
  metadata: {
194722
194855
  type: "object",
194723
194856
  patternProperties: {
@@ -194769,9 +194902,21 @@ var schemaComponents = {
194769
194902
  description: "Free text; WhatsApp accepts it only inside the 24-hour window.",
194770
194903
  maxLength: 4096,
194771
194904
  minLength: 1
194905
+ },
194906
+ variables: {
194907
+ type: "object",
194908
+ patternProperties: {
194909
+ "^[A-Za-z_][A-Za-z0-9_]{0,63}$": {
194910
+ type: "string",
194911
+ maxLength: 1000
194912
+ }
194913
+ },
194914
+ additionalProperties: false,
194915
+ maxProperties: 30,
194916
+ description: "What the business knows about this person, by name (an appointment's date and its reference, say), as a campaign recipient's `variables`. Kept with the conversation and never sent to the person: the Agent reads them when the person replies, and does not ask for them again. They fill nothing in the message; its template's values are `template.parameters`."
194772
194917
  }
194773
194918
  },
194774
- description: "Open a WhatsApp conversation with a template or, inside the 24-hour window, a text. Give `template` or `text`.",
194919
+ description: "Open a WhatsApp conversation with a template or, inside the 24-hour window, a text. Give `template` or `text`. `instructions` and `variables` tell the Agent what to know when the person replies, as a campaign's row does.",
194775
194920
  additionalProperties: false
194776
194921
  },
194777
194922
  {
@@ -194841,6 +194986,12 @@ var schemaComponents = {
194841
194986
  description: "Destination number in E.164. Omit it to use the contact's preferred phone; WhatsApp can also reuse a messaging identity received from that contact on the selected channel when no phone is stored.",
194842
194987
  pattern: "^\\+[1-9][0-9]{1,14}$"
194843
194988
  },
194989
+ instructions: {
194990
+ type: "string",
194991
+ maxLength: 8000,
194992
+ minLength: 1,
194993
+ description: "On WhatsApp, what the Agent should know and do if the person replies, as a campaign recipient's `instructions`: kept with the conversation and never sent to the person. On a call, added after the profile's instructions, for that call only."
194994
+ },
194844
194995
  metadata: {
194845
194996
  type: "object",
194846
194997
  patternProperties: {
@@ -194874,7 +195025,7 @@ var schemaComponents = {
194874
195025
  }
194875
195026
  },
194876
195027
  additionalProperties: false,
194877
- description: "Values for the `{{name}}` variables of the profile's template parameters (WhatsApp) or of the Agent's and the profile's texts (calls).",
195028
+ description: "Values for the `{{name}}` variables of the profile's template parameters (WhatsApp) or of the Agent's and the profile's texts (calls). On WhatsApp they are also kept with the conversation, never sent as such, for the Agent to read when the person replies, as a campaign recipient's `variables`.",
194878
195029
  maxProperties: 50
194879
195030
  }
194880
195031
  },
@@ -195192,6 +195343,9 @@ var schemaComponents = {
195192
195343
  {
195193
195344
  $ref: "#/components/schemas/RaizConversationViewAuthorOnlyFailure"
195194
195345
  },
195346
+ {
195347
+ $ref: "#/components/schemas/RaizOutboundChannelRefusedFailure"
195348
+ },
195195
195349
  {
195196
195350
  $ref: "#/components/schemas/RaizWhatsappChannelRefusedFailure"
195197
195351
  },
@@ -195205,6 +195359,7 @@ var schemaComponents = {
195205
195359
  FORBIDDEN: "#/components/schemas/ForbiddenFailure",
195206
195360
  CHANNEL_CREATION_IN_APP: "#/components/schemas/RaizChannelCreationInAppFailure",
195207
195361
  CONVERSATION_VIEW_AUTHOR_ONLY: "#/components/schemas/RaizConversationViewAuthorOnlyFailure",
195362
+ OUTBOUND_CHANNEL_REFUSED: "#/components/schemas/RaizOutboundChannelRefusedFailure",
195208
195363
  WHATSAPP_CHANNEL_REFUSED: "#/components/schemas/RaizWhatsappChannelRefusedFailure",
195209
195364
  WIDGET_REFUSED: "#/components/schemas/RaizWidgetRefusedFailure"
195210
195365
  }
@@ -195288,6 +195443,9 @@ var schemaComponents = {
195288
195443
  {
195289
195444
  $ref: "#/components/schemas/InternalFailure"
195290
195445
  },
195446
+ {
195447
+ $ref: "#/components/schemas/RaizOutboundChannelInternalFailure"
195448
+ },
195291
195449
  {
195292
195450
  $ref: "#/components/schemas/RaizWhatsappChannelInternalFailure"
195293
195451
  },
@@ -195302,6 +195460,7 @@ var schemaComponents = {
195302
195460
  propertyName: "code",
195303
195461
  mapping: {
195304
195462
  INTERNAL_ERROR: "#/components/schemas/InternalFailure",
195463
+ OUTBOUND_CHANNEL_INTERNAL: "#/components/schemas/RaizOutboundChannelInternalFailure",
195305
195464
  WHATSAPP_CHANNEL_INTERNAL: "#/components/schemas/RaizWhatsappChannelInternalFailure",
195306
195465
  WHATSAPP_NOT_SENT: "#/components/schemas/RaizWhatsappNotSentFailure",
195307
195466
  WIDGET_INTERNAL: "#/components/schemas/RaizWidgetInternalFailure"
@@ -199028,6 +199187,9 @@ var schemaComponents = {
199028
199187
  {
199029
199188
  $ref: "#/components/schemas/RaizConversationViewAuthorOnlyFailure"
199030
199189
  },
199190
+ {
199191
+ $ref: "#/components/schemas/RaizOutboundChannelRefusedFailure"
199192
+ },
199031
199193
  {
199032
199194
  $ref: "#/components/schemas/RaizWhatsappChannelRefusedFailure"
199033
199195
  },
@@ -199041,6 +199203,7 @@ var schemaComponents = {
199041
199203
  FORBIDDEN: "#/components/schemas/ForbiddenFailure",
199042
199204
  CHANNEL_CREATION_IN_APP: "#/components/schemas/RaizChannelCreationInAppFailure",
199043
199205
  CONVERSATION_VIEW_AUTHOR_ONLY: "#/components/schemas/RaizConversationViewAuthorOnlyFailure",
199206
+ OUTBOUND_CHANNEL_REFUSED: "#/components/schemas/RaizOutboundChannelRefusedFailure",
199044
199207
  WHATSAPP_CHANNEL_REFUSED: "#/components/schemas/RaizWhatsappChannelRefusedFailure",
199045
199208
  WIDGET_REFUSED: "#/components/schemas/RaizWidgetRefusedFailure"
199046
199209
  }
@@ -199124,6 +199287,9 @@ var schemaComponents = {
199124
199287
  {
199125
199288
  $ref: "#/components/schemas/InternalFailure"
199126
199289
  },
199290
+ {
199291
+ $ref: "#/components/schemas/RaizOutboundChannelInternalFailure"
199292
+ },
199127
199293
  {
199128
199294
  $ref: "#/components/schemas/RaizWhatsappChannelInternalFailure"
199129
199295
  },
@@ -199138,6 +199304,7 @@ var schemaComponents = {
199138
199304
  propertyName: "code",
199139
199305
  mapping: {
199140
199306
  INTERNAL_ERROR: "#/components/schemas/InternalFailure",
199307
+ OUTBOUND_CHANNEL_INTERNAL: "#/components/schemas/RaizOutboundChannelInternalFailure",
199141
199308
  WHATSAPP_CHANNEL_INTERNAL: "#/components/schemas/RaizWhatsappChannelInternalFailure",
199142
199309
  WHATSAPP_NOT_SENT: "#/components/schemas/RaizWhatsappNotSentFailure",
199143
199310
  WIDGET_INTERNAL: "#/components/schemas/RaizWidgetInternalFailure"
@@ -204871,7 +205038,7 @@ var schemaComponents = {
204871
205038
  anyOf: [
204872
205039
  {
204873
205040
  type: "string",
204874
- description: "The person of the organization who wrote an operator message in Raíz: their member id, as Arbol Account lists it (`account.members.list`). Null when Raíz does not know who wrote it (the WhatsApp Business app, a machine client) and for every other role.",
205041
+ description: "The person of the organization who wrote an operator message in Raíz: their member id, as Arbol Account lists it (`account.members.list`). Null when no person of the team wrote it in Raíz (see `origin`), when a machine client did, and for every other role.",
204875
205042
  maxLength: 255,
204876
205043
  minLength: 1
204877
205044
  },
@@ -204888,9 +205055,21 @@ var schemaComponents = {
204888
205055
  origin: {
204889
205056
  anyOf: [
204890
205057
  {
204891
- type: "string",
204892
- const: "business_app",
204893
- description: "Where an operator message was written: `business_app` is the WhatsApp Business app (the phone app or WhatsApp Web) on a number Raíz shares. Null for messages written in Raíz and for every other role."
205058
+ anyOf: [
205059
+ {
205060
+ type: "string",
205061
+ const: "business_app"
205062
+ },
205063
+ {
205064
+ type: "string",
205065
+ const: "campaign"
205066
+ },
205067
+ {
205068
+ type: "string",
205069
+ const: "api"
205070
+ }
205071
+ ],
205072
+ description: "Where an operator message came from. `business_app`: a person of the team wrote it in the WhatsApp Business app (the phone app or WhatsApp Web) on a number Raíz shares. `campaign`: a campaign sent it, and nobody of the team wrote it; the conversation's `campaignId` names the campaign. `api`: a machine client sent it to open the conversation with `createConversation`; the conversation's `requestedBy` names the client. Null for a message written in Raíz for the team (by a person, see `memberId`, or by a machine client with `sendMessage`) and for every other role."
204894
205073
  },
204895
205074
  {
204896
205075
  type: "null"
@@ -205999,6 +206178,74 @@ var schemaComponents = {
205999
206178
  }
206000
206179
  }
206001
206180
  },
206181
+ RaizOutboundChannelInternalFailure: {
206182
+ type: "object",
206183
+ description: "What became of the send could not be read back. Asking again never reaches the person twice.",
206184
+ additionalProperties: false,
206185
+ required: [
206186
+ "code",
206187
+ "message",
206188
+ "retryable",
206189
+ "data"
206190
+ ],
206191
+ properties: {
206192
+ code: {
206193
+ type: "string",
206194
+ enum: [
206195
+ "OUTBOUND_CHANNEL_INTERNAL"
206196
+ ],
206197
+ description: "The failure code, stable across releases."
206198
+ },
206199
+ message: {
206200
+ type: "string",
206201
+ description: "What went wrong, for people; it never contains input values."
206202
+ },
206203
+ retryable: {
206204
+ type: "boolean",
206205
+ enum: [
206206
+ false
206207
+ ],
206208
+ description: "Whether repeating the same request may succeed."
206209
+ },
206210
+ data: {
206211
+ $ref: "#/components/schemas/Empty"
206212
+ }
206213
+ }
206214
+ },
206215
+ RaizOutboundChannelRefusedFailure: {
206216
+ type: "object",
206217
+ description: "Only the Campaigns Worker sends through this service, and only for a recipient of a campaign of that organization.",
206218
+ additionalProperties: false,
206219
+ required: [
206220
+ "code",
206221
+ "message",
206222
+ "retryable",
206223
+ "data"
206224
+ ],
206225
+ properties: {
206226
+ code: {
206227
+ type: "string",
206228
+ enum: [
206229
+ "OUTBOUND_CHANNEL_REFUSED"
206230
+ ],
206231
+ description: "The failure code, stable across releases."
206232
+ },
206233
+ message: {
206234
+ type: "string",
206235
+ description: "What went wrong, for people; it never contains input values."
206236
+ },
206237
+ retryable: {
206238
+ type: "boolean",
206239
+ enum: [
206240
+ false
206241
+ ],
206242
+ description: "Whether repeating the same request may succeed."
206243
+ },
206244
+ data: {
206245
+ $ref: "#/components/schemas/Empty"
206246
+ }
206247
+ }
206248
+ },
206002
206249
  RaizOutsideContactHoursFailure: {
206003
206250
  type: "object",
206004
206251
  description: "The profile's contact hours do not allow starting a conversation now. Try again within them.",
@@ -211781,6 +212028,9 @@ var schemaComponents = {
211781
212028
  {
211782
212029
  $ref: "#/components/schemas/RaizConversationViewAuthorOnlyFailure"
211783
212030
  },
212031
+ {
212032
+ $ref: "#/components/schemas/RaizOutboundChannelRefusedFailure"
212033
+ },
211784
212034
  {
211785
212035
  $ref: "#/components/schemas/RaizWhatsappChannelRefusedFailure"
211786
212036
  },
@@ -211794,6 +212044,7 @@ var schemaComponents = {
211794
212044
  FORBIDDEN: "#/components/schemas/ForbiddenFailure",
211795
212045
  CHANNEL_CREATION_IN_APP: "#/components/schemas/RaizChannelCreationInAppFailure",
211796
212046
  CONVERSATION_VIEW_AUTHOR_ONLY: "#/components/schemas/RaizConversationViewAuthorOnlyFailure",
212047
+ OUTBOUND_CHANNEL_REFUSED: "#/components/schemas/RaizOutboundChannelRefusedFailure",
211797
212048
  WHATSAPP_CHANNEL_REFUSED: "#/components/schemas/RaizWhatsappChannelRefusedFailure",
211798
212049
  WIDGET_REFUSED: "#/components/schemas/RaizWidgetRefusedFailure"
211799
212050
  }
@@ -211877,6 +212128,9 @@ var schemaComponents = {
211877
212128
  {
211878
212129
  $ref: "#/components/schemas/InternalFailure"
211879
212130
  },
212131
+ {
212132
+ $ref: "#/components/schemas/RaizOutboundChannelInternalFailure"
212133
+ },
211880
212134
  {
211881
212135
  $ref: "#/components/schemas/RaizWhatsappChannelInternalFailure"
211882
212136
  },
@@ -211891,6 +212145,7 @@ var schemaComponents = {
211891
212145
  propertyName: "code",
211892
212146
  mapping: {
211893
212147
  INTERNAL_ERROR: "#/components/schemas/InternalFailure",
212148
+ OUTBOUND_CHANNEL_INTERNAL: "#/components/schemas/RaizOutboundChannelInternalFailure",
211894
212149
  WHATSAPP_CHANNEL_INTERNAL: "#/components/schemas/RaizWhatsappChannelInternalFailure",
211895
212150
  WHATSAPP_NOT_SENT: "#/components/schemas/RaizWhatsappNotSentFailure",
211896
212151
  WIDGET_INTERNAL: "#/components/schemas/RaizWidgetInternalFailure"
@@ -229019,6 +229274,7 @@ var schemaComponents = {
229019
229274
  "professionalName",
229020
229275
  "specialty",
229021
229276
  "patientName",
229277
+ "documentNumber",
229022
229278
  "phone",
229023
229279
  "service",
229024
229280
  "status",
@@ -229049,6 +229305,10 @@ var schemaComponents = {
229049
229305
  patientName: {
229050
229306
  type: "string"
229051
229307
  },
229308
+ documentNumber: {
229309
+ type: "string",
229310
+ description: "The patient's document number, as SIIPS's agenda stores it: letters and digits only. Empty when the agenda shows none, or when its row and its reference name different documents."
229311
+ },
229052
229312
  phone: {
229053
229313
  type: "string",
229054
229314
  description: "SIIPS's contact phone text; may be empty or contain several numbers."
@@ -243159,6 +243419,29 @@ var schemaComponents = {
243159
243419
  description: "With `expand=recipients`: `definitionKey=optionKey`, only those whose latest answer is that option; `definitionKey=`, only those with no answer yet.",
243160
243420
  pattern: "^[a-z][a-z0-9_]{0,63}=([a-z][a-z0-9_]{0,63})?$"
243161
243421
  },
243422
+ recipientsButton: {
243423
+ type: "string",
243424
+ maxLength: 256,
243425
+ minLength: 1,
243426
+ description: "With `expand=recipients`: only those whose last pressed button is this one, by its exact text."
243427
+ },
243428
+ recipientsReply: {
243429
+ anyOf: [
243430
+ {
243431
+ type: "string",
243432
+ const: "button"
243433
+ },
243434
+ {
243435
+ type: "string",
243436
+ const: "written"
243437
+ },
243438
+ {
243439
+ type: "string",
243440
+ const: "none"
243441
+ }
243442
+ ],
243443
+ description: "With `expand=recipients`, WhatsApp: how the people a message reached answered it. `button`: they pressed one of its buttons. `written`: they wrote and pressed none. `none`: they did neither (`progress.noReply`)."
243444
+ },
243162
243445
  recipientsStatus: {
243163
243446
  anyOf: [
243164
243447
  {
@@ -251292,9 +251575,9 @@ var schemaComponents = {
251292
251575
  // src/generated/generation.json
251293
251576
  var generation_default = {
251294
251577
  formatVersion: 6,
251295
- release: "1.20261109.141359",
251296
- openapiSha256: "fc78469830b09af11f1750dd548066ee86255c8e060a7a283138f655dd125dc1",
251297
- openapiContentSha256: "c61cc122d41c13268f82a7b8300d2531aa42b4c344b3c6626e57505c439f4604",
251578
+ release: "1.20261110.71953",
251579
+ openapiSha256: "e2acbe92fa06b190130488dac5a6a89694072f87d35e9fcf90bbc047e3b9ed59",
251580
+ openapiContentSha256: "e4500da0dc9e62fc4c2c5f01cf0ef0cd8ace237db83026063e1264f2e205dd06",
251298
251581
  forge: {
251299
251582
  repository: "https://github.com/cloudflare/forge",
251300
251583
  commit: "7f86447210b7bea3779bfdab3cd5655eade0eadb",
@@ -251307,7 +251590,7 @@ var generation_default = {
251307
251590
  outputs: [
251308
251591
  {
251309
251592
  path: "src/generated/commands.ts",
251310
- sha256: "c8aa87e2733485d0cd099cf58b2722097170ba6c0283452dc5178e43d6a68f8b"
251593
+ sha256: "4642b68a0a1b7180ac0a2d974e8ff82520cc1a53d6464ca4b91b0bffec066d45"
251311
251594
  }
251312
251595
  ]
251313
251596
  };
@@ -252907,7 +253190,7 @@ ${name}`);
252907
253190
  }
252908
253191
 
252909
253192
  // src/index.ts
252910
- var VERSION = "3.46.0";
253193
+ var VERSION = "3.47.0";
252911
253194
  var RELEASE = generation_default.release;
252912
253195
  var commands2 = { ...commands, ...accountOperatorCommands };
252913
253196
  var SDK_PATHS = new Map(Object.values(commands2).map((command) => [command.operation, command.sdkPath]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/cli",
3
- "version": "3.46.0",
3
+ "version": "3.47.0",
4
4
  "description": "The Arbol CLI: the Arbol API from your terminal, with commands generated by Cloudflare Forge from the public OpenAPI.",
5
5
  "keywords": [
6
6
  "arbol",
@@ -45,7 +45,7 @@
45
45
  "verify:with-tests": "bun run typecheck && bun run test && bun run build"
46
46
  },
47
47
  "dependencies": {
48
- "@arbol-ai/sdk": "5.46.0",
48
+ "@arbol-ai/sdk": "5.47.0",
49
49
  "ajv": "8.20.0",
50
50
  "ajv-formats": "3.0.1",
51
51
  "oauth4webapi": "3.8.8"
@@ -60,8 +60,8 @@
60
60
  "packageManager": "bun@1.4.3",
61
61
  "arbol": {
62
62
  "openapi": {
63
- "release": "1.20261109.141359",
64
- "sha256": "c61cc122d41c13268f82a7b8300d2531aa42b4c344b3c6626e57505c439f4604"
63
+ "release": "1.20261110.71953",
64
+ "sha256": "e4500da0dc9e62fc4c2c5f01cf0ef0cd8ace237db83026063e1264f2e205dd06"
65
65
  }
66
66
  }
67
67
  }