@vitrina/api 14.15.0 → 14.15.1

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 CHANGED
@@ -27349,7 +27349,7 @@ interface paths {
27349
27349
  * First-touch status for one lead source
27350
27350
  * @description Health and recent outcomes of the proactive first message for one lead source (`chileautos`, `yapo`, `mercadolibre`, `website`, …): which rail it uses, whether its account is usable, sends today, and the latest outcomes with the reason a lead was skipped.
27351
27351
  *
27352
- * `website` is ON by default for every workspace. With no `website` block of its own it borrows the account and template chain of the first enabled source (`config_origin: inherited`, named in `inherited_from`), or uses the partner WhatsApp account and Vitrina's own website templates (`platform_default`). `templates` lists the WhatsApp ladder in send order with each template's state on that account: only `APPROVED` templates are ever sent; a `PENDING` or `REJECTED` one is shown so it is not silently skipped, and `status: null` means it is not on that account. When no template can be sent the first message goes by email, from the workspace mailbox.
27352
+ * `website` is ON by default for every workspace, and a portal (`chileautos`, `mercadolibre`, `yapo`) is ON by default once the workspace has an enabled marketplace account for it. With no block of its own such a source borrows the account and template chain of the first enabled source (`config_origin: inherited`, named in `inherited_from`), or uses the partner WhatsApp account and Vitrina's own templates — for a portal, the workspace's own first-contact templates first, then Vitrina's fallback ones (`platform_default`). An explicit block, `enabled: false` included, always wins. `templates` lists the WhatsApp ladder in send order with each template's state on that account: only `APPROVED` templates are ever sent; a `PENDING` or `REJECTED` one is shown so it is not silently skipped, and `status: null` means it is not on that account. When no template can be sent the first message goes by email, from the workspace mailbox.
27353
27353
  */
27354
27354
  get: {
27355
27355
  parameters: {
@@ -87080,7 +87080,7 @@ interface paths {
87080
87080
  *
87081
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
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.
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` — only when the team answers the replies, see `reply_mode` —, `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.
87084
87084
  */
87085
87085
  get: {
87086
87086
  parameters: {
@@ -87092,6 +87092,8 @@ interface paths {
87092
87092
  send_window?: string;
87093
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
87094
  send_schedule?: string;
87095
+ /** @description Who answers the replies, to plan with. `account_default` resolves the number's routing (an AI agent answers → slots outside the contact hours are not warned about). Absent = the saved campaign's (with campaign_id), else unknown (the warning stays). */
87096
+ reply_mode?: "account_default" | "human";
87095
87097
  };
87096
87098
  header?: never;
87097
87099
  path?: never;
@@ -87999,7 +88001,7 @@ interface paths {
87999
88001
  };
88000
88002
  /**
88001
88003
  * «¿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.
88004
+ * @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), `replies` (who answers the replies: the AI agent the number routes to, or the team — `warn` when the team answers and some sends fall outside the contact hours), `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
88005
  */
88004
88006
  get: {
88005
88007
  parameters: {
@@ -180693,6 +180695,13 @@ interface components {
180693
180695
  }[];
180694
180696
  /** @description No tier known for the number: no cap applied (all at the first slot). */
180695
180697
  tier_unknown: boolean;
180698
+ /**
180699
+ * @description Who answers the replies: `ai` = the AI agent the number routes to (slots outside the contact hours carry no `outside_contact_hours` warning); `human` = the team; null = unknown (warned as for the team).
180700
+ * @enum {string|null}
180701
+ */
180702
+ replies_handled_by: "ai" | "human" | null;
180703
+ /** @description The batches (`local`) outside the workspace’s contact hours, whoever answers. */
180704
+ outside_contact_hours: string[];
180696
180705
  } | null;
180697
180706
  CampaignSendPlan: {
180698
180707
  recipients: number;
@@ -180735,7 +180744,7 @@ interface components {
180735
180744
  /** @description No check is `block`. */
180736
180745
  ready: boolean;
180737
180746
  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). */
180747
+ /** @description template_approved | recipients | header_media | test_sent | messaging_tier | number_quality | schedule | replies | opt_out | recent_campaign_overlap (WhatsApp); template | recipients | unsubscribe | test_sent | sender_domain (email). */
180739
180748
  key: string;
180740
180749
  /** @enum {string} */
180741
180750
  status: "ok" | "warn" | "block";
@@ -180760,6 +180769,11 @@ interface components {
180760
180769
  limit_per_24h?: number | null;
180761
180770
  /** @description Kept free for reminders and other senders (WhatsApp). */
180762
180771
  reserve?: number;
180772
+ /**
180773
+ * @description Who answers the replies (WhatsApp): the AI agent the number routes to, or the team (`reply_mode = human`, or no agent on the number).
180774
+ * @enum {string}
180775
+ */
180776
+ replies_handled_by?: "ai" | "human";
180763
180777
  };
180764
180778
  plan: components["schemas"]["CampaignScheduleSimulation"] & unknown;
180765
180779
  };
package/dist/index.d.ts CHANGED
@@ -27349,7 +27349,7 @@ interface paths {
27349
27349
  * First-touch status for one lead source
27350
27350
  * @description Health and recent outcomes of the proactive first message for one lead source (`chileautos`, `yapo`, `mercadolibre`, `website`, …): which rail it uses, whether its account is usable, sends today, and the latest outcomes with the reason a lead was skipped.
27351
27351
  *
27352
- * `website` is ON by default for every workspace. With no `website` block of its own it borrows the account and template chain of the first enabled source (`config_origin: inherited`, named in `inherited_from`), or uses the partner WhatsApp account and Vitrina's own website templates (`platform_default`). `templates` lists the WhatsApp ladder in send order with each template's state on that account: only `APPROVED` templates are ever sent; a `PENDING` or `REJECTED` one is shown so it is not silently skipped, and `status: null` means it is not on that account. When no template can be sent the first message goes by email, from the workspace mailbox.
27352
+ * `website` is ON by default for every workspace, and a portal (`chileautos`, `mercadolibre`, `yapo`) is ON by default once the workspace has an enabled marketplace account for it. With no block of its own such a source borrows the account and template chain of the first enabled source (`config_origin: inherited`, named in `inherited_from`), or uses the partner WhatsApp account and Vitrina's own templates — for a portal, the workspace's own first-contact templates first, then Vitrina's fallback ones (`platform_default`). An explicit block, `enabled: false` included, always wins. `templates` lists the WhatsApp ladder in send order with each template's state on that account: only `APPROVED` templates are ever sent; a `PENDING` or `REJECTED` one is shown so it is not silently skipped, and `status: null` means it is not on that account. When no template can be sent the first message goes by email, from the workspace mailbox.
27353
27353
  */
27354
27354
  get: {
27355
27355
  parameters: {
@@ -87080,7 +87080,7 @@ interface paths {
87080
87080
  *
87081
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
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.
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` — only when the team answers the replies, see `reply_mode` —, `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.
87084
87084
  */
87085
87085
  get: {
87086
87086
  parameters: {
@@ -87092,6 +87092,8 @@ interface paths {
87092
87092
  send_window?: string;
87093
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
87094
  send_schedule?: string;
87095
+ /** @description Who answers the replies, to plan with. `account_default` resolves the number's routing (an AI agent answers → slots outside the contact hours are not warned about). Absent = the saved campaign's (with campaign_id), else unknown (the warning stays). */
87096
+ reply_mode?: "account_default" | "human";
87095
87097
  };
87096
87098
  header?: never;
87097
87099
  path?: never;
@@ -87999,7 +88001,7 @@ interface paths {
87999
88001
  };
88000
88002
  /**
88001
88003
  * «¿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.
88004
+ * @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), `replies` (who answers the replies: the AI agent the number routes to, or the team — `warn` when the team answers and some sends fall outside the contact hours), `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
88005
  */
88004
88006
  get: {
88005
88007
  parameters: {
@@ -180693,6 +180695,13 @@ interface components {
180693
180695
  }[];
180694
180696
  /** @description No tier known for the number: no cap applied (all at the first slot). */
180695
180697
  tier_unknown: boolean;
180698
+ /**
180699
+ * @description Who answers the replies: `ai` = the AI agent the number routes to (slots outside the contact hours carry no `outside_contact_hours` warning); `human` = the team; null = unknown (warned as for the team).
180700
+ * @enum {string|null}
180701
+ */
180702
+ replies_handled_by: "ai" | "human" | null;
180703
+ /** @description The batches (`local`) outside the workspace’s contact hours, whoever answers. */
180704
+ outside_contact_hours: string[];
180696
180705
  } | null;
180697
180706
  CampaignSendPlan: {
180698
180707
  recipients: number;
@@ -180735,7 +180744,7 @@ interface components {
180735
180744
  /** @description No check is `block`. */
180736
180745
  ready: boolean;
180737
180746
  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). */
180747
+ /** @description template_approved | recipients | header_media | test_sent | messaging_tier | number_quality | schedule | replies | opt_out | recent_campaign_overlap (WhatsApp); template | recipients | unsubscribe | test_sent | sender_domain (email). */
180739
180748
  key: string;
180740
180749
  /** @enum {string} */
180741
180750
  status: "ok" | "warn" | "block";
@@ -180760,6 +180769,11 @@ interface components {
180760
180769
  limit_per_24h?: number | null;
180761
180770
  /** @description Kept free for reminders and other senders (WhatsApp). */
180762
180771
  reserve?: number;
180772
+ /**
180773
+ * @description Who answers the replies (WhatsApp): the AI agent the number routes to, or the team (`reply_mode = human`, or no agent on the number).
180774
+ * @enum {string}
180775
+ */
180776
+ replies_handled_by?: "ai" | "human";
180763
180777
  };
180764
180778
  plan: components["schemas"]["CampaignScheduleSimulation"] & unknown;
180765
180779
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "14.15.0",
3
+ "version": "14.15.1",
4
4
  "description": "Typed TypeScript SDK for the Vitrina API pública — generated from the committed openapi.public.json (ADR 0106).",
5
5
  "type": "module",
6
6
  "license": "MIT",