@arbol-ai/cli 3.38.0 → 3.39.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 +2838 -831
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -9020,6 +9020,162 @@ var commands = {
9020
9020
  confirmation: null,
9021
9021
  hidden: false
9022
9022
  },
9023
+ "axxa coverage lookup": {
9024
+ operation: "axxa.coverage.lookup",
9025
+ sdkPath: [
9026
+ "axxa",
9027
+ "coverage",
9028
+ "lookup"
9029
+ ],
9030
+ pathField: null,
9031
+ fields: [
9032
+ {
9033
+ name: "documentNumber",
9034
+ flag: "document-number",
9035
+ kind: "string",
9036
+ required: true,
9037
+ description: ""
9038
+ },
9039
+ {
9040
+ name: "documentType",
9041
+ flag: "document-type",
9042
+ kind: "string",
9043
+ required: true,
9044
+ description: "",
9045
+ choices: [
9046
+ "CC",
9047
+ "CE",
9048
+ "TI",
9049
+ "RC",
9050
+ "PA"
9051
+ ]
9052
+ },
9053
+ {
9054
+ name: "serviceType",
9055
+ flag: "service-type",
9056
+ kind: "string",
9057
+ required: true,
9058
+ description: "",
9059
+ choices: [
9060
+ "outpatient",
9061
+ "emergency",
9062
+ "laboratory",
9063
+ "therapy",
9064
+ "radiology",
9065
+ "other"
9066
+ ]
9067
+ },
9068
+ {
9069
+ name: "contractNumber",
9070
+ flag: "contract-number",
9071
+ kind: "string",
9072
+ required: false,
9073
+ description: "The plan to read, from an eligibility lookup. Required only when the person has several."
9074
+ },
9075
+ {
9076
+ name: "cupsCode",
9077
+ flag: "cups-code",
9078
+ kind: "string",
9079
+ required: true,
9080
+ description: "The exact service code. Only this code is answered, never one that merely starts with it."
9081
+ },
9082
+ {
9083
+ name: "connectionId",
9084
+ flag: "connection-id",
9085
+ kind: "string",
9086
+ required: false,
9087
+ description: ""
9088
+ }
9089
+ ],
9090
+ inputSchema: {
9091
+ additionalProperties: false,
9092
+ type: "object",
9093
+ required: [
9094
+ "documentNumber",
9095
+ "documentType",
9096
+ "serviceType",
9097
+ "cupsCode"
9098
+ ],
9099
+ properties: {
9100
+ documentNumber: {
9101
+ pattern: "^[A-Za-z0-9]{3,30}$",
9102
+ type: "string"
9103
+ },
9104
+ documentType: {
9105
+ anyOf: [
9106
+ {
9107
+ const: "CC",
9108
+ type: "string"
9109
+ },
9110
+ {
9111
+ const: "CE",
9112
+ type: "string"
9113
+ },
9114
+ {
9115
+ const: "TI",
9116
+ type: "string"
9117
+ },
9118
+ {
9119
+ const: "RC",
9120
+ type: "string"
9121
+ },
9122
+ {
9123
+ const: "PA",
9124
+ type: "string"
9125
+ }
9126
+ ]
9127
+ },
9128
+ serviceType: {
9129
+ anyOf: [
9130
+ {
9131
+ const: "outpatient",
9132
+ type: "string"
9133
+ },
9134
+ {
9135
+ const: "emergency",
9136
+ type: "string"
9137
+ },
9138
+ {
9139
+ const: "laboratory",
9140
+ type: "string"
9141
+ },
9142
+ {
9143
+ const: "therapy",
9144
+ type: "string"
9145
+ },
9146
+ {
9147
+ const: "radiology",
9148
+ type: "string"
9149
+ },
9150
+ {
9151
+ const: "other",
9152
+ type: "string"
9153
+ }
9154
+ ]
9155
+ },
9156
+ contractNumber: {
9157
+ minLength: 1,
9158
+ maxLength: 100,
9159
+ description: "The plan to read, from an eligibility lookup. Required only when the person has several.",
9160
+ type: "string"
9161
+ },
9162
+ cupsCode: {
9163
+ pattern: "^[0-9A-Za-z-]{3,20}$",
9164
+ description: "The exact service code. Only this code is answered, never one that merely starts with it.",
9165
+ type: "string"
9166
+ },
9167
+ connectionId: {
9168
+ pattern: "^con_[0-9A-Za-z]{26}$",
9169
+ type: "string"
9170
+ }
9171
+ }
9172
+ },
9173
+ title: "Look up coverage of a service",
9174
+ description: "Read whether a person's plan and this provider cover one exact service code in one service category, whether it requires an authorization and, when both cover it, the voucher quote. AXA lists each service under one category, so service_not_found there does not mean it is not covered. Generates no authorization.",
9175
+ effect: "read",
9176
+ confirmation: null,
9177
+ hidden: false
9178
+ },
9023
9179
  "axxa eligibility lookup": {
9024
9180
  operation: "axxa.eligibility.lookup",
9025
9181
  sdkPath: [
@@ -17454,7 +17610,7 @@ var commands = {
17454
17610
  },
17455
17611
  settings: {
17456
17612
  $ref: "#/components/schemas/RaizAgentSettingsInput",
17457
- description: "How the Agent behaves. In an update, the complete new settings: keys left out return to their default. Text and voice settings apply only to Agents of that modality."
17613
+ description: "How the Agent behaves. In an update, only the keys you send change: a key left out stays and `null` returns it to its default. A key's own value, such as `policy` or `voice`, is replaced whole. An update that changes `modality` starts from the defaults. Text and voice settings apply only to Agents of that modality."
17458
17614
  },
17459
17615
  status: {
17460
17616
  description: "A paused Agent answers nothing and places no calls.",
@@ -17865,7 +18021,7 @@ var commands = {
17865
18021
  },
17866
18022
  settings: {
17867
18023
  $ref: "#/components/schemas/RaizAgentSettingsInput",
17868
- description: "How the Agent behaves. In an update, the complete new settings: keys left out return to their default. Text and voice settings apply only to Agents of that modality."
18024
+ description: "How the Agent behaves. In an update, only the keys you send change: a key left out stays and `null` returns it to its default. A key's own value, such as `policy` or `voice`, is replaced whole. An update that changes `modality` starts from the defaults. Text and voice settings apply only to Agents of that modality."
17869
18025
  },
17870
18026
  status: {
17871
18027
  description: "A paused Agent answers nothing and places no calls.",
@@ -17938,7 +18094,7 @@ var commands = {
17938
18094
  }
17939
18095
  },
17940
18096
  title: "Update an Agent",
17941
- description: "Change an Agent: instructions, first message, name, language, time zone, settings, integration tools, Knowledge, procedures, connection procedures or status. Omitted fields stay and `null` clears one; `settings`, `integrationTools`, `integrationProcedures`, `procedures` and `knowledgeDocumentIds` replace the whole value when given (keep each existing procedure's `id`), so read the Agent with `get_agent` first and send its `version` as `expectedVersion` (VERSION_CONFLICT: read it again). `status: paused` stops it from answering and calling. `modality` changes only while it has no channels and no published voice line (AGENT_MODALITY_LOCKED). A voice Agent republishes in the background: check `synced`.",
18097
+ description: "Change an Agent: instructions, first message, name, language, time zone, settings, integration tools, Knowledge, procedures, connection procedures or status. Omitted fields stay and `null` clears one, also inside `settings`; `integrationTools`, `integrationProcedures`, `procedures` and `knowledgeDocumentIds` replace the whole value when given (keep each existing procedure's `id`), so read the Agent with `get_agent` first and send its `version` as `expectedVersion` (VERSION_CONFLICT: read it again). `status: paused` stops it from answering and calling. `modality` changes only while it has no channels and no published voice line (AGENT_MODALITY_LOCKED). A voice Agent republishes in the background: check `synced`.",
17942
18098
  effect: "write",
17943
18099
  confirmation: null,
17944
18100
  hidden: false
@@ -18331,247 +18487,326 @@ var commands = {
18331
18487
  "create"
18332
18488
  ],
18333
18489
  pathField: null,
18334
- fields: [
18335
- {
18336
- name: "channelId",
18337
- flag: "channel-id",
18338
- kind: "string",
18339
- required: false,
18340
- description: ""
18341
- },
18342
- {
18343
- name: "firstMessage",
18344
- flag: "first-message",
18345
- kind: "string",
18346
- required: false,
18347
- description: ""
18348
- },
18349
- {
18350
- name: "instructions",
18351
- flag: "instructions",
18352
- kind: "string",
18353
- required: false,
18354
- description: ""
18355
- },
18356
- {
18357
- name: "maxAttempts",
18358
- flag: "max-attempts",
18359
- kind: "integer",
18360
- required: false,
18361
- description: "Calls per recipient at most, retries included. Default 1."
18362
- },
18363
- {
18364
- name: "retryAfterMinutes",
18365
- flag: "retry-after-minutes",
18366
- kind: "integer",
18367
- required: false,
18368
- description: "Wait before a retry. Default 60."
18369
- },
18370
- {
18371
- name: "retryOn",
18372
- flag: "retry-on",
18373
- kind: "list",
18374
- required: false,
18375
- description: 'Which results earn a retry. Default `["no_answer"]`.',
18376
- choices: [
18377
- "no_answer",
18378
- "failure"
18379
- ]
18380
- },
18381
- {
18382
- name: "scheduledEndAt",
18383
- flag: "scheduled-end-at",
18384
- kind: "string",
18385
- required: false,
18386
- description: ""
18387
- },
18388
- {
18389
- name: "scheduledStartAt",
18390
- flag: "scheduled-start-at",
18391
- kind: "string",
18392
- required: false,
18393
- description: ""
18394
- },
18395
- {
18396
- name: "timeZone",
18397
- flag: "time-zone",
18398
- kind: "string",
18399
- required: false,
18400
- description: "IANA time zone name."
18401
- },
18402
- {
18403
- name: "agentId",
18404
- flag: "agent-id",
18405
- kind: "string",
18406
- required: true,
18407
- description: "Agent id."
18408
- },
18409
- {
18410
- name: "name",
18411
- flag: "name",
18412
- kind: "string",
18413
- required: true,
18414
- description: ""
18415
- }
18416
- ],
18490
+ fields: [],
18417
18491
  inputSchema: {
18418
- additionalProperties: false,
18419
- type: "object",
18420
- required: [
18421
- "agentId",
18422
- "name"
18423
- ],
18424
- properties: {
18425
- channelId: {
18426
- anyOf: [
18427
- {
18428
- description: "Channel id.",
18492
+ anyOf: [
18493
+ {
18494
+ description: "A campaign that calls each recipient with a voice Agent. The default.",
18495
+ additionalProperties: false,
18496
+ type: "object",
18497
+ required: [
18498
+ "agentId",
18499
+ "name"
18500
+ ],
18501
+ properties: {
18502
+ channelId: {
18503
+ anyOf: [
18504
+ {
18505
+ description: "The line calls or messages leave from, of the campaign's kind. Null: the Agent's own.",
18506
+ examples: [
18507
+ "chn_01m45h8q2rf3t9w6y7z0b1c2d3"
18508
+ ],
18509
+ pattern: "^(?:chn_(?:[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}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$",
18510
+ type: "string"
18511
+ },
18512
+ {
18513
+ type: "null"
18514
+ }
18515
+ ]
18516
+ },
18517
+ contactHours: {
18518
+ description: "When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.",
18519
+ maxItems: 14,
18520
+ type: "array",
18521
+ items: {
18522
+ $ref: "#/components/schemas/RaizContactHoursWindow",
18523
+ description: "On these days, calls start and messages leave between `from` and `to`."
18524
+ }
18525
+ },
18526
+ metadata: {
18527
+ description: "Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.",
18528
+ maxProperties: 50,
18529
+ type: "object",
18530
+ patternProperties: {
18531
+ "^[A-Za-z0-9_.-]{1,40}$": {
18532
+ maxLength: 500,
18533
+ type: "string"
18534
+ }
18535
+ }
18536
+ },
18537
+ scheduledEndAt: {
18538
+ anyOf: [
18539
+ {
18540
+ description: "Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled.",
18541
+ format: "date-time",
18542
+ type: "string"
18543
+ },
18544
+ {
18545
+ type: "null"
18546
+ }
18547
+ ]
18548
+ },
18549
+ scheduledStartAt: {
18550
+ anyOf: [
18551
+ {
18552
+ description: "Nothing starts before this instant, even once the campaign is started.",
18553
+ format: "date-time",
18554
+ type: "string"
18555
+ },
18556
+ {
18557
+ type: "null"
18558
+ }
18559
+ ]
18560
+ },
18561
+ timeZone: {
18562
+ description: "IANA time zone name.",
18429
18563
  examples: [
18430
- "chn_01m45h8q2rf3t9w6y7z0b1c2d3"
18564
+ "America/Bogota"
18431
18565
  ],
18432
- pattern: "^(?:chn_(?:[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}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$",
18566
+ maxLength: 64,
18567
+ pattern: "^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$",
18433
18568
  type: "string"
18434
18569
  },
18435
- {
18436
- type: "null"
18437
- }
18438
- ]
18439
- },
18440
- contactHours: {
18441
- description: "When calls may start, in the campaign's time zone. Empty: any time.",
18442
- maxItems: 14,
18443
- type: "array",
18444
- items: {
18445
- $ref: "#/components/schemas/RaizContactHoursWindow",
18446
- description: "On these days, calls start between `from` and `to`."
18447
- }
18448
- },
18449
- firstMessage: {
18450
- anyOf: [
18451
- {
18452
- maxLength: 2000,
18453
- minLength: 1,
18454
- type: "string",
18455
- description: "What the Agent says first on every call. Null: the Agent's own first message."
18570
+ agentId: {
18571
+ description: "Agent id.",
18572
+ examples: [
18573
+ "agt_01m45h8q2rf3t9w6y7z0b1c2d3"
18574
+ ],
18575
+ pattern: "^agt_(?:[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}))$",
18576
+ type: "string"
18456
18577
  },
18457
- {
18458
- type: "null"
18459
- }
18460
- ]
18461
- },
18462
- instructions: {
18463
- anyOf: [
18464
- {
18465
- maxLength: 8000,
18578
+ name: {
18579
+ maxLength: 200,
18466
18580
  minLength: 1,
18467
- type: "string",
18468
- description: "What these calls are about, added to the Agent's instructions on every call."
18581
+ type: "string"
18469
18582
  },
18470
- {
18471
- type: "null"
18472
- }
18473
- ]
18474
- },
18475
- maxAttempts: {
18476
- description: "Calls per recipient at most, retries included. Default 1.",
18477
- maximum: 10,
18478
- minimum: 1,
18479
- type: "integer"
18480
- },
18481
- metadata: {
18482
- description: "Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.",
18483
- maxProperties: 50,
18484
- type: "object",
18485
- patternProperties: {
18486
- "^[A-Za-z0-9_.-]{1,40}$": {
18487
- maxLength: 500,
18583
+ recipients: {
18584
+ maxItems: 1e4,
18585
+ type: "array",
18586
+ items: {
18587
+ $ref: "#/components/schemas/RaizCampaignRecipientInput"
18588
+ },
18589
+ description: "Who to reach, unique by `address`. Each becomes `contactId`, or else the contact that owns their number (created when the organization has none), when the campaign first reaches them. Send a longer list in parts with `updateCampaign` and `addRecipients`."
18590
+ },
18591
+ maxAttempts: {
18592
+ description: "Calls per recipient at most, retries included. Default 1.",
18593
+ maximum: 10,
18594
+ minimum: 1,
18595
+ type: "integer"
18596
+ },
18597
+ retryAfterMinutes: {
18598
+ description: "Wait before a retry, up to a week. Default 60. For several tries in a day use a few hours; for several in a month, a week, with `scheduledEndAt` as the last day.",
18599
+ maximum: 10080,
18600
+ minimum: 1,
18601
+ type: "integer"
18602
+ },
18603
+ retryOn: {
18604
+ description: 'Which results earn another call. Default `["no_answer"]`: nobody answered, busy or silence; `failure`: answered but judged unsuccessful.',
18605
+ maxItems: 2,
18606
+ uniqueItems: true,
18607
+ type: "array",
18608
+ items: {
18609
+ anyOf: [
18610
+ {
18611
+ const: "no_answer",
18612
+ type: "string"
18613
+ },
18614
+ {
18615
+ const: "failure",
18616
+ type: "string"
18617
+ }
18618
+ ]
18619
+ }
18620
+ },
18621
+ channelType: {
18622
+ const: "voice",
18488
18623
  type: "string"
18624
+ },
18625
+ firstMessage: {
18626
+ anyOf: [
18627
+ {
18628
+ maxLength: 2000,
18629
+ minLength: 1,
18630
+ type: "string",
18631
+ description: "What the Agent says first on every call. Null: the Agent's own first message."
18632
+ },
18633
+ {
18634
+ type: "null"
18635
+ }
18636
+ ]
18637
+ },
18638
+ instructions: {
18639
+ anyOf: [
18640
+ {
18641
+ maxLength: 8000,
18642
+ minLength: 1,
18643
+ type: "string",
18644
+ description: "What these calls are about, added to the Agent's instructions on every call."
18645
+ },
18646
+ {
18647
+ type: "null"
18648
+ }
18649
+ ]
18489
18650
  }
18490
18651
  }
18491
18652
  },
18492
- retryAfterMinutes: {
18493
- description: "Wait before a retry. Default 60.",
18494
- maximum: 10080,
18495
- minimum: 1,
18496
- type: "integer"
18497
- },
18498
- retryOn: {
18499
- description: 'Which results earn a retry. Default `["no_answer"]`.',
18500
- maxItems: 2,
18501
- uniqueItems: true,
18502
- type: "array",
18503
- items: {
18504
- description: "`no_answer`: nobody answered, the line was busy, or the Agent heard no one. `failure`: the call was answered but its analysis judged it unsuccessful.",
18505
- anyOf: [
18506
- {
18507
- const: "no_answer",
18508
- type: "string"
18509
- },
18510
- {
18511
- const: "failure",
18512
- type: "string"
18653
+ {
18654
+ description: "A campaign that sends each recipient an approved WhatsApp template; its text Agent answers whoever replies.",
18655
+ additionalProperties: false,
18656
+ type: "object",
18657
+ required: [
18658
+ "agentId",
18659
+ "name",
18660
+ "channelType",
18661
+ "template"
18662
+ ],
18663
+ properties: {
18664
+ channelId: {
18665
+ anyOf: [
18666
+ {
18667
+ description: "The line calls or messages leave from, of the campaign's kind. Null: the Agent's own.",
18668
+ examples: [
18669
+ "chn_01m45h8q2rf3t9w6y7z0b1c2d3"
18670
+ ],
18671
+ pattern: "^(?:chn_(?:[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}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$",
18672
+ type: "string"
18673
+ },
18674
+ {
18675
+ type: "null"
18676
+ }
18677
+ ]
18678
+ },
18679
+ contactHours: {
18680
+ description: "When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.",
18681
+ maxItems: 14,
18682
+ type: "array",
18683
+ items: {
18684
+ $ref: "#/components/schemas/RaizContactHoursWindow",
18685
+ description: "On these days, calls start and messages leave between `from` and `to`."
18513
18686
  }
18514
- ]
18515
- }
18516
- },
18517
- scheduledEndAt: {
18518
- anyOf: [
18519
- {
18520
- description: "No call starts after this instant.",
18521
- format: "date-time",
18687
+ },
18688
+ metadata: {
18689
+ description: "Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.",
18690
+ maxProperties: 50,
18691
+ type: "object",
18692
+ patternProperties: {
18693
+ "^[A-Za-z0-9_.-]{1,40}$": {
18694
+ maxLength: 500,
18695
+ type: "string"
18696
+ }
18697
+ }
18698
+ },
18699
+ scheduledEndAt: {
18700
+ anyOf: [
18701
+ {
18702
+ description: "Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled.",
18703
+ format: "date-time",
18704
+ type: "string"
18705
+ },
18706
+ {
18707
+ type: "null"
18708
+ }
18709
+ ]
18710
+ },
18711
+ scheduledStartAt: {
18712
+ anyOf: [
18713
+ {
18714
+ description: "Nothing starts before this instant, even once the campaign is started.",
18715
+ format: "date-time",
18716
+ type: "string"
18717
+ },
18718
+ {
18719
+ type: "null"
18720
+ }
18721
+ ]
18722
+ },
18723
+ timeZone: {
18724
+ description: "IANA time zone name.",
18725
+ examples: [
18726
+ "America/Bogota"
18727
+ ],
18728
+ maxLength: 64,
18729
+ pattern: "^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$",
18522
18730
  type: "string"
18523
18731
  },
18524
- {
18525
- type: "null"
18526
- }
18527
- ]
18528
- },
18529
- scheduledStartAt: {
18530
- anyOf: [
18531
- {
18532
- description: "No call starts before this instant, even once the campaign is started.",
18533
- format: "date-time",
18732
+ agentId: {
18733
+ description: "Agent id.",
18734
+ examples: [
18735
+ "agt_01m45h8q2rf3t9w6y7z0b1c2d3"
18736
+ ],
18737
+ pattern: "^agt_(?:[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}))$",
18534
18738
  type: "string"
18535
18739
  },
18536
- {
18537
- type: "null"
18740
+ name: {
18741
+ maxLength: 200,
18742
+ minLength: 1,
18743
+ type: "string"
18744
+ },
18745
+ recipients: {
18746
+ maxItems: 1e4,
18747
+ type: "array",
18748
+ items: {
18749
+ $ref: "#/components/schemas/RaizCampaignRecipientInput"
18750
+ },
18751
+ description: "Who to reach, unique by `address`. Each becomes `contactId`, or else the contact that owns their number (created when the organization has none), when the campaign first reaches them. Send a longer list in parts with `updateCampaign` and `addRecipients`."
18752
+ },
18753
+ maxAttempts: {
18754
+ description: "Messages per recipient at most, reminders included. Default 2. WhatsApp penalizes a number people block or report, so keep it low.",
18755
+ maximum: 10,
18756
+ minimum: 1,
18757
+ type: "integer"
18758
+ },
18759
+ retryAfterMinutes: {
18760
+ description: "Wait from one message to the next, up to a week. Default 1440, a day. A person WhatsApp limited waits at least a day whatever this says.",
18761
+ maximum: 10080,
18762
+ minimum: 1,
18763
+ type: "integer"
18764
+ },
18765
+ retryOn: {
18766
+ description: 'What earns another message. Default `["not_delivered"]`: only when it did not arrive. Add `no_answer` to remind whoever received it and has not replied. A person who replies, or who cannot receive it, is never sent another.',
18767
+ maxItems: 2,
18768
+ uniqueItems: true,
18769
+ type: "array",
18770
+ items: {
18771
+ anyOf: [
18772
+ {
18773
+ const: "no_answer",
18774
+ type: "string"
18775
+ },
18776
+ {
18777
+ const: "not_delivered",
18778
+ type: "string"
18779
+ }
18780
+ ]
18781
+ }
18782
+ },
18783
+ channelType: {
18784
+ const: "whatsapp",
18785
+ type: "string"
18786
+ },
18787
+ instructions: {
18788
+ anyOf: [
18789
+ {
18790
+ maxLength: 8000,
18791
+ minLength: 1,
18792
+ type: "string",
18793
+ description: "What the Agent should know when someone replies: what the message is about and what to do next."
18794
+ },
18795
+ {
18796
+ type: "null"
18797
+ }
18798
+ ]
18799
+ },
18800
+ template: {
18801
+ $ref: "#/components/schemas/RaizCampaignTemplateInput",
18802
+ description: "The approved template sent to each recipient. WhatsApp only allows a business to start a conversation with one."
18538
18803
  }
18539
- ]
18540
- },
18541
- timeZone: {
18542
- description: "IANA time zone name.",
18543
- examples: [
18544
- "America/Bogota"
18545
- ],
18546
- maxLength: 64,
18547
- pattern: "^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$",
18548
- type: "string"
18549
- },
18550
- agentId: {
18551
- description: "Agent id.",
18552
- examples: [
18553
- "agt_01m45h8q2rf3t9w6y7z0b1c2d3"
18554
- ],
18555
- pattern: "^agt_(?:[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}))$",
18556
- type: "string"
18557
- },
18558
- name: {
18559
- maxLength: 200,
18560
- minLength: 1,
18561
- type: "string"
18562
- },
18563
- recipients: {
18564
- maxItems: 1e4,
18565
- type: "array",
18566
- items: {
18567
- $ref: "#/components/schemas/RaizCampaignRecipientInput"
18568
- },
18569
- description: "Who to call, unique by `address`. A recipient's contact is `contactId`, or else the contact that owns its number (created when the organization has none)."
18804
+ }
18570
18805
  }
18571
- }
18806
+ ]
18572
18807
  },
18573
- title: "Create a call campaign",
18574
- description: "Prepare an outbound call campaign for a voice Agent with up to 10000 recipients, each a phone `address` with an optional `contactId`, `variables`, `firstMessage` and `instructions`. Nobody is called until it is started. Each recipient's contact is the one it names, or the owner of its number (created when none exists). Calls happen only inside `contactHours` (in `timeZone`, the organization's by default) and between `scheduledStartAt` and `scheduledEndAt`; each recipient gets up to `maxAttempts` calls, retried `retryAfterMinutes` later after the results in `retryOn` (`no_answer`, `failure`). Starting it (REST `POST /v1/campaigns/{campaignId}/start`) is not an AI tool. Read the `run-a-campaign` skill.",
18808
+ title: "Create a campaign",
18809
+ description: "Prepare a campaign with up to 10000 recipients, each a phone `address` with an optional `contactId` and `variables`. A call campaign (the default) has a voice Agent call each one. With `channelType: whatsapp` and an approved `template`, each one is sent the template, its `parameters` filled from their `variables` (`{{name}}`), and its text Agent answers whoever replies. Nobody is reached until it is started. A list adds nobody to the organization's contacts: a recipient becomes the contact it names, or the owner of its number (created when none exists), when the campaign first reaches them. A longer list continues with `updateCampaign` and `addRecipients`. Nothing happens outside `contactHours` (in `timeZone`, the organization's by default) or outside `scheduledStartAt` and `scheduledEndAt`; each recipient gets up to `maxAttempts` attempts, `retryAfterMinutes` apart, after the results in `retryOn`. Read it with `expand=readiness` to see whether it can start. Starting it (REST `POST /v1/campaigns/{campaignId}/start`) is not an AI tool. Read the `run-a-campaign` skill.",
18575
18810
  effect: "write",
18576
18811
  confirmation: null,
18577
18812
  hidden: false
@@ -18590,7 +18825,7 @@ var commands = {
18590
18825
  flag: "expand",
18591
18826
  kind: "string",
18592
18827
  required: false,
18593
- description: "Related data to include, comma-separated: `recipients`."
18828
+ description: "Related data to include, comma-separated: `recipients`, `readiness`."
18594
18829
  },
18595
18830
  {
18596
18831
  name: "recipientsCursor",
@@ -18618,6 +18853,27 @@ var commands = {
18618
18853
  required: false,
18619
18854
  description: "Maximum `recipients` items in one page. Defaults to 100.",
18620
18855
  default: 100
18856
+ },
18857
+ {
18858
+ name: "recipientsQ",
18859
+ flag: "recipients-q",
18860
+ kind: "string",
18861
+ required: false,
18862
+ description: "With `expand=recipients`: only those whose number contains these digits or whose name contains this text."
18863
+ },
18864
+ {
18865
+ name: "recipientsStatus",
18866
+ flag: "recipients-status",
18867
+ kind: "string",
18868
+ required: false,
18869
+ 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.",
18870
+ choices: [
18871
+ "pending",
18872
+ "in_progress",
18873
+ "completed",
18874
+ "failed",
18875
+ "cancelled"
18876
+ ]
18621
18877
  }
18622
18878
  ],
18623
18879
  inputSchema: {
@@ -18632,11 +18888,11 @@ var commands = {
18632
18888
  type: "string"
18633
18889
  },
18634
18890
  expand: {
18635
- description: "Related data to include, comma-separated: `recipients`.",
18891
+ description: "Related data to include, comma-separated: `recipients`, `readiness`.",
18636
18892
  examples: [
18637
- "recipients"
18893
+ "recipients,readiness"
18638
18894
  ],
18639
- pattern: "^(recipients)(,(recipients))*$",
18895
+ pattern: "^(recipients|readiness)(,(recipients|readiness))*$",
18640
18896
  type: "string"
18641
18897
  },
18642
18898
  recipientsCursor: {
@@ -18660,10 +18916,41 @@ var commands = {
18660
18916
  },
18661
18917
  recipientsLimit: {
18662
18918
  description: "Maximum `recipients` items in one page. Defaults to 100.",
18663
- maximum: 100,
18919
+ maximum: 1000,
18664
18920
  minimum: 1,
18665
18921
  type: "integer",
18666
18922
  default: 100
18923
+ },
18924
+ recipientsQ: {
18925
+ description: "With `expand=recipients`: only those whose number contains these digits or whose name contains this text.",
18926
+ maxLength: 200,
18927
+ minLength: 1,
18928
+ type: "string"
18929
+ },
18930
+ recipientsStatus: {
18931
+ 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.",
18932
+ anyOf: [
18933
+ {
18934
+ const: "pending",
18935
+ type: "string"
18936
+ },
18937
+ {
18938
+ const: "in_progress",
18939
+ type: "string"
18940
+ },
18941
+ {
18942
+ const: "completed",
18943
+ type: "string"
18944
+ },
18945
+ {
18946
+ const: "failed",
18947
+ type: "string"
18948
+ },
18949
+ {
18950
+ const: "cancelled",
18951
+ type: "string"
18952
+ }
18953
+ ]
18667
18954
  }
18668
18955
  },
18669
18956
  required: [
@@ -18672,7 +18959,7 @@ var commands = {
18672
18959
  additionalProperties: false
18673
18960
  },
18674
18961
  title: "Get a campaign",
18675
- description: "Read one campaign: Agent, schedule, contact hours, retries and progress. `expand=recipients` adds its recipients in the order they were added, each with attempts, next attempt, error and latest call; continue with `recipientsCursor` (`recipientsDirection` reads the other way). Read it before `update_campaign` and send `expectedVersion`.",
18962
+ 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`.",
18676
18963
  effect: "read",
18677
18964
  confirmation: null,
18678
18965
  hidden: false
@@ -18720,12 +19007,23 @@ var commands = {
18720
19007
  required: false,
18721
19008
  description: "Agent id."
18722
19009
  },
19010
+ {
19011
+ name: "channelType",
19012
+ flag: "channel-type",
19013
+ kind: "string",
19014
+ required: false,
19015
+ description: "How the campaign reaches people: by call or by WhatsApp.",
19016
+ choices: [
19017
+ "voice",
19018
+ "whatsapp"
19019
+ ]
19020
+ },
18723
19021
  {
18724
19022
  name: "status",
18725
19023
  flag: "status",
18726
19024
  kind: "string",
18727
19025
  required: false,
18728
- description: "`queued`: not started yet (or its start is scheduled). `running`: calling due recipients. `paused`: started, then paused; calls in progress finish. `completed`: no recipient is left to call.",
19026
+ description: "`queued`: not started yet (or its start is scheduled). `running`: reaching due recipients. `paused`: started, then paused; what is in progress finishes. `completed`: no recipient is left to reach.",
18729
19027
  choices: [
18730
19028
  "queued",
18731
19029
  "running",
@@ -18772,8 +19070,21 @@ var commands = {
18772
19070
  pattern: "^agt_(?:[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}))$",
18773
19071
  type: "string"
18774
19072
  },
19073
+ channelType: {
19074
+ description: "How the campaign reaches people: by call or by WhatsApp.",
19075
+ anyOf: [
19076
+ {
19077
+ const: "voice",
19078
+ type: "string"
19079
+ },
19080
+ {
19081
+ const: "whatsapp",
19082
+ type: "string"
19083
+ }
19084
+ ]
19085
+ },
18775
19086
  status: {
18776
- description: "`queued`: not started yet (or its start is scheduled). `running`: calling due recipients. `paused`: started, then paused; calls in progress finish. `completed`: no recipient is left to call.",
19087
+ description: "`queued`: not started yet (or its start is scheduled). `running`: reaching due recipients. `paused`: started, then paused; what is in progress finishes. `completed`: no recipient is left to reach.",
18777
19088
  anyOf: [
18778
19089
  {
18779
19090
  const: "queued",
@@ -18805,7 +19116,7 @@ var commands = {
18805
19116
  additionalProperties: false
18806
19117
  },
18807
19118
  title: "List campaigns",
18808
- description: "List the organization's call campaigns, newest first, each with its progress (recipients pending, in progress, completed, failed and succeeded). Filter by `status` or `agentId`. A campaign's calls: `list_conversations` with `campaignId`; its numbers by day: `get_report` with `name: campaign_progress`.",
19119
+ description: "List the organization's campaigns, newest first, each with its progress (recipients pending, in progress, completed, failed and succeeded; on WhatsApp also delivered, read and replied). Filter by `channelType`, `status` or `agentId`. A campaign's calls and messages: `list_conversations` with `campaignId`; its numbers by day: `get_report` with `name: campaign_progress`.",
18809
19120
  effect: "read",
18810
19121
  confirmation: null,
18811
19122
  hidden: false
@@ -18826,45 +19137,6 @@ var commands = {
18826
19137
  required: false,
18827
19138
  description: ""
18828
19139
  },
18829
- {
18830
- name: "firstMessage",
18831
- flag: "first-message",
18832
- kind: "string",
18833
- required: false,
18834
- description: ""
18835
- },
18836
- {
18837
- name: "instructions",
18838
- flag: "instructions",
18839
- kind: "string",
18840
- required: false,
18841
- description: ""
18842
- },
18843
- {
18844
- name: "maxAttempts",
18845
- flag: "max-attempts",
18846
- kind: "integer",
18847
- required: false,
18848
- description: "Calls per recipient at most, retries included. Default 1."
18849
- },
18850
- {
18851
- name: "retryAfterMinutes",
18852
- flag: "retry-after-minutes",
18853
- kind: "integer",
18854
- required: false,
18855
- description: "Wait before a retry. Default 60."
18856
- },
18857
- {
18858
- name: "retryOn",
18859
- flag: "retry-on",
18860
- kind: "list",
18861
- required: false,
18862
- description: 'Which results earn a retry. Default `["no_answer"]`.',
18863
- choices: [
18864
- "no_answer",
18865
- "failure"
18866
- ]
18867
- },
18868
19140
  {
18869
19141
  name: "scheduledEndAt",
18870
19142
  flag: "scheduled-end-at",
@@ -18900,6 +19172,27 @@ var commands = {
18900
19172
  required: false,
18901
19173
  description: "The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT."
18902
19174
  },
19175
+ {
19176
+ name: "firstMessage",
19177
+ flag: "first-message",
19178
+ kind: "string",
19179
+ required: false,
19180
+ description: ""
19181
+ },
19182
+ {
19183
+ name: "instructions",
19184
+ flag: "instructions",
19185
+ kind: "string",
19186
+ required: false,
19187
+ description: ""
19188
+ },
19189
+ {
19190
+ name: "maxAttempts",
19191
+ flag: "max-attempts",
19192
+ kind: "integer",
19193
+ required: false,
19194
+ description: "Calls or messages per recipient at most, retries included."
19195
+ },
18903
19196
  {
18904
19197
  name: "name",
18905
19198
  flag: "name",
@@ -18913,6 +19206,25 @@ var commands = {
18913
19206
  kind: "boolean",
18914
19207
  required: false,
18915
19208
  description: "Pause (`true`) or resume (`false`) a started campaign. A campaign that never started is started with `startCampaign` (INVALID_STATE here)."
19209
+ },
19210
+ {
19211
+ name: "retryAfterMinutes",
19212
+ flag: "retry-after-minutes",
19213
+ kind: "integer",
19214
+ required: false,
19215
+ description: "Wait before a retry or reminder, up to a week."
19216
+ },
19217
+ {
19218
+ name: "retryOn",
19219
+ flag: "retry-on",
19220
+ kind: "list",
19221
+ required: false,
19222
+ description: "What earns another attempt: `no_answer` and `failure` on a call, `no_answer` and `not_delivered` on WhatsApp.",
19223
+ choices: [
19224
+ "no_answer",
19225
+ "failure",
19226
+ "not_delivered"
19227
+ ]
18916
19228
  }
18917
19229
  ],
18918
19230
  inputSchema: {
@@ -18925,7 +19237,7 @@ var commands = {
18925
19237
  channelId: {
18926
19238
  anyOf: [
18927
19239
  {
18928
- description: "Channel id.",
19240
+ description: "The line calls or messages leave from, of the campaign's kind. Null: the Agent's own.",
18929
19241
  examples: [
18930
19242
  "chn_01m45h8q2rf3t9w6y7z0b1c2d3"
18931
19243
  ],
@@ -18938,46 +19250,14 @@ var commands = {
18938
19250
  ]
18939
19251
  },
18940
19252
  contactHours: {
18941
- description: "When calls may start, in the campaign's time zone. Empty: any time.",
19253
+ description: "When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.",
18942
19254
  maxItems: 14,
18943
19255
  type: "array",
18944
19256
  items: {
18945
19257
  $ref: "#/components/schemas/RaizContactHoursWindow",
18946
- description: "On these days, calls start between `from` and `to`."
19258
+ description: "On these days, calls start and messages leave between `from` and `to`."
18947
19259
  }
18948
19260
  },
18949
- firstMessage: {
18950
- anyOf: [
18951
- {
18952
- maxLength: 2000,
18953
- minLength: 1,
18954
- type: "string",
18955
- description: "What the Agent says first on every call. Null: the Agent's own first message."
18956
- },
18957
- {
18958
- type: "null"
18959
- }
18960
- ]
18961
- },
18962
- instructions: {
18963
- anyOf: [
18964
- {
18965
- maxLength: 8000,
18966
- minLength: 1,
18967
- type: "string",
18968
- description: "What these calls are about, added to the Agent's instructions on every call."
18969
- },
18970
- {
18971
- type: "null"
18972
- }
18973
- ]
18974
- },
18975
- maxAttempts: {
18976
- description: "Calls per recipient at most, retries included. Default 1.",
18977
- maximum: 10,
18978
- minimum: 1,
18979
- type: "integer"
18980
- },
18981
19261
  metadata: {
18982
19262
  description: "Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.",
18983
19263
  maxProperties: 50,
@@ -18989,35 +19269,10 @@ var commands = {
18989
19269
  }
18990
19270
  }
18991
19271
  },
18992
- retryAfterMinutes: {
18993
- description: "Wait before a retry. Default 60.",
18994
- maximum: 10080,
18995
- minimum: 1,
18996
- type: "integer"
18997
- },
18998
- retryOn: {
18999
- description: 'Which results earn a retry. Default `["no_answer"]`.',
19000
- maxItems: 2,
19001
- uniqueItems: true,
19002
- type: "array",
19003
- items: {
19004
- description: "`no_answer`: nobody answered, the line was busy, or the Agent heard no one. `failure`: the call was answered but its analysis judged it unsuccessful.",
19005
- anyOf: [
19006
- {
19007
- const: "no_answer",
19008
- type: "string"
19009
- },
19010
- {
19011
- const: "failure",
19012
- type: "string"
19013
- }
19014
- ]
19015
- }
19016
- },
19017
19272
  scheduledEndAt: {
19018
19273
  anyOf: [
19019
19274
  {
19020
- description: "No call starts after this instant.",
19275
+ description: "Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled.",
19021
19276
  format: "date-time",
19022
19277
  type: "string"
19023
19278
  },
@@ -19029,7 +19284,7 @@ var commands = {
19029
19284
  scheduledStartAt: {
19030
19285
  anyOf: [
19031
19286
  {
19032
- description: "No call starts before this instant, even once the campaign is started.",
19287
+ description: "Nothing starts before this instant, even once the campaign is started.",
19033
19288
  format: "date-time",
19034
19289
  type: "string"
19035
19290
  },
@@ -19047,6 +19302,14 @@ var commands = {
19047
19302
  pattern: "^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$",
19048
19303
  type: "string"
19049
19304
  },
19305
+ addRecipients: {
19306
+ maxItems: 1e4,
19307
+ type: "array",
19308
+ items: {
19309
+ $ref: "#/components/schemas/RaizCampaignRecipientInput"
19310
+ },
19311
+ description: "Adds these recipients, before or after the start, skipping numbers the campaign already has. A list longer than one request arrives in parts this way, and repeating a part reaches nobody twice."
19312
+ },
19050
19313
  agentId: {
19051
19314
  description: "Changes only before the campaign starts.",
19052
19315
  examples: [
@@ -19060,6 +19323,38 @@ var commands = {
19060
19323
  minimum: 1,
19061
19324
  type: "integer"
19062
19325
  },
19326
+ firstMessage: {
19327
+ anyOf: [
19328
+ {
19329
+ maxLength: 2000,
19330
+ minLength: 1,
19331
+ type: "string",
19332
+ description: "Calls only: what the Agent says first on every call. Null: the Agent's own first message."
19333
+ },
19334
+ {
19335
+ type: "null"
19336
+ }
19337
+ ]
19338
+ },
19339
+ instructions: {
19340
+ anyOf: [
19341
+ {
19342
+ maxLength: 8000,
19343
+ minLength: 1,
19344
+ type: "string",
19345
+ description: "On a call, what it is about, added to the Agent's instructions. On WhatsApp, what the Agent should know when someone replies."
19346
+ },
19347
+ {
19348
+ type: "null"
19349
+ }
19350
+ ]
19351
+ },
19352
+ maxAttempts: {
19353
+ description: "Calls or messages per recipient at most, retries included.",
19354
+ maximum: 10,
19355
+ minimum: 1,
19356
+ type: "integer"
19357
+ },
19063
19358
  name: {
19064
19359
  maxLength: 200,
19065
19360
  minLength: 1,
@@ -19075,7 +19370,40 @@ var commands = {
19075
19370
  items: {
19076
19371
  $ref: "#/components/schemas/RaizCampaignRecipientInput"
19077
19372
  },
19078
- description: "Before the campaign starts: the complete set, matched by `address` (listed recipients get these values, new ones are added, missing ones are removed). Once it started: only additions, so a long list can be sent in batches; addresses already in the campaign are left as they are, listed or not."
19373
+ description: "Before the campaign starts: the complete set, replacing whoever was there. Once it started: only adds, skipping numbers it already has."
19374
+ },
19375
+ retryAfterMinutes: {
19376
+ description: "Wait before a retry or reminder, up to a week.",
19377
+ maximum: 10080,
19378
+ minimum: 1,
19379
+ type: "integer"
19380
+ },
19381
+ retryOn: {
19382
+ description: "What earns another attempt: `no_answer` and `failure` on a call, `no_answer` and `not_delivered` on WhatsApp.",
19383
+ maxItems: 2,
19384
+ uniqueItems: true,
19385
+ type: "array",
19386
+ items: {
19387
+ description: "On a call, `no_answer`: nobody answered, the line was busy, or the Agent heard no one; `failure`: it was answered but its analysis judged it unsuccessful. On WhatsApp, `no_answer`: it arrived and the person has not replied once `retryAfterMinutes` pass; `not_delivered`: it did not arrive.",
19388
+ anyOf: [
19389
+ {
19390
+ const: "no_answer",
19391
+ type: "string"
19392
+ },
19393
+ {
19394
+ const: "failure",
19395
+ type: "string"
19396
+ },
19397
+ {
19398
+ const: "not_delivered",
19399
+ type: "string"
19400
+ }
19401
+ ]
19402
+ }
19403
+ },
19404
+ template: {
19405
+ $ref: "#/components/schemas/RaizCampaignTemplateInput",
19406
+ description: "WhatsApp only. On a started campaign it applies to the messages still to go."
19079
19407
  },
19080
19408
  campaignId: {
19081
19409
  description: "Campaign id.",
@@ -19088,7 +19416,7 @@ var commands = {
19088
19416
  }
19089
19417
  },
19090
19418
  title: "Update a campaign",
19091
- description: "Change a campaign. Omitted fields stay. `paused: true` pauses a started campaign (no new call starts; calls in progress finish) and `paused: false` resumes it, with the same checks as starting. Before the start, `recipients` is the complete set (matched by `address`); once started it only adds, so send a long list in batches. The Agent changes only before the start, and a completed campaign accepts only its name and metadata.",
19419
+ description: "Change a campaign. Omitted fields stay. `paused: true` pauses a started campaign (no new call or message starts; those in progress finish) and `paused: false` resumes it, with the same checks as starting. Before the start, `recipients` is the complete set, replacing whoever was there; once started it only adds. `addRecipients` adds at any moment, which is how a list longer than one request arrives: a number the campaign already has is skipped, so repeating a part reaches nobody twice. The Agent changes only before the start, and a completed campaign accepts only its name and metadata. A change lifts the wait of a campaign held by `errorCode`: fixing a template and sending it here tries again at once.",
19092
19420
  effect: "write",
19093
19421
  confirmation: null,
19094
19422
  hidden: false
@@ -24969,7 +25297,7 @@ var commands = {
24969
25297
  type: "array",
24970
25298
  items: {
24971
25299
  $ref: "#/components/schemas/RaizContactHoursWindow",
24972
- description: "On these days, calls start between `from` and `to`."
25300
+ description: "On these days, calls start and messages leave between `from` and `to`."
24973
25301
  }
24974
25302
  },
24975
25303
  metadata: {
@@ -25077,7 +25405,7 @@ var commands = {
25077
25405
  type: "array",
25078
25406
  items: {
25079
25407
  $ref: "#/components/schemas/RaizContactHoursWindow",
25080
- description: "On these days, calls start between `from` and `to`."
25408
+ description: "On these days, calls start and messages leave between `from` and `to`."
25081
25409
  }
25082
25410
  },
25083
25411
  metadata: {
@@ -25371,7 +25699,7 @@ var commands = {
25371
25699
  type: "array",
25372
25700
  items: {
25373
25701
  $ref: "#/components/schemas/RaizContactHoursWindow",
25374
- description: "On these days, calls start between `from` and `to`."
25702
+ description: "On these days, calls start and messages leave between `from` and `to`."
25375
25703
  }
25376
25704
  },
25377
25705
  expectedVersion: {
@@ -27125,6 +27453,13 @@ var commands = {
27125
27453
  required: false,
27126
27454
  description: ""
27127
27455
  },
27456
+ {
27457
+ name: "providerId",
27458
+ flag: "provider-id",
27459
+ kind: "string",
27460
+ required: false,
27461
+ description: "An exact provider context id from getConnection(expand: providers), required when the source has no selected default."
27462
+ },
27128
27463
  {
27129
27464
  name: "documentType",
27130
27465
  flag: "document-type",
@@ -27181,6 +27516,11 @@ var commands = {
27181
27516
  pattern: "^con_[0-9a-z]{26}$",
27182
27517
  type: "string"
27183
27518
  },
27519
+ providerId: {
27520
+ pattern: "^[1-9][0-9]{0,8}$",
27521
+ description: "An exact provider context id from getConnection(expand: providers), required when the source has no selected default.",
27522
+ type: "string"
27523
+ },
27184
27524
  documentType: {
27185
27525
  anyOf: [
27186
27526
  {
@@ -27281,7 +27621,18 @@ var commands = {
27281
27621
  "get"
27282
27622
  ],
27283
27623
  pathField: "connectionId",
27284
- fields: [],
27624
+ fields: [
27625
+ {
27626
+ name: "expand",
27627
+ flag: "expand",
27628
+ kind: "string",
27629
+ required: false,
27630
+ description: "The expand.",
27631
+ choices: [
27632
+ "providers"
27633
+ ]
27634
+ }
27635
+ ],
27285
27636
  inputSchema: {
27286
27637
  type: "object",
27287
27638
  properties: {
@@ -27289,6 +27640,11 @@ var commands = {
27289
27640
  pattern: "^con_[0-9a-z]{26}$",
27290
27641
  type: "string",
27291
27642
  description: "The connection id."
27643
+ },
27644
+ expand: {
27645
+ const: "providers",
27646
+ type: "string",
27647
+ description: "The expand."
27292
27648
  }
27293
27649
  },
27294
27650
  required: [
@@ -27297,7 +27653,7 @@ var commands = {
27297
27653
  additionalProperties: false
27298
27654
  },
27299
27655
  title: "Get connection",
27300
- description: "Read safe status without contacting the provider.",
27656
+ description: "Read safe status. expand providers reads the available business provider contexts with the retained session, without submitting credentials.",
27301
27657
  effect: "read",
27302
27658
  confirmation: null,
27303
27659
  hidden: false
@@ -27384,9 +27740,12 @@ var commands = {
27384
27740
  flag: "document-type",
27385
27741
  kind: "string",
27386
27742
  required: false,
27387
- description: "Document type. Defaults to CC.",
27743
+ description: "Document type. Defaults to CC. CE, RC and TI are read through the same form.",
27388
27744
  choices: [
27389
- "CC"
27745
+ "CC",
27746
+ "CE",
27747
+ "RC",
27748
+ "TI"
27390
27749
  ]
27391
27750
  },
27392
27751
  {
@@ -27429,12 +27788,24 @@ var commands = {
27429
27788
  type: "string"
27430
27789
  },
27431
27790
  documentType: {
27432
- description: "Document type. Defaults to CC.",
27791
+ description: "Document type. Defaults to CC. CE, RC and TI are read through the same form.",
27433
27792
  anyOf: [
27434
27793
  {
27435
27794
  const: "CC",
27436
27795
  type: "string"
27437
27796
  },
27797
+ {
27798
+ const: "CE",
27799
+ type: "string"
27800
+ },
27801
+ {
27802
+ const: "RC",
27803
+ type: "string"
27804
+ },
27805
+ {
27806
+ const: "TI",
27807
+ type: "string"
27808
+ },
27438
27809
  {
27439
27810
  type: "null"
27440
27811
  }
@@ -28392,9 +28763,12 @@ var commands = {
28392
28763
  flag: "document-type",
28393
28764
  kind: "string",
28394
28765
  required: false,
28395
- description: "Document type. Defaults to CC.",
28766
+ description: "Document type. Defaults to CC. CE, RC and TI are read through the same form.",
28396
28767
  choices: [
28397
- "CC"
28768
+ "CC",
28769
+ "CE",
28770
+ "RC",
28771
+ "TI"
28398
28772
  ]
28399
28773
  },
28400
28774
  {
@@ -28450,12 +28824,24 @@ var commands = {
28450
28824
  type: "string"
28451
28825
  },
28452
28826
  documentType: {
28453
- description: "Document type. Defaults to CC.",
28827
+ description: "Document type. Defaults to CC. CE, RC and TI are read through the same form.",
28454
28828
  anyOf: [
28455
28829
  {
28456
28830
  const: "CC",
28457
28831
  type: "string"
28458
28832
  },
28833
+ {
28834
+ const: "CE",
28835
+ type: "string"
28836
+ },
28837
+ {
28838
+ const: "RC",
28839
+ type: "string"
28840
+ },
28841
+ {
28842
+ const: "TI",
28843
+ type: "string"
28844
+ },
28459
28845
  {
28460
28846
  type: "null"
28461
28847
  }
@@ -28496,7 +28882,7 @@ var commands = {
28496
28882
  }
28497
28883
  },
28498
28884
  title: "Look up an authorization",
28499
- description: "Read an existing SaludWeb authorization for the exact CC patient, issuer and authorization number. Reports delivered status, dates, explicit charge type, fixed fee or copay percentage and provider-reported payments. Unknown balance and copay cap remain null. Does not issue, attend, modify or pay an authorization.",
28885
+ description: "Read an existing SaludWeb authorization for the exact patient, issuer and authorization number. Reports its status, dates, the authorized procedures, the provider it is directed to, explicit charge type, fixed fee or copay percentage and provider-reported payments. Procedures that could not be read, unknown balance and copay cap remain null. Does not issue, attend, modify or pay an authorization.",
28500
28886
  effect: "read",
28501
28887
  confirmation: null,
28502
28888
  hidden: false
@@ -37381,6 +37767,14 @@ var schemaComponents = {
37381
37767
  const: "comfachoco",
37382
37768
  type: "string"
37383
37769
  },
37770
+ {
37771
+ const: "oficlinic",
37772
+ type: "string"
37773
+ },
37774
+ {
37775
+ const: "sanitas",
37776
+ type: "string"
37777
+ },
37384
37778
  {
37385
37779
  const: "account",
37386
37780
  type: "string"
@@ -46908,14 +47302,492 @@ var schemaComponents = {
46908
47302
  const: null
46909
47303
  },
46910
47304
  error: {
46911
- $ref: "#/components/schemas/AxxaListConnectionsTooManyRequestsFailure"
47305
+ $ref: "#/components/schemas/AxxaListConnectionsTooManyRequestsFailure"
47306
+ },
47307
+ metadata: {
47308
+ $ref: "#/components/schemas/ResponseMetadata"
47309
+ }
47310
+ }
47311
+ },
47312
+ AxxaListConnectionsTooManyRequestsFailure: {
47313
+ oneOf: [
47314
+ {
47315
+ $ref: "#/components/schemas/RateLimitedFailure"
47316
+ },
47317
+ {
47318
+ $ref: "#/components/schemas/AxxaLoginCooldownFailure"
47319
+ }
47320
+ ],
47321
+ discriminator: {
47322
+ propertyName: "code",
47323
+ mapping: {
47324
+ RATE_LIMITED: "#/components/schemas/RateLimitedFailure",
47325
+ LOGIN_COOLDOWN: "#/components/schemas/AxxaLoginCooldownFailure"
47326
+ }
47327
+ }
47328
+ },
47329
+ AxxaLoginCooldownFailure: {
47330
+ type: "object",
47331
+ description: "Login attempts are temporarily paused after a failed or uncertain attempt.",
47332
+ additionalProperties: false,
47333
+ required: [
47334
+ "code",
47335
+ "message",
47336
+ "retryable",
47337
+ "data"
47338
+ ],
47339
+ properties: {
47340
+ code: {
47341
+ type: "string",
47342
+ enum: [
47343
+ "LOGIN_COOLDOWN"
47344
+ ],
47345
+ description: "The failure code, stable across releases."
47346
+ },
47347
+ message: {
47348
+ type: "string",
47349
+ description: "What went wrong, for people; it never contains input values."
47350
+ },
47351
+ retryable: {
47352
+ type: "boolean",
47353
+ enum: [
47354
+ false
47355
+ ],
47356
+ description: "Whether repeating the same request may succeed."
47357
+ },
47358
+ data: {
47359
+ $ref: "#/components/schemas/Empty"
47360
+ }
47361
+ }
47362
+ },
47363
+ AxxaLoginRejectedFailure: {
47364
+ type: "object",
47365
+ description: "AXA did not establish a session. Check the credentials and CAPTCHA; do not retry automatically.",
47366
+ additionalProperties: false,
47367
+ required: [
47368
+ "code",
47369
+ "message",
47370
+ "retryable",
47371
+ "data"
47372
+ ],
47373
+ properties: {
47374
+ code: {
47375
+ type: "string",
47376
+ enum: [
47377
+ "LOGIN_REJECTED"
47378
+ ],
47379
+ description: "The failure code, stable across releases."
47380
+ },
47381
+ message: {
47382
+ type: "string",
47383
+ description: "What went wrong, for people; it never contains input values."
47384
+ },
47385
+ retryable: {
47386
+ type: "boolean",
47387
+ enum: [
47388
+ false
47389
+ ],
47390
+ description: "Whether repeating the same request may succeed."
47391
+ },
47392
+ data: {
47393
+ $ref: "#/components/schemas/Empty"
47394
+ }
47395
+ }
47396
+ },
47397
+ AxxaLookupAuthorizationsBadGatewayError: {
47398
+ type: "object",
47399
+ description: "A failed answer.",
47400
+ additionalProperties: false,
47401
+ required: [
47402
+ "success",
47403
+ "data",
47404
+ "error",
47405
+ "metadata"
47406
+ ],
47407
+ properties: {
47408
+ success: {
47409
+ type: "boolean",
47410
+ enum: [
47411
+ false
47412
+ ]
47413
+ },
47414
+ data: {
47415
+ const: null
47416
+ },
47417
+ error: {
47418
+ $ref: "#/components/schemas/AxxaLookupAuthorizationsBadGatewayFailure"
47419
+ },
47420
+ metadata: {
47421
+ $ref: "#/components/schemas/ResponseMetadata"
47422
+ }
47423
+ }
47424
+ },
47425
+ AxxaLookupAuthorizationsBadGatewayFailure: {
47426
+ oneOf: [
47427
+ {
47428
+ $ref: "#/components/schemas/OutcomeUnknownFailure"
47429
+ },
47430
+ {
47431
+ $ref: "#/components/schemas/AxxaPortalChangedFailure"
47432
+ }
47433
+ ],
47434
+ discriminator: {
47435
+ propertyName: "code",
47436
+ mapping: {
47437
+ OUTCOME_UNKNOWN: "#/components/schemas/OutcomeUnknownFailure",
47438
+ PORTAL_CHANGED: "#/components/schemas/AxxaPortalChangedFailure"
47439
+ }
47440
+ }
47441
+ },
47442
+ AxxaLookupAuthorizationsBody: {
47443
+ additionalProperties: false,
47444
+ type: "object",
47445
+ required: [
47446
+ "documentNumber"
47447
+ ],
47448
+ properties: {
47449
+ documentNumber: {
47450
+ pattern: "^[A-Za-z0-9]{3,30}$",
47451
+ type: "string"
47452
+ },
47453
+ connectionId: {
47454
+ pattern: "^con_[0-9A-Za-z]{26}$",
47455
+ type: "string"
47456
+ }
47457
+ }
47458
+ },
47459
+ AxxaLookupAuthorizationsConflictError: {
47460
+ type: "object",
47461
+ description: "A failed answer.",
47462
+ additionalProperties: false,
47463
+ required: [
47464
+ "success",
47465
+ "data",
47466
+ "error",
47467
+ "metadata"
47468
+ ],
47469
+ properties: {
47470
+ success: {
47471
+ type: "boolean",
47472
+ enum: [
47473
+ false
47474
+ ]
47475
+ },
47476
+ data: {
47477
+ const: null
47478
+ },
47479
+ error: {
47480
+ $ref: "#/components/schemas/AxxaLookupAuthorizationsConflictFailure"
47481
+ },
47482
+ metadata: {
47483
+ $ref: "#/components/schemas/ResponseMetadata"
47484
+ }
47485
+ }
47486
+ },
47487
+ AxxaLookupAuthorizationsConflictFailure: {
47488
+ oneOf: [
47489
+ {
47490
+ $ref: "#/components/schemas/AxxaNotConfiguredFailure"
47491
+ },
47492
+ {
47493
+ $ref: "#/components/schemas/AxxaSessionRequiredFailure"
47494
+ },
47495
+ {
47496
+ $ref: "#/components/schemas/AxxaSessionBusyFailure"
47497
+ }
47498
+ ],
47499
+ discriminator: {
47500
+ propertyName: "code",
47501
+ mapping: {
47502
+ NOT_CONFIGURED: "#/components/schemas/AxxaNotConfiguredFailure",
47503
+ SESSION_REQUIRED: "#/components/schemas/AxxaSessionRequiredFailure",
47504
+ SESSION_BUSY: "#/components/schemas/AxxaSessionBusyFailure"
47505
+ }
47506
+ }
47507
+ },
47508
+ AxxaLookupAuthorizationsForbiddenError: {
47509
+ type: "object",
47510
+ description: "A failed answer.",
47511
+ additionalProperties: false,
47512
+ required: [
47513
+ "success",
47514
+ "data",
47515
+ "error",
47516
+ "metadata"
47517
+ ],
47518
+ properties: {
47519
+ success: {
47520
+ type: "boolean",
47521
+ enum: [
47522
+ false
47523
+ ]
47524
+ },
47525
+ data: {
47526
+ const: null
47527
+ },
47528
+ error: {
47529
+ $ref: "#/components/schemas/AxxaLookupAuthorizationsForbiddenFailure"
47530
+ },
47531
+ metadata: {
47532
+ $ref: "#/components/schemas/ResponseMetadata"
47533
+ }
47534
+ }
47535
+ },
47536
+ AxxaLookupAuthorizationsForbiddenFailure: {
47537
+ oneOf: [
47538
+ {
47539
+ $ref: "#/components/schemas/ForbiddenFailure"
47540
+ },
47541
+ {
47542
+ $ref: "#/components/schemas/AxxaLoginRejectedFailure"
47543
+ },
47544
+ {
47545
+ $ref: "#/components/schemas/AxxaAccountMismatchFailure"
47546
+ }
47547
+ ],
47548
+ discriminator: {
47549
+ propertyName: "code",
47550
+ mapping: {
47551
+ FORBIDDEN: "#/components/schemas/ForbiddenFailure",
47552
+ LOGIN_REJECTED: "#/components/schemas/AxxaLoginRejectedFailure",
47553
+ ACCOUNT_MISMATCH: "#/components/schemas/AxxaAccountMismatchFailure"
47554
+ }
47555
+ }
47556
+ },
47557
+ AxxaLookupAuthorizationsResult: {
47558
+ additionalProperties: false,
47559
+ description: "Only an empty authorizations array confirms no matches. Provider failures are errors.",
47560
+ type: "object",
47561
+ required: [
47562
+ "authorizations",
47563
+ "beneficiary"
47564
+ ],
47565
+ properties: {
47566
+ authorizations: {
47567
+ maxItems: 100,
47568
+ type: "array",
47569
+ items: {
47570
+ additionalProperties: false,
47571
+ type: "object",
47572
+ required: [
47573
+ "authorizationNumber",
47574
+ "requestNumber",
47575
+ "requestedAt",
47576
+ "authorizedAt",
47577
+ "product",
47578
+ "services",
47579
+ "diagnosis"
47580
+ ],
47581
+ properties: {
47582
+ authorizationNumber: {
47583
+ minLength: 1,
47584
+ maxLength: 100,
47585
+ type: "string"
47586
+ },
47587
+ requestNumber: {
47588
+ minLength: 1,
47589
+ maxLength: 100,
47590
+ type: "string"
47591
+ },
47592
+ requestedAt: {
47593
+ minLength: 1,
47594
+ maxLength: 100,
47595
+ description: "Date as displayed by AXA; no timezone is inferred.",
47596
+ type: "string"
47597
+ },
47598
+ authorizedAt: {
47599
+ minLength: 1,
47600
+ maxLength: 100,
47601
+ description: "Date as displayed by AXA; no timezone is inferred.",
47602
+ type: "string"
47603
+ },
47604
+ product: {
47605
+ maxLength: 200,
47606
+ type: "string"
47607
+ },
47608
+ services: {
47609
+ maxItems: 100,
47610
+ type: "array",
47611
+ items: {
47612
+ additionalProperties: false,
47613
+ type: "object",
47614
+ required: [
47615
+ "code",
47616
+ "description"
47617
+ ],
47618
+ properties: {
47619
+ code: {
47620
+ minLength: 1,
47621
+ maxLength: 100,
47622
+ type: "string"
47623
+ },
47624
+ description: {
47625
+ maxLength: 2000,
47626
+ type: "string"
47627
+ }
47628
+ }
47629
+ }
47630
+ },
47631
+ diagnosis: {
47632
+ additionalProperties: false,
47633
+ type: "object",
47634
+ required: [
47635
+ "code",
47636
+ "description"
47637
+ ],
47638
+ properties: {
47639
+ code: {
47640
+ minLength: 1,
47641
+ maxLength: 100,
47642
+ type: "string"
47643
+ },
47644
+ description: {
47645
+ maxLength: 2000,
47646
+ type: "string"
47647
+ }
47648
+ }
47649
+ }
47650
+ }
47651
+ }
47652
+ },
47653
+ beneficiary: {
47654
+ anyOf: [
47655
+ {
47656
+ additionalProperties: false,
47657
+ type: "object",
47658
+ required: [
47659
+ "name",
47660
+ "documentNumber"
47661
+ ],
47662
+ properties: {
47663
+ name: {
47664
+ minLength: 1,
47665
+ maxLength: 300,
47666
+ type: "string"
47667
+ },
47668
+ documentNumber: {
47669
+ pattern: "^[A-Za-z0-9]{3,30}$",
47670
+ type: "string"
47671
+ }
47672
+ }
47673
+ },
47674
+ {
47675
+ type: "null"
47676
+ }
47677
+ ]
47678
+ }
47679
+ }
47680
+ },
47681
+ AxxaLookupAuthorizationsResultResponse: {
47682
+ type: "object",
47683
+ description: "A successful answer.",
47684
+ additionalProperties: false,
47685
+ required: [
47686
+ "success",
47687
+ "data",
47688
+ "error",
47689
+ "metadata"
47690
+ ],
47691
+ properties: {
47692
+ success: {
47693
+ type: "boolean",
47694
+ enum: [
47695
+ true
47696
+ ]
47697
+ },
47698
+ data: {
47699
+ $ref: "#/components/schemas/AxxaLookupAuthorizationsResult"
47700
+ },
47701
+ error: {
47702
+ const: null
47703
+ },
47704
+ metadata: {
47705
+ $ref: "#/components/schemas/ResponseMetadata"
47706
+ }
47707
+ }
47708
+ },
47709
+ AxxaLookupAuthorizationsServiceUnavailableError: {
47710
+ type: "object",
47711
+ description: "A failed answer.",
47712
+ additionalProperties: false,
47713
+ required: [
47714
+ "success",
47715
+ "data",
47716
+ "error",
47717
+ "metadata"
47718
+ ],
47719
+ properties: {
47720
+ success: {
47721
+ type: "boolean",
47722
+ enum: [
47723
+ false
47724
+ ]
47725
+ },
47726
+ data: {
47727
+ const: null
47728
+ },
47729
+ error: {
47730
+ $ref: "#/components/schemas/AxxaLookupAuthorizationsServiceUnavailableFailure"
47731
+ },
47732
+ metadata: {
47733
+ $ref: "#/components/schemas/ResponseMetadata"
47734
+ }
47735
+ }
47736
+ },
47737
+ AxxaLookupAuthorizationsServiceUnavailableFailure: {
47738
+ oneOf: [
47739
+ {
47740
+ $ref: "#/components/schemas/UpstreamUnavailableFailure"
47741
+ },
47742
+ {
47743
+ $ref: "#/components/schemas/AxxaCaptchaUnavailableFailure"
47744
+ },
47745
+ {
47746
+ $ref: "#/components/schemas/AxxaCaptchaPausedFailure"
47747
+ },
47748
+ {
47749
+ $ref: "#/components/schemas/AxxaPortalUnavailableFailure"
47750
+ }
47751
+ ],
47752
+ discriminator: {
47753
+ propertyName: "code",
47754
+ mapping: {
47755
+ UPSTREAM_UNAVAILABLE: "#/components/schemas/UpstreamUnavailableFailure",
47756
+ CAPTCHA_UNAVAILABLE: "#/components/schemas/AxxaCaptchaUnavailableFailure",
47757
+ CAPTCHA_PAUSED: "#/components/schemas/AxxaCaptchaPausedFailure",
47758
+ PORTAL_UNAVAILABLE: "#/components/schemas/AxxaPortalUnavailableFailure"
47759
+ }
47760
+ }
47761
+ },
47762
+ AxxaLookupAuthorizationsTooManyRequestsError: {
47763
+ type: "object",
47764
+ description: "A failed answer.",
47765
+ additionalProperties: false,
47766
+ required: [
47767
+ "success",
47768
+ "data",
47769
+ "error",
47770
+ "metadata"
47771
+ ],
47772
+ properties: {
47773
+ success: {
47774
+ type: "boolean",
47775
+ enum: [
47776
+ false
47777
+ ]
47778
+ },
47779
+ data: {
47780
+ const: null
47781
+ },
47782
+ error: {
47783
+ $ref: "#/components/schemas/AxxaLookupAuthorizationsTooManyRequestsFailure"
46912
47784
  },
46913
47785
  metadata: {
46914
47786
  $ref: "#/components/schemas/ResponseMetadata"
46915
47787
  }
46916
47788
  }
46917
47789
  },
46918
- AxxaListConnectionsTooManyRequestsFailure: {
47790
+ AxxaLookupAuthorizationsTooManyRequestsFailure: {
46919
47791
  oneOf: [
46920
47792
  {
46921
47793
  $ref: "#/components/schemas/RateLimitedFailure"
@@ -46932,75 +47804,7 @@ var schemaComponents = {
46932
47804
  }
46933
47805
  }
46934
47806
  },
46935
- AxxaLoginCooldownFailure: {
46936
- type: "object",
46937
- description: "Login attempts are temporarily paused after a failed or uncertain attempt.",
46938
- additionalProperties: false,
46939
- required: [
46940
- "code",
46941
- "message",
46942
- "retryable",
46943
- "data"
46944
- ],
46945
- properties: {
46946
- code: {
46947
- type: "string",
46948
- enum: [
46949
- "LOGIN_COOLDOWN"
46950
- ],
46951
- description: "The failure code, stable across releases."
46952
- },
46953
- message: {
46954
- type: "string",
46955
- description: "What went wrong, for people; it never contains input values."
46956
- },
46957
- retryable: {
46958
- type: "boolean",
46959
- enum: [
46960
- false
46961
- ],
46962
- description: "Whether repeating the same request may succeed."
46963
- },
46964
- data: {
46965
- $ref: "#/components/schemas/Empty"
46966
- }
46967
- }
46968
- },
46969
- AxxaLoginRejectedFailure: {
46970
- type: "object",
46971
- description: "AXA did not establish a session. Check the credentials and CAPTCHA; do not retry automatically.",
46972
- additionalProperties: false,
46973
- required: [
46974
- "code",
46975
- "message",
46976
- "retryable",
46977
- "data"
46978
- ],
46979
- properties: {
46980
- code: {
46981
- type: "string",
46982
- enum: [
46983
- "LOGIN_REJECTED"
46984
- ],
46985
- description: "The failure code, stable across releases."
46986
- },
46987
- message: {
46988
- type: "string",
46989
- description: "What went wrong, for people; it never contains input values."
46990
- },
46991
- retryable: {
46992
- type: "boolean",
46993
- enum: [
46994
- false
46995
- ],
46996
- description: "Whether repeating the same request may succeed."
46997
- },
46998
- data: {
46999
- $ref: "#/components/schemas/Empty"
47000
- }
47001
- }
47002
- },
47003
- AxxaLookupAuthorizationsBadGatewayError: {
47807
+ AxxaLookupCoverageBadGatewayError: {
47004
47808
  type: "object",
47005
47809
  description: "A failed answer.",
47006
47810
  additionalProperties: false,
@@ -47021,14 +47825,14 @@ var schemaComponents = {
47021
47825
  const: null
47022
47826
  },
47023
47827
  error: {
47024
- $ref: "#/components/schemas/AxxaLookupAuthorizationsBadGatewayFailure"
47828
+ $ref: "#/components/schemas/AxxaLookupCoverageBadGatewayFailure"
47025
47829
  },
47026
47830
  metadata: {
47027
47831
  $ref: "#/components/schemas/ResponseMetadata"
47028
47832
  }
47029
47833
  }
47030
47834
  },
47031
- AxxaLookupAuthorizationsBadGatewayFailure: {
47835
+ AxxaLookupCoverageBadGatewayFailure: {
47032
47836
  oneOf: [
47033
47837
  {
47034
47838
  $ref: "#/components/schemas/OutcomeUnknownFailure"
@@ -47045,24 +47849,90 @@ var schemaComponents = {
47045
47849
  }
47046
47850
  }
47047
47851
  },
47048
- AxxaLookupAuthorizationsBody: {
47852
+ AxxaLookupCoverageBody: {
47049
47853
  additionalProperties: false,
47050
47854
  type: "object",
47051
47855
  required: [
47052
- "documentNumber"
47856
+ "documentNumber",
47857
+ "documentType",
47858
+ "serviceType",
47859
+ "cupsCode"
47053
47860
  ],
47054
47861
  properties: {
47055
47862
  documentNumber: {
47056
47863
  pattern: "^[A-Za-z0-9]{3,30}$",
47057
47864
  type: "string"
47058
47865
  },
47866
+ documentType: {
47867
+ anyOf: [
47868
+ {
47869
+ const: "CC",
47870
+ type: "string"
47871
+ },
47872
+ {
47873
+ const: "CE",
47874
+ type: "string"
47875
+ },
47876
+ {
47877
+ const: "TI",
47878
+ type: "string"
47879
+ },
47880
+ {
47881
+ const: "RC",
47882
+ type: "string"
47883
+ },
47884
+ {
47885
+ const: "PA",
47886
+ type: "string"
47887
+ }
47888
+ ]
47889
+ },
47890
+ serviceType: {
47891
+ anyOf: [
47892
+ {
47893
+ const: "outpatient",
47894
+ type: "string"
47895
+ },
47896
+ {
47897
+ const: "emergency",
47898
+ type: "string"
47899
+ },
47900
+ {
47901
+ const: "laboratory",
47902
+ type: "string"
47903
+ },
47904
+ {
47905
+ const: "therapy",
47906
+ type: "string"
47907
+ },
47908
+ {
47909
+ const: "radiology",
47910
+ type: "string"
47911
+ },
47912
+ {
47913
+ const: "other",
47914
+ type: "string"
47915
+ }
47916
+ ]
47917
+ },
47918
+ contractNumber: {
47919
+ minLength: 1,
47920
+ maxLength: 100,
47921
+ description: "The plan to read, from an eligibility lookup. Required only when the person has several.",
47922
+ type: "string"
47923
+ },
47924
+ cupsCode: {
47925
+ pattern: "^[0-9A-Za-z-]{3,20}$",
47926
+ description: "The exact service code. Only this code is answered, never one that merely starts with it.",
47927
+ type: "string"
47928
+ },
47059
47929
  connectionId: {
47060
47930
  pattern: "^con_[0-9A-Za-z]{26}$",
47061
47931
  type: "string"
47062
47932
  }
47063
47933
  }
47064
47934
  },
47065
- AxxaLookupAuthorizationsConflictError: {
47935
+ AxxaLookupCoverageConflictError: {
47066
47936
  type: "object",
47067
47937
  description: "A failed answer.",
47068
47938
  additionalProperties: false,
@@ -47083,14 +47953,14 @@ var schemaComponents = {
47083
47953
  const: null
47084
47954
  },
47085
47955
  error: {
47086
- $ref: "#/components/schemas/AxxaLookupAuthorizationsConflictFailure"
47956
+ $ref: "#/components/schemas/AxxaLookupCoverageConflictFailure"
47087
47957
  },
47088
47958
  metadata: {
47089
47959
  $ref: "#/components/schemas/ResponseMetadata"
47090
47960
  }
47091
47961
  }
47092
47962
  },
47093
- AxxaLookupAuthorizationsConflictFailure: {
47963
+ AxxaLookupCoverageConflictFailure: {
47094
47964
  oneOf: [
47095
47965
  {
47096
47966
  $ref: "#/components/schemas/AxxaNotConfiguredFailure"
@@ -47111,7 +47981,7 @@ var schemaComponents = {
47111
47981
  }
47112
47982
  }
47113
47983
  },
47114
- AxxaLookupAuthorizationsForbiddenError: {
47984
+ AxxaLookupCoverageForbiddenError: {
47115
47985
  type: "object",
47116
47986
  description: "A failed answer.",
47117
47987
  additionalProperties: false,
@@ -47132,14 +48002,14 @@ var schemaComponents = {
47132
48002
  const: null
47133
48003
  },
47134
48004
  error: {
47135
- $ref: "#/components/schemas/AxxaLookupAuthorizationsForbiddenFailure"
48005
+ $ref: "#/components/schemas/AxxaLookupCoverageForbiddenFailure"
47136
48006
  },
47137
48007
  metadata: {
47138
48008
  $ref: "#/components/schemas/ResponseMetadata"
47139
48009
  }
47140
48010
  }
47141
48011
  },
47142
- AxxaLookupAuthorizationsForbiddenFailure: {
48012
+ AxxaLookupCoverageForbiddenFailure: {
47143
48013
  oneOf: [
47144
48014
  {
47145
48015
  $ref: "#/components/schemas/ForbiddenFailure"
@@ -47160,110 +48030,89 @@ var schemaComponents = {
47160
48030
  }
47161
48031
  }
47162
48032
  },
47163
- AxxaLookupAuthorizationsResult: {
48033
+ AxxaLookupCoverageResult: {
47164
48034
  additionalProperties: false,
47165
- description: "Only an empty authorizations array confirms no matches. Provider failures are errors.",
48035
+ description: "AXA's answer for one exact service, in one service category. Affiliation, coverage, authorization and the voucher are separate facts, and none confirms an appointment.",
47166
48036
  type: "object",
47167
48037
  required: [
47168
- "authorizations",
47169
- "beneficiary"
48038
+ "status",
48039
+ "plans",
48040
+ "selectedPlan",
48041
+ "service",
48042
+ "voucher",
48043
+ "validationMessages"
47170
48044
  ],
47171
48045
  properties: {
47172
- authorizations: {
48046
+ status: {
48047
+ description: "found: the service exists in this category. service_not_found: this category does not list that code; another category may. plan_required: name one of the plans. plan_restricted: AXA offers no service search on this plan, see its notice. validation_required: see the messages.",
48048
+ anyOf: [
48049
+ {
48050
+ const: "found",
48051
+ type: "string"
48052
+ },
48053
+ {
48054
+ const: "service_not_found",
48055
+ type: "string"
48056
+ },
48057
+ {
48058
+ const: "plan_required",
48059
+ type: "string"
48060
+ },
48061
+ {
48062
+ const: "plan_restricted",
48063
+ type: "string"
48064
+ },
48065
+ {
48066
+ const: "validation_required",
48067
+ type: "string"
48068
+ }
48069
+ ]
48070
+ },
48071
+ plans: {
47173
48072
  maxItems: 100,
47174
48073
  type: "array",
47175
48074
  items: {
47176
48075
  additionalProperties: false,
47177
48076
  type: "object",
47178
48077
  required: [
47179
- "authorizationNumber",
47180
- "requestNumber",
47181
- "requestedAt",
47182
- "authorizedAt",
47183
- "product",
47184
- "services",
47185
- "diagnosis"
48078
+ "name",
48079
+ "contractNumber",
48080
+ "notice"
47186
48081
  ],
47187
48082
  properties: {
47188
- authorizationNumber: {
47189
- minLength: 1,
47190
- maxLength: 100,
47191
- type: "string"
47192
- },
47193
- requestNumber: {
47194
- minLength: 1,
47195
- maxLength: 100,
47196
- type: "string"
47197
- },
47198
- requestedAt: {
48083
+ name: {
47199
48084
  minLength: 1,
47200
- maxLength: 100,
47201
- description: "Date as displayed by AXA; no timezone is inferred.",
48085
+ maxLength: 300,
47202
48086
  type: "string"
47203
48087
  },
47204
- authorizedAt: {
48088
+ contractNumber: {
47205
48089
  minLength: 1,
47206
48090
  maxLength: 100,
47207
- description: "Date as displayed by AXA; no timezone is inferred.",
47208
- type: "string"
47209
- },
47210
- product: {
47211
- maxLength: 200,
47212
48091
  type: "string"
47213
48092
  },
47214
- services: {
47215
- maxItems: 100,
47216
- type: "array",
47217
- items: {
47218
- additionalProperties: false,
47219
- type: "object",
47220
- required: [
47221
- "code",
47222
- "description"
47223
- ],
47224
- properties: {
47225
- code: {
47226
- minLength: 1,
47227
- maxLength: 100,
47228
- type: "string"
47229
- },
47230
- description: {
47231
- maxLength: 2000,
47232
- type: "string"
47233
- }
47234
- }
47235
- }
47236
- },
47237
- diagnosis: {
47238
- additionalProperties: false,
47239
- type: "object",
47240
- required: [
47241
- "code",
47242
- "description"
47243
- ],
47244
- properties: {
47245
- code: {
47246
- minLength: 1,
47247
- maxLength: 100,
47248
- type: "string"
47249
- },
47250
- description: {
48093
+ notice: {
48094
+ anyOf: [
48095
+ {
47251
48096
  maxLength: 2000,
47252
48097
  type: "string"
48098
+ },
48099
+ {
48100
+ type: "null"
47253
48101
  }
47254
- }
48102
+ ]
47255
48103
  }
47256
48104
  }
47257
48105
  }
47258
48106
  },
47259
- beneficiary: {
48107
+ selectedPlan: {
47260
48108
  anyOf: [
47261
48109
  {
47262
48110
  additionalProperties: false,
47263
48111
  type: "object",
47264
48112
  required: [
47265
48113
  "name",
47266
- "documentNumber"
48114
+ "contractNumber",
48115
+ "notice"
47267
48116
  ],
47268
48117
  properties: {
47269
48118
  name: {
@@ -47271,9 +48120,113 @@ var schemaComponents = {
47271
48120
  maxLength: 300,
47272
48121
  type: "string"
47273
48122
  },
47274
- documentNumber: {
47275
- pattern: "^[A-Za-z0-9]{3,30}$",
48123
+ contractNumber: {
48124
+ minLength: 1,
48125
+ maxLength: 100,
48126
+ type: "string"
48127
+ },
48128
+ notice: {
48129
+ anyOf: [
48130
+ {
48131
+ maxLength: 2000,
48132
+ type: "string"
48133
+ },
48134
+ {
48135
+ type: "null"
48136
+ }
48137
+ ]
48138
+ }
48139
+ }
48140
+ },
48141
+ {
48142
+ type: "null"
48143
+ }
48144
+ ]
48145
+ },
48146
+ service: {
48147
+ anyOf: [
48148
+ {
48149
+ additionalProperties: false,
48150
+ type: "object",
48151
+ required: [
48152
+ "cupsCode",
48153
+ "description",
48154
+ "affiliateCovered",
48155
+ "providerCovered",
48156
+ "authorizationRequired"
48157
+ ],
48158
+ properties: {
48159
+ cupsCode: {
47276
48160
  type: "string"
48161
+ },
48162
+ description: {
48163
+ type: "string"
48164
+ },
48165
+ affiliateCovered: {
48166
+ description: "Whether the person's plan covers it.",
48167
+ type: "boolean"
48168
+ },
48169
+ providerCovered: {
48170
+ description: "Whether this provider has an agreement for it.",
48171
+ type: "boolean"
48172
+ },
48173
+ authorizationRequired: {
48174
+ description: "Null when AXA answers that it does not apply.",
48175
+ anyOf: [
48176
+ {
48177
+ type: "boolean"
48178
+ },
48179
+ {
48180
+ type: "null"
48181
+ }
48182
+ ]
48183
+ }
48184
+ }
48185
+ },
48186
+ {
48187
+ type: "null"
48188
+ }
48189
+ ]
48190
+ },
48191
+ voucher: {
48192
+ description: "Read only when both coverages hold.",
48193
+ anyOf: [
48194
+ {
48195
+ additionalProperties: false,
48196
+ type: "object",
48197
+ required: [
48198
+ "status",
48199
+ "amount"
48200
+ ],
48201
+ properties: {
48202
+ status: {
48203
+ description: "quoted: AXA stated an amount. not_enabled: AXA reports no voucher for this service. unavailable: AXA did not answer, which says nothing about the amount.",
48204
+ anyOf: [
48205
+ {
48206
+ const: "quoted",
48207
+ type: "string"
48208
+ },
48209
+ {
48210
+ const: "not_enabled",
48211
+ type: "string"
48212
+ },
48213
+ {
48214
+ const: "unavailable",
48215
+ type: "string"
48216
+ }
48217
+ ]
48218
+ },
48219
+ amount: {
48220
+ description: "COP. AXA's quote at this moment for this service: not a balance and not proof of payment.",
48221
+ anyOf: [
48222
+ {
48223
+ minimum: 0,
48224
+ type: "number"
48225
+ },
48226
+ {
48227
+ type: "null"
48228
+ }
48229
+ ]
47277
48230
  }
47278
48231
  }
47279
48232
  },
@@ -47281,10 +48234,19 @@ var schemaComponents = {
47281
48234
  type: "null"
47282
48235
  }
47283
48236
  ]
48237
+ },
48238
+ validationMessages: {
48239
+ maxItems: 20,
48240
+ type: "array",
48241
+ items: {
48242
+ minLength: 1,
48243
+ maxLength: 2000,
48244
+ type: "string"
48245
+ }
47284
48246
  }
47285
48247
  }
47286
48248
  },
47287
- AxxaLookupAuthorizationsResultResponse: {
48249
+ AxxaLookupCoverageResultResponse: {
47288
48250
  type: "object",
47289
48251
  description: "A successful answer.",
47290
48252
  additionalProperties: false,
@@ -47302,7 +48264,7 @@ var schemaComponents = {
47302
48264
  ]
47303
48265
  },
47304
48266
  data: {
47305
- $ref: "#/components/schemas/AxxaLookupAuthorizationsResult"
48267
+ $ref: "#/components/schemas/AxxaLookupCoverageResult"
47306
48268
  },
47307
48269
  error: {
47308
48270
  const: null
@@ -47312,7 +48274,7 @@ var schemaComponents = {
47312
48274
  }
47313
48275
  }
47314
48276
  },
47315
- AxxaLookupAuthorizationsServiceUnavailableError: {
48277
+ AxxaLookupCoverageServiceUnavailableError: {
47316
48278
  type: "object",
47317
48279
  description: "A failed answer.",
47318
48280
  additionalProperties: false,
@@ -47333,14 +48295,14 @@ var schemaComponents = {
47333
48295
  const: null
47334
48296
  },
47335
48297
  error: {
47336
- $ref: "#/components/schemas/AxxaLookupAuthorizationsServiceUnavailableFailure"
48298
+ $ref: "#/components/schemas/AxxaLookupCoverageServiceUnavailableFailure"
47337
48299
  },
47338
48300
  metadata: {
47339
48301
  $ref: "#/components/schemas/ResponseMetadata"
47340
48302
  }
47341
48303
  }
47342
48304
  },
47343
- AxxaLookupAuthorizationsServiceUnavailableFailure: {
48305
+ AxxaLookupCoverageServiceUnavailableFailure: {
47344
48306
  oneOf: [
47345
48307
  {
47346
48308
  $ref: "#/components/schemas/UpstreamUnavailableFailure"
@@ -47365,7 +48327,7 @@ var schemaComponents = {
47365
48327
  }
47366
48328
  }
47367
48329
  },
47368
- AxxaLookupAuthorizationsTooManyRequestsError: {
48330
+ AxxaLookupCoverageTooManyRequestsError: {
47369
48331
  type: "object",
47370
48332
  description: "A failed answer.",
47371
48333
  additionalProperties: false,
@@ -47386,14 +48348,14 @@ var schemaComponents = {
47386
48348
  const: null
47387
48349
  },
47388
48350
  error: {
47389
- $ref: "#/components/schemas/AxxaLookupAuthorizationsTooManyRequestsFailure"
48351
+ $ref: "#/components/schemas/AxxaLookupCoverageTooManyRequestsFailure"
47390
48352
  },
47391
48353
  metadata: {
47392
48354
  $ref: "#/components/schemas/ResponseMetadata"
47393
48355
  }
47394
48356
  }
47395
48357
  },
47396
- AxxaLookupAuthorizationsTooManyRequestsFailure: {
48358
+ AxxaLookupCoverageTooManyRequestsFailure: {
47397
48359
  oneOf: [
47398
48360
  {
47399
48361
  $ref: "#/components/schemas/RateLimitedFailure"
@@ -84796,6 +85758,7 @@ var schemaComponents = {
84796
85758
  "attachmentReader",
84797
85759
  "budgetExhaustedMessage",
84798
85760
  "closingMessage",
85761
+ "deferLongOperations",
84799
85762
  "evalGate",
84800
85763
  "followUpAfterMinutes",
84801
85764
  "followUpMessage",
@@ -84959,7 +85922,7 @@ var schemaComponents = {
84959
85922
  automaticKnowledge: {
84960
85923
  anyOf: [
84961
85924
  {
84962
- description: "Text Agents. Retrieve relevant passages from this Agent's active Knowledge before a substantive contact message, without a model tool call. Null or false: on-demand search only. Does not store contact memories or learn unreviewed answers.",
85925
+ description: "Text Agents. Before a substantive contact message, without a model tool call, retrieve this Agent's relevant active Knowledge: complete documents that fit, and the matching passages, marked as excerpts, of those that do not. Null or false: on-demand search only. Does not store contact memories or learn unreviewed answers.",
84963
85926
  type: "boolean"
84964
85927
  },
84965
85928
  {
@@ -85013,6 +85976,17 @@ var schemaComponents = {
85013
85976
  }
85014
85977
  ]
85015
85978
  },
85979
+ deferLongOperations: {
85980
+ anyOf: [
85981
+ {
85982
+ description: "Text Agents on WhatsApp, with `pollPendingOperations` on (AGENT_SETTINGS_INVALID otherwise). Nobody waits for a long read: Raíz asks a connected system that supports it to answer early that its work is pending; a reply that only started such reads ends with a fixed notice, without another model call; and the result reaches the contact when it arrives, with one honest update if it takes minutes. Null: disabled.",
85983
+ type: "boolean"
85984
+ },
85985
+ {
85986
+ type: "null"
85987
+ }
85988
+ ]
85989
+ },
85016
85990
  evalGate: {
85017
85991
  anyOf: [
85018
85992
  {
@@ -85421,7 +86395,7 @@ var schemaComponents = {
85421
86395
  automaticKnowledge: {
85422
86396
  anyOf: [
85423
86397
  {
85424
- description: "Text Agents. Retrieve relevant passages from this Agent's active Knowledge before a substantive contact message, without a model tool call. Null or false: on-demand search only. Does not store contact memories or learn unreviewed answers.",
86398
+ description: "Text Agents. Before a substantive contact message, without a model tool call, retrieve this Agent's relevant active Knowledge: complete documents that fit, and the matching passages, marked as excerpts, of those that do not. Null or false: on-demand search only. Does not store contact memories or learn unreviewed answers.",
85425
86399
  type: "boolean"
85426
86400
  },
85427
86401
  {
@@ -85487,6 +86461,17 @@ var schemaComponents = {
85487
86461
  }
85488
86462
  ]
85489
86463
  },
86464
+ deferLongOperations: {
86465
+ anyOf: [
86466
+ {
86467
+ description: "Text Agents on WhatsApp, with `pollPendingOperations` on (AGENT_SETTINGS_INVALID otherwise). Nobody waits for a long read: Raíz asks a connected system that supports it to answer early that its work is pending; a reply that only started such reads ends with a fixed notice, without another model call; and the result reaches the contact when it arrives, with one honest update if it takes minutes. Null: disabled.",
86468
+ type: "boolean"
86469
+ },
86470
+ {
86471
+ type: "null"
86472
+ }
86473
+ ]
86474
+ },
85490
86475
  evalGate: {
85491
86476
  anyOf: [
85492
86477
  {
@@ -86353,9 +87338,12 @@ var schemaComponents = {
86353
87338
  required: [
86354
87339
  "agentId",
86355
87340
  "channelId",
87341
+ "channelType",
86356
87342
  "contactHours",
86357
87343
  "createdAt",
86358
87344
  "endedAt",
87345
+ "errorAt",
87346
+ "errorCode",
86359
87347
  "firstMessage",
86360
87348
  "id",
86361
87349
  "instructions",
@@ -86369,9 +87357,11 @@ var schemaComponents = {
86369
87357
  "scheduledStartAt",
86370
87358
  "startedAt",
86371
87359
  "status",
87360
+ "template",
86372
87361
  "timeZone",
86373
87362
  "updatedAt",
86374
- "version"
87363
+ "version",
87364
+ "waitingUntilAt"
86375
87365
  ],
86376
87366
  properties: {
86377
87367
  agentId: {
@@ -86385,7 +87375,7 @@ var schemaComponents = {
86385
87375
  channelId: {
86386
87376
  anyOf: [
86387
87377
  {
86388
- description: "The voice line calls leave from. Null: the Agent's own outbound line.",
87378
+ description: "The line calls or messages leave from. Null: the Agent's own.",
86389
87379
  examples: [
86390
87380
  "chn_01m45h8q2rf3t9w6y7z0b1c2d3"
86391
87381
  ],
@@ -86397,13 +87387,26 @@ var schemaComponents = {
86397
87387
  }
86398
87388
  ]
86399
87389
  },
87390
+ channelType: {
87391
+ description: "How the campaign reaches people: by call or by WhatsApp.",
87392
+ anyOf: [
87393
+ {
87394
+ const: "voice",
87395
+ type: "string"
87396
+ },
87397
+ {
87398
+ const: "whatsapp",
87399
+ type: "string"
87400
+ }
87401
+ ]
87402
+ },
86400
87403
  contactHours: {
86401
- description: "When calls may start, in the campaign's time zone. Empty: any time.",
87404
+ description: "When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.",
86402
87405
  maxItems: 14,
86403
87406
  type: "array",
86404
87407
  items: {
86405
87408
  $ref: "#/components/schemas/RaizContactHoursWindow",
86406
- description: "On these days, calls start between `from` and `to`."
87409
+ description: "On these days, calls start and messages leave between `from` and `to`."
86407
87410
  }
86408
87411
  },
86409
87412
  createdAt: {
@@ -86423,6 +87426,29 @@ var schemaComponents = {
86423
87426
  }
86424
87427
  ]
86425
87428
  },
87429
+ errorAt: {
87430
+ anyOf: [
87431
+ {
87432
+ description: "When `errorCode` was first seen.",
87433
+ format: "date-time",
87434
+ type: "string"
87435
+ },
87436
+ {
87437
+ type: "null"
87438
+ }
87439
+ ]
87440
+ },
87441
+ errorCode: {
87442
+ anyOf: [
87443
+ {
87444
+ description: "Why the campaign cannot reach anyone now, such as `TEMPLATE_NOT_APPROVED` or `WHATSAPP_RATE_LIMITED`. Null when nothing is wrong. Cleared when a call or message gets through or the campaign changes; nobody loses an attempt to it.",
87445
+ type: "string"
87446
+ },
87447
+ {
87448
+ type: "null"
87449
+ }
87450
+ ]
87451
+ },
86426
87452
  firstMessage: {
86427
87453
  anyOf: [
86428
87454
  {
@@ -86482,7 +87508,7 @@ var schemaComponents = {
86482
87508
  maxItems: 2,
86483
87509
  type: "array",
86484
87510
  items: {
86485
- description: "`no_answer`: nobody answered, the line was busy, or the Agent heard no one. `failure`: the call was answered but its analysis judged it unsuccessful.",
87511
+ description: "On a call, `no_answer`: nobody answered, the line was busy, or the Agent heard no one; `failure`: it was answered but its analysis judged it unsuccessful. On WhatsApp, `no_answer`: it arrived and the person has not replied once `retryAfterMinutes` pass; `not_delivered`: it did not arrive.",
86486
87512
  anyOf: [
86487
87513
  {
86488
87514
  const: "no_answer",
@@ -86491,6 +87517,10 @@ var schemaComponents = {
86491
87517
  {
86492
87518
  const: "failure",
86493
87519
  type: "string"
87520
+ },
87521
+ {
87522
+ const: "not_delivered",
87523
+ type: "string"
86494
87524
  }
86495
87525
  ]
86496
87526
  }
@@ -86532,7 +87562,7 @@ var schemaComponents = {
86532
87562
  ]
86533
87563
  },
86534
87564
  status: {
86535
- description: "`queued`: not started yet (or its start is scheduled). `running`: calling due recipients. `paused`: started, then paused; calls in progress finish. `completed`: no recipient is left to call.",
87565
+ description: "`queued`: not started yet (or its start is scheduled). `running`: reaching due recipients. `paused`: started, then paused; what is in progress finishes. `completed`: no recipient is left to reach.",
86536
87566
  anyOf: [
86537
87567
  {
86538
87568
  const: "queued",
@@ -86560,6 +87590,17 @@ var schemaComponents = {
86560
87590
  }
86561
87591
  ]
86562
87592
  },
87593
+ template: {
87594
+ anyOf: [
87595
+ {
87596
+ $ref: "#/components/schemas/RaizCampaignTemplate",
87597
+ description: "The approved template sent to each recipient. WhatsApp only allows a business to start a conversation with one."
87598
+ },
87599
+ {
87600
+ type: "null"
87601
+ }
87602
+ ]
87603
+ },
86563
87604
  timeZone: {
86564
87605
  type: "string"
86565
87606
  },
@@ -86572,12 +87613,49 @@ var schemaComponents = {
86572
87613
  minimum: 1,
86573
87614
  type: "integer"
86574
87615
  },
87616
+ waitingUntilAt: {
87617
+ anyOf: [
87618
+ {
87619
+ description: "When it tries again after `errorCode`, later each time the same problem lasts: from fifteen minutes up to six hours.",
87620
+ format: "date-time",
87621
+ type: "string"
87622
+ },
87623
+ {
87624
+ type: "null"
87625
+ }
87626
+ ]
87627
+ },
87628
+ readiness: {
87629
+ $ref: "#/components/schemas/RaizCampaignReadiness",
87630
+ description: "Whether the campaign can start, checked against its Agent, line, template and recipients without reaching anyone. Present only when expanded."
87631
+ },
86575
87632
  recipients: {
86576
87633
  $ref: "#/components/schemas/RaizCampaignRecipientPage",
86577
87634
  description: "The campaign's recipients in the order they were added, each with its latest attempt. Present only when expanded."
86578
87635
  }
86579
87636
  }
86580
87637
  },
87638
+ RaizCampaignBlocker: {
87639
+ additionalProperties: false,
87640
+ type: "object",
87641
+ required: [
87642
+ "code"
87643
+ ],
87644
+ properties: {
87645
+ address: {
87646
+ description: "The recipient it is about, when it is one.",
87647
+ type: "string"
87648
+ },
87649
+ code: {
87650
+ description: "The error `startCampaign` would refuse with: `CAMPAIGN_AGENT_NOT_READY`, `CAMPAIGN_NO_RECIPIENTS`, `CAMPAIGN_VARIABLE_MISSING`, `CHANNEL_NOT_READY`, a `TEMPLATE_*` code, `UPSTREAM_UNAVAILABLE` or `VOICE_AGENT_NOT_READY`.",
87651
+ type: "string"
87652
+ },
87653
+ variable: {
87654
+ description: "The variable it lacks, when it is one.",
87655
+ type: "string"
87656
+ }
87657
+ }
87658
+ },
86581
87659
  RaizCampaignPage: {
86582
87660
  additionalProperties: false,
86583
87661
  type: "object",
@@ -86609,18 +87687,33 @@ var schemaComponents = {
86609
87687
  additionalProperties: false,
86610
87688
  type: "object",
86611
87689
  required: [
87690
+ "answered",
86612
87691
  "completed",
87692
+ "delivered",
86613
87693
  "failed",
86614
87694
  "inProgress",
87695
+ "noAnswer",
86615
87696
  "pending",
87697
+ "read",
86616
87698
  "recipients",
87699
+ "replied",
86617
87700
  "succeeded"
86618
87701
  ],
86619
87702
  properties: {
87703
+ answered: {
87704
+ description: "Calls: recipients whose latest call someone answered and its analysis judged.",
87705
+ minimum: 0,
87706
+ type: "integer"
87707
+ },
86620
87708
  completed: {
86621
87709
  minimum: 0,
86622
87710
  type: "integer"
86623
87711
  },
87712
+ delivered: {
87713
+ description: "WhatsApp: recipients who received a message.",
87714
+ minimum: 0,
87715
+ type: "integer"
87716
+ },
86624
87717
  failed: {
86625
87718
  minimum: 0,
86626
87719
  type: "integer"
@@ -86629,21 +87722,69 @@ var schemaComponents = {
86629
87722
  minimum: 0,
86630
87723
  type: "integer"
86631
87724
  },
87725
+ noAnswer: {
87726
+ description: "Calls: recipients who failed because their calls ran out without anyone answering. A voicemail counts here.",
87727
+ minimum: 0,
87728
+ type: "integer"
87729
+ },
86632
87730
  pending: {
86633
87731
  minimum: 0,
86634
87732
  type: "integer"
86635
87733
  },
87734
+ read: {
87735
+ description: "WhatsApp: recipients who read a message.",
87736
+ minimum: 0,
87737
+ type: "integer"
87738
+ },
86636
87739
  recipients: {
86637
87740
  minimum: 0,
86638
87741
  type: "integer"
86639
87742
  },
87743
+ replied: {
87744
+ description: "WhatsApp: recipients who replied.",
87745
+ minimum: 0,
87746
+ type: "integer"
87747
+ },
86640
87748
  succeeded: {
86641
- description: "Recipients whose latest call's analysis judged it successful.",
87749
+ description: "Recipients whose latest conversation's analysis judged it successful.",
86642
87750
  minimum: 0,
86643
87751
  type: "integer"
86644
87752
  }
86645
87753
  }
86646
87754
  },
87755
+ RaizCampaignReadiness: {
87756
+ additionalProperties: false,
87757
+ type: "object",
87758
+ required: [
87759
+ "blockers",
87760
+ "preview",
87761
+ "ready"
87762
+ ],
87763
+ properties: {
87764
+ blockers: {
87765
+ description: "What has to be fixed first. Empty when it can start.",
87766
+ type: "array",
87767
+ items: {
87768
+ $ref: "#/components/schemas/RaizCampaignBlocker"
87769
+ }
87770
+ },
87771
+ preview: {
87772
+ anyOf: [
87773
+ {
87774
+ description: "WhatsApp: the message as the first pending recipient would read it. Null when it cannot be told yet.",
87775
+ type: "string"
87776
+ },
87777
+ {
87778
+ type: "null"
87779
+ }
87780
+ ]
87781
+ },
87782
+ ready: {
87783
+ description: "Whether `startCampaign` would accept it now.",
87784
+ type: "boolean"
87785
+ }
87786
+ }
87787
+ },
86647
87788
  RaizCampaignRecipientInput: {
86648
87789
  additionalProperties: false,
86649
87790
  type: "object",
@@ -86656,20 +87797,46 @@ var schemaComponents = {
86656
87797
  description: "Phone number in E.164 format."
86657
87798
  },
86658
87799
  contactId: {
86659
- description: "The contact the call is about. Omitted: the contact that owns `address`, created when the organization has none.",
87800
+ description: "The contact this recipient is. Omitted: the contact that owns `address` when the campaign first reaches them, created when the organization has none.",
86660
87801
  examples: [
86661
87802
  "cnt_01m45h8q2rf3t9w6y7z0b1c2d3"
86662
87803
  ],
86663
87804
  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}))$",
86664
87805
  type: "string"
86665
87806
  },
87807
+ familyName: {
87808
+ anyOf: [
87809
+ {
87810
+ maxLength: 200,
87811
+ minLength: 1,
87812
+ type: "string",
87813
+ description: "See `givenName`."
87814
+ },
87815
+ {
87816
+ type: "null"
87817
+ }
87818
+ ]
87819
+ },
86666
87820
  firstMessage: {
86667
87821
  anyOf: [
86668
87822
  {
86669
87823
  maxLength: 2000,
86670
87824
  minLength: 1,
86671
87825
  type: "string",
86672
- description: "What the Agent says first to this recipient, instead of the campaign's."
87826
+ description: "What the Agent says first when calling this recipient, instead of the campaign's. Calls only: a WhatsApp campaign opens with its template."
87827
+ },
87828
+ {
87829
+ type: "null"
87830
+ }
87831
+ ]
87832
+ },
87833
+ givenName: {
87834
+ anyOf: [
87835
+ {
87836
+ maxLength: 200,
87837
+ minLength: 1,
87838
+ type: "string",
87839
+ description: "The person's name, saved on their contact when the campaign first reaches them, only if the contact has no name yet."
86673
87840
  },
86674
87841
  {
86675
87842
  type: "null"
@@ -86682,7 +87849,7 @@ var schemaComponents = {
86682
87849
  maxLength: 8000,
86683
87850
  minLength: 1,
86684
87851
  type: "string",
86685
- description: "Extra instructions for this call, after the campaign's."
87852
+ description: "Extra instructions for this recipient, after the campaign's."
86686
87853
  },
86687
87854
  {
86688
87855
  type: "null"
@@ -86690,7 +87857,7 @@ var schemaComponents = {
86690
87857
  ]
86691
87858
  },
86692
87859
  variables: {
86693
- description: "Values for the `{{name}}` variables the Agent's instructions, first message or this campaign's texts reference. Raíz always provides `contact_name`, `contact_given_name`, `contact_id`, `contact_phone`, `conversation_id` and `bulletins` (the business bulletins in force), which a recipient's values never replace.",
87860
+ 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.",
86694
87861
  maxProperties: 30,
86695
87862
  type: "object",
86696
87863
  patternProperties: {
@@ -86722,12 +87889,17 @@ var schemaComponents = {
86722
87889
  "attemptCount",
86723
87890
  "contactId",
86724
87891
  "createdAt",
87892
+ "deliveredAt",
86725
87893
  "errorCode",
87894
+ "familyName",
86726
87895
  "firstMessage",
87896
+ "givenName",
86727
87897
  "id",
86728
87898
  "instructions",
86729
87899
  "lastAttempt",
86730
87900
  "nextAttemptAt",
87901
+ "readAt",
87902
+ "repliedAt",
86731
87903
  "status",
86732
87904
  "updatedAt",
86733
87905
  "variables"
@@ -86760,10 +87932,32 @@ var schemaComponents = {
86760
87932
  format: "date-time",
86761
87933
  type: "string"
86762
87934
  },
87935
+ deliveredAt: {
87936
+ anyOf: [
87937
+ {
87938
+ description: "WhatsApp: when this person first received a message of the campaign.",
87939
+ format: "date-time",
87940
+ type: "string"
87941
+ },
87942
+ {
87943
+ type: "null"
87944
+ }
87945
+ ]
87946
+ },
86763
87947
  errorCode: {
86764
87948
  anyOf: [
86765
87949
  {
86766
- description: "Why the recipient failed: `NO_ANSWER` or `CALL_FAILED` after its last attempt, `CONTACT_SUPPRESSED` when a suppression rule forbids the number.",
87950
+ description: "Why the recipient failed, or why its latest message did not arrive while it waits for a retry: `NO_ANSWER` when nobody answered, `CALL_REJECTED` when the call could not be placed, `CALL_FAILED` when it did not achieve its goal, `CONTACT_SUPPRESSED` when a suppression rule forbids the number, a `WHATSAPP_*` code on WhatsApp.",
87951
+ type: "string"
87952
+ },
87953
+ {
87954
+ type: "null"
87955
+ }
87956
+ ]
87957
+ },
87958
+ familyName: {
87959
+ anyOf: [
87960
+ {
86767
87961
  type: "string"
86768
87962
  },
86769
87963
  {
@@ -86781,6 +87975,16 @@ var schemaComponents = {
86781
87975
  }
86782
87976
  ]
86783
87977
  },
87978
+ givenName: {
87979
+ anyOf: [
87980
+ {
87981
+ type: "string"
87982
+ },
87983
+ {
87984
+ type: "null"
87985
+ }
87986
+ ]
87987
+ },
86784
87988
  id: {
86785
87989
  description: "Campaign recipient id.",
86786
87990
  examples: [
@@ -86802,7 +88006,7 @@ var schemaComponents = {
86802
88006
  lastAttempt: {
86803
88007
  anyOf: [
86804
88008
  {
86805
- description: "The latest call to this recipient; its transcript is `getConversation`.",
88009
+ description: "The latest call or message to this recipient; its transcript is `getConversation`.",
86806
88010
  additionalProperties: false,
86807
88011
  type: "object",
86808
88012
  required: [
@@ -86879,8 +88083,32 @@ var schemaComponents = {
86879
88083
  }
86880
88084
  ]
86881
88085
  },
88086
+ readAt: {
88087
+ anyOf: [
88088
+ {
88089
+ description: "WhatsApp: when this person first read a message of the campaign. Some people turn read receipts off.",
88090
+ format: "date-time",
88091
+ type: "string"
88092
+ },
88093
+ {
88094
+ type: "null"
88095
+ }
88096
+ ]
88097
+ },
88098
+ repliedAt: {
88099
+ anyOf: [
88100
+ {
88101
+ description: "WhatsApp: when this person first replied.",
88102
+ format: "date-time",
88103
+ type: "string"
88104
+ },
88105
+ {
88106
+ type: "null"
88107
+ }
88108
+ ]
88109
+ },
86882
88110
  status: {
86883
- description: "`pending`: waiting for its (next) call. `in_progress`: being called. `completed`: an attempt succeeded. `failed`: its attempts ran out, or it cannot be called.",
88111
+ 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.",
86884
88112
  anyOf: [
86885
88113
  {
86886
88114
  const: "pending",
@@ -86910,7 +88138,7 @@ var schemaComponents = {
86910
88138
  type: "string"
86911
88139
  },
86912
88140
  variables: {
86913
- description: "Values for the `{{name}}` variables the Agent's instructions, first message or this campaign's texts reference. Raíz always provides `contact_name`, `contact_given_name`, `contact_id`, `contact_phone`, `conversation_id` and `bulletins` (the business bulletins in force), which a recipient's values never replace.",
88141
+ 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.",
86914
88142
  maxProperties: 30,
86915
88143
  type: "object",
86916
88144
  patternProperties: {
@@ -86934,6 +88162,69 @@ var schemaComponents = {
86934
88162
  }
86935
88163
  }
86936
88164
  },
88165
+ RaizCampaignTemplate: {
88166
+ additionalProperties: false,
88167
+ type: "object",
88168
+ required: [
88169
+ "language",
88170
+ "name",
88171
+ "parameters"
88172
+ ],
88173
+ properties: {
88174
+ language: {
88175
+ description: "The template's language: WhatsApp's code (`es`, `es_MX`) or a BCP 47 tag (`es-MX`).",
88176
+ maxLength: 15,
88177
+ minLength: 2,
88178
+ type: "string"
88179
+ },
88180
+ name: {
88181
+ description: "An approved template of the line's WhatsApp Business Account. Its body may have variables; a file in its header and button parameters cannot be used in a campaign.",
88182
+ maxLength: 512,
88183
+ minLength: 1,
88184
+ type: "string"
88185
+ },
88186
+ parameters: {
88187
+ description: "The template's body parameters, in order. Each is a text that may reference each recipient's `variables` as `{{name}}`, for example `{{patient_name}}` or `Dr. {{doctor}}`.",
88188
+ maxItems: 20,
88189
+ type: "array",
88190
+ items: {
88191
+ maxLength: 1024,
88192
+ type: "string"
88193
+ }
88194
+ }
88195
+ }
88196
+ },
88197
+ RaizCampaignTemplateInput: {
88198
+ additionalProperties: false,
88199
+ type: "object",
88200
+ required: [
88201
+ "language",
88202
+ "name"
88203
+ ],
88204
+ properties: {
88205
+ language: {
88206
+ description: "The template's language: WhatsApp's code (`es`, `es_MX`) or a BCP 47 tag (`es-MX`).",
88207
+ maxLength: 15,
88208
+ minLength: 2,
88209
+ type: "string"
88210
+ },
88211
+ name: {
88212
+ description: "An approved template of the line's WhatsApp Business Account. Its body may have variables; a file in its header and button parameters cannot be used in a campaign.",
88213
+ maxLength: 512,
88214
+ minLength: 1,
88215
+ type: "string"
88216
+ },
88217
+ parameters: {
88218
+ description: "The template's body parameters, in order. Each is a text that may reference each recipient's `variables` as `{{name}}`, for example `{{patient_name}}` or `Dr. {{doctor}}`.",
88219
+ maxItems: 20,
88220
+ type: "array",
88221
+ items: {
88222
+ maxLength: 1024,
88223
+ type: "string"
88224
+ }
88225
+ }
88226
+ }
88227
+ },
86937
88228
  RaizChange: {
86938
88229
  additionalProperties: false,
86939
88230
  type: "object",
@@ -91730,7 +93021,7 @@ var schemaComponents = {
91730
93021
  type: "string"
91731
93022
  },
91732
93023
  message: {
91733
- const: "Only a text Agent can hold a web conversation.",
93024
+ const: "Only a text Agent can hold a web conversation; a voice Agent only with `origin: test`, to try it by text.",
91734
93025
  type: "string"
91735
93026
  },
91736
93027
  retryable: {
@@ -92556,6 +93847,106 @@ var schemaComponents = {
92556
93847
  }
92557
93848
  }
92558
93849
  },
93850
+ {
93851
+ additionalProperties: false,
93852
+ type: "object",
93853
+ required: [
93854
+ "code",
93855
+ "message",
93856
+ "retryable",
93857
+ "data"
93858
+ ],
93859
+ properties: {
93860
+ code: {
93861
+ const: "CAMPAIGN_AGENT_NOT_READY",
93862
+ type: "string"
93863
+ },
93864
+ message: {
93865
+ const: "The campaign's Agent must be an active text Agent: it answers whoever replies to the message.",
93866
+ type: "string"
93867
+ },
93868
+ retryable: {
93869
+ const: false,
93870
+ type: "boolean"
93871
+ },
93872
+ data: {
93873
+ additionalProperties: false,
93874
+ type: "object",
93875
+ properties: {}
93876
+ }
93877
+ }
93878
+ },
93879
+ {
93880
+ additionalProperties: false,
93881
+ type: "object",
93882
+ required: [
93883
+ "code",
93884
+ "message",
93885
+ "retryable",
93886
+ "data"
93887
+ ],
93888
+ properties: {
93889
+ code: {
93890
+ const: "CAMPAIGN_NO_RECIPIENTS",
93891
+ type: "string"
93892
+ },
93893
+ message: {
93894
+ const: "The campaign has nobody left to reach. Add recipients first.",
93895
+ type: "string"
93896
+ },
93897
+ retryable: {
93898
+ const: false,
93899
+ type: "boolean"
93900
+ },
93901
+ data: {
93902
+ additionalProperties: false,
93903
+ type: "object",
93904
+ properties: {}
93905
+ }
93906
+ }
93907
+ },
93908
+ {
93909
+ additionalProperties: false,
93910
+ type: "object",
93911
+ required: [
93912
+ "code",
93913
+ "message",
93914
+ "retryable",
93915
+ "data"
93916
+ ],
93917
+ properties: {
93918
+ code: {
93919
+ const: "CAMPAIGN_VARIABLE_MISSING",
93920
+ type: "string"
93921
+ },
93922
+ message: {
93923
+ const: "A recipient has no value for a variable the template's parameters use. An empty value cannot be sent on WhatsApp.",
93924
+ type: "string"
93925
+ },
93926
+ retryable: {
93927
+ const: false,
93928
+ type: "boolean"
93929
+ },
93930
+ data: {
93931
+ additionalProperties: false,
93932
+ type: "object",
93933
+ required: [
93934
+ "address",
93935
+ "variable"
93936
+ ],
93937
+ properties: {
93938
+ address: {
93939
+ description: "The first recipient that lacks the value.",
93940
+ type: "string"
93941
+ },
93942
+ variable: {
93943
+ description: "The variable of the template's parameters it lacks.",
93944
+ type: "string"
93945
+ }
93946
+ }
93947
+ }
93948
+ }
93949
+ },
92559
93950
  {
92560
93951
  additionalProperties: false,
92561
93952
  type: "object",
@@ -92991,6 +94382,35 @@ var schemaComponents = {
92991
94382
  }
92992
94383
  }
92993
94384
  },
94385
+ {
94386
+ additionalProperties: false,
94387
+ type: "object",
94388
+ required: [
94389
+ "code",
94390
+ "message",
94391
+ "retryable",
94392
+ "data"
94393
+ ],
94394
+ properties: {
94395
+ code: {
94396
+ const: "WHATSAPP_ACCOUNT_RESTRICTED",
94397
+ type: "string"
94398
+ },
94399
+ message: {
94400
+ const: "WhatsApp has restricted this number or its business account. Review the account's status before sending again.",
94401
+ type: "string"
94402
+ },
94403
+ retryable: {
94404
+ const: false,
94405
+ type: "boolean"
94406
+ },
94407
+ data: {
94408
+ additionalProperties: false,
94409
+ type: "object",
94410
+ properties: {}
94411
+ }
94412
+ }
94413
+ },
92994
94414
  {
92995
94415
  additionalProperties: false,
92996
94416
  type: "object",
@@ -93136,6 +94556,35 @@ var schemaComponents = {
93136
94556
  }
93137
94557
  }
93138
94558
  },
94559
+ {
94560
+ additionalProperties: false,
94561
+ type: "object",
94562
+ required: [
94563
+ "code",
94564
+ "message",
94565
+ "retryable",
94566
+ "data"
94567
+ ],
94568
+ properties: {
94569
+ code: {
94570
+ const: "WHATSAPP_ENGAGEMENT_LIMITED",
94571
+ type: "string"
94572
+ },
94573
+ message: {
94574
+ const: "WhatsApp limited how many marketing messages this person receives. Wait at least a day before sending again.",
94575
+ type: "string"
94576
+ },
94577
+ retryable: {
94578
+ const: true,
94579
+ type: "boolean"
94580
+ },
94581
+ data: {
94582
+ additionalProperties: false,
94583
+ type: "object",
94584
+ properties: {}
94585
+ }
94586
+ }
94587
+ },
93139
94588
  {
93140
94589
  additionalProperties: false,
93141
94590
  type: "object",
@@ -96411,7 +97860,7 @@ var schemaComponents = {
96411
97860
  type: "array",
96412
97861
  items: {
96413
97862
  $ref: "#/components/schemas/RaizContactHoursWindow",
96414
- description: "On these days, calls start between `from` and `to`."
97863
+ description: "On these days, calls start and messages leave between `from` and `to`."
96415
97864
  }
96416
97865
  },
96417
97866
  createdAt: {
@@ -102580,6 +104029,9 @@ var schemaComponents = {
102580
104029
  {
102581
104030
  $ref: "#/components/schemas/SanitasConnectionRequiredFailure"
102582
104031
  },
104032
+ {
104033
+ $ref: "#/components/schemas/SanitasProviderContextRequiredFailure"
104034
+ },
102583
104035
  {
102584
104036
  $ref: "#/components/schemas/SanitasProviderSessionExpiredFailure"
102585
104037
  },
@@ -102591,6 +104043,7 @@ var schemaComponents = {
102591
104043
  propertyName: "code",
102592
104044
  mapping: {
102593
104045
  CONNECTION_REQUIRED: "#/components/schemas/SanitasConnectionRequiredFailure",
104046
+ PROVIDER_CONTEXT_REQUIRED: "#/components/schemas/SanitasProviderContextRequiredFailure",
102594
104047
  PROVIDER_SESSION_EXPIRED: "#/components/schemas/SanitasProviderSessionExpiredFailure",
102595
104048
  PATIENT_UNRESOLVED: "#/components/schemas/SanitasPatientUnresolvedFailure"
102596
104049
  }
@@ -102781,6 +104234,11 @@ var schemaComponents = {
102781
104234
  pattern: "^con_[0-9a-z]{26}$",
102782
104235
  type: "string"
102783
104236
  },
104237
+ providerId: {
104238
+ pattern: "^[1-9][0-9]{0,8}$",
104239
+ description: "An exact provider context id from getConnection(expand: providers), required when the source has no selected default.",
104240
+ type: "string"
104241
+ },
102784
104242
  documentType: {
102785
104243
  anyOf: [
102786
104244
  {
@@ -102900,6 +104358,9 @@ var schemaComponents = {
102900
104358
  {
102901
104359
  $ref: "#/components/schemas/SanitasConnectionRequiredFailure"
102902
104360
  },
104361
+ {
104362
+ $ref: "#/components/schemas/SanitasProviderContextRequiredFailure"
104363
+ },
102903
104364
  {
102904
104365
  $ref: "#/components/schemas/SanitasProviderSessionExpiredFailure"
102905
104366
  },
@@ -102911,6 +104372,7 @@ var schemaComponents = {
102911
104372
  propertyName: "code",
102912
104373
  mapping: {
102913
104374
  CONNECTION_REQUIRED: "#/components/schemas/SanitasConnectionRequiredFailure",
104375
+ PROVIDER_CONTEXT_REQUIRED: "#/components/schemas/SanitasProviderContextRequiredFailure",
102914
104376
  PROVIDER_SESSION_EXPIRED: "#/components/schemas/SanitasProviderSessionExpiredFailure",
102915
104377
  PATIENT_UNRESOLVED: "#/components/schemas/SanitasPatientUnresolvedFailure"
102916
104378
  }
@@ -103078,6 +104540,40 @@ var schemaComponents = {
103078
104540
  }
103079
104541
  }
103080
104542
  },
104543
+ SanitasProviderContextRequiredFailure: {
104544
+ type: "object",
104545
+ description: "Select one of this connection’s provider contexts before querying affiliation.",
104546
+ additionalProperties: false,
104547
+ required: [
104548
+ "code",
104549
+ "message",
104550
+ "retryable",
104551
+ "data"
104552
+ ],
104553
+ properties: {
104554
+ code: {
104555
+ type: "string",
104556
+ enum: [
104557
+ "PROVIDER_CONTEXT_REQUIRED"
104558
+ ],
104559
+ description: "The failure code, stable across releases."
104560
+ },
104561
+ message: {
104562
+ type: "string",
104563
+ description: "What went wrong, for people; it never contains input values."
104564
+ },
104565
+ retryable: {
104566
+ type: "boolean",
104567
+ enum: [
104568
+ false
104569
+ ],
104570
+ description: "Whether repeating the same request may succeed."
104571
+ },
104572
+ data: {
104573
+ $ref: "#/components/schemas/Empty"
104574
+ }
104575
+ }
104576
+ },
103081
104577
  SanitasProviderProtocolChangedFailure: {
103082
104578
  type: "object",
103083
104579
  description: "The provider response could not be verified.",
@@ -103378,6 +104874,7 @@ var schemaComponents = {
103378
104874
  type: "object",
103379
104875
  required: [
103380
104876
  "id",
104877
+ "providers",
103381
104878
  "status",
103382
104879
  "verifiedAt",
103383
104880
  "errorCode"
@@ -103387,6 +104884,37 @@ var schemaComponents = {
103387
104884
  pattern: "^con_[0-9a-z]{26}$",
103388
104885
  type: "string"
103389
104886
  },
104887
+ providers: {
104888
+ anyOf: [
104889
+ {
104890
+ maxItems: 100,
104891
+ type: "array",
104892
+ items: {
104893
+ additionalProperties: false,
104894
+ type: "object",
104895
+ required: [
104896
+ "id",
104897
+ "name",
104898
+ "selected"
104899
+ ],
104900
+ properties: {
104901
+ id: {
104902
+ type: "string"
104903
+ },
104904
+ name: {
104905
+ type: "string"
104906
+ },
104907
+ selected: {
104908
+ type: "boolean"
104909
+ }
104910
+ }
104911
+ }
104912
+ },
104913
+ {
104914
+ type: "null"
104915
+ }
104916
+ ]
104917
+ },
103390
104918
  status: {
103391
104919
  anyOf: [
103392
104920
  {
@@ -103867,8 +105395,24 @@ var schemaComponents = {
103867
105395
  type: "string"
103868
105396
  },
103869
105397
  documentType: {
103870
- const: "CC",
103871
- type: "string"
105398
+ anyOf: [
105399
+ {
105400
+ const: "CC",
105401
+ type: "string"
105402
+ },
105403
+ {
105404
+ const: "CE",
105405
+ type: "string"
105406
+ },
105407
+ {
105408
+ const: "RC",
105409
+ type: "string"
105410
+ },
105411
+ {
105412
+ const: "TI",
105413
+ type: "string"
105414
+ }
105415
+ ]
103872
105416
  },
103873
105417
  incomeGroup: {
103874
105418
  type: "string"
@@ -103985,8 +105529,10 @@ var schemaComponents = {
103985
105529
  "issuerCode",
103986
105530
  "ok",
103987
105531
  "outcome",
105532
+ "procedures",
103988
105533
  "providerCode",
103989
- "providerStatus"
105534
+ "providerStatus",
105535
+ "receivingProvider"
103990
105536
  ],
103991
105537
  properties: {
103992
105538
  ai_hint: {
@@ -104000,8 +105546,24 @@ var schemaComponents = {
104000
105546
  type: "string"
104001
105547
  },
104002
105548
  documentType: {
104003
- const: "CC",
104004
- type: "string"
105549
+ anyOf: [
105550
+ {
105551
+ const: "CC",
105552
+ type: "string"
105553
+ },
105554
+ {
105555
+ const: "CE",
105556
+ type: "string"
105557
+ },
105558
+ {
105559
+ const: "RC",
105560
+ type: "string"
105561
+ },
105562
+ {
105563
+ const: "TI",
105564
+ type: "string"
105565
+ }
105566
+ ]
104005
105567
  },
104006
105568
  expiresOn: {
104007
105569
  description: "YYYY/MM/DD, as SURA writes it.",
@@ -104095,11 +105657,78 @@ var schemaComponents = {
104095
105657
  const: "found",
104096
105658
  type: "string"
104097
105659
  },
105660
+ procedures: {
105661
+ description: "What it covers. Null means the portal did not establish it, never that it covers nothing.",
105662
+ anyOf: [
105663
+ {
105664
+ maxItems: 100,
105665
+ type: "array",
105666
+ items: {
105667
+ additionalProperties: false,
105668
+ type: "object",
105669
+ required: [
105670
+ "code",
105671
+ "description",
105672
+ "quantity"
105673
+ ],
105674
+ properties: {
105675
+ code: {
105676
+ description: "The Suracups code SURA authorized.",
105677
+ type: "string"
105678
+ },
105679
+ description: {
105680
+ type: "string"
105681
+ },
105682
+ quantity: {
105683
+ minimum: 1,
105684
+ type: "integer"
105685
+ }
105686
+ }
105687
+ }
105688
+ },
105689
+ {
105690
+ type: "null"
105691
+ }
105692
+ ]
105693
+ },
104098
105694
  providerCode: {
104099
105695
  type: "string"
104100
105696
  },
104101
105697
  providerStatus: {
105698
+ description: "ENTREGADA, POR CONVENIO or ANULADA. An ANULADA authorization no longer serves.",
104102
105699
  type: "string"
105700
+ },
105701
+ receivingProvider: {
105702
+ anyOf: [
105703
+ {
105704
+ additionalProperties: false,
105705
+ type: "object",
105706
+ required: [
105707
+ "branchCode",
105708
+ "branchName",
105709
+ "documentNumber",
105710
+ "name"
105711
+ ],
105712
+ properties: {
105713
+ branchCode: {
105714
+ type: "string"
105715
+ },
105716
+ branchName: {
105717
+ type: "string"
105718
+ },
105719
+ documentNumber: {
105720
+ description: "The provider's identification number, without its type.",
105721
+ type: "string"
105722
+ },
105723
+ name: {
105724
+ type: "string"
105725
+ }
105726
+ }
105727
+ },
105728
+ {
105729
+ type: "null"
105730
+ }
105731
+ ]
104103
105732
  }
104104
105733
  }
104105
105734
  },
@@ -106004,7 +107633,7 @@ var schemaComponents = {
106004
107633
  },
106005
107634
  {
106006
107635
  $ref: "#/components/schemas/SuraAuthorization",
106007
- description: "An existing, delivered authorization and the charge it states."
107636
+ description: "An existing authorization: the charge it states, what it covers and who must attend it."
106008
107637
  },
106009
107638
  {
106010
107639
  $ref: "#/components/schemas/SuraCopayHistory",
@@ -106668,12 +108297,24 @@ var schemaComponents = {
106668
108297
  type: "string"
106669
108298
  },
106670
108299
  documentType: {
106671
- description: "Document type. Defaults to CC.",
108300
+ description: "Document type. Defaults to CC. CE, RC and TI are read through the same form.",
106672
108301
  anyOf: [
106673
108302
  {
106674
108303
  const: "CC",
106675
108304
  type: "string"
106676
108305
  },
108306
+ {
108307
+ const: "CE",
108308
+ type: "string"
108309
+ },
108310
+ {
108311
+ const: "RC",
108312
+ type: "string"
108313
+ },
108314
+ {
108315
+ const: "TI",
108316
+ type: "string"
108317
+ },
106677
108318
  {
106678
108319
  type: "null"
106679
108320
  }
@@ -106770,7 +108411,7 @@ var schemaComponents = {
106770
108411
  },
106771
108412
  {
106772
108413
  $ref: "#/components/schemas/SuraAuthorization",
106773
- description: "An existing, delivered authorization and the charge it states."
108414
+ description: "An existing authorization: the charge it states, what it covers and who must attend it."
106774
108415
  }
106775
108416
  ]
106776
108417
  },
@@ -107063,12 +108704,24 @@ var schemaComponents = {
107063
108704
  type: "string"
107064
108705
  },
107065
108706
  documentType: {
107066
- description: "Document type. Defaults to CC.",
108707
+ description: "Document type. Defaults to CC. CE, RC and TI are read through the same form.",
107067
108708
  anyOf: [
107068
108709
  {
107069
108710
  const: "CC",
107070
108711
  type: "string"
107071
108712
  },
108713
+ {
108714
+ const: "CE",
108715
+ type: "string"
108716
+ },
108717
+ {
108718
+ const: "RC",
108719
+ type: "string"
108720
+ },
108721
+ {
108722
+ const: "TI",
108723
+ type: "string"
108724
+ },
107072
108725
  {
107073
108726
  type: "null"
107074
108727
  }
@@ -107698,8 +109351,24 @@ var schemaComponents = {
107698
109351
  type: "string"
107699
109352
  },
107700
109353
  documentType: {
107701
- const: "CC",
107702
- type: "string"
109354
+ anyOf: [
109355
+ {
109356
+ const: "CC",
109357
+ type: "string"
109358
+ },
109359
+ {
109360
+ const: "CE",
109361
+ type: "string"
109362
+ },
109363
+ {
109364
+ const: "RC",
109365
+ type: "string"
109366
+ },
109367
+ {
109368
+ const: "TI",
109369
+ type: "string"
109370
+ }
109371
+ ]
107703
109372
  },
107704
109373
  ok: {
107705
109374
  const: true,
@@ -118924,6 +120593,89 @@ var schemaComponents = {
118924
120593
  }
118925
120594
  }
118926
120595
  },
120596
+ AxxaCoverageLookupInput: {
120597
+ additionalProperties: false,
120598
+ type: "object",
120599
+ required: [
120600
+ "documentNumber",
120601
+ "documentType",
120602
+ "serviceType",
120603
+ "cupsCode"
120604
+ ],
120605
+ properties: {
120606
+ documentNumber: {
120607
+ pattern: "^[A-Za-z0-9]{3,30}$",
120608
+ type: "string"
120609
+ },
120610
+ documentType: {
120611
+ anyOf: [
120612
+ {
120613
+ const: "CC",
120614
+ type: "string"
120615
+ },
120616
+ {
120617
+ const: "CE",
120618
+ type: "string"
120619
+ },
120620
+ {
120621
+ const: "TI",
120622
+ type: "string"
120623
+ },
120624
+ {
120625
+ const: "RC",
120626
+ type: "string"
120627
+ },
120628
+ {
120629
+ const: "PA",
120630
+ type: "string"
120631
+ }
120632
+ ]
120633
+ },
120634
+ serviceType: {
120635
+ anyOf: [
120636
+ {
120637
+ const: "outpatient",
120638
+ type: "string"
120639
+ },
120640
+ {
120641
+ const: "emergency",
120642
+ type: "string"
120643
+ },
120644
+ {
120645
+ const: "laboratory",
120646
+ type: "string"
120647
+ },
120648
+ {
120649
+ const: "therapy",
120650
+ type: "string"
120651
+ },
120652
+ {
120653
+ const: "radiology",
120654
+ type: "string"
120655
+ },
120656
+ {
120657
+ const: "other",
120658
+ type: "string"
120659
+ }
120660
+ ]
120661
+ },
120662
+ contractNumber: {
120663
+ minLength: 1,
120664
+ maxLength: 100,
120665
+ description: "The plan to read, from an eligibility lookup. Required only when the person has several.",
120666
+ type: "string"
120667
+ },
120668
+ cupsCode: {
120669
+ pattern: "^[0-9A-Za-z-]{3,20}$",
120670
+ description: "The exact service code. Only this code is answered, never one that merely starts with it.",
120671
+ type: "string"
120672
+ },
120673
+ connectionId: {
120674
+ pattern: "^con_[0-9A-Za-z]{26}$",
120675
+ type: "string"
120676
+ }
120677
+ }
120678
+ },
118927
120679
  AxxaEligibilityLookupInput: {
118928
120680
  additionalProperties: false,
118929
120681
  type: "object",
@@ -123538,7 +125290,7 @@ var schemaComponents = {
123538
125290
  },
123539
125291
  settings: {
123540
125292
  $ref: "#/components/schemas/RaizAgentSettingsInput",
123541
- description: "How the Agent behaves. In an update, the complete new settings: keys left out return to their default. Text and voice settings apply only to Agents of that modality."
125293
+ description: "How the Agent behaves. In an update, only the keys you send change: a key left out stays and `null` returns it to its default. A key's own value, such as `policy` or `voice`, is replaced whole. An update that changes `modality` starts from the defaults. Text and voice settings apply only to Agents of that modality."
123542
125294
  },
123543
125295
  status: {
123544
125296
  description: "A paused Agent answers nothing and places no calls.",
@@ -123698,7 +125450,7 @@ var schemaComponents = {
123698
125450
  },
123699
125451
  settings: {
123700
125452
  $ref: "#/components/schemas/RaizAgentSettingsInput",
123701
- description: "How the Agent behaves. In an update, the complete new settings: keys left out return to their default. Text and voice settings apply only to Agents of that modality."
125453
+ description: "How the Agent behaves. In an update, only the keys you send change: a key left out stays and `null` returns it to its default. A key's own value, such as `policy` or `voice`, is replaced whole. An update that changes `modality` starts from the defaults. Text and voice settings apply only to Agents of that modality."
123702
125454
  },
123703
125455
  status: {
123704
125456
  description: "A paused Agent answers nothing and places no calls.",
@@ -124003,8 +125755,21 @@ var schemaComponents = {
124003
125755
  pattern: "^agt_(?:[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}))$",
124004
125756
  type: "string"
124005
125757
  },
125758
+ channelType: {
125759
+ description: "How the campaign reaches people: by call or by WhatsApp.",
125760
+ anyOf: [
125761
+ {
125762
+ const: "voice",
125763
+ type: "string"
125764
+ },
125765
+ {
125766
+ const: "whatsapp",
125767
+ type: "string"
125768
+ }
125769
+ ]
125770
+ },
124006
125771
  status: {
124007
- description: "`queued`: not started yet (or its start is scheduled). `running`: calling due recipients. `paused`: started, then paused; calls in progress finish. `completed`: no recipient is left to call.",
125772
+ description: "`queued`: not started yet (or its start is scheduled). `running`: reaching due recipients. `paused`: started, then paused; what is in progress finishes. `completed`: no recipient is left to reach.",
124008
125773
  anyOf: [
124009
125774
  {
124010
125775
  const: "queued",
@@ -124036,17 +125801,415 @@ var schemaComponents = {
124036
125801
  additionalProperties: false
124037
125802
  },
124038
125803
  RaizCampaignsCreateInput: {
125804
+ anyOf: [
125805
+ {
125806
+ description: "A campaign that calls each recipient with a voice Agent. The default.",
125807
+ additionalProperties: false,
125808
+ type: "object",
125809
+ required: [
125810
+ "agentId",
125811
+ "name"
125812
+ ],
125813
+ properties: {
125814
+ channelId: {
125815
+ anyOf: [
125816
+ {
125817
+ description: "The line calls or messages leave from, of the campaign's kind. Null: the Agent's own.",
125818
+ examples: [
125819
+ "chn_01m45h8q2rf3t9w6y7z0b1c2d3"
125820
+ ],
125821
+ pattern: "^(?:chn_(?:[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}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$",
125822
+ type: "string"
125823
+ },
125824
+ {
125825
+ type: "null"
125826
+ }
125827
+ ]
125828
+ },
125829
+ contactHours: {
125830
+ description: "When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.",
125831
+ maxItems: 14,
125832
+ type: "array",
125833
+ items: {
125834
+ $ref: "#/components/schemas/RaizContactHoursWindow",
125835
+ description: "On these days, calls start and messages leave between `from` and `to`."
125836
+ }
125837
+ },
125838
+ metadata: {
125839
+ description: "Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.",
125840
+ maxProperties: 50,
125841
+ type: "object",
125842
+ patternProperties: {
125843
+ "^[A-Za-z0-9_.-]{1,40}$": {
125844
+ maxLength: 500,
125845
+ type: "string"
125846
+ }
125847
+ }
125848
+ },
125849
+ scheduledEndAt: {
125850
+ anyOf: [
125851
+ {
125852
+ description: "Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled.",
125853
+ format: "date-time",
125854
+ type: "string"
125855
+ },
125856
+ {
125857
+ type: "null"
125858
+ }
125859
+ ]
125860
+ },
125861
+ scheduledStartAt: {
125862
+ anyOf: [
125863
+ {
125864
+ description: "Nothing starts before this instant, even once the campaign is started.",
125865
+ format: "date-time",
125866
+ type: "string"
125867
+ },
125868
+ {
125869
+ type: "null"
125870
+ }
125871
+ ]
125872
+ },
125873
+ timeZone: {
125874
+ description: "IANA time zone name.",
125875
+ examples: [
125876
+ "America/Bogota"
125877
+ ],
125878
+ maxLength: 64,
125879
+ pattern: "^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$",
125880
+ type: "string"
125881
+ },
125882
+ agentId: {
125883
+ description: "Agent id.",
125884
+ examples: [
125885
+ "agt_01m45h8q2rf3t9w6y7z0b1c2d3"
125886
+ ],
125887
+ pattern: "^agt_(?:[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}))$",
125888
+ type: "string"
125889
+ },
125890
+ name: {
125891
+ maxLength: 200,
125892
+ minLength: 1,
125893
+ type: "string"
125894
+ },
125895
+ recipients: {
125896
+ maxItems: 1e4,
125897
+ type: "array",
125898
+ items: {
125899
+ $ref: "#/components/schemas/RaizCampaignRecipientInput"
125900
+ },
125901
+ description: "Who to reach, unique by `address`. Each becomes `contactId`, or else the contact that owns their number (created when the organization has none), when the campaign first reaches them. Send a longer list in parts with `updateCampaign` and `addRecipients`."
125902
+ },
125903
+ maxAttempts: {
125904
+ description: "Calls per recipient at most, retries included. Default 1.",
125905
+ maximum: 10,
125906
+ minimum: 1,
125907
+ type: "integer"
125908
+ },
125909
+ retryAfterMinutes: {
125910
+ description: "Wait before a retry, up to a week. Default 60. For several tries in a day use a few hours; for several in a month, a week, with `scheduledEndAt` as the last day.",
125911
+ maximum: 10080,
125912
+ minimum: 1,
125913
+ type: "integer"
125914
+ },
125915
+ retryOn: {
125916
+ description: 'Which results earn another call. Default `["no_answer"]`: nobody answered, busy or silence; `failure`: answered but judged unsuccessful.',
125917
+ maxItems: 2,
125918
+ uniqueItems: true,
125919
+ type: "array",
125920
+ items: {
125921
+ anyOf: [
125922
+ {
125923
+ const: "no_answer",
125924
+ type: "string"
125925
+ },
125926
+ {
125927
+ const: "failure",
125928
+ type: "string"
125929
+ }
125930
+ ]
125931
+ }
125932
+ },
125933
+ channelType: {
125934
+ const: "voice",
125935
+ type: "string"
125936
+ },
125937
+ firstMessage: {
125938
+ anyOf: [
125939
+ {
125940
+ maxLength: 2000,
125941
+ minLength: 1,
125942
+ type: "string",
125943
+ description: "What the Agent says first on every call. Null: the Agent's own first message."
125944
+ },
125945
+ {
125946
+ type: "null"
125947
+ }
125948
+ ]
125949
+ },
125950
+ instructions: {
125951
+ anyOf: [
125952
+ {
125953
+ maxLength: 8000,
125954
+ minLength: 1,
125955
+ type: "string",
125956
+ description: "What these calls are about, added to the Agent's instructions on every call."
125957
+ },
125958
+ {
125959
+ type: "null"
125960
+ }
125961
+ ]
125962
+ }
125963
+ }
125964
+ },
125965
+ {
125966
+ description: "A campaign that sends each recipient an approved WhatsApp template; its text Agent answers whoever replies.",
125967
+ additionalProperties: false,
125968
+ type: "object",
125969
+ required: [
125970
+ "agentId",
125971
+ "name",
125972
+ "channelType",
125973
+ "template"
125974
+ ],
125975
+ properties: {
125976
+ channelId: {
125977
+ anyOf: [
125978
+ {
125979
+ description: "The line calls or messages leave from, of the campaign's kind. Null: the Agent's own.",
125980
+ examples: [
125981
+ "chn_01m45h8q2rf3t9w6y7z0b1c2d3"
125982
+ ],
125983
+ pattern: "^(?:chn_(?:[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}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$",
125984
+ type: "string"
125985
+ },
125986
+ {
125987
+ type: "null"
125988
+ }
125989
+ ]
125990
+ },
125991
+ contactHours: {
125992
+ description: "When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.",
125993
+ maxItems: 14,
125994
+ type: "array",
125995
+ items: {
125996
+ $ref: "#/components/schemas/RaizContactHoursWindow",
125997
+ description: "On these days, calls start and messages leave between `from` and `to`."
125998
+ }
125999
+ },
126000
+ metadata: {
126001
+ description: "Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.",
126002
+ maxProperties: 50,
126003
+ type: "object",
126004
+ patternProperties: {
126005
+ "^[A-Za-z0-9_.-]{1,40}$": {
126006
+ maxLength: 500,
126007
+ type: "string"
126008
+ }
126009
+ }
126010
+ },
126011
+ scheduledEndAt: {
126012
+ anyOf: [
126013
+ {
126014
+ description: "Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled.",
126015
+ format: "date-time",
126016
+ type: "string"
126017
+ },
126018
+ {
126019
+ type: "null"
126020
+ }
126021
+ ]
126022
+ },
126023
+ scheduledStartAt: {
126024
+ anyOf: [
126025
+ {
126026
+ description: "Nothing starts before this instant, even once the campaign is started.",
126027
+ format: "date-time",
126028
+ type: "string"
126029
+ },
126030
+ {
126031
+ type: "null"
126032
+ }
126033
+ ]
126034
+ },
126035
+ timeZone: {
126036
+ description: "IANA time zone name.",
126037
+ examples: [
126038
+ "America/Bogota"
126039
+ ],
126040
+ maxLength: 64,
126041
+ pattern: "^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$",
126042
+ type: "string"
126043
+ },
126044
+ agentId: {
126045
+ description: "Agent id.",
126046
+ examples: [
126047
+ "agt_01m45h8q2rf3t9w6y7z0b1c2d3"
126048
+ ],
126049
+ pattern: "^agt_(?:[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}))$",
126050
+ type: "string"
126051
+ },
126052
+ name: {
126053
+ maxLength: 200,
126054
+ minLength: 1,
126055
+ type: "string"
126056
+ },
126057
+ recipients: {
126058
+ maxItems: 1e4,
126059
+ type: "array",
126060
+ items: {
126061
+ $ref: "#/components/schemas/RaizCampaignRecipientInput"
126062
+ },
126063
+ description: "Who to reach, unique by `address`. Each becomes `contactId`, or else the contact that owns their number (created when the organization has none), when the campaign first reaches them. Send a longer list in parts with `updateCampaign` and `addRecipients`."
126064
+ },
126065
+ maxAttempts: {
126066
+ description: "Messages per recipient at most, reminders included. Default 2. WhatsApp penalizes a number people block or report, so keep it low.",
126067
+ maximum: 10,
126068
+ minimum: 1,
126069
+ type: "integer"
126070
+ },
126071
+ retryAfterMinutes: {
126072
+ description: "Wait from one message to the next, up to a week. Default 1440, a day. A person WhatsApp limited waits at least a day whatever this says.",
126073
+ maximum: 10080,
126074
+ minimum: 1,
126075
+ type: "integer"
126076
+ },
126077
+ retryOn: {
126078
+ description: 'What earns another message. Default `["not_delivered"]`: only when it did not arrive. Add `no_answer` to remind whoever received it and has not replied. A person who replies, or who cannot receive it, is never sent another.',
126079
+ maxItems: 2,
126080
+ uniqueItems: true,
126081
+ type: "array",
126082
+ items: {
126083
+ anyOf: [
126084
+ {
126085
+ const: "no_answer",
126086
+ type: "string"
126087
+ },
126088
+ {
126089
+ const: "not_delivered",
126090
+ type: "string"
126091
+ }
126092
+ ]
126093
+ }
126094
+ },
126095
+ channelType: {
126096
+ const: "whatsapp",
126097
+ type: "string"
126098
+ },
126099
+ instructions: {
126100
+ anyOf: [
126101
+ {
126102
+ maxLength: 8000,
126103
+ minLength: 1,
126104
+ type: "string",
126105
+ description: "What the Agent should know when someone replies: what the message is about and what to do next."
126106
+ },
126107
+ {
126108
+ type: "null"
126109
+ }
126110
+ ]
126111
+ },
126112
+ template: {
126113
+ $ref: "#/components/schemas/RaizCampaignTemplateInput",
126114
+ description: "The approved template sent to each recipient. WhatsApp only allows a business to start a conversation with one."
126115
+ }
126116
+ }
126117
+ }
126118
+ ]
126119
+ },
126120
+ RaizCampaignsGetInput: {
126121
+ type: "object",
126122
+ properties: {
126123
+ campaignId: {
126124
+ description: "Campaign id.",
126125
+ examples: [
126126
+ "cmp_01m45h8q2rf3t9w6y7z0b1c2d3"
126127
+ ],
126128
+ pattern: "^cmp_(?:[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}))$",
126129
+ type: "string"
126130
+ },
126131
+ expand: {
126132
+ description: "Related data to include, comma-separated: `recipients`, `readiness`.",
126133
+ examples: [
126134
+ "recipients,readiness"
126135
+ ],
126136
+ pattern: "^(recipients|readiness)(,(recipients|readiness))*$",
126137
+ type: "string"
126138
+ },
126139
+ recipientsCursor: {
126140
+ description: "Opaque cursor the `recipients` expansion's pageInfo returned; omit it for its first page.",
126141
+ maxLength: 4096,
126142
+ type: "string"
126143
+ },
126144
+ recipientsDirection: {
126145
+ description: "Direction to traverse the `recipients` expansion from the supplied cursor.",
126146
+ anyOf: [
126147
+ {
126148
+ const: "forward",
126149
+ type: "string"
126150
+ },
126151
+ {
126152
+ const: "backward",
126153
+ type: "string"
126154
+ }
126155
+ ],
126156
+ default: "forward"
126157
+ },
126158
+ recipientsLimit: {
126159
+ description: "Maximum `recipients` items in one page. Defaults to 100.",
126160
+ maximum: 1000,
126161
+ minimum: 1,
126162
+ type: "integer",
126163
+ default: 100
126164
+ },
126165
+ recipientsQ: {
126166
+ description: "With `expand=recipients`: only those whose number contains these digits or whose name contains this text.",
126167
+ maxLength: 200,
126168
+ minLength: 1,
126169
+ type: "string"
126170
+ },
126171
+ recipientsStatus: {
126172
+ 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.",
126173
+ anyOf: [
126174
+ {
126175
+ const: "pending",
126176
+ type: "string"
126177
+ },
126178
+ {
126179
+ const: "in_progress",
126180
+ type: "string"
126181
+ },
126182
+ {
126183
+ const: "completed",
126184
+ type: "string"
126185
+ },
126186
+ {
126187
+ const: "failed",
126188
+ type: "string"
126189
+ },
126190
+ {
126191
+ const: "cancelled",
126192
+ type: "string"
126193
+ }
126194
+ ]
126195
+ }
126196
+ },
126197
+ required: [
126198
+ "campaignId"
126199
+ ],
126200
+ additionalProperties: false
126201
+ },
126202
+ RaizCampaignsUpdateInput: {
124039
126203
  additionalProperties: false,
124040
126204
  type: "object",
124041
126205
  required: [
124042
- "agentId",
124043
- "name"
126206
+ "campaignId"
124044
126207
  ],
124045
126208
  properties: {
124046
126209
  channelId: {
124047
126210
  anyOf: [
124048
126211
  {
124049
- description: "Channel id.",
126212
+ description: "The line calls or messages leave from, of the campaign's kind. Null: the Agent's own.",
124050
126213
  examples: [
124051
126214
  "chn_01m45h8q2rf3t9w6y7z0b1c2d3"
124052
126215
  ],
@@ -124059,21 +126222,86 @@ var schemaComponents = {
124059
126222
  ]
124060
126223
  },
124061
126224
  contactHours: {
124062
- description: "When calls may start, in the campaign's time zone. Empty: any time.",
126225
+ description: "When calls may start and messages may leave, in the campaign's time zone. Empty: any time. Public holidays count like any other day: whether to reach people on one is the organization's decision.",
124063
126226
  maxItems: 14,
124064
126227
  type: "array",
124065
126228
  items: {
124066
126229
  $ref: "#/components/schemas/RaizContactHoursWindow",
124067
- description: "On these days, calls start between `from` and `to`."
126230
+ description: "On these days, calls start and messages leave between `from` and `to`."
124068
126231
  }
124069
126232
  },
126233
+ metadata: {
126234
+ description: "Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.",
126235
+ maxProperties: 50,
126236
+ type: "object",
126237
+ patternProperties: {
126238
+ "^[A-Za-z0-9_.-]{1,40}$": {
126239
+ maxLength: 500,
126240
+ type: "string"
126241
+ }
126242
+ }
126243
+ },
126244
+ scheduledEndAt: {
126245
+ anyOf: [
126246
+ {
126247
+ description: "Nothing new starts after this instant, retries and reminders included: when what the campaign is about has passed. Whoever is still pending then is cancelled.",
126248
+ format: "date-time",
126249
+ type: "string"
126250
+ },
126251
+ {
126252
+ type: "null"
126253
+ }
126254
+ ]
126255
+ },
126256
+ scheduledStartAt: {
126257
+ anyOf: [
126258
+ {
126259
+ description: "Nothing starts before this instant, even once the campaign is started.",
126260
+ format: "date-time",
126261
+ type: "string"
126262
+ },
126263
+ {
126264
+ type: "null"
126265
+ }
126266
+ ]
126267
+ },
126268
+ timeZone: {
126269
+ description: "IANA time zone name.",
126270
+ examples: [
126271
+ "America/Bogota"
126272
+ ],
126273
+ maxLength: 64,
126274
+ pattern: "^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$",
126275
+ type: "string"
126276
+ },
126277
+ addRecipients: {
126278
+ maxItems: 1e4,
126279
+ type: "array",
126280
+ items: {
126281
+ $ref: "#/components/schemas/RaizCampaignRecipientInput"
126282
+ },
126283
+ description: "Adds these recipients, before or after the start, skipping numbers the campaign already has. A list longer than one request arrives in parts this way, and repeating a part reaches nobody twice."
126284
+ },
126285
+ agentId: {
126286
+ description: "Changes only before the campaign starts.",
126287
+ examples: [
126288
+ "agt_01m45h8q2rf3t9w6y7z0b1c2d3"
126289
+ ],
126290
+ pattern: "^agt_(?:[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}))$",
126291
+ type: "string"
126292
+ },
126293
+ expectedVersion: {
126294
+ description: "The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.",
126295
+ minimum: 1,
126296
+ type: "integer"
126297
+ },
124070
126298
  firstMessage: {
124071
126299
  anyOf: [
124072
126300
  {
124073
126301
  maxLength: 2000,
124074
126302
  minLength: 1,
124075
126303
  type: "string",
124076
- description: "What the Agent says first on every call. Null: the Agent's own first message."
126304
+ description: "Calls only: what the Agent says first on every call. Null: the Agent's own first message."
124077
126305
  },
124078
126306
  {
124079
126307
  type: "null"
@@ -124086,7 +126314,7 @@ var schemaComponents = {
124086
126314
  maxLength: 8000,
124087
126315
  minLength: 1,
124088
126316
  type: "string",
124089
- description: "What these calls are about, added to the Agent's instructions on every call."
126317
+ description: "On a call, what it is about, added to the Agent's instructions. On WhatsApp, what the Agent should know when someone replies."
124090
126318
  },
124091
126319
  {
124092
126320
  type: "null"
@@ -124094,241 +126322,41 @@ var schemaComponents = {
124094
126322
  ]
124095
126323
  },
124096
126324
  maxAttempts: {
124097
- description: "Calls per recipient at most, retries included. Default 1.",
126325
+ description: "Calls or messages per recipient at most, retries included.",
124098
126326
  maximum: 10,
124099
126327
  minimum: 1,
124100
126328
  type: "integer"
124101
126329
  },
124102
- metadata: {
124103
- description: "Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.",
124104
- maxProperties: 50,
124105
- type: "object",
124106
- patternProperties: {
124107
- "^[A-Za-z0-9_.-]{1,40}$": {
124108
- maxLength: 500,
124109
- type: "string"
124110
- }
124111
- }
124112
- },
124113
- retryAfterMinutes: {
124114
- description: "Wait before a retry. Default 60.",
124115
- maximum: 10080,
124116
- minimum: 1,
124117
- type: "integer"
124118
- },
124119
- retryOn: {
124120
- description: 'Which results earn a retry. Default `["no_answer"]`.',
124121
- maxItems: 2,
124122
- uniqueItems: true,
124123
- type: "array",
124124
- items: {
124125
- description: "`no_answer`: nobody answered, the line was busy, or the Agent heard no one. `failure`: the call was answered but its analysis judged it unsuccessful.",
124126
- anyOf: [
124127
- {
124128
- const: "no_answer",
124129
- type: "string"
124130
- },
124131
- {
124132
- const: "failure",
124133
- type: "string"
124134
- }
124135
- ]
124136
- }
124137
- },
124138
- scheduledEndAt: {
124139
- anyOf: [
124140
- {
124141
- description: "No call starts after this instant.",
124142
- format: "date-time",
124143
- type: "string"
124144
- },
124145
- {
124146
- type: "null"
124147
- }
124148
- ]
124149
- },
124150
- scheduledStartAt: {
124151
- anyOf: [
124152
- {
124153
- description: "No call starts before this instant, even once the campaign is started.",
124154
- format: "date-time",
124155
- type: "string"
124156
- },
124157
- {
124158
- type: "null"
124159
- }
124160
- ]
124161
- },
124162
- timeZone: {
124163
- description: "IANA time zone name.",
124164
- examples: [
124165
- "America/Bogota"
124166
- ],
124167
- maxLength: 64,
124168
- pattern: "^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$",
124169
- type: "string"
124170
- },
124171
- agentId: {
124172
- description: "Agent id.",
124173
- examples: [
124174
- "agt_01m45h8q2rf3t9w6y7z0b1c2d3"
124175
- ],
124176
- pattern: "^agt_(?:[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}))$",
124177
- type: "string"
124178
- },
124179
126330
  name: {
124180
126331
  maxLength: 200,
124181
126332
  minLength: 1,
124182
126333
  type: "string"
124183
126334
  },
126335
+ paused: {
126336
+ description: "Pause (`true`) or resume (`false`) a started campaign. A campaign that never started is started with `startCampaign` (INVALID_STATE here).",
126337
+ type: "boolean"
126338
+ },
124184
126339
  recipients: {
124185
126340
  maxItems: 1e4,
124186
126341
  type: "array",
124187
126342
  items: {
124188
126343
  $ref: "#/components/schemas/RaizCampaignRecipientInput"
124189
126344
  },
124190
- description: "Who to call, unique by `address`. A recipient's contact is `contactId`, or else the contact that owns its number (created when the organization has none)."
124191
- }
124192
- }
124193
- },
124194
- RaizCampaignsGetInput: {
124195
- type: "object",
124196
- properties: {
124197
- campaignId: {
124198
- description: "Campaign id.",
124199
- examples: [
124200
- "cmp_01m45h8q2rf3t9w6y7z0b1c2d3"
124201
- ],
124202
- pattern: "^cmp_(?:[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}))$",
124203
- type: "string"
124204
- },
124205
- expand: {
124206
- description: "Related data to include, comma-separated: `recipients`.",
124207
- examples: [
124208
- "recipients"
124209
- ],
124210
- pattern: "^(recipients)(,(recipients))*$",
124211
- type: "string"
124212
- },
124213
- recipientsCursor: {
124214
- description: "Opaque cursor the `recipients` expansion's pageInfo returned; omit it for its first page.",
124215
- maxLength: 4096,
124216
- type: "string"
124217
- },
124218
- recipientsDirection: {
124219
- description: "Direction to traverse the `recipients` expansion from the supplied cursor.",
124220
- anyOf: [
124221
- {
124222
- const: "forward",
124223
- type: "string"
124224
- },
124225
- {
124226
- const: "backward",
124227
- type: "string"
124228
- }
124229
- ],
124230
- default: "forward"
124231
- },
124232
- recipientsLimit: {
124233
- description: "Maximum `recipients` items in one page. Defaults to 100.",
124234
- maximum: 100,
124235
- minimum: 1,
124236
- type: "integer",
124237
- default: 100
124238
- }
124239
- },
124240
- required: [
124241
- "campaignId"
124242
- ],
124243
- additionalProperties: false
124244
- },
124245
- RaizCampaignsUpdateInput: {
124246
- additionalProperties: false,
124247
- type: "object",
124248
- required: [
124249
- "campaignId"
124250
- ],
124251
- properties: {
124252
- channelId: {
124253
- anyOf: [
124254
- {
124255
- description: "Channel id.",
124256
- examples: [
124257
- "chn_01m45h8q2rf3t9w6y7z0b1c2d3"
124258
- ],
124259
- pattern: "^(?:chn_(?:[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}))|(?:agc)_(?:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|[a-f0-9]{32}))$",
124260
- type: "string"
124261
- },
124262
- {
124263
- type: "null"
124264
- }
124265
- ]
124266
- },
124267
- contactHours: {
124268
- description: "When calls may start, in the campaign's time zone. Empty: any time.",
124269
- maxItems: 14,
124270
- type: "array",
124271
- items: {
124272
- $ref: "#/components/schemas/RaizContactHoursWindow",
124273
- description: "On these days, calls start between `from` and `to`."
124274
- }
124275
- },
124276
- firstMessage: {
124277
- anyOf: [
124278
- {
124279
- maxLength: 2000,
124280
- minLength: 1,
124281
- type: "string",
124282
- description: "What the Agent says first on every call. Null: the Agent's own first message."
124283
- },
124284
- {
124285
- type: "null"
124286
- }
124287
- ]
124288
- },
124289
- instructions: {
124290
- anyOf: [
124291
- {
124292
- maxLength: 8000,
124293
- minLength: 1,
124294
- type: "string",
124295
- description: "What these calls are about, added to the Agent's instructions on every call."
124296
- },
124297
- {
124298
- type: "null"
124299
- }
124300
- ]
124301
- },
124302
- maxAttempts: {
124303
- description: "Calls per recipient at most, retries included. Default 1.",
124304
- maximum: 10,
124305
- minimum: 1,
124306
- type: "integer"
124307
- },
124308
- metadata: {
124309
- description: "Your own keys and labels for this resource (up to 50 keys of 40 characters; values up to 500 characters). Raíz never interprets them.",
124310
- maxProperties: 50,
124311
- type: "object",
124312
- patternProperties: {
124313
- "^[A-Za-z0-9_.-]{1,40}$": {
124314
- maxLength: 500,
124315
- type: "string"
124316
- }
124317
- }
126345
+ description: "Before the campaign starts: the complete set, replacing whoever was there. Once it started: only adds, skipping numbers it already has."
124318
126346
  },
124319
126347
  retryAfterMinutes: {
124320
- description: "Wait before a retry. Default 60.",
126348
+ description: "Wait before a retry or reminder, up to a week.",
124321
126349
  maximum: 10080,
124322
126350
  minimum: 1,
124323
126351
  type: "integer"
124324
126352
  },
124325
126353
  retryOn: {
124326
- description: 'Which results earn a retry. Default `["no_answer"]`.',
126354
+ description: "What earns another attempt: `no_answer` and `failure` on a call, `no_answer` and `not_delivered` on WhatsApp.",
124327
126355
  maxItems: 2,
124328
126356
  uniqueItems: true,
124329
126357
  type: "array",
124330
126358
  items: {
124331
- description: "`no_answer`: nobody answered, the line was busy, or the Agent heard no one. `failure`: the call was answered but its analysis judged it unsuccessful.",
126359
+ description: "On a call, `no_answer`: nobody answered, the line was busy, or the Agent heard no one; `failure`: it was answered but its analysis judged it unsuccessful. On WhatsApp, `no_answer`: it arrived and the person has not replied once `retryAfterMinutes` pass; `not_delivered`: it did not arrive.",
124332
126360
  anyOf: [
124333
126361
  {
124334
126362
  const: "no_answer",
@@ -124337,72 +126365,17 @@ var schemaComponents = {
124337
126365
  {
124338
126366
  const: "failure",
124339
126367
  type: "string"
126368
+ },
126369
+ {
126370
+ const: "not_delivered",
126371
+ type: "string"
124340
126372
  }
124341
126373
  ]
124342
126374
  }
124343
126375
  },
124344
- scheduledEndAt: {
124345
- anyOf: [
124346
- {
124347
- description: "No call starts after this instant.",
124348
- format: "date-time",
124349
- type: "string"
124350
- },
124351
- {
124352
- type: "null"
124353
- }
124354
- ]
124355
- },
124356
- scheduledStartAt: {
124357
- anyOf: [
124358
- {
124359
- description: "No call starts before this instant, even once the campaign is started.",
124360
- format: "date-time",
124361
- type: "string"
124362
- },
124363
- {
124364
- type: "null"
124365
- }
124366
- ]
124367
- },
124368
- timeZone: {
124369
- description: "IANA time zone name.",
124370
- examples: [
124371
- "America/Bogota"
124372
- ],
124373
- maxLength: 64,
124374
- pattern: "^[A-Za-z]+(/[A-Za-z0-9_+-]+)*$",
124375
- type: "string"
124376
- },
124377
- agentId: {
124378
- description: "Changes only before the campaign starts.",
124379
- examples: [
124380
- "agt_01m45h8q2rf3t9w6y7z0b1c2d3"
124381
- ],
124382
- pattern: "^agt_(?:[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}))$",
124383
- type: "string"
124384
- },
124385
- expectedVersion: {
124386
- description: "The `version` you read. When present, the change applies only if nobody changed the resource since; otherwise it fails with VERSION_CONFLICT.",
124387
- minimum: 1,
124388
- type: "integer"
124389
- },
124390
- name: {
124391
- maxLength: 200,
124392
- minLength: 1,
124393
- type: "string"
124394
- },
124395
- paused: {
124396
- description: "Pause (`true`) or resume (`false`) a started campaign. A campaign that never started is started with `startCampaign` (INVALID_STATE here).",
124397
- type: "boolean"
124398
- },
124399
- recipients: {
124400
- maxItems: 1e4,
124401
- type: "array",
124402
- items: {
124403
- $ref: "#/components/schemas/RaizCampaignRecipientInput"
124404
- },
124405
- description: "Before the campaign starts: the complete set, matched by `address` (listed recipients get these values, new ones are added, missing ones are removed). Once it started: only additions, so a long list can be sent in batches; addresses already in the campaign are left as they are, listed or not."
126376
+ template: {
126377
+ $ref: "#/components/schemas/RaizCampaignTemplateInput",
126378
+ description: "WhatsApp only. On a started campaign it applies to the messages still to go."
124406
126379
  },
124407
126380
  campaignId: {
124408
126381
  description: "Campaign id.",
@@ -127926,7 +129899,7 @@ var schemaComponents = {
127926
129899
  type: "array",
127927
129900
  items: {
127928
129901
  $ref: "#/components/schemas/RaizContactHoursWindow",
127929
- description: "On these days, calls start between `from` and `to`."
129902
+ description: "On these days, calls start and messages leave between `from` and `to`."
127930
129903
  }
127931
129904
  },
127932
129905
  metadata: {
@@ -128034,7 +130007,7 @@ var schemaComponents = {
128034
130007
  type: "array",
128035
130008
  items: {
128036
130009
  $ref: "#/components/schemas/RaizContactHoursWindow",
128037
- description: "On these days, calls start between `from` and `to`."
130010
+ description: "On these days, calls start and messages leave between `from` and `to`."
128038
130011
  }
128039
130012
  },
128040
130013
  metadata: {
@@ -128135,7 +130108,7 @@ var schemaComponents = {
128135
130108
  type: "array",
128136
130109
  items: {
128137
130110
  $ref: "#/components/schemas/RaizContactHoursWindow",
128138
- description: "On these days, calls start between `from` and `to`."
130111
+ description: "On these days, calls start and messages leave between `from` and `to`."
128139
130112
  }
128140
130113
  },
128141
130114
  expectedVersion: {
@@ -129189,6 +131162,11 @@ var schemaComponents = {
129189
131162
  pattern: "^con_[0-9a-z]{26}$",
129190
131163
  type: "string"
129191
131164
  },
131165
+ providerId: {
131166
+ pattern: "^[1-9][0-9]{0,8}$",
131167
+ description: "An exact provider context id from getConnection(expand: providers), required when the source has no selected default.",
131168
+ type: "string"
131169
+ },
129192
131170
  documentType: {
129193
131171
  anyOf: [
129194
131172
  {
@@ -129282,6 +131260,11 @@ var schemaComponents = {
129282
131260
  pattern: "^con_[0-9a-z]{26}$",
129283
131261
  type: "string",
129284
131262
  description: "The connection id."
131263
+ },
131264
+ expand: {
131265
+ const: "providers",
131266
+ type: "string",
131267
+ description: "The expand."
129285
131268
  }
129286
131269
  },
129287
131270
  required: [
@@ -129324,12 +131307,24 @@ var schemaComponents = {
129324
131307
  type: "string"
129325
131308
  },
129326
131309
  documentType: {
129327
- description: "Document type. Defaults to CC.",
131310
+ description: "Document type. Defaults to CC. CE, RC and TI are read through the same form.",
129328
131311
  anyOf: [
129329
131312
  {
129330
131313
  const: "CC",
129331
131314
  type: "string"
129332
131315
  },
131316
+ {
131317
+ const: "CE",
131318
+ type: "string"
131319
+ },
131320
+ {
131321
+ const: "RC",
131322
+ type: "string"
131323
+ },
131324
+ {
131325
+ const: "TI",
131326
+ type: "string"
131327
+ },
129333
131328
  {
129334
131329
  type: "null"
129335
131330
  }
@@ -129912,12 +131907,24 @@ var schemaComponents = {
129912
131907
  type: "string"
129913
131908
  },
129914
131909
  documentType: {
129915
- description: "Document type. Defaults to CC.",
131910
+ description: "Document type. Defaults to CC. CE, RC and TI are read through the same form.",
129916
131911
  anyOf: [
129917
131912
  {
129918
131913
  const: "CC",
129919
131914
  type: "string"
129920
131915
  },
131916
+ {
131917
+ const: "CE",
131918
+ type: "string"
131919
+ },
131920
+ {
131921
+ const: "RC",
131922
+ type: "string"
131923
+ },
131924
+ {
131925
+ const: "TI",
131926
+ type: "string"
131927
+ },
129921
131928
  {
129922
131929
  type: "null"
129923
131930
  }
@@ -132068,9 +134075,9 @@ var schemaComponents = {
132068
134075
  // src/generated/generation.json
132069
134076
  var generation_default = {
132070
134077
  formatVersion: 6,
132071
- release: "1.20261105.142412",
132072
- openapiSha256: "619001af7ae00bd7ef54abf1415d83bef1e92fd656227d892cebc7dea363204b",
132073
- openapiContentSha256: "12f082ea2aa4a683c8d9b2cd0da26addee085672cdc67b386ea5da4596f08152",
134078
+ release: "1.20261105.193553",
134079
+ openapiSha256: "baa84db132222f324916e899c97f5593b7f5d84b108ea47063ce740c6b2e0077",
134080
+ openapiContentSha256: "a7fefc26e04f60595cdd40d058867d090d19e0976d5bae8aa3d2bcd2d3b2b7ff",
132074
134081
  forge: {
132075
134082
  repository: "https://github.com/cloudflare/forge",
132076
134083
  commit: "7f86447210b7bea3779bfdab3cd5655eade0eadb",
@@ -132083,7 +134090,7 @@ var generation_default = {
132083
134090
  outputs: [
132084
134091
  {
132085
134092
  path: "src/generated/commands.ts",
132086
- sha256: "2a06c28be1d498261df2c2167f162dd9565129490b1efb1bfe7ae55f23bc57b5"
134093
+ sha256: "d9ac0f990b23a5db0bf0b5d201b068bea6066508345040d7f37ed589822d1362"
132087
134094
  }
132088
134095
  ]
132089
134096
  };
@@ -133683,7 +135690,7 @@ ${name}`);
133683
135690
  }
133684
135691
 
133685
135692
  // src/index.ts
133686
- var VERSION = "3.38.0";
135693
+ var VERSION = "3.39.0";
133687
135694
  var RELEASE = generation_default.release;
133688
135695
  var commands2 = { ...commands, ...accountOperatorCommands };
133689
135696
  var SDK_PATHS = new Map(Object.values(commands2).map((command) => [command.operation, command.sdkPath]));