@vitrina/api 11.31.0 → 11.32.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.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +569 -5
- package/dist/index.d.ts +569 -5
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -73857,6 +73857,8 @@ interface paths {
|
|
|
73857
73857
|
*
|
|
73858
73858
|
* Each row also carries `marketplaceWindow` — `{ open, closedAt, closedReason, lastEvent, lastEventReason, lastEventAt }` on a `facebook_marketplace` conversation, `null` on every other channel. `open` is whether a reply typed in Vitrina can be delivered right now.
|
|
73859
73859
|
*
|
|
73860
|
+
* Each row also carries `ad_origin` (the `AdOrigin` schema) — the Meta ad that opened the thread, in ONE shape whatever the channel (click-to-WhatsApp or an Instagram DM ad), or `null` for an organic thread. `platform` is the thread channel; `ad_external_id` is Meta's ad id (`null` for a boosted post); `ad_name` and `campaign_name` are `null` when the Ads read does not know them; `title` is the ADVERTISER'S copy, never the customer's words; `thumbnail_url` is Vitrina's durable copy of the creative when `media_archived` is `true`, else Meta's own link, which expires — render it with a fallback; `captured_at` is when the thread opened. Meta's own object stays on `ad_referral`, verbatim and write-once, in the channel's spelling (`source_id`/`ctwa_clid` on WhatsApp; `source: 'ADS'`, `ad_id`, `ads_context_data` on Instagram).
|
|
73861
|
+
*
|
|
73860
73862
|
* Rows here do NOT carry `ad_origin_nudge` — that field is single-conversation-read only, to avoid a per-row integration lookup on every page of the inbox.
|
|
73861
73863
|
*/
|
|
73862
73864
|
get: {
|
|
@@ -74012,6 +74014,7 @@ interface paths {
|
|
|
74012
74014
|
* "created_at": "2026-09-22T11:08:10.882Z"
|
|
74013
74015
|
* },
|
|
74014
74016
|
* "marketplaceWindow": null,
|
|
74017
|
+
* "ad_origin": null,
|
|
74015
74018
|
* "tags": [
|
|
74016
74019
|
* {
|
|
74017
74020
|
* "id": "12121212-0000-4000-8000-000000000001",
|
|
@@ -74020,6 +74023,142 @@ interface paths {
|
|
|
74020
74023
|
* }
|
|
74021
74024
|
* ],
|
|
74022
74025
|
* "last_call": null
|
|
74026
|
+
* },
|
|
74027
|
+
* {
|
|
74028
|
+
* "id": "bbbbbbbb-0000-4000-8000-000000000002",
|
|
74029
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
74030
|
+
* "display_seq": 133,
|
|
74031
|
+
* "display_id": "C-133",
|
|
74032
|
+
* "channel": "instagram",
|
|
74033
|
+
* "external_id": "<instagram-scoped-id>",
|
|
74034
|
+
* "messaging_account_id": "16161616-0000-4000-8000-000000000001",
|
|
74035
|
+
* "brand": null,
|
|
74036
|
+
* "contact_id": "22222222-0000-4000-8000-000000000001",
|
|
74037
|
+
* "ticket_id": null,
|
|
74038
|
+
* "status": "open",
|
|
74039
|
+
* "handler": "bot",
|
|
74040
|
+
* "assignee_user_id": null,
|
|
74041
|
+
* "assignee_assigned_at": null,
|
|
74042
|
+
* "snoozed_until": null,
|
|
74043
|
+
* "resolved_at": null,
|
|
74044
|
+
* "resolved_by": null,
|
|
74045
|
+
* "closed_at": null,
|
|
74046
|
+
* "close_deferred_until": null,
|
|
74047
|
+
* "transfer_immediately": false,
|
|
74048
|
+
* "filtered_at": null,
|
|
74049
|
+
* "filtered_reason": null,
|
|
74050
|
+
* "summary": null,
|
|
74051
|
+
* "summarized_at": null,
|
|
74052
|
+
* "history_summary": null,
|
|
74053
|
+
* "history_summary_upto_message_id": null,
|
|
74054
|
+
* "first_billable_at": null,
|
|
74055
|
+
* "billable": null,
|
|
74056
|
+
* "billing_reason": null,
|
|
74057
|
+
* "assigned_unanswered_alerted_at": null,
|
|
74058
|
+
* "assigned_unanswered_realerted_at": null,
|
|
74059
|
+
* "bot_gate_override_at": null,
|
|
74060
|
+
* "bot_gate_override_by": null,
|
|
74061
|
+
* "source": null,
|
|
74062
|
+
* "awaiting_human_since": null,
|
|
74063
|
+
* "awaiting_payment_since": null,
|
|
74064
|
+
* "awaiting_payment_escalated_at": null,
|
|
74065
|
+
* "awaiting_obligation_id": null,
|
|
74066
|
+
* "ad_referral": {
|
|
74067
|
+
* "ref": null,
|
|
74068
|
+
* "source": "ADS",
|
|
74069
|
+
* "type": "OPEN_THREAD",
|
|
74070
|
+
* "ad_id": "120236000000000001",
|
|
74071
|
+
* "ads_context_data": {
|
|
74072
|
+
* "ad_title": "Evaluación sin costo este mes",
|
|
74073
|
+
* "photo_url": null,
|
|
74074
|
+
* "video_url": "https://lookaside.fbsbx.com/ig_messaging_cdn/?asset_id=<asset>",
|
|
74075
|
+
* "post_id": "18000000000000001",
|
|
74076
|
+
* "product_id": null
|
|
74077
|
+
* }
|
|
74078
|
+
* },
|
|
74079
|
+
* "ad_join": null,
|
|
74080
|
+
* "ad_welcome": null,
|
|
74081
|
+
* "metadata": {
|
|
74082
|
+
* "ad_creative": {
|
|
74083
|
+
* "thumbnail_url": "https://media.vitrinadev.com/ad-creatives/a1a1a1a1-0000-4000-8000-000000000001/<digest>.jpg",
|
|
74084
|
+
* "source": "share_media",
|
|
74085
|
+
* "permalink": "https://www.instagram.com/p/<shortcode>/",
|
|
74086
|
+
* "archived_at": "2026-09-22T10:42:15.120Z"
|
|
74087
|
+
* }
|
|
74088
|
+
* },
|
|
74089
|
+
* "ai_control_source": "legacy",
|
|
74090
|
+
* "ai_control_changed_at": null,
|
|
74091
|
+
* "ai_control_revision": 0,
|
|
74092
|
+
* "ai_control_window_start": null,
|
|
74093
|
+
* "ai_control_window_end": null,
|
|
74094
|
+
* "ai_control_account_revision": null,
|
|
74095
|
+
* "ai_blocked_until": null,
|
|
74096
|
+
* "ai_keep_with_human": false,
|
|
74097
|
+
* "external_id_provisional": false,
|
|
74098
|
+
* "originated_at": null,
|
|
74099
|
+
* "originated_by_kind": null,
|
|
74100
|
+
* "originated_by_ai_agent_id": null,
|
|
74101
|
+
* "originated_by_user_id": null,
|
|
74102
|
+
* "originated_outbound_action_id": null,
|
|
74103
|
+
* "last_message_date": "2026-09-22T10:41:12.310Z",
|
|
74104
|
+
* "created_at": "2026-09-22T10:41:12.004Z",
|
|
74105
|
+
* "updated_at": "2026-09-22T10:41:12.310Z",
|
|
74106
|
+
* "contact": {
|
|
74107
|
+
* "id": "22222222-0000-4000-8000-000000000001",
|
|
74108
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
74109
|
+
* "name": "Rodrigo Pizarro",
|
|
74110
|
+
* "email": "rodrigo.pizarro@example.cl",
|
|
74111
|
+
* "phone": "+56977000021",
|
|
74112
|
+
* "external_id": "web:visitor-9f2c1a",
|
|
74113
|
+
* "avatar_url": null,
|
|
74114
|
+
* "city": null,
|
|
74115
|
+
* "country": null,
|
|
74116
|
+
* "language": "es",
|
|
74117
|
+
* "job_title": null,
|
|
74118
|
+
* "company_id": null,
|
|
74119
|
+
* "brand": null,
|
|
74120
|
+
* "social": {},
|
|
74121
|
+
* "social_stats": {},
|
|
74122
|
+
* "lifecycle_stage": "unknown",
|
|
74123
|
+
* "email_status": "subscribed",
|
|
74124
|
+
* "email_consent": false,
|
|
74125
|
+
* "outreach_consent_at": null,
|
|
74126
|
+
* "outreach_consent_source_url": null,
|
|
74127
|
+
* "outreach_consent_text_version": null,
|
|
74128
|
+
* "bot_replies_disabled_at": null,
|
|
74129
|
+
* "bot_replies_disabled_by": null,
|
|
74130
|
+
* "spam_at": null,
|
|
74131
|
+
* "blocked_at": null,
|
|
74132
|
+
* "archived_at": null,
|
|
74133
|
+
* "merged_at": null,
|
|
74134
|
+
* "merged_into_contact_id": null,
|
|
74135
|
+
* "search_text": "rodrigo pizarro rodrigo.pizarro@example.cl +56977000021",
|
|
74136
|
+
* "created_at": "2026-09-22T11:06:33.508Z",
|
|
74137
|
+
* "updated_at": "2026-09-22T11:06:33.508Z"
|
|
74138
|
+
* },
|
|
74139
|
+
* "ticket": null,
|
|
74140
|
+
* "lastMessage": {
|
|
74141
|
+
* "id": "eeeeeeee-0000-4000-8000-000000000001",
|
|
74142
|
+
* "content": "Hola, quiero más información",
|
|
74143
|
+
* "sender_type": "contact",
|
|
74144
|
+
* "created_at": "2026-09-22T10:41:12.310Z"
|
|
74145
|
+
* },
|
|
74146
|
+
* "marketplaceWindow": null,
|
|
74147
|
+
* "ad_origin": {
|
|
74148
|
+
* "platform": "instagram",
|
|
74149
|
+
* "kind": "ad",
|
|
74150
|
+
* "ad_external_id": "120236000000000001",
|
|
74151
|
+
* "ad_name": "Evaluación facial — septiembre",
|
|
74152
|
+
* "campaign_name": "Mensajes Instagram · Evaluación",
|
|
74153
|
+
* "title": "Evaluación sin costo este mes",
|
|
74154
|
+
* "thumbnail_url": "https://media.vitrinadev.com/ad-creatives/a1a1a1a1-0000-4000-8000-000000000001/<digest>.jpg",
|
|
74155
|
+
* "media_archived": true,
|
|
74156
|
+
* "video_url": "https://lookaside.fbsbx.com/ig_messaging_cdn/?asset_id=<asset>",
|
|
74157
|
+
* "source_url": "https://www.instagram.com/p/<shortcode>/",
|
|
74158
|
+
* "captured_at": "2026-09-22T10:41:12.004Z"
|
|
74159
|
+
* },
|
|
74160
|
+
* "tags": [],
|
|
74161
|
+
* "last_call": null
|
|
74023
74162
|
* }
|
|
74024
74163
|
* ],
|
|
74025
74164
|
* "meta": {
|
|
@@ -74041,7 +74180,9 @@ interface paths {
|
|
|
74041
74180
|
* }
|
|
74042
74181
|
*/
|
|
74043
74182
|
"application/json": {
|
|
74044
|
-
data
|
|
74183
|
+
data: {
|
|
74184
|
+
ad_origin: components["schemas"]["AdOrigin"];
|
|
74185
|
+
}[];
|
|
74045
74186
|
meta?: {
|
|
74046
74187
|
[key: string]: unknown;
|
|
74047
74188
|
};
|
|
@@ -74420,7 +74561,11 @@ interface paths {
|
|
|
74420
74561
|
*
|
|
74421
74562
|
* Pass `?exclude=messages` to opt into the SAME row without that embed. Any caller that re-reads this on a clock should: the embed has no limit, so a two-year-old thread returns two years of messages every time. `GET /conversations/{id}/messages` pages them properly.
|
|
74422
74563
|
*
|
|
74423
|
-
* Also carries `ad_origin_nudge: 'connect_meta_ads' | null`, non-null ONLY when the caller holds `integrations:write`, the conversation came from a Meta click-to-WhatsApp ad, and the workspace has no connected `meta_ads` integration. THIS ROUTE ONLY — deliberately absent from the list, where the predicate would be an N+1.
|
|
74564
|
+
* Also carries `ad_origin_nudge: 'connect_meta_ads' | null`, non-null ONLY when the caller holds `integrations:write`, the conversation came from a Meta ad (click-to-WhatsApp or an Instagram DM ad), and the workspace has no connected `meta_ads` integration. THIS ROUTE ONLY — deliberately absent from the list, where the predicate would be an N+1.
|
|
74565
|
+
*
|
|
74566
|
+
* And `handoff_resolved_suggested: boolean` (#2968) — true only on an open/pending AI-handoff thread whose customer is still waiting on us AND Jev already read their own pending words as saying the matter is resolved (checked once per customer message, at the next handoff re-notify tick). The inbox reads this to offer a one-click close. THIS ROUTE ONLY, same N+1 reasoning as `ad_origin_nudge`.
|
|
74567
|
+
*
|
|
74568
|
+
* Carries `ad_origin` exactly as `GET /conversations` rows do.
|
|
74424
74569
|
*/
|
|
74425
74570
|
get: {
|
|
74426
74571
|
parameters: {
|
|
@@ -74552,6 +74697,7 @@ interface paths {
|
|
|
74552
74697
|
* "created_at": "2026-09-22T11:08:10.882Z"
|
|
74553
74698
|
* },
|
|
74554
74699
|
* "marketplaceWindow": null,
|
|
74700
|
+
* "ad_origin": null,
|
|
74555
74701
|
* "tags": [
|
|
74556
74702
|
* {
|
|
74557
74703
|
* "id": "12121212-0000-4000-8000-000000000001",
|
|
@@ -74561,6 +74707,7 @@ interface paths {
|
|
|
74561
74707
|
* ],
|
|
74562
74708
|
* "last_call": null,
|
|
74563
74709
|
* "ad_origin_nudge": null,
|
|
74710
|
+
* "handoff_resolved_suggested": false,
|
|
74564
74711
|
* "message": [
|
|
74565
74712
|
* {
|
|
74566
74713
|
* "id": "eeeeeeee-0000-4000-8000-000000000001",
|
|
@@ -74577,7 +74724,9 @@ interface paths {
|
|
|
74577
74724
|
* }
|
|
74578
74725
|
*/
|
|
74579
74726
|
"application/json": {
|
|
74580
|
-
data
|
|
74727
|
+
data: {
|
|
74728
|
+
ad_origin: components["schemas"]["AdOrigin"];
|
|
74729
|
+
};
|
|
74581
74730
|
meta?: {
|
|
74582
74731
|
[key: string]: unknown;
|
|
74583
74732
|
};
|
|
@@ -93044,7 +93193,7 @@ interface paths {
|
|
|
93044
93193
|
* },
|
|
93045
93194
|
* "lines": [
|
|
93046
93195
|
* {
|
|
93047
|
-
* "text": "La mejor campaña fue «Evaluación sin costo · Meta», con 5,4× de retorno, y 36,4% de tus tratamientos
|
|
93196
|
+
* "text": "La mejor campaña fue «Evaluación sin costo · Meta», con 5,4× de retorno, y el 36,4% de tus tratamientos llegó desde anuncios.",
|
|
93048
93197
|
* "fact_keys": [
|
|
93049
93198
|
* "best_campaign_name",
|
|
93050
93199
|
* "best_campaign_roas",
|
|
@@ -93609,6 +93758,343 @@ interface paths {
|
|
|
93609
93758
|
patch?: never;
|
|
93610
93759
|
trace?: never;
|
|
93611
93760
|
};
|
|
93761
|
+
"/ads/share/resumen": {
|
|
93762
|
+
parameters: {
|
|
93763
|
+
query?: never;
|
|
93764
|
+
header?: never;
|
|
93765
|
+
path?: never;
|
|
93766
|
+
cookie?: never;
|
|
93767
|
+
};
|
|
93768
|
+
/**
|
|
93769
|
+
* One calendar month as the Resumen share card (data)
|
|
93770
|
+
* @description The month the monthly Ads email reports, as data: the card’s dominant figure (the return; the outcomes when there is no value yet; the spend when nothing came back), its caption and lines pre-formatted es-CL in the workspace’s nouns, up to three fact-built sentences (no model) and — when the engine’s recent measurement verdict is broken — the reason, printed after «Falta parte del seguimiento:». `period` = `YYYY-MM` (Santiago), default the previous month. No sample mode.
|
|
93771
|
+
*/
|
|
93772
|
+
get: {
|
|
93773
|
+
parameters: {
|
|
93774
|
+
query?: {
|
|
93775
|
+
/** @description Calendar month `YYYY-MM` (Santiago). Default: the previous month. The running month reads up to today; a month that has not started yet is a 400. */
|
|
93776
|
+
period?: string;
|
|
93777
|
+
/** @description Palette of the image. Default `light`. */
|
|
93778
|
+
theme?: "light" | "dark";
|
|
93779
|
+
};
|
|
93780
|
+
header?: never;
|
|
93781
|
+
path?: never;
|
|
93782
|
+
cookie?: never;
|
|
93783
|
+
};
|
|
93784
|
+
requestBody?: never;
|
|
93785
|
+
responses: {
|
|
93786
|
+
/** @description The month card */
|
|
93787
|
+
200: {
|
|
93788
|
+
headers: {
|
|
93789
|
+
[name: string]: unknown;
|
|
93790
|
+
};
|
|
93791
|
+
content: {
|
|
93792
|
+
/**
|
|
93793
|
+
* @example {
|
|
93794
|
+
* "data": {
|
|
93795
|
+
* "period": {
|
|
93796
|
+
* "month": "2026-08",
|
|
93797
|
+
* "from": "2026-08-01",
|
|
93798
|
+
* "to": "2026-08-31",
|
|
93799
|
+
* "closed": true,
|
|
93800
|
+
* "label": "Agosto · 1 – 31 ago 2026"
|
|
93801
|
+
* },
|
|
93802
|
+
* "vocabulary": "generic",
|
|
93803
|
+
* "has_activity": true,
|
|
93804
|
+
* "dominant": "roas",
|
|
93805
|
+
* "headline": "Agosto: 3,7× de retorno",
|
|
93806
|
+
* "tile": {
|
|
93807
|
+
* "number": "3,7×",
|
|
93808
|
+
* "unit": "retorno",
|
|
93809
|
+
* "caption": "$845.200 invertidos · $3.120.000 en cierres",
|
|
93810
|
+
* "lines": [
|
|
93811
|
+
* "31 cierres desde anuncios",
|
|
93812
|
+
* "Mejor campaña: «Temporada de primavera», 4,2× de retorno",
|
|
93813
|
+
* "En julio: 2,9× de retorno"
|
|
93814
|
+
* ]
|
|
93815
|
+
* },
|
|
93816
|
+
* "sentences": [
|
|
93817
|
+
* "Tus anuncios trajeron **$3.120.000** en cierres, con 31 cierres (el 73,8% del total).",
|
|
93818
|
+
* "La mejor campaña fue «Temporada de primavera», con 4,2× de retorno.",
|
|
93819
|
+
* "Son 7 cierres más que en julio."
|
|
93820
|
+
* ],
|
|
93821
|
+
* "tracking_issue": null,
|
|
93822
|
+
* "image_alt": "3,7× retorno en agosto. $845.200 invertidos · $3.120.000 en cierres. 31 cierres desde anuncios. Mejor campaña: «Temporada de primavera», 4,2× de retorno. En julio: 2,9× de retorno",
|
|
93823
|
+
* "figures": {
|
|
93824
|
+
* "spend": 845200,
|
|
93825
|
+
* "revenue": 3120000,
|
|
93826
|
+
* "roas": 3.69,
|
|
93827
|
+
* "attributed_outcomes": 31,
|
|
93828
|
+
* "best_campaign": "Temporada de primavera"
|
|
93829
|
+
* }
|
|
93830
|
+
* }
|
|
93831
|
+
* }
|
|
93832
|
+
*/
|
|
93833
|
+
"application/json": {
|
|
93834
|
+
data: components["schemas"]["AdsShareResumen"];
|
|
93835
|
+
};
|
|
93836
|
+
};
|
|
93837
|
+
};
|
|
93838
|
+
/** @description Validation error */
|
|
93839
|
+
400: {
|
|
93840
|
+
headers: {
|
|
93841
|
+
[name: string]: unknown;
|
|
93842
|
+
};
|
|
93843
|
+
content: {
|
|
93844
|
+
"application/json": components["schemas"]["Error"];
|
|
93845
|
+
};
|
|
93846
|
+
};
|
|
93847
|
+
/** @description Unauthorized */
|
|
93848
|
+
401: {
|
|
93849
|
+
headers: {
|
|
93850
|
+
[name: string]: unknown;
|
|
93851
|
+
};
|
|
93852
|
+
content: {
|
|
93853
|
+
"application/json": components["schemas"]["Error"];
|
|
93854
|
+
};
|
|
93855
|
+
};
|
|
93856
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
93857
|
+
402: {
|
|
93858
|
+
headers: {
|
|
93859
|
+
[name: string]: unknown;
|
|
93860
|
+
};
|
|
93861
|
+
content: {
|
|
93862
|
+
/**
|
|
93863
|
+
* @example {
|
|
93864
|
+
* "error": {
|
|
93865
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
93866
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
93867
|
+
* "details": {
|
|
93868
|
+
* "required": [
|
|
93869
|
+
* "vitrina_ads"
|
|
93870
|
+
* ],
|
|
93871
|
+
* "active": [],
|
|
93872
|
+
* "feature": "vitrina_ads",
|
|
93873
|
+
* "entitlement_state": "off"
|
|
93874
|
+
* }
|
|
93875
|
+
* }
|
|
93876
|
+
* }
|
|
93877
|
+
*/
|
|
93878
|
+
"application/json": components["schemas"]["Error"];
|
|
93879
|
+
};
|
|
93880
|
+
};
|
|
93881
|
+
/** @description Forbidden */
|
|
93882
|
+
403: {
|
|
93883
|
+
headers: {
|
|
93884
|
+
[name: string]: unknown;
|
|
93885
|
+
};
|
|
93886
|
+
content: {
|
|
93887
|
+
"application/json": components["schemas"]["Error"];
|
|
93888
|
+
};
|
|
93889
|
+
};
|
|
93890
|
+
/** @description Not found */
|
|
93891
|
+
404: {
|
|
93892
|
+
headers: {
|
|
93893
|
+
[name: string]: unknown;
|
|
93894
|
+
};
|
|
93895
|
+
content: {
|
|
93896
|
+
"application/json": components["schemas"]["Error"];
|
|
93897
|
+
};
|
|
93898
|
+
};
|
|
93899
|
+
/** @description Vitrina Ads is active but the delegated key has not finished rotating (`ADS_KEY_NEEDS_REMINT`) — retry once `GET /ads/state` reports `needs_remint: false`. Also the generic conflict of a write. */
|
|
93900
|
+
409: {
|
|
93901
|
+
headers: {
|
|
93902
|
+
[name: string]: unknown;
|
|
93903
|
+
};
|
|
93904
|
+
content: {
|
|
93905
|
+
/**
|
|
93906
|
+
* @example {
|
|
93907
|
+
* "error": {
|
|
93908
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
93909
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
93910
|
+
* "details": {
|
|
93911
|
+
* "key_kind": "core"
|
|
93912
|
+
* }
|
|
93913
|
+
* }
|
|
93914
|
+
* }
|
|
93915
|
+
*/
|
|
93916
|
+
"application/json": components["schemas"]["Error"];
|
|
93917
|
+
};
|
|
93918
|
+
};
|
|
93919
|
+
/** @description Rate limited */
|
|
93920
|
+
429: {
|
|
93921
|
+
headers: {
|
|
93922
|
+
[name: string]: unknown;
|
|
93923
|
+
};
|
|
93924
|
+
content: {
|
|
93925
|
+
"application/json": components["schemas"]["Error"];
|
|
93926
|
+
};
|
|
93927
|
+
};
|
|
93928
|
+
};
|
|
93929
|
+
};
|
|
93930
|
+
put?: never;
|
|
93931
|
+
post?: never;
|
|
93932
|
+
delete?: never;
|
|
93933
|
+
options?: never;
|
|
93934
|
+
head?: never;
|
|
93935
|
+
patch?: never;
|
|
93936
|
+
trace?: never;
|
|
93937
|
+
};
|
|
93938
|
+
"/ads/share/resumen.png": {
|
|
93939
|
+
parameters: {
|
|
93940
|
+
query?: never;
|
|
93941
|
+
header?: never;
|
|
93942
|
+
path?: never;
|
|
93943
|
+
cookie?: never;
|
|
93944
|
+
};
|
|
93945
|
+
/**
|
|
93946
|
+
* One calendar month as the Resumen share card (PNG)
|
|
93947
|
+
* @description The same card as `GET /ads/share/resumen`, drawn as the Resumen «Compartir» image: a 1200 × 630 PNG (the monthly Ads email carries its own shorter crop of the same facts instead). Aggregates and the workspace’s own campaign names only. Carries a strong `ETag` (a repeat with `If-None-Match` answers 304) and `Cache-Control: private` — a day for a closed month, five minutes for the running one.
|
|
93948
|
+
*/
|
|
93949
|
+
get: {
|
|
93950
|
+
parameters: {
|
|
93951
|
+
query?: {
|
|
93952
|
+
/** @description Calendar month `YYYY-MM` (Santiago). Default: the previous month. The running month reads up to today; a month that has not started yet is a 400. */
|
|
93953
|
+
period?: string;
|
|
93954
|
+
/** @description Palette of the image. Default `light`. */
|
|
93955
|
+
theme?: "light" | "dark";
|
|
93956
|
+
};
|
|
93957
|
+
header?: never;
|
|
93958
|
+
path?: never;
|
|
93959
|
+
cookie?: never;
|
|
93960
|
+
};
|
|
93961
|
+
requestBody?: never;
|
|
93962
|
+
responses: {
|
|
93963
|
+
/** @description The card image */
|
|
93964
|
+
200: {
|
|
93965
|
+
headers: {
|
|
93966
|
+
[name: string]: unknown;
|
|
93967
|
+
};
|
|
93968
|
+
content: {
|
|
93969
|
+
"image/png": string;
|
|
93970
|
+
};
|
|
93971
|
+
};
|
|
93972
|
+
/** @description Unchanged since the `ETag` sent */
|
|
93973
|
+
304: {
|
|
93974
|
+
headers: {
|
|
93975
|
+
[name: string]: unknown;
|
|
93976
|
+
};
|
|
93977
|
+
content?: never;
|
|
93978
|
+
};
|
|
93979
|
+
/** @description Validation error */
|
|
93980
|
+
400: {
|
|
93981
|
+
headers: {
|
|
93982
|
+
[name: string]: unknown;
|
|
93983
|
+
};
|
|
93984
|
+
content: {
|
|
93985
|
+
"application/json": components["schemas"]["Error"];
|
|
93986
|
+
};
|
|
93987
|
+
};
|
|
93988
|
+
/** @description Unauthorized */
|
|
93989
|
+
401: {
|
|
93990
|
+
headers: {
|
|
93991
|
+
[name: string]: unknown;
|
|
93992
|
+
};
|
|
93993
|
+
content: {
|
|
93994
|
+
"application/json": components["schemas"]["Error"];
|
|
93995
|
+
};
|
|
93996
|
+
};
|
|
93997
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
93998
|
+
402: {
|
|
93999
|
+
headers: {
|
|
94000
|
+
[name: string]: unknown;
|
|
94001
|
+
};
|
|
94002
|
+
content: {
|
|
94003
|
+
/**
|
|
94004
|
+
* @example {
|
|
94005
|
+
* "error": {
|
|
94006
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
94007
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
94008
|
+
* "details": {
|
|
94009
|
+
* "required": [
|
|
94010
|
+
* "vitrina_ads"
|
|
94011
|
+
* ],
|
|
94012
|
+
* "active": [],
|
|
94013
|
+
* "feature": "vitrina_ads",
|
|
94014
|
+
* "entitlement_state": "off"
|
|
94015
|
+
* }
|
|
94016
|
+
* }
|
|
94017
|
+
* }
|
|
94018
|
+
*/
|
|
94019
|
+
"application/json": components["schemas"]["Error"];
|
|
94020
|
+
};
|
|
94021
|
+
};
|
|
94022
|
+
/** @description Forbidden */
|
|
94023
|
+
403: {
|
|
94024
|
+
headers: {
|
|
94025
|
+
[name: string]: unknown;
|
|
94026
|
+
};
|
|
94027
|
+
content: {
|
|
94028
|
+
"application/json": components["schemas"]["Error"];
|
|
94029
|
+
};
|
|
94030
|
+
};
|
|
94031
|
+
/** @description Not found */
|
|
94032
|
+
404: {
|
|
94033
|
+
headers: {
|
|
94034
|
+
[name: string]: unknown;
|
|
94035
|
+
};
|
|
94036
|
+
content: {
|
|
94037
|
+
"application/json": components["schemas"]["Error"];
|
|
94038
|
+
};
|
|
94039
|
+
};
|
|
94040
|
+
/** @description Vitrina Ads is active but the delegated key has not finished rotating (`ADS_KEY_NEEDS_REMINT`) — retry once `GET /ads/state` reports `needs_remint: false`. Also the generic conflict of a write. */
|
|
94041
|
+
409: {
|
|
94042
|
+
headers: {
|
|
94043
|
+
[name: string]: unknown;
|
|
94044
|
+
};
|
|
94045
|
+
content: {
|
|
94046
|
+
/**
|
|
94047
|
+
* @example {
|
|
94048
|
+
* "error": {
|
|
94049
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
94050
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
94051
|
+
* "details": {
|
|
94052
|
+
* "key_kind": "core"
|
|
94053
|
+
* }
|
|
94054
|
+
* }
|
|
94055
|
+
* }
|
|
94056
|
+
*/
|
|
94057
|
+
"application/json": components["schemas"]["Error"];
|
|
94058
|
+
};
|
|
94059
|
+
};
|
|
94060
|
+
/** @description Rate limited */
|
|
94061
|
+
429: {
|
|
94062
|
+
headers: {
|
|
94063
|
+
[name: string]: unknown;
|
|
94064
|
+
};
|
|
94065
|
+
content: {
|
|
94066
|
+
"application/json": components["schemas"]["Error"];
|
|
94067
|
+
};
|
|
94068
|
+
};
|
|
94069
|
+
/** @description The image rasteriser is not available on this deployment. `error.code` is `SHARE_IMAGE_UNAVAILABLE`; retry after the `Retry-After` seconds. `GET /ads/share/resumen` (the data) is unaffected. */
|
|
94070
|
+
503: {
|
|
94071
|
+
headers: {
|
|
94072
|
+
/** @description Seconds to wait before retrying. */
|
|
94073
|
+
"Retry-After"?: number;
|
|
94074
|
+
[name: string]: unknown;
|
|
94075
|
+
};
|
|
94076
|
+
content: {
|
|
94077
|
+
/**
|
|
94078
|
+
* @example {
|
|
94079
|
+
* "error": {
|
|
94080
|
+
* "code": "SHARE_IMAGE_UNAVAILABLE",
|
|
94081
|
+
* "message": "La imagen del resumen no está disponible en este momento. Vuelve a intentarlo en unos minutos."
|
|
94082
|
+
* }
|
|
94083
|
+
* }
|
|
94084
|
+
*/
|
|
94085
|
+
"application/json": components["schemas"]["Error"];
|
|
94086
|
+
};
|
|
94087
|
+
};
|
|
94088
|
+
};
|
|
94089
|
+
};
|
|
94090
|
+
put?: never;
|
|
94091
|
+
post?: never;
|
|
94092
|
+
delete?: never;
|
|
94093
|
+
options?: never;
|
|
94094
|
+
head?: never;
|
|
94095
|
+
patch?: never;
|
|
94096
|
+
trace?: never;
|
|
94097
|
+
};
|
|
93612
94098
|
"/ads/actions": {
|
|
93613
94099
|
parameters: {
|
|
93614
94100
|
query?: never;
|
|
@@ -116211,6 +116697,36 @@ interface components {
|
|
|
116211
116697
|
test_events_link: string | null;
|
|
116212
116698
|
simulated: boolean;
|
|
116213
116699
|
};
|
|
116700
|
+
AdOrigin: {
|
|
116701
|
+
/**
|
|
116702
|
+
* @description Where the thread lives — the conversation channel.
|
|
116703
|
+
* @enum {string}
|
|
116704
|
+
*/
|
|
116705
|
+
platform: "whatsapp" | "instagram" | "messenger";
|
|
116706
|
+
/**
|
|
116707
|
+
* @description `post` when the person tapped a boosted post, else `ad`.
|
|
116708
|
+
* @enum {string}
|
|
116709
|
+
*/
|
|
116710
|
+
kind: "ad" | "post";
|
|
116711
|
+
/** @description Meta's ad id; `null` for a post or when Meta sent none. */
|
|
116712
|
+
ad_external_id: string | null;
|
|
116713
|
+
/** @description The ad name in the ad account; `null` when unknown. */
|
|
116714
|
+
ad_name: string | null;
|
|
116715
|
+
/** @description The ad's campaign name; `null` when unknown. */
|
|
116716
|
+
campaign_name: string | null;
|
|
116717
|
+
/** @description The ad's headline — the ADVERTISER'S copy, never the customer's words. */
|
|
116718
|
+
title: string | null;
|
|
116719
|
+
/** @description Still image of the creative: our durable copy when `media_archived`, else Meta’s own link. */
|
|
116720
|
+
thumbnail_url: string | null;
|
|
116721
|
+
/** @description `true` when `thumbnail_url` is Vitrina’s durable copy; `false` when it is a Meta CDN link that expires (render with a fallback) or absent. */
|
|
116722
|
+
media_archived: boolean;
|
|
116723
|
+
/** @description The creative’s video when a video ad (a Meta CDN link — it expires). */
|
|
116724
|
+
video_url: string | null;
|
|
116725
|
+
/** @description Permalink to the ad or the post it promotes, when known. */
|
|
116726
|
+
source_url: string | null;
|
|
116727
|
+
/** @description When the thread opened from the ad (the conversation creation time). */
|
|
116728
|
+
captured_at: string | null;
|
|
116729
|
+
} | null;
|
|
116214
116730
|
Message: {
|
|
116215
116731
|
id: string;
|
|
116216
116732
|
conversation_id: string;
|
|
@@ -116675,6 +117191,54 @@ interface components {
|
|
|
116675
117191
|
/** @description `false` in sample mode: the goal was validated but not stored. */
|
|
116676
117192
|
persisted?: boolean;
|
|
116677
117193
|
} | null;
|
|
117194
|
+
AdsShareResumen: {
|
|
117195
|
+
period: {
|
|
117196
|
+
/** @description `YYYY-MM`. */
|
|
117197
|
+
month: string;
|
|
117198
|
+
from: string;
|
|
117199
|
+
to: string;
|
|
117200
|
+
/** @description `false` for the running month (figures still growing). */
|
|
117201
|
+
closed: boolean;
|
|
117202
|
+
/** @description The period line printed on the card, «Agosto · 1 – 31 ago 2026». */
|
|
117203
|
+
label: string;
|
|
117204
|
+
};
|
|
117205
|
+
/**
|
|
117206
|
+
* @description The noun family every label and sentence was written in.
|
|
117207
|
+
* @enum {string}
|
|
117208
|
+
*/
|
|
117209
|
+
vocabulary: "automotive" | "healthcare" | "generic";
|
|
117210
|
+
/** @description `true` when the month had spend or ad-attributed outcomes. `false` = nothing to report (the monthly email is not sent for such a month). */
|
|
117211
|
+
has_activity: boolean;
|
|
117212
|
+
/**
|
|
117213
|
+
* @description The figure the card leads with: the return when the month has value, else the outcomes, else the spend. `null` without activity.
|
|
117214
|
+
* @enum {string|null}
|
|
117215
|
+
*/
|
|
117216
|
+
dominant: "roas" | "outcomes" | "spend" | null;
|
|
117217
|
+
/** @description The dominant figure as a title, month first («Agosto: 3,7× de retorno»). */
|
|
117218
|
+
headline: string;
|
|
117219
|
+
/** @description The card as drawn, pre-formatted es-CL, in the tenant’s nouns. */
|
|
117220
|
+
tile: {
|
|
117221
|
+
/** @description Display number («3,7×»). */
|
|
117222
|
+
number: string;
|
|
117223
|
+
/** @description Its unit («retorno»). */
|
|
117224
|
+
unit: string | null;
|
|
117225
|
+
caption: string;
|
|
117226
|
+
lines: string[];
|
|
117227
|
+
};
|
|
117228
|
+
/** @description Up to three fact-built sentences (no model) — the value, count, best campaign and change the image does not carry. `**x**` marks the lead figure. */
|
|
117229
|
+
sentences: string[];
|
|
117230
|
+
/** @description Set when the engine’s measurement verdict for the trailing 30 days (on the 1st–3rd, roughly the month just closed) is broken — the reason in plain words («el tag de tu sitio no envió datos»), printed after «Falta parte del seguimiento:». Never from today’s Meta or tag state. `null` when measurement was sound or could not be read. */
|
|
117231
|
+
tracking_issue: string | null;
|
|
117232
|
+
/** @description Alt text for the card image. */
|
|
117233
|
+
image_alt: string;
|
|
117234
|
+
figures: {
|
|
117235
|
+
spend: number | null;
|
|
117236
|
+
revenue: number | null;
|
|
117237
|
+
roas: number | null;
|
|
117238
|
+
attributed_outcomes: number | null;
|
|
117239
|
+
best_campaign: string | null;
|
|
117240
|
+
};
|
|
117241
|
+
};
|
|
116678
117242
|
AdsAction: {
|
|
116679
117243
|
/** @description `<kind>:<target external id>:<YYYY-MM-DD>` — a composite key, stable for a day. */
|
|
116680
117244
|
key: string;
|
|
@@ -116961,7 +117525,7 @@ declare function createClient(opts: CreateClientOptions): VitrinaClient;
|
|
|
116961
117525
|
* is regenerated — narrow on the ones you handle, never assume this
|
|
116962
117526
|
* list is exhaustive at runtime.
|
|
116963
117527
|
*/
|
|
116964
|
-
type ErrorCode = 'VALIDATION_ERROR' | 'NOT_FOUND' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'CONFLICT' | 'UNIQUE_CONFLICT' | 'IDEMPOTENCY_KEY_CONFLICT' | 'VERTICAL_NOT_ENABLED' | 'ENTITLEMENT_NOT_ACTIVE' | 'UNSUPPORTED_VEHICLE_TYPE' | 'NO_OFFERING_ADAPTER' | 'PAYLOAD_TOO_LARGE' | 'UNSUPPORTED_MEDIA_TYPE' | 'UPSTREAM_ERROR' | 'RATE_LIMITED' | 'GONE' | 'INTERNAL_ERROR' | 'MESSAGING_ACCOUNT_TENANT_MISSING' | 'COPILOT_APPROVALS_UNAVAILABLE' | 'COPILOT_APPROVAL_REPLAY_BLOCKED' | 'COPILOT_DISABLED' | 'COPILOT_BUDGET_EXCEEDED' | 'DEALER_SITES_NOT_CONFIGURED' | 'STOREFRONT_ZONES_NOT_CONFIGURED' | 'RECONTACTO_NOT_ENABLED' | 'SYNC_QUEUE_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_MISMATCH' | 'ADS_KEY_NEEDS_REMINT' | 'ADS_ACTION_REPLAY_BLOCKED' | 'ADS_ACTION_NOT_AVAILABLE' | 'ADS_ACTION_NOT_REVERSIBLE' | 'ADS_ACTION_CONSENT_REQUIRED' | 'MISSING_SIGNATURE' | 'MALFORMED_SIGNATURE' | 'STALE_SIGNATURE' | 'INVALID_SIGNATURE' | 'REPLAY_DETECTED' | 'TURNSTILE_UNAVAILABLE' | 'TASADOR_QUOTA_EXHAUSTED' | 'TASADOR_ANON_DAILY_LIMIT' | 'TASADOR_CAPACITY_REACHED' | 'CLINIC_PLAN_REQUIRED' | 'TENANT_BILLING_PAUSED' | 'FACEBOOK_MARKETPLACE_NOT_AVAILABLE' | 'WORKSPACE_MEMBER_INACTIVE' | 'DEVICE_AGENT_ALREADY_PAIRED' | 'DEVICE_AGENT_SELF_REQUIRES_USER' | 'DEVICE_AGENT_KIND_NOT_ALLOWED' | 'DEVICE_TASK_STATUS_NOT_ALLOWED' | 'FACEBOOK_MARKETPLACE_NO_PHONE_AGENT' | 'FACEBOOK_MARKETPLACE_THREAD_NOT_ADDRESSABLE' | 'FACEBOOK_MARKETPLACE_ATTACHMENT_UNSUPPORTED' | 'REPLY_PACING_LOCKED' | 'SANDBOX_CHANNEL_FORBIDDEN' | 'SANDBOX_BILLING_FORBIDDEN' | 'SANDBOX_NOT_PROVISIONED' | 'SANDBOX_RESET_UNAVAILABLE' | 'CONNECTED_APP_SENSITIVE_DATA' | 'handoff_mismatch' | 'sync_in_flight' | 'atribu_refused' | 'start_again' | 'reconnect' | 'partner_token_invalid' | 'OUTBOUND_BLOCKED' | 'OUTBOUND_WARNING' | 'dpa_acceptance_required' | 'EMAIL_SENDER_UNRESOLVED' | 'CAMPAIGN_FROM_CONNECTED_MAILBOX' | 'BANK_FEED_NOT_CONFIGURED' | 'ADDON_NOT_PRICED' | 'MIRROR_LINES_UNMAPPED';
|
|
117528
|
+
type ErrorCode = 'VALIDATION_ERROR' | 'NOT_FOUND' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'CONFLICT' | 'UNIQUE_CONFLICT' | 'IDEMPOTENCY_KEY_CONFLICT' | 'VERTICAL_NOT_ENABLED' | 'ENTITLEMENT_NOT_ACTIVE' | 'UNSUPPORTED_VEHICLE_TYPE' | 'NO_OFFERING_ADAPTER' | 'PAYLOAD_TOO_LARGE' | 'UNSUPPORTED_MEDIA_TYPE' | 'UPSTREAM_ERROR' | 'RATE_LIMITED' | 'GONE' | 'INTERNAL_ERROR' | 'MESSAGING_ACCOUNT_TENANT_MISSING' | 'COPILOT_APPROVALS_UNAVAILABLE' | 'COPILOT_APPROVAL_REPLAY_BLOCKED' | 'COPILOT_DISABLED' | 'COPILOT_BUDGET_EXCEEDED' | 'DEALER_SITES_NOT_CONFIGURED' | 'STOREFRONT_ZONES_NOT_CONFIGURED' | 'RECONTACTO_NOT_ENABLED' | 'SYNC_QUEUE_UNAVAILABLE' | 'SHARE_IMAGE_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_MISMATCH' | 'ADS_KEY_NEEDS_REMINT' | 'ADS_ACTION_REPLAY_BLOCKED' | 'ADS_ACTION_NOT_AVAILABLE' | 'ADS_ACTION_NOT_REVERSIBLE' | 'ADS_ACTION_CONSENT_REQUIRED' | 'MISSING_SIGNATURE' | 'MALFORMED_SIGNATURE' | 'STALE_SIGNATURE' | 'INVALID_SIGNATURE' | 'REPLAY_DETECTED' | 'TURNSTILE_UNAVAILABLE' | 'TASADOR_QUOTA_EXHAUSTED' | 'TASADOR_ANON_DAILY_LIMIT' | 'TASADOR_CAPACITY_REACHED' | 'CLINIC_PLAN_REQUIRED' | 'TENANT_BILLING_PAUSED' | 'FACEBOOK_MARKETPLACE_NOT_AVAILABLE' | 'WORKSPACE_MEMBER_INACTIVE' | 'DEVICE_AGENT_ALREADY_PAIRED' | 'DEVICE_AGENT_SELF_REQUIRES_USER' | 'DEVICE_AGENT_KIND_NOT_ALLOWED' | 'DEVICE_TASK_STATUS_NOT_ALLOWED' | 'FACEBOOK_MARKETPLACE_NO_PHONE_AGENT' | 'FACEBOOK_MARKETPLACE_THREAD_NOT_ADDRESSABLE' | 'FACEBOOK_MARKETPLACE_ATTACHMENT_UNSUPPORTED' | 'REPLY_PACING_LOCKED' | 'SANDBOX_CHANNEL_FORBIDDEN' | 'SANDBOX_BILLING_FORBIDDEN' | 'SANDBOX_NOT_PROVISIONED' | 'SANDBOX_RESET_UNAVAILABLE' | 'CONNECTED_APP_SENSITIVE_DATA' | 'handoff_mismatch' | 'sync_in_flight' | 'atribu_refused' | 'start_again' | 'reconnect' | 'partner_token_invalid' | 'OUTBOUND_BLOCKED' | 'OUTBOUND_WARNING' | 'dpa_acceptance_required' | 'EMAIL_SENDER_UNRESOLVED' | 'CAMPAIGN_FROM_CONNECTED_MAILBOX' | 'BANK_FEED_NOT_CONFIGURED' | 'ADDON_NOT_PRICED' | 'MIRROR_LINES_UNMAPPED';
|
|
116965
117529
|
declare const ERROR_CODES: readonly ErrorCode[];
|
|
116966
117530
|
|
|
116967
117531
|
/**
|