@arbol-ai/cli 3.41.0 → 3.42.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 +162 -16
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -18962,7 +18962,7 @@ var commands = {
18962
18962
  flag: "expand",
18963
18963
  kind: "string",
18964
18964
  required: false,
18965
- description: "Related data to include, comma-separated: `recipients`, `readiness`."
18965
+ description: "Related data to include, comma-separated: `recipients`, `readiness`, `results`."
18966
18966
  },
18967
18967
  {
18968
18968
  name: "recipientsCursor",
@@ -18998,6 +18998,13 @@ var commands = {
18998
18998
  required: false,
18999
18999
  description: "With `expand=recipients`: only those whose number contains these digits or whose name contains this text."
19000
19000
  },
19001
+ {
19002
+ name: "recipientsResult",
19003
+ flag: "recipients-result",
19004
+ kind: "string",
19005
+ required: false,
19006
+ description: "With `expand=recipients`: `definitionKey=optionKey`, only those whose latest answer is that option; `definitionKey=`, only those with no answer yet."
19007
+ },
19001
19008
  {
19002
19009
  name: "recipientsStatus",
19003
19010
  flag: "recipients-status",
@@ -19025,11 +19032,11 @@ var commands = {
19025
19032
  type: "string"
19026
19033
  },
19027
19034
  expand: {
19028
- description: "Related data to include, comma-separated: `recipients`, `readiness`.",
19035
+ description: "Related data to include, comma-separated: `recipients`, `readiness`, `results`.",
19029
19036
  examples: [
19030
- "recipients,readiness"
19037
+ "recipients,readiness,results"
19031
19038
  ],
19032
- pattern: "^(recipients|readiness)(,(recipients|readiness))*$",
19039
+ pattern: "^(recipients|readiness|results)(,(recipients|readiness|results))*$",
19033
19040
  type: "string"
19034
19041
  },
19035
19042
  recipientsCursor: {
@@ -19064,6 +19071,11 @@ var commands = {
19064
19071
  minLength: 1,
19065
19072
  type: "string"
19066
19073
  },
19074
+ recipientsResult: {
19075
+ description: "With `expand=recipients`: `definitionKey=optionKey`, only those whose latest answer is that option; `definitionKey=`, only those with no answer yet.",
19076
+ pattern: "^[a-z][a-z0-9_]{0,63}=([a-z][a-z0-9_]{0,63})?$",
19077
+ type: "string"
19078
+ },
19067
19079
  recipientsStatus: {
19068
19080
  description: "`pending`: waiting for its (next) call or message. `in_progress`: being called, or on WhatsApp waiting for a reply until a reminder is due. `completed`: an attempt succeeded; on WhatsApp, the message arrived. `failed`: its attempts ran out, or it cannot be reached.",
19069
19081
  anyOf: [
@@ -19096,7 +19108,7 @@ var commands = {
19096
19108
  additionalProperties: false
19097
19109
  },
19098
19110
  title: "Get a campaign",
19099
- description: "Read one campaign: Agent, schedule, contact hours, retries, progress and, in `errorCode`, why it cannot reach anyone now. `expand=recipients` adds its recipients in the order they were added, each with attempts, next attempt, error and latest call or message; continue with `recipientsCursor` (`recipientsDirection` reads the other way). `expand=readiness` says whether it can start and lists what has to be fixed first, without reaching anyone. Read it before `update_campaign` and send `expectedVersion`.",
19111
+ description: "Read one campaign: Agent, schedule, contact hours, retries, progress and, in `errorCode`, why it cannot reach anyone now. `expand=recipients` adds its recipients in the order they were added, each with attempts, next attempt, error and latest call or message; continue with `recipientsCursor` (`recipientsDirection` reads the other way). `expand=readiness` says whether it can start and lists what has to be fixed first, without reaching anyone. `expand=results` counts what people answered, by the Agent's data definitions with options; each recipient also says their own. Read it before `update_campaign` and send `expectedVersion`.",
19100
19112
  effect: "read",
19101
19113
  confirmation: null,
19102
19114
  hidden: false
@@ -88361,6 +88373,14 @@ var schemaComponents = {
88361
88373
  recipients: {
88362
88374
  $ref: "#/components/schemas/RaizCampaignRecipientPage",
88363
88375
  description: "The campaign's recipients in the order they were added, each with its latest attempt. Present only when expanded."
88376
+ },
88377
+ results: {
88378
+ description: "What people answered, for each data definition with options their Agent collects that has an answer yet. Answers arrive when a conversation closes and is analyzed, so they can keep arriving after the campaign ends.",
88379
+ maxItems: 100,
88380
+ type: "array",
88381
+ items: {
88382
+ $ref: "#/components/schemas/RaizCampaignResult"
88383
+ }
88364
88384
  }
88365
88385
  }
88366
88386
  },
@@ -88586,7 +88606,7 @@ var schemaComponents = {
88586
88606
  ]
88587
88607
  },
88588
88608
  variables: {
88589
- description: "Values for the `{{name}}` variables a WhatsApp template's parameters, or the Agent's instructions, first message or this campaign's texts on a call, reference. Raíz always provides `contact_name`, `contact_given_name` and `contact_phone`, and on a call also `contact_id`, `conversation_id` and `bulletins` (the business bulletins in force); a recipient's values never replace them.",
88609
+ description: "Values for the `{{name}}` variables a WhatsApp template's parameters, or the Agent's instructions, first message or this campaign's texts on a call, reference. A reference means the variable that is the same word, whatever its accents and case: `{{País}}` reads `pais`, and an exact name wins. Raíz always provides `contact_name`, `contact_given_name` and `contact_phone`, and on a call also `contact_id`, `conversation_id` and `bulletins` (the business bulletins in force); a recipient's values never replace them.",
88590
88610
  maxProperties: 30,
88591
88611
  type: "object",
88592
88612
  patternProperties: {
@@ -88616,6 +88636,7 @@ var schemaComponents = {
88616
88636
  required: [
88617
88637
  "address",
88618
88638
  "attemptCount",
88639
+ "contact",
88619
88640
  "contactId",
88620
88641
  "createdAt",
88621
88642
  "deliveredAt",
@@ -88629,6 +88650,7 @@ var schemaComponents = {
88629
88650
  "nextAttemptAt",
88630
88651
  "readAt",
88631
88652
  "repliedAt",
88653
+ "results",
88632
88654
  "status",
88633
88655
  "updatedAt",
88634
88656
  "variables"
@@ -88641,6 +88663,43 @@ var schemaComponents = {
88641
88663
  minimum: 0,
88642
88664
  type: "integer"
88643
88665
  },
88666
+ contact: {
88667
+ anyOf: [
88668
+ {
88669
+ description: "The contact this person is: the one the list named, else the one that owns the number. Null when the organization has none yet; the campaign creates it when it reaches them.",
88670
+ additionalProperties: false,
88671
+ type: "object",
88672
+ required: [
88673
+ "id",
88674
+ "name"
88675
+ ],
88676
+ properties: {
88677
+ id: {
88678
+ description: "Contact id.",
88679
+ examples: [
88680
+ "cnt_01m45h8q2rf3t9w6y7z0b1c2d3"
88681
+ ],
88682
+ pattern: "^cnt_(?:[0-7][0-9a-hjkmnp-tv-z]{25}|(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$",
88683
+ type: "string"
88684
+ },
88685
+ name: {
88686
+ anyOf: [
88687
+ {
88688
+ description: "Their saved name, else the name they show on WhatsApp; null when the organization has neither.",
88689
+ type: "string"
88690
+ },
88691
+ {
88692
+ type: "null"
88693
+ }
88694
+ ]
88695
+ }
88696
+ }
88697
+ },
88698
+ {
88699
+ type: "null"
88700
+ }
88701
+ ]
88702
+ },
88644
88703
  contactId: {
88645
88704
  anyOf: [
88646
88705
  {
@@ -88735,7 +88794,7 @@ var schemaComponents = {
88735
88794
  lastAttempt: {
88736
88795
  anyOf: [
88737
88796
  {
88738
- description: "The latest call or message to this recipient; its transcript is `getConversation`.",
88797
+ description: "The latest call or message to this recipient, or their answer when it came after that conversation closed; its transcript is `getConversation`.",
88739
88798
  additionalProperties: false,
88740
88799
  type: "object",
88741
88800
  required: [
@@ -88836,6 +88895,34 @@ var schemaComponents = {
88836
88895
  }
88837
88896
  ]
88838
88897
  },
88898
+ results: {
88899
+ description: "What this person answered, from their conversations: the latest for each data definition with options their Agent collects. Empty until a conversation they answered closes and is analyzed.",
88900
+ maxItems: 100,
88901
+ type: "array",
88902
+ items: {
88903
+ additionalProperties: false,
88904
+ type: "object",
88905
+ required: [
88906
+ "definitionKey",
88907
+ "label",
88908
+ "value"
88909
+ ],
88910
+ properties: {
88911
+ definitionKey: {
88912
+ description: "The key of the data definition that read it.",
88913
+ type: "string"
88914
+ },
88915
+ label: {
88916
+ description: "The answer, as people read it.",
88917
+ type: "string"
88918
+ },
88919
+ value: {
88920
+ description: "The key of the answer's option.",
88921
+ type: "string"
88922
+ }
88923
+ }
88924
+ }
88925
+ },
88839
88926
  status: {
88840
88927
  description: "`pending`: waiting for its (next) call or message. `in_progress`: being called, or on WhatsApp waiting for a reply until a reminder is due. `completed`: an attempt succeeded; on WhatsApp, the message arrived. `failed`: its attempts ran out, or it cannot be reached.",
88841
88928
  anyOf: [
@@ -88867,7 +88954,7 @@ var schemaComponents = {
88867
88954
  type: "string"
88868
88955
  },
88869
88956
  variables: {
88870
- description: "Values for the `{{name}}` variables a WhatsApp template's parameters, or the Agent's instructions, first message or this campaign's texts on a call, reference. Raíz always provides `contact_name`, `contact_given_name` and `contact_phone`, and on a call also `contact_id`, `conversation_id` and `bulletins` (the business bulletins in force); a recipient's values never replace them.",
88957
+ description: "Values for the `{{name}}` variables a WhatsApp template's parameters, or the Agent's instructions, first message or this campaign's texts on a call, reference. A reference means the variable that is the same word, whatever its accents and case: `{{País}}` reads `pais`, and an exact name wins. Raíz always provides `contact_name`, `contact_given_name` and `contact_phone`, and on a call also `contact_id`, `conversation_id` and `bulletins` (the business bulletins in force); a recipient's values never replace them.",
88871
88958
  maxProperties: 30,
88872
88959
  type: "object",
88873
88960
  patternProperties: {
@@ -88891,6 +88978,60 @@ var schemaComponents = {
88891
88978
  }
88892
88979
  }
88893
88980
  },
88981
+ RaizCampaignResult: {
88982
+ additionalProperties: false,
88983
+ type: "object",
88984
+ required: [
88985
+ "definition",
88986
+ "values"
88987
+ ],
88988
+ properties: {
88989
+ definition: {
88990
+ additionalProperties: false,
88991
+ type: "object",
88992
+ required: [
88993
+ "key",
88994
+ "name"
88995
+ ],
88996
+ properties: {
88997
+ key: {
88998
+ type: "string"
88999
+ },
89000
+ name: {
89001
+ type: "string"
89002
+ }
89003
+ }
89004
+ },
89005
+ values: {
89006
+ maxItems: 100,
89007
+ type: "array",
89008
+ items: {
89009
+ additionalProperties: false,
89010
+ type: "object",
89011
+ required: [
89012
+ "key",
89013
+ "label",
89014
+ "people"
89015
+ ],
89016
+ properties: {
89017
+ key: {
89018
+ description: "The key of the answer's option.",
89019
+ type: "string"
89020
+ },
89021
+ label: {
89022
+ description: "The answer, as people read it.",
89023
+ type: "string"
89024
+ },
89025
+ people: {
89026
+ description: "How many recipients it is the latest answer of. Each counts once, however many conversations they had.",
89027
+ minimum: 1,
89028
+ type: "integer"
89029
+ }
89030
+ }
89031
+ }
89032
+ }
89033
+ }
89034
+ },
88894
89035
  RaizCampaignTemplate: {
88895
89036
  additionalProperties: false,
88896
89037
  type: "object",
@@ -128434,11 +128575,11 @@ var schemaComponents = {
128434
128575
  type: "string"
128435
128576
  },
128436
128577
  expand: {
128437
- description: "Related data to include, comma-separated: `recipients`, `readiness`.",
128578
+ description: "Related data to include, comma-separated: `recipients`, `readiness`, `results`.",
128438
128579
  examples: [
128439
- "recipients,readiness"
128580
+ "recipients,readiness,results"
128440
128581
  ],
128441
- pattern: "^(recipients|readiness)(,(recipients|readiness))*$",
128582
+ pattern: "^(recipients|readiness|results)(,(recipients|readiness|results))*$",
128442
128583
  type: "string"
128443
128584
  },
128444
128585
  recipientsCursor: {
@@ -128473,6 +128614,11 @@ var schemaComponents = {
128473
128614
  minLength: 1,
128474
128615
  type: "string"
128475
128616
  },
128617
+ recipientsResult: {
128618
+ description: "With `expand=recipients`: `definitionKey=optionKey`, only those whose latest answer is that option; `definitionKey=`, only those with no answer yet.",
128619
+ pattern: "^[a-z][a-z0-9_]{0,63}=([a-z][a-z0-9_]{0,63})?$",
128620
+ type: "string"
128621
+ },
128476
128622
  recipientsStatus: {
128477
128623
  description: "`pending`: waiting for its (next) call or message. `in_progress`: being called, or on WhatsApp waiting for a reply until a reminder is due. `completed`: an attempt succeeded; on WhatsApp, the message arrived. `failed`: its attempts ran out, or it cannot be reached.",
128478
128624
  anyOf: [
@@ -136548,9 +136694,9 @@ var schemaComponents = {
136548
136694
  // src/generated/generation.json
136549
136695
  var generation_default = {
136550
136696
  formatVersion: 6,
136551
- release: "1.20261106.171439",
136552
- openapiSha256: "3dde2e71d41c041ea8a06dcad793712321720bccfd252ba901b8575274e4d042",
136553
- openapiContentSha256: "e7c2c8058a6f848070f1d5933ea788446ac39acb99aa97b4f6eed2f83162f71f",
136697
+ release: "1.20261106.175459",
136698
+ openapiSha256: "5f4c8fe2bd581b29d21de1dc673df5cbf07ccf6fac105dd2d7ae2cd23260233f",
136699
+ openapiContentSha256: "7ce3b52ae65d2f5e08a6fffa59be703c62066678493c5fb3bcc3646d3a39a91f",
136554
136700
  forge: {
136555
136701
  repository: "https://github.com/cloudflare/forge",
136556
136702
  commit: "7f86447210b7bea3779bfdab3cd5655eade0eadb",
@@ -136563,7 +136709,7 @@ var generation_default = {
136563
136709
  outputs: [
136564
136710
  {
136565
136711
  path: "src/generated/commands.ts",
136566
- sha256: "6ae733a2be6cc4395d26c710ecbfe0ac6c569f63abcb4630629aa45cef3aeec5"
136712
+ sha256: "ff6dca4fe9e0da6026de47d2870b001871ad436ac88bed99b338739ed06251d3"
136567
136713
  }
136568
136714
  ]
136569
136715
  };
@@ -138163,7 +138309,7 @@ ${name}`);
138163
138309
  }
138164
138310
 
138165
138311
  // src/index.ts
138166
- var VERSION = "3.41.0";
138312
+ var VERSION = "3.42.0";
138167
138313
  var RELEASE = generation_default.release;
138168
138314
  var commands2 = { ...commands, ...accountOperatorCommands };
138169
138315
  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.41.0",
3
+ "version": "3.42.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.41.0",
48
+ "@arbol-ai/sdk": "5.42.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.20261106.171439",
64
- "sha256": "e7c2c8058a6f848070f1d5933ea788446ac39acb99aa97b4f6eed2f83162f71f"
63
+ "release": "1.20261106.175459",
64
+ "sha256": "7ce3b52ae65d2f5e08a6fffa59be703c62066678493c5fb3bcc3646d3a39a91f"
65
65
  }
66
66
  }
67
67
  }