@vitrina/api 14.14.0 → 14.15.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.
- package/dist/index.d.cts +283 -6
- package/dist/index.d.ts +283 -6
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -22097,7 +22097,7 @@ interface paths {
|
|
|
22097
22097
|
pipeline_id?: string;
|
|
22098
22098
|
stage_id?: string;
|
|
22099
22099
|
status?: "open" | "won" | "lost" | "unqualified";
|
|
22100
|
-
source?: "conversation" | "marketplace" | "manual" | "import" | "ai_agent" | "chileautos" | "yapo" | "mercadolibre" | "website" | "facebook_marketplace" | "form";
|
|
22100
|
+
source?: "conversation" | "marketplace" | "manual" | "import" | "ai_agent" | "chileautos" | "yapo" | "mercadolibre" | "website" | "facebook_marketplace" | "form" | "campaign";
|
|
22101
22101
|
intent?: "buy" | "sell" | "financing" | "trade_in";
|
|
22102
22102
|
owner_user_id?: string;
|
|
22103
22103
|
team_id?: string;
|
|
@@ -22428,7 +22428,7 @@ interface paths {
|
|
|
22428
22428
|
title: string;
|
|
22429
22429
|
notes?: string | null;
|
|
22430
22430
|
/** @enum {string} */
|
|
22431
|
-
source?: "conversation" | "marketplace" | "manual" | "import" | "ai_agent" | "chileautos" | "yapo" | "mercadolibre" | "website" | "facebook_marketplace";
|
|
22431
|
+
source?: "conversation" | "marketplace" | "manual" | "import" | "ai_agent" | "chileautos" | "yapo" | "mercadolibre" | "website" | "facebook_marketplace" | "campaign";
|
|
22432
22432
|
/** @enum {string} */
|
|
22433
22433
|
intent?: "buy" | "sell" | "financing" | "trade_in";
|
|
22434
22434
|
source_ref?: string | null;
|
|
@@ -86942,6 +86942,7 @@ interface paths {
|
|
|
86942
86942
|
/** @description Pilot: send this many random recipients first, then pause (paused_reason "pilot") until resumed. Null = no pilot. */
|
|
86943
86943
|
pilot_size?: number | null;
|
|
86944
86944
|
send_window?: components["schemas"]["CampaignSendWindow"] & unknown;
|
|
86945
|
+
send_schedule?: components["schemas"]["CampaignSendSchedule"] & unknown;
|
|
86945
86946
|
};
|
|
86946
86947
|
};
|
|
86947
86948
|
};
|
|
@@ -87078,6 +87079,8 @@ interface paths {
|
|
|
87078
87079
|
* With `recipients`, `plan` says how a campaign to that many people would go: `sendable_now` (its fair share of the headroom, shared with the other campaigns sending on the number), `windows` (sending days), `estimated_completion_at` (continuations move into the workspace’s marketing hours) and the `recommended_send_mode`. `campaign_id` makes a saved campaign’s own recent sends count as its. 404 for a number that is not this workspace’s, 400 for one that is not WhatsApp.
|
|
87079
87080
|
*
|
|
87080
87081
|
* `send_window` (JSON-encoded, optional) plans against that window — `null` = the workspace default; absent = the saved campaign’s effective window (with `campaign_id`), else the workspace default. The plan then answers `send_window` (resolved), `window_label` («lun–vie 10:00–18:00 (America/Santiago)») and, when it is outside the window now, `next_window_opens_at` — the first batch, `next_batch_at` and `estimated_completion_at` start there, and every continuation lands inside the window. An invalid window is a 400 with `field_errors` (`send_window.start`, …).
|
|
87082
|
+
*
|
|
87083
|
+
* `send_schedule` (JSON-encoded `CampaignSendSchedule`, optional; `null` = none; absent = the saved campaign’s) plans against explicit instants instead (ADR 0139): `plan.schedule` simulates it batch by batch against the rolling 24 h — `planned` per slot, per-slot `warnings` (`budget_not_freed`, `partial_budget`, `outside_contact_hours`, `in_the_past`), `covers_all`, `completes_at` and `issues` (`slot_in_past`, `duplicate_slot`, `too_close` with a `suggested_at`, `uncovered`, `asap_not_allowed`). The window fields are then null: a schedule replaces the window.
|
|
87081
87084
|
*/
|
|
87082
87085
|
get: {
|
|
87083
87086
|
parameters: {
|
|
@@ -87087,6 +87090,8 @@ interface paths {
|
|
|
87087
87090
|
campaign_id?: string;
|
|
87088
87091
|
/** @description JSON-encoded CampaignSendWindow to plan with (e.g. {"timezone":"America/Santiago","days":[1,2,3,4,5],"start":"10:00","end":"18:00"}), or `null` for the workspace default. Absent = the campaign's effective window (with campaign_id), else the workspace default. */
|
|
87089
87092
|
send_window?: string;
|
|
87093
|
+
/** @description JSON-encoded CampaignSendSchedule to plan with (e.g. {"kind":"daily","timezone":"America/Santiago","start_date":"2026-10-14","time":"20:00"}), or `null` for none. Absent = the saved campaign's schedule (with campaign_id), else none. With a schedule, `plan.schedule` carries the simulation. */
|
|
87094
|
+
send_schedule?: string;
|
|
87090
87095
|
};
|
|
87091
87096
|
header?: never;
|
|
87092
87097
|
path?: never;
|
|
@@ -87221,7 +87226,7 @@ interface paths {
|
|
|
87221
87226
|
};
|
|
87222
87227
|
/**
|
|
87223
87228
|
* Fetch one campaign with its stats
|
|
87224
|
-
* @description The campaign plus its delivery counters — this is the read to poll while a send is in progress. A WhatsApp campaign that is not finished also carries `pacing` (ADR 0129): its number’s tier and `limit_per_24h`, `sent_last_24h`, `pending`, `waiting` (a paced campaign waiting for the window) with `next_batch_at`, `estimated_completion_at` and `windows_remaining`, plus the effective `send_window` (`send_window_source`: campaign | workspace), its `window_label` and `next_window_opens_at` (outside the window now); null when the budget cannot be read.
|
|
87229
|
+
* @description The campaign plus its delivery counters — this is the read to poll while a send is in progress. A WhatsApp campaign that is not finished also carries `pacing` (ADR 0129): its number’s tier and `limit_per_24h`, `sent_last_24h`, `pending`, `waiting` (a paced campaign waiting for the window) with `next_batch_at`, `estimated_completion_at` and `windows_remaining`, plus the effective `send_window` (`send_window_source`: campaign | workspace), its `window_label` and `next_window_opens_at` (outside the window now); null when the budget cannot be read. With a `send_schedule` (ADR 0139) it also carries `schedule_label`, `next_slot_at`, `batches` (what each slot did: planned / sent / failed / skipped_reason, oldest first) and `schedule` — the pending part simulated slot by slot.
|
|
87225
87230
|
*/
|
|
87226
87231
|
get: {
|
|
87227
87232
|
parameters: {
|
|
@@ -87455,7 +87460,7 @@ interface paths {
|
|
|
87455
87460
|
head?: never;
|
|
87456
87461
|
/**
|
|
87457
87462
|
* Edit a campaign
|
|
87458
|
-
* @description Legal only while the campaign is `draft` or `scheduled`; from any other status this is a **409** — except a body carrying ONLY `send_window`, which is also legal while `paused` or `sending` and takes effect at the next batch (a campaign waiting for the old window re-plans at once). At least one field is required. `channel` is absent from the body on purpose — a campaign’s channel is fixed at creation, since the content shape depends on it.
|
|
87463
|
+
* @description Legal only while the campaign is `draft` or `scheduled`; from any other status this is a **409** — except a body carrying ONLY `send_window` and/or `send_schedule`, which is also legal while `paused` or `sending` and takes effect at the next batch (a campaign waiting for the old window or slot re-plans at once). At least one field is required. A `send_schedule` with `send_mode: asap` (set or stored) is a 400 `schedule_requires_paced`; a slot in the past or two slots at once a 400 `schedule_invalid`. `channel` is absent from the body on purpose — a campaign’s channel is fixed at creation, since the content shape depends on it.
|
|
87459
87464
|
*/
|
|
87460
87465
|
patch: {
|
|
87461
87466
|
parameters: {
|
|
@@ -87512,6 +87517,7 @@ interface paths {
|
|
|
87512
87517
|
/** @description Pilot: send this many random recipients first, then pause (paused_reason "pilot") until resumed. Null = no pilot. */
|
|
87513
87518
|
pilot_size?: number | null;
|
|
87514
87519
|
send_window?: components["schemas"]["CampaignSendWindow"] & unknown;
|
|
87520
|
+
send_schedule?: components["schemas"]["CampaignSendSchedule"] & unknown;
|
|
87515
87521
|
};
|
|
87516
87522
|
};
|
|
87517
87523
|
};
|
|
@@ -87825,7 +87831,9 @@ interface paths {
|
|
|
87825
87831
|
*
|
|
87826
87832
|
* Legal from `draft` and `scheduled`; a 409 from anywhere else. Sending is not undoable once recipients start receiving — `/pause` stops the remainder, it does not recall what went out.
|
|
87827
87833
|
*
|
|
87828
|
-
* The response is the campaign plus `started: true` and `waiting_for_window_until`: a paced campaign (or a pilot) sent outside its send window sends nothing yet and waits for the window — this is when it opens; null = the first batch leaves now.
|
|
87834
|
+
* The response is the campaign plus `started: true` and `waiting_for_window_until`: a paced campaign (or a pilot) sent outside its send window sends nothing yet and waits for the window — this is when it opens; null = the first batch leaves now. With a `send_schedule` it is the first slot.
|
|
87835
|
+
*
|
|
87836
|
+
* Optional body `{ send_schedule }` (ADR 0139): sets the schedule and sends in one step. The «¿Lista para enviar?» checks (`GET /campaigns/{id}/preflight`) run again here: while any is `block` the answer is a **409 `preflight_blocked`** with the checks in `error.details.checks`, and nothing changes.
|
|
87829
87837
|
*/
|
|
87830
87838
|
post: {
|
|
87831
87839
|
parameters: {
|
|
@@ -87839,7 +87847,21 @@ interface paths {
|
|
|
87839
87847
|
};
|
|
87840
87848
|
cookie?: never;
|
|
87841
87849
|
};
|
|
87842
|
-
requestBody?:
|
|
87850
|
+
requestBody?: {
|
|
87851
|
+
content: {
|
|
87852
|
+
/**
|
|
87853
|
+
* @example {
|
|
87854
|
+
* "send_schedule": {
|
|
87855
|
+
* "kind": "daily",
|
|
87856
|
+
* "timezone": "America/Santiago",
|
|
87857
|
+
* "start_date": "2026-10-01",
|
|
87858
|
+
* "time": "20:00"
|
|
87859
|
+
* }
|
|
87860
|
+
* }
|
|
87861
|
+
*/
|
|
87862
|
+
"application/json": components["schemas"]["CampaignSendNowBody"];
|
|
87863
|
+
};
|
|
87864
|
+
};
|
|
87843
87865
|
responses: {
|
|
87844
87866
|
/** @description The campaign, now scheduled, and whether it waits for its window */
|
|
87845
87867
|
200: {
|
|
@@ -87968,6 +87990,165 @@ interface paths {
|
|
|
87968
87990
|
patch?: never;
|
|
87969
87991
|
trace?: never;
|
|
87970
87992
|
};
|
|
87993
|
+
"/campaigns/{id}/preflight": {
|
|
87994
|
+
parameters: {
|
|
87995
|
+
query?: never;
|
|
87996
|
+
header?: never;
|
|
87997
|
+
path?: never;
|
|
87998
|
+
cookie?: never;
|
|
87999
|
+
};
|
|
88000
|
+
/**
|
|
88001
|
+
* «¿Lista para enviar?» — the checks before a send
|
|
88002
|
+
* @description Everything worth knowing before pressing send, as a check list (ADR 0139): each `{ key, status: ok | warn | block, title_es/_en, detail_es/_en?, href? }`. WhatsApp: `template_approved`, `recipients` (reachable vs not), `header_media`, `test_sent` (a test in the last 7 days), `messaging_tier`, `number_quality`, `schedule` (the simulation’s issues), `opt_out` (a quick-reply button to say no), `recent_campaign_overlap` (people who got a campaign in the last 7 days). Email: `template`, `recipients`, `unsubscribe`, `test_sent`, `sender_domain`. `ready` = no `block`; `/send` refuses with 409 `preflight_blocked` otherwise. `summary` says how it will go (recipients, schedule label, first batch, completion, batches) and `plan` is the schedule simulated («Ver plan»). Reads only.
|
|
88003
|
+
*/
|
|
88004
|
+
get: {
|
|
88005
|
+
parameters: {
|
|
88006
|
+
query?: never;
|
|
88007
|
+
header?: never;
|
|
88008
|
+
path: {
|
|
88009
|
+
id: string;
|
|
88010
|
+
};
|
|
88011
|
+
cookie?: never;
|
|
88012
|
+
};
|
|
88013
|
+
requestBody?: never;
|
|
88014
|
+
responses: {
|
|
88015
|
+
/** @description The checks, the summary and the plan */
|
|
88016
|
+
200: {
|
|
88017
|
+
headers: {
|
|
88018
|
+
[name: string]: unknown;
|
|
88019
|
+
};
|
|
88020
|
+
content: {
|
|
88021
|
+
/**
|
|
88022
|
+
* @example {
|
|
88023
|
+
* "data": {
|
|
88024
|
+
* "ready": true,
|
|
88025
|
+
* "checks": [
|
|
88026
|
+
* {
|
|
88027
|
+
* "key": "template_approved",
|
|
88028
|
+
* "status": "ok",
|
|
88029
|
+
* "title_es": "Plantilla aprobada por Meta",
|
|
88030
|
+
* "title_en": "Template approved by Meta",
|
|
88031
|
+
* "detail_es": "promo_octubre",
|
|
88032
|
+
* "detail_en": "promo_octubre"
|
|
88033
|
+
* },
|
|
88034
|
+
* {
|
|
88035
|
+
* "key": "recipients",
|
|
88036
|
+
* "status": "warn",
|
|
88037
|
+
* "title_es": "Se enviará a 801 personas",
|
|
88038
|
+
* "title_en": "It will go to 801 people",
|
|
88039
|
+
* "detail_es": "50 no la recibirán: sin número válido, duplicadas o pidieron no recibir mensajes.",
|
|
88040
|
+
* "detail_en": "50 will not get it: no valid number, duplicates or opted out.",
|
|
88041
|
+
* "href": "/campaigns/audiences/7a7a7a7a-0000-4000-8000-0000000000a1"
|
|
88042
|
+
* },
|
|
88043
|
+
* {
|
|
88044
|
+
* "key": "messaging_tier",
|
|
88045
|
+
* "status": "ok",
|
|
88046
|
+
* "title_es": "Tu número puede iniciar 250 conversaciones cada 24 h",
|
|
88047
|
+
* "title_en": "Your number can start 250 conversations every 24 h",
|
|
88048
|
+
* "detail_es": "Las campañas dejan 50 libres para recordatorios y otros mensajes.",
|
|
88049
|
+
* "detail_en": "Campaigns leave 50 free for reminders and other messages."
|
|
88050
|
+
* }
|
|
88051
|
+
* ],
|
|
88052
|
+
* "summary": {
|
|
88053
|
+
* "recipients": 801,
|
|
88054
|
+
* "channel": "whatsapp",
|
|
88055
|
+
* "template_name": "promo_octubre",
|
|
88056
|
+
* "schedule_label_es": "Todos los días a las 20:00 (America/Santiago) desde hoy",
|
|
88057
|
+
* "schedule_label_en": "Every day at 20:00 (America/Santiago) from today",
|
|
88058
|
+
* "first_batch_at": "2026-10-01T23:00:00.000Z",
|
|
88059
|
+
* "completes_at": "2026-10-05T23:00:00.000Z",
|
|
88060
|
+
* "batches_count": 5,
|
|
88061
|
+
* "limit_per_24h": 250,
|
|
88062
|
+
* "reserve": 50
|
|
88063
|
+
* },
|
|
88064
|
+
* "plan": {
|
|
88065
|
+
* "batches": [
|
|
88066
|
+
* {
|
|
88067
|
+
* "at": "2026-10-01T23:00:00.000Z",
|
|
88068
|
+
* "local": "jue 1 oct, 20:00",
|
|
88069
|
+
* "planned": 200,
|
|
88070
|
+
* "slot_index": null,
|
|
88071
|
+
* "warnings": []
|
|
88072
|
+
* }
|
|
88073
|
+
* ],
|
|
88074
|
+
* "covers_all": true,
|
|
88075
|
+
* "remaining_after_last": 0,
|
|
88076
|
+
* "completes_at": "2026-10-05T23:00:00.000Z",
|
|
88077
|
+
* "issues": [],
|
|
88078
|
+
* "tier_unknown": false
|
|
88079
|
+
* }
|
|
88080
|
+
* }
|
|
88081
|
+
* }
|
|
88082
|
+
*/
|
|
88083
|
+
"application/json": {
|
|
88084
|
+
data: components["schemas"]["CampaignPreflight"];
|
|
88085
|
+
};
|
|
88086
|
+
};
|
|
88087
|
+
};
|
|
88088
|
+
/** @description Validation error */
|
|
88089
|
+
400: {
|
|
88090
|
+
headers: {
|
|
88091
|
+
[name: string]: unknown;
|
|
88092
|
+
};
|
|
88093
|
+
content: {
|
|
88094
|
+
"application/json": components["schemas"]["Error"];
|
|
88095
|
+
};
|
|
88096
|
+
};
|
|
88097
|
+
/** @description Unauthorized */
|
|
88098
|
+
401: {
|
|
88099
|
+
headers: {
|
|
88100
|
+
[name: string]: unknown;
|
|
88101
|
+
};
|
|
88102
|
+
content: {
|
|
88103
|
+
"application/json": components["schemas"]["Error"];
|
|
88104
|
+
};
|
|
88105
|
+
};
|
|
88106
|
+
/** @description Forbidden */
|
|
88107
|
+
403: {
|
|
88108
|
+
headers: {
|
|
88109
|
+
[name: string]: unknown;
|
|
88110
|
+
};
|
|
88111
|
+
content: {
|
|
88112
|
+
"application/json": components["schemas"]["Error"];
|
|
88113
|
+
};
|
|
88114
|
+
};
|
|
88115
|
+
/** @description Not found */
|
|
88116
|
+
404: {
|
|
88117
|
+
headers: {
|
|
88118
|
+
[name: string]: unknown;
|
|
88119
|
+
};
|
|
88120
|
+
content: {
|
|
88121
|
+
"application/json": components["schemas"]["Error"];
|
|
88122
|
+
};
|
|
88123
|
+
};
|
|
88124
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
88125
|
+
409: {
|
|
88126
|
+
headers: {
|
|
88127
|
+
[name: string]: unknown;
|
|
88128
|
+
};
|
|
88129
|
+
content: {
|
|
88130
|
+
"application/json": components["schemas"]["Error"];
|
|
88131
|
+
};
|
|
88132
|
+
};
|
|
88133
|
+
/** @description Rate limited */
|
|
88134
|
+
429: {
|
|
88135
|
+
headers: {
|
|
88136
|
+
[name: string]: unknown;
|
|
88137
|
+
};
|
|
88138
|
+
content: {
|
|
88139
|
+
"application/json": components["schemas"]["Error"];
|
|
88140
|
+
};
|
|
88141
|
+
};
|
|
88142
|
+
};
|
|
88143
|
+
};
|
|
88144
|
+
put?: never;
|
|
88145
|
+
post?: never;
|
|
88146
|
+
delete?: never;
|
|
88147
|
+
options?: never;
|
|
88148
|
+
head?: never;
|
|
88149
|
+
patch?: never;
|
|
88150
|
+
trace?: never;
|
|
88151
|
+
};
|
|
87971
88152
|
"/campaigns/{id}/pause": {
|
|
87972
88153
|
parameters: {
|
|
87973
88154
|
query?: never;
|
|
@@ -180456,6 +180637,63 @@ interface components {
|
|
|
180456
180637
|
/** @description Local closing time, HH:MM (exclusive); later than start. */
|
|
180457
180638
|
end: string;
|
|
180458
180639
|
} | null;
|
|
180640
|
+
/** @description The schedule this plan used (ADR 0139); null = none. */
|
|
180641
|
+
CampaignSendSchedule: {
|
|
180642
|
+
/** @enum {string} */
|
|
180643
|
+
kind: "daily";
|
|
180644
|
+
/** @description IANA zone, e.g. America/Santiago. */
|
|
180645
|
+
timezone: string;
|
|
180646
|
+
/** @description First day (local), YYYY-MM-DD. */
|
|
180647
|
+
start_date: string;
|
|
180648
|
+
/** @description Local time of every batch, HH:MM. */
|
|
180649
|
+
time: string;
|
|
180650
|
+
} | {
|
|
180651
|
+
/** @enum {string} */
|
|
180652
|
+
kind: "slots";
|
|
180653
|
+
/** @description IANA zone, e.g. America/Santiago. */
|
|
180654
|
+
timezone: string;
|
|
180655
|
+
/** @description The batches, one per instant (stored sorted ascending). */
|
|
180656
|
+
slots: {
|
|
180657
|
+
/** @description Local date, YYYY-MM-DD. */
|
|
180658
|
+
date: string;
|
|
180659
|
+
/** @description Local time, HH:MM. */
|
|
180660
|
+
time: string;
|
|
180661
|
+
}[];
|
|
180662
|
+
/**
|
|
180663
|
+
* @description Recipients left after the last slot: continue every day at the last slot’s time, or pause (schedule_exhausted).
|
|
180664
|
+
* @enum {string}
|
|
180665
|
+
*/
|
|
180666
|
+
after_last: "continue_daily" | "pause";
|
|
180667
|
+
} | null;
|
|
180668
|
+
/** @description With a schedule: batch by batch, against the budget (ADR 0139). Null without one. */
|
|
180669
|
+
CampaignScheduleSimulation: {
|
|
180670
|
+
batches: {
|
|
180671
|
+
/** @description The slot instant (ISO). */
|
|
180672
|
+
at: string;
|
|
180673
|
+
/** @description The slot on the schedule’s clock, e.g. «jue 15 oct, 20:00». */
|
|
180674
|
+
local: string;
|
|
180675
|
+
/** @description People this batch would send to. */
|
|
180676
|
+
planned: number;
|
|
180677
|
+
/** @description Index into the sorted `slots`; null for a daily batch. */
|
|
180678
|
+
slot_index: number | null;
|
|
180679
|
+
warnings: ("budget_not_freed" | "partial_budget" | "outside_contact_hours" | "in_the_past")[];
|
|
180680
|
+
}[];
|
|
180681
|
+
covers_all: boolean;
|
|
180682
|
+
remaining_after_last: number;
|
|
180683
|
+
/** @description The slot that sends the last person; null when it never does. */
|
|
180684
|
+
completes_at: string | null;
|
|
180685
|
+
issues: {
|
|
180686
|
+
/** @enum {string} */
|
|
180687
|
+
code: "slot_in_past" | "duplicate_slot" | "too_close" | "uncovered" | "asap_not_allowed";
|
|
180688
|
+
slot_index?: number;
|
|
180689
|
+
message_es: string;
|
|
180690
|
+
message_en: string;
|
|
180691
|
+
/** @description The earliest instant that would work (ISO). */
|
|
180692
|
+
suggested_at?: string;
|
|
180693
|
+
}[];
|
|
180694
|
+
/** @description No tier known for the number: no cap applied (all at the first slot). */
|
|
180695
|
+
tier_unknown: boolean;
|
|
180696
|
+
} | null;
|
|
180459
180697
|
CampaignSendPlan: {
|
|
180460
180698
|
recipients: number;
|
|
180461
180699
|
sendable_now: number | null;
|
|
@@ -180475,6 +180713,10 @@ interface components {
|
|
|
180475
180713
|
window_label: string | null;
|
|
180476
180714
|
/** @description Set when it is outside the window now: the first batch waits until then. */
|
|
180477
180715
|
next_window_opens_at: string | null;
|
|
180716
|
+
send_schedule?: components["schemas"]["CampaignSendSchedule"];
|
|
180717
|
+
/** @description e.g. «Todos los días a las 20:00 (America/Santiago) desde hoy». */
|
|
180718
|
+
schedule_label?: string | null;
|
|
180719
|
+
schedule?: components["schemas"]["CampaignScheduleSimulation"];
|
|
180478
180720
|
} | null;
|
|
180479
180721
|
CampaignMessagingBudget: {
|
|
180480
180722
|
budget: components["schemas"]["MessagingBudget"];
|
|
@@ -180486,6 +180728,41 @@ interface components {
|
|
|
180486
180728
|
/** @description Outside the send window: nothing leaves until this instant (the window opening). Null = sends now. */
|
|
180487
180729
|
waiting_for_window_until: string | null;
|
|
180488
180730
|
};
|
|
180731
|
+
CampaignSendNowBody: {
|
|
180732
|
+
send_schedule?: components["schemas"]["CampaignSendSchedule"] & unknown;
|
|
180733
|
+
};
|
|
180734
|
+
CampaignPreflight: {
|
|
180735
|
+
/** @description No check is `block`. */
|
|
180736
|
+
ready: boolean;
|
|
180737
|
+
checks: {
|
|
180738
|
+
/** @description template_approved | recipients | header_media | test_sent | messaging_tier | number_quality | schedule | opt_out | recent_campaign_overlap (WhatsApp); template | recipients | unsubscribe | test_sent | sender_domain (email). */
|
|
180739
|
+
key: string;
|
|
180740
|
+
/** @enum {string} */
|
|
180741
|
+
status: "ok" | "warn" | "block";
|
|
180742
|
+
title_es: string;
|
|
180743
|
+
title_en: string;
|
|
180744
|
+
detail_es?: string;
|
|
180745
|
+
detail_en?: string;
|
|
180746
|
+
/** @description App-relative link to fix it, e.g. the template or the audience. */
|
|
180747
|
+
href?: string;
|
|
180748
|
+
}[];
|
|
180749
|
+
summary: {
|
|
180750
|
+
recipients: number;
|
|
180751
|
+
/** @enum {string} */
|
|
180752
|
+
channel: "whatsapp" | "email";
|
|
180753
|
+
template_name?: string;
|
|
180754
|
+
schedule_label_es: string;
|
|
180755
|
+
schedule_label_en: string;
|
|
180756
|
+
first_batch_at: string | null;
|
|
180757
|
+
completes_at: string | null;
|
|
180758
|
+
batches_count: number | null;
|
|
180759
|
+
/** @description The number’s Meta limit (WhatsApp); null = no cap known. */
|
|
180760
|
+
limit_per_24h?: number | null;
|
|
180761
|
+
/** @description Kept free for reminders and other senders (WhatsApp). */
|
|
180762
|
+
reserve?: number;
|
|
180763
|
+
};
|
|
180764
|
+
plan: components["schemas"]["CampaignScheduleSimulation"] & unknown;
|
|
180765
|
+
};
|
|
180489
180766
|
CampaignResumeBody: {
|
|
180490
180767
|
/**
|
|
180491
180768
|
* @description paced: continue automatically across the rolling 24 h windows; asap: send what fits now and pause (ADR 0129).
|
package/dist/index.d.ts
CHANGED
|
@@ -22097,7 +22097,7 @@ interface paths {
|
|
|
22097
22097
|
pipeline_id?: string;
|
|
22098
22098
|
stage_id?: string;
|
|
22099
22099
|
status?: "open" | "won" | "lost" | "unqualified";
|
|
22100
|
-
source?: "conversation" | "marketplace" | "manual" | "import" | "ai_agent" | "chileautos" | "yapo" | "mercadolibre" | "website" | "facebook_marketplace" | "form";
|
|
22100
|
+
source?: "conversation" | "marketplace" | "manual" | "import" | "ai_agent" | "chileautos" | "yapo" | "mercadolibre" | "website" | "facebook_marketplace" | "form" | "campaign";
|
|
22101
22101
|
intent?: "buy" | "sell" | "financing" | "trade_in";
|
|
22102
22102
|
owner_user_id?: string;
|
|
22103
22103
|
team_id?: string;
|
|
@@ -22428,7 +22428,7 @@ interface paths {
|
|
|
22428
22428
|
title: string;
|
|
22429
22429
|
notes?: string | null;
|
|
22430
22430
|
/** @enum {string} */
|
|
22431
|
-
source?: "conversation" | "marketplace" | "manual" | "import" | "ai_agent" | "chileautos" | "yapo" | "mercadolibre" | "website" | "facebook_marketplace";
|
|
22431
|
+
source?: "conversation" | "marketplace" | "manual" | "import" | "ai_agent" | "chileautos" | "yapo" | "mercadolibre" | "website" | "facebook_marketplace" | "campaign";
|
|
22432
22432
|
/** @enum {string} */
|
|
22433
22433
|
intent?: "buy" | "sell" | "financing" | "trade_in";
|
|
22434
22434
|
source_ref?: string | null;
|
|
@@ -86942,6 +86942,7 @@ interface paths {
|
|
|
86942
86942
|
/** @description Pilot: send this many random recipients first, then pause (paused_reason "pilot") until resumed. Null = no pilot. */
|
|
86943
86943
|
pilot_size?: number | null;
|
|
86944
86944
|
send_window?: components["schemas"]["CampaignSendWindow"] & unknown;
|
|
86945
|
+
send_schedule?: components["schemas"]["CampaignSendSchedule"] & unknown;
|
|
86945
86946
|
};
|
|
86946
86947
|
};
|
|
86947
86948
|
};
|
|
@@ -87078,6 +87079,8 @@ interface paths {
|
|
|
87078
87079
|
* With `recipients`, `plan` says how a campaign to that many people would go: `sendable_now` (its fair share of the headroom, shared with the other campaigns sending on the number), `windows` (sending days), `estimated_completion_at` (continuations move into the workspace’s marketing hours) and the `recommended_send_mode`. `campaign_id` makes a saved campaign’s own recent sends count as its. 404 for a number that is not this workspace’s, 400 for one that is not WhatsApp.
|
|
87079
87080
|
*
|
|
87080
87081
|
* `send_window` (JSON-encoded, optional) plans against that window — `null` = the workspace default; absent = the saved campaign’s effective window (with `campaign_id`), else the workspace default. The plan then answers `send_window` (resolved), `window_label` («lun–vie 10:00–18:00 (America/Santiago)») and, when it is outside the window now, `next_window_opens_at` — the first batch, `next_batch_at` and `estimated_completion_at` start there, and every continuation lands inside the window. An invalid window is a 400 with `field_errors` (`send_window.start`, …).
|
|
87082
|
+
*
|
|
87083
|
+
* `send_schedule` (JSON-encoded `CampaignSendSchedule`, optional; `null` = none; absent = the saved campaign’s) plans against explicit instants instead (ADR 0139): `plan.schedule` simulates it batch by batch against the rolling 24 h — `planned` per slot, per-slot `warnings` (`budget_not_freed`, `partial_budget`, `outside_contact_hours`, `in_the_past`), `covers_all`, `completes_at` and `issues` (`slot_in_past`, `duplicate_slot`, `too_close` with a `suggested_at`, `uncovered`, `asap_not_allowed`). The window fields are then null: a schedule replaces the window.
|
|
87081
87084
|
*/
|
|
87082
87085
|
get: {
|
|
87083
87086
|
parameters: {
|
|
@@ -87087,6 +87090,8 @@ interface paths {
|
|
|
87087
87090
|
campaign_id?: string;
|
|
87088
87091
|
/** @description JSON-encoded CampaignSendWindow to plan with (e.g. {"timezone":"America/Santiago","days":[1,2,3,4,5],"start":"10:00","end":"18:00"}), or `null` for the workspace default. Absent = the campaign's effective window (with campaign_id), else the workspace default. */
|
|
87089
87092
|
send_window?: string;
|
|
87093
|
+
/** @description JSON-encoded CampaignSendSchedule to plan with (e.g. {"kind":"daily","timezone":"America/Santiago","start_date":"2026-10-14","time":"20:00"}), or `null` for none. Absent = the saved campaign's schedule (with campaign_id), else none. With a schedule, `plan.schedule` carries the simulation. */
|
|
87094
|
+
send_schedule?: string;
|
|
87090
87095
|
};
|
|
87091
87096
|
header?: never;
|
|
87092
87097
|
path?: never;
|
|
@@ -87221,7 +87226,7 @@ interface paths {
|
|
|
87221
87226
|
};
|
|
87222
87227
|
/**
|
|
87223
87228
|
* Fetch one campaign with its stats
|
|
87224
|
-
* @description The campaign plus its delivery counters — this is the read to poll while a send is in progress. A WhatsApp campaign that is not finished also carries `pacing` (ADR 0129): its number’s tier and `limit_per_24h`, `sent_last_24h`, `pending`, `waiting` (a paced campaign waiting for the window) with `next_batch_at`, `estimated_completion_at` and `windows_remaining`, plus the effective `send_window` (`send_window_source`: campaign | workspace), its `window_label` and `next_window_opens_at` (outside the window now); null when the budget cannot be read.
|
|
87229
|
+
* @description The campaign plus its delivery counters — this is the read to poll while a send is in progress. A WhatsApp campaign that is not finished also carries `pacing` (ADR 0129): its number’s tier and `limit_per_24h`, `sent_last_24h`, `pending`, `waiting` (a paced campaign waiting for the window) with `next_batch_at`, `estimated_completion_at` and `windows_remaining`, plus the effective `send_window` (`send_window_source`: campaign | workspace), its `window_label` and `next_window_opens_at` (outside the window now); null when the budget cannot be read. With a `send_schedule` (ADR 0139) it also carries `schedule_label`, `next_slot_at`, `batches` (what each slot did: planned / sent / failed / skipped_reason, oldest first) and `schedule` — the pending part simulated slot by slot.
|
|
87225
87230
|
*/
|
|
87226
87231
|
get: {
|
|
87227
87232
|
parameters: {
|
|
@@ -87455,7 +87460,7 @@ interface paths {
|
|
|
87455
87460
|
head?: never;
|
|
87456
87461
|
/**
|
|
87457
87462
|
* Edit a campaign
|
|
87458
|
-
* @description Legal only while the campaign is `draft` or `scheduled`; from any other status this is a **409** — except a body carrying ONLY `send_window`, which is also legal while `paused` or `sending` and takes effect at the next batch (a campaign waiting for the old window re-plans at once). At least one field is required. `channel` is absent from the body on purpose — a campaign’s channel is fixed at creation, since the content shape depends on it.
|
|
87463
|
+
* @description Legal only while the campaign is `draft` or `scheduled`; from any other status this is a **409** — except a body carrying ONLY `send_window` and/or `send_schedule`, which is also legal while `paused` or `sending` and takes effect at the next batch (a campaign waiting for the old window or slot re-plans at once). At least one field is required. A `send_schedule` with `send_mode: asap` (set or stored) is a 400 `schedule_requires_paced`; a slot in the past or two slots at once a 400 `schedule_invalid`. `channel` is absent from the body on purpose — a campaign’s channel is fixed at creation, since the content shape depends on it.
|
|
87459
87464
|
*/
|
|
87460
87465
|
patch: {
|
|
87461
87466
|
parameters: {
|
|
@@ -87512,6 +87517,7 @@ interface paths {
|
|
|
87512
87517
|
/** @description Pilot: send this many random recipients first, then pause (paused_reason "pilot") until resumed. Null = no pilot. */
|
|
87513
87518
|
pilot_size?: number | null;
|
|
87514
87519
|
send_window?: components["schemas"]["CampaignSendWindow"] & unknown;
|
|
87520
|
+
send_schedule?: components["schemas"]["CampaignSendSchedule"] & unknown;
|
|
87515
87521
|
};
|
|
87516
87522
|
};
|
|
87517
87523
|
};
|
|
@@ -87825,7 +87831,9 @@ interface paths {
|
|
|
87825
87831
|
*
|
|
87826
87832
|
* Legal from `draft` and `scheduled`; a 409 from anywhere else. Sending is not undoable once recipients start receiving — `/pause` stops the remainder, it does not recall what went out.
|
|
87827
87833
|
*
|
|
87828
|
-
* The response is the campaign plus `started: true` and `waiting_for_window_until`: a paced campaign (or a pilot) sent outside its send window sends nothing yet and waits for the window — this is when it opens; null = the first batch leaves now.
|
|
87834
|
+
* The response is the campaign plus `started: true` and `waiting_for_window_until`: a paced campaign (or a pilot) sent outside its send window sends nothing yet and waits for the window — this is when it opens; null = the first batch leaves now. With a `send_schedule` it is the first slot.
|
|
87835
|
+
*
|
|
87836
|
+
* Optional body `{ send_schedule }` (ADR 0139): sets the schedule and sends in one step. The «¿Lista para enviar?» checks (`GET /campaigns/{id}/preflight`) run again here: while any is `block` the answer is a **409 `preflight_blocked`** with the checks in `error.details.checks`, and nothing changes.
|
|
87829
87837
|
*/
|
|
87830
87838
|
post: {
|
|
87831
87839
|
parameters: {
|
|
@@ -87839,7 +87847,21 @@ interface paths {
|
|
|
87839
87847
|
};
|
|
87840
87848
|
cookie?: never;
|
|
87841
87849
|
};
|
|
87842
|
-
requestBody?:
|
|
87850
|
+
requestBody?: {
|
|
87851
|
+
content: {
|
|
87852
|
+
/**
|
|
87853
|
+
* @example {
|
|
87854
|
+
* "send_schedule": {
|
|
87855
|
+
* "kind": "daily",
|
|
87856
|
+
* "timezone": "America/Santiago",
|
|
87857
|
+
* "start_date": "2026-10-01",
|
|
87858
|
+
* "time": "20:00"
|
|
87859
|
+
* }
|
|
87860
|
+
* }
|
|
87861
|
+
*/
|
|
87862
|
+
"application/json": components["schemas"]["CampaignSendNowBody"];
|
|
87863
|
+
};
|
|
87864
|
+
};
|
|
87843
87865
|
responses: {
|
|
87844
87866
|
/** @description The campaign, now scheduled, and whether it waits for its window */
|
|
87845
87867
|
200: {
|
|
@@ -87968,6 +87990,165 @@ interface paths {
|
|
|
87968
87990
|
patch?: never;
|
|
87969
87991
|
trace?: never;
|
|
87970
87992
|
};
|
|
87993
|
+
"/campaigns/{id}/preflight": {
|
|
87994
|
+
parameters: {
|
|
87995
|
+
query?: never;
|
|
87996
|
+
header?: never;
|
|
87997
|
+
path?: never;
|
|
87998
|
+
cookie?: never;
|
|
87999
|
+
};
|
|
88000
|
+
/**
|
|
88001
|
+
* «¿Lista para enviar?» — the checks before a send
|
|
88002
|
+
* @description Everything worth knowing before pressing send, as a check list (ADR 0139): each `{ key, status: ok | warn | block, title_es/_en, detail_es/_en?, href? }`. WhatsApp: `template_approved`, `recipients` (reachable vs not), `header_media`, `test_sent` (a test in the last 7 days), `messaging_tier`, `number_quality`, `schedule` (the simulation’s issues), `opt_out` (a quick-reply button to say no), `recent_campaign_overlap` (people who got a campaign in the last 7 days). Email: `template`, `recipients`, `unsubscribe`, `test_sent`, `sender_domain`. `ready` = no `block`; `/send` refuses with 409 `preflight_blocked` otherwise. `summary` says how it will go (recipients, schedule label, first batch, completion, batches) and `plan` is the schedule simulated («Ver plan»). Reads only.
|
|
88003
|
+
*/
|
|
88004
|
+
get: {
|
|
88005
|
+
parameters: {
|
|
88006
|
+
query?: never;
|
|
88007
|
+
header?: never;
|
|
88008
|
+
path: {
|
|
88009
|
+
id: string;
|
|
88010
|
+
};
|
|
88011
|
+
cookie?: never;
|
|
88012
|
+
};
|
|
88013
|
+
requestBody?: never;
|
|
88014
|
+
responses: {
|
|
88015
|
+
/** @description The checks, the summary and the plan */
|
|
88016
|
+
200: {
|
|
88017
|
+
headers: {
|
|
88018
|
+
[name: string]: unknown;
|
|
88019
|
+
};
|
|
88020
|
+
content: {
|
|
88021
|
+
/**
|
|
88022
|
+
* @example {
|
|
88023
|
+
* "data": {
|
|
88024
|
+
* "ready": true,
|
|
88025
|
+
* "checks": [
|
|
88026
|
+
* {
|
|
88027
|
+
* "key": "template_approved",
|
|
88028
|
+
* "status": "ok",
|
|
88029
|
+
* "title_es": "Plantilla aprobada por Meta",
|
|
88030
|
+
* "title_en": "Template approved by Meta",
|
|
88031
|
+
* "detail_es": "promo_octubre",
|
|
88032
|
+
* "detail_en": "promo_octubre"
|
|
88033
|
+
* },
|
|
88034
|
+
* {
|
|
88035
|
+
* "key": "recipients",
|
|
88036
|
+
* "status": "warn",
|
|
88037
|
+
* "title_es": "Se enviará a 801 personas",
|
|
88038
|
+
* "title_en": "It will go to 801 people",
|
|
88039
|
+
* "detail_es": "50 no la recibirán: sin número válido, duplicadas o pidieron no recibir mensajes.",
|
|
88040
|
+
* "detail_en": "50 will not get it: no valid number, duplicates or opted out.",
|
|
88041
|
+
* "href": "/campaigns/audiences/7a7a7a7a-0000-4000-8000-0000000000a1"
|
|
88042
|
+
* },
|
|
88043
|
+
* {
|
|
88044
|
+
* "key": "messaging_tier",
|
|
88045
|
+
* "status": "ok",
|
|
88046
|
+
* "title_es": "Tu número puede iniciar 250 conversaciones cada 24 h",
|
|
88047
|
+
* "title_en": "Your number can start 250 conversations every 24 h",
|
|
88048
|
+
* "detail_es": "Las campañas dejan 50 libres para recordatorios y otros mensajes.",
|
|
88049
|
+
* "detail_en": "Campaigns leave 50 free for reminders and other messages."
|
|
88050
|
+
* }
|
|
88051
|
+
* ],
|
|
88052
|
+
* "summary": {
|
|
88053
|
+
* "recipients": 801,
|
|
88054
|
+
* "channel": "whatsapp",
|
|
88055
|
+
* "template_name": "promo_octubre",
|
|
88056
|
+
* "schedule_label_es": "Todos los días a las 20:00 (America/Santiago) desde hoy",
|
|
88057
|
+
* "schedule_label_en": "Every day at 20:00 (America/Santiago) from today",
|
|
88058
|
+
* "first_batch_at": "2026-10-01T23:00:00.000Z",
|
|
88059
|
+
* "completes_at": "2026-10-05T23:00:00.000Z",
|
|
88060
|
+
* "batches_count": 5,
|
|
88061
|
+
* "limit_per_24h": 250,
|
|
88062
|
+
* "reserve": 50
|
|
88063
|
+
* },
|
|
88064
|
+
* "plan": {
|
|
88065
|
+
* "batches": [
|
|
88066
|
+
* {
|
|
88067
|
+
* "at": "2026-10-01T23:00:00.000Z",
|
|
88068
|
+
* "local": "jue 1 oct, 20:00",
|
|
88069
|
+
* "planned": 200,
|
|
88070
|
+
* "slot_index": null,
|
|
88071
|
+
* "warnings": []
|
|
88072
|
+
* }
|
|
88073
|
+
* ],
|
|
88074
|
+
* "covers_all": true,
|
|
88075
|
+
* "remaining_after_last": 0,
|
|
88076
|
+
* "completes_at": "2026-10-05T23:00:00.000Z",
|
|
88077
|
+
* "issues": [],
|
|
88078
|
+
* "tier_unknown": false
|
|
88079
|
+
* }
|
|
88080
|
+
* }
|
|
88081
|
+
* }
|
|
88082
|
+
*/
|
|
88083
|
+
"application/json": {
|
|
88084
|
+
data: components["schemas"]["CampaignPreflight"];
|
|
88085
|
+
};
|
|
88086
|
+
};
|
|
88087
|
+
};
|
|
88088
|
+
/** @description Validation error */
|
|
88089
|
+
400: {
|
|
88090
|
+
headers: {
|
|
88091
|
+
[name: string]: unknown;
|
|
88092
|
+
};
|
|
88093
|
+
content: {
|
|
88094
|
+
"application/json": components["schemas"]["Error"];
|
|
88095
|
+
};
|
|
88096
|
+
};
|
|
88097
|
+
/** @description Unauthorized */
|
|
88098
|
+
401: {
|
|
88099
|
+
headers: {
|
|
88100
|
+
[name: string]: unknown;
|
|
88101
|
+
};
|
|
88102
|
+
content: {
|
|
88103
|
+
"application/json": components["schemas"]["Error"];
|
|
88104
|
+
};
|
|
88105
|
+
};
|
|
88106
|
+
/** @description Forbidden */
|
|
88107
|
+
403: {
|
|
88108
|
+
headers: {
|
|
88109
|
+
[name: string]: unknown;
|
|
88110
|
+
};
|
|
88111
|
+
content: {
|
|
88112
|
+
"application/json": components["schemas"]["Error"];
|
|
88113
|
+
};
|
|
88114
|
+
};
|
|
88115
|
+
/** @description Not found */
|
|
88116
|
+
404: {
|
|
88117
|
+
headers: {
|
|
88118
|
+
[name: string]: unknown;
|
|
88119
|
+
};
|
|
88120
|
+
content: {
|
|
88121
|
+
"application/json": components["schemas"]["Error"];
|
|
88122
|
+
};
|
|
88123
|
+
};
|
|
88124
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
88125
|
+
409: {
|
|
88126
|
+
headers: {
|
|
88127
|
+
[name: string]: unknown;
|
|
88128
|
+
};
|
|
88129
|
+
content: {
|
|
88130
|
+
"application/json": components["schemas"]["Error"];
|
|
88131
|
+
};
|
|
88132
|
+
};
|
|
88133
|
+
/** @description Rate limited */
|
|
88134
|
+
429: {
|
|
88135
|
+
headers: {
|
|
88136
|
+
[name: string]: unknown;
|
|
88137
|
+
};
|
|
88138
|
+
content: {
|
|
88139
|
+
"application/json": components["schemas"]["Error"];
|
|
88140
|
+
};
|
|
88141
|
+
};
|
|
88142
|
+
};
|
|
88143
|
+
};
|
|
88144
|
+
put?: never;
|
|
88145
|
+
post?: never;
|
|
88146
|
+
delete?: never;
|
|
88147
|
+
options?: never;
|
|
88148
|
+
head?: never;
|
|
88149
|
+
patch?: never;
|
|
88150
|
+
trace?: never;
|
|
88151
|
+
};
|
|
87971
88152
|
"/campaigns/{id}/pause": {
|
|
87972
88153
|
parameters: {
|
|
87973
88154
|
query?: never;
|
|
@@ -180456,6 +180637,63 @@ interface components {
|
|
|
180456
180637
|
/** @description Local closing time, HH:MM (exclusive); later than start. */
|
|
180457
180638
|
end: string;
|
|
180458
180639
|
} | null;
|
|
180640
|
+
/** @description The schedule this plan used (ADR 0139); null = none. */
|
|
180641
|
+
CampaignSendSchedule: {
|
|
180642
|
+
/** @enum {string} */
|
|
180643
|
+
kind: "daily";
|
|
180644
|
+
/** @description IANA zone, e.g. America/Santiago. */
|
|
180645
|
+
timezone: string;
|
|
180646
|
+
/** @description First day (local), YYYY-MM-DD. */
|
|
180647
|
+
start_date: string;
|
|
180648
|
+
/** @description Local time of every batch, HH:MM. */
|
|
180649
|
+
time: string;
|
|
180650
|
+
} | {
|
|
180651
|
+
/** @enum {string} */
|
|
180652
|
+
kind: "slots";
|
|
180653
|
+
/** @description IANA zone, e.g. America/Santiago. */
|
|
180654
|
+
timezone: string;
|
|
180655
|
+
/** @description The batches, one per instant (stored sorted ascending). */
|
|
180656
|
+
slots: {
|
|
180657
|
+
/** @description Local date, YYYY-MM-DD. */
|
|
180658
|
+
date: string;
|
|
180659
|
+
/** @description Local time, HH:MM. */
|
|
180660
|
+
time: string;
|
|
180661
|
+
}[];
|
|
180662
|
+
/**
|
|
180663
|
+
* @description Recipients left after the last slot: continue every day at the last slot’s time, or pause (schedule_exhausted).
|
|
180664
|
+
* @enum {string}
|
|
180665
|
+
*/
|
|
180666
|
+
after_last: "continue_daily" | "pause";
|
|
180667
|
+
} | null;
|
|
180668
|
+
/** @description With a schedule: batch by batch, against the budget (ADR 0139). Null without one. */
|
|
180669
|
+
CampaignScheduleSimulation: {
|
|
180670
|
+
batches: {
|
|
180671
|
+
/** @description The slot instant (ISO). */
|
|
180672
|
+
at: string;
|
|
180673
|
+
/** @description The slot on the schedule’s clock, e.g. «jue 15 oct, 20:00». */
|
|
180674
|
+
local: string;
|
|
180675
|
+
/** @description People this batch would send to. */
|
|
180676
|
+
planned: number;
|
|
180677
|
+
/** @description Index into the sorted `slots`; null for a daily batch. */
|
|
180678
|
+
slot_index: number | null;
|
|
180679
|
+
warnings: ("budget_not_freed" | "partial_budget" | "outside_contact_hours" | "in_the_past")[];
|
|
180680
|
+
}[];
|
|
180681
|
+
covers_all: boolean;
|
|
180682
|
+
remaining_after_last: number;
|
|
180683
|
+
/** @description The slot that sends the last person; null when it never does. */
|
|
180684
|
+
completes_at: string | null;
|
|
180685
|
+
issues: {
|
|
180686
|
+
/** @enum {string} */
|
|
180687
|
+
code: "slot_in_past" | "duplicate_slot" | "too_close" | "uncovered" | "asap_not_allowed";
|
|
180688
|
+
slot_index?: number;
|
|
180689
|
+
message_es: string;
|
|
180690
|
+
message_en: string;
|
|
180691
|
+
/** @description The earliest instant that would work (ISO). */
|
|
180692
|
+
suggested_at?: string;
|
|
180693
|
+
}[];
|
|
180694
|
+
/** @description No tier known for the number: no cap applied (all at the first slot). */
|
|
180695
|
+
tier_unknown: boolean;
|
|
180696
|
+
} | null;
|
|
180459
180697
|
CampaignSendPlan: {
|
|
180460
180698
|
recipients: number;
|
|
180461
180699
|
sendable_now: number | null;
|
|
@@ -180475,6 +180713,10 @@ interface components {
|
|
|
180475
180713
|
window_label: string | null;
|
|
180476
180714
|
/** @description Set when it is outside the window now: the first batch waits until then. */
|
|
180477
180715
|
next_window_opens_at: string | null;
|
|
180716
|
+
send_schedule?: components["schemas"]["CampaignSendSchedule"];
|
|
180717
|
+
/** @description e.g. «Todos los días a las 20:00 (America/Santiago) desde hoy». */
|
|
180718
|
+
schedule_label?: string | null;
|
|
180719
|
+
schedule?: components["schemas"]["CampaignScheduleSimulation"];
|
|
180478
180720
|
} | null;
|
|
180479
180721
|
CampaignMessagingBudget: {
|
|
180480
180722
|
budget: components["schemas"]["MessagingBudget"];
|
|
@@ -180486,6 +180728,41 @@ interface components {
|
|
|
180486
180728
|
/** @description Outside the send window: nothing leaves until this instant (the window opening). Null = sends now. */
|
|
180487
180729
|
waiting_for_window_until: string | null;
|
|
180488
180730
|
};
|
|
180731
|
+
CampaignSendNowBody: {
|
|
180732
|
+
send_schedule?: components["schemas"]["CampaignSendSchedule"] & unknown;
|
|
180733
|
+
};
|
|
180734
|
+
CampaignPreflight: {
|
|
180735
|
+
/** @description No check is `block`. */
|
|
180736
|
+
ready: boolean;
|
|
180737
|
+
checks: {
|
|
180738
|
+
/** @description template_approved | recipients | header_media | test_sent | messaging_tier | number_quality | schedule | opt_out | recent_campaign_overlap (WhatsApp); template | recipients | unsubscribe | test_sent | sender_domain (email). */
|
|
180739
|
+
key: string;
|
|
180740
|
+
/** @enum {string} */
|
|
180741
|
+
status: "ok" | "warn" | "block";
|
|
180742
|
+
title_es: string;
|
|
180743
|
+
title_en: string;
|
|
180744
|
+
detail_es?: string;
|
|
180745
|
+
detail_en?: string;
|
|
180746
|
+
/** @description App-relative link to fix it, e.g. the template or the audience. */
|
|
180747
|
+
href?: string;
|
|
180748
|
+
}[];
|
|
180749
|
+
summary: {
|
|
180750
|
+
recipients: number;
|
|
180751
|
+
/** @enum {string} */
|
|
180752
|
+
channel: "whatsapp" | "email";
|
|
180753
|
+
template_name?: string;
|
|
180754
|
+
schedule_label_es: string;
|
|
180755
|
+
schedule_label_en: string;
|
|
180756
|
+
first_batch_at: string | null;
|
|
180757
|
+
completes_at: string | null;
|
|
180758
|
+
batches_count: number | null;
|
|
180759
|
+
/** @description The number’s Meta limit (WhatsApp); null = no cap known. */
|
|
180760
|
+
limit_per_24h?: number | null;
|
|
180761
|
+
/** @description Kept free for reminders and other senders (WhatsApp). */
|
|
180762
|
+
reserve?: number;
|
|
180763
|
+
};
|
|
180764
|
+
plan: components["schemas"]["CampaignScheduleSimulation"] & unknown;
|
|
180765
|
+
};
|
|
180489
180766
|
CampaignResumeBody: {
|
|
180490
180767
|
/**
|
|
180491
180768
|
* @description paced: continue automatically across the rolling 24 h windows; asap: send what fits now and pause (ADR 0129).
|
package/package.json
CHANGED