@vitrina/api 11.8.0 → 11.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.cts +1006 -10
  2. package/dist/index.d.ts +1006 -10
  3. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -87655,6 +87655,8 @@ interface paths {
87655
87655
  model?: string;
87656
87656
  /** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
87657
87657
  sample?: "1" | "true";
87658
+ /** @description `day` ALSO answers `days[]` and `previous_days[]` — one point per calendar day of the window and of the previous window (the engine’s own day rows, never recomputed), beside the unchanged `current`/`previous` totals. Default `total`. */
87659
+ grain?: "total" | "day";
87658
87660
  /** @description Documentary only — `/ads/overview` always returns `previous` (the immediately-preceding window of equal length) alongside `current`; there is nothing to switch on. */
87659
87661
  compare?: "previous_period";
87660
87662
  };
@@ -87728,7 +87730,491 @@ interface paths {
87728
87730
  * "appointment_booked": 9,
87729
87731
  * "closed_won": 3
87730
87732
  * }
87731
- * }
87733
+ * },
87734
+ * "days": [
87735
+ * {
87736
+ * "date": "2026-08-24",
87737
+ * "spend": 31800,
87738
+ * "revenue": 120000,
87739
+ * "outcomes": 2,
87740
+ * "attributed_outcomes": 1,
87741
+ * "partial": false
87742
+ * },
87743
+ * {
87744
+ * "date": "2026-08-25",
87745
+ * "spend": 35700,
87746
+ * "revenue": 130000,
87747
+ * "outcomes": 3,
87748
+ * "attributed_outcomes": 2,
87749
+ * "partial": false
87750
+ * },
87751
+ * {
87752
+ * "date": "2026-08-26",
87753
+ * "spend": 28700,
87754
+ * "revenue": 110000,
87755
+ * "outcomes": 1,
87756
+ * "attributed_outcomes": 1,
87757
+ * "partial": false
87758
+ * },
87759
+ * {
87760
+ * "date": "2026-08-27",
87761
+ * "spend": 33400,
87762
+ * "revenue": 120000,
87763
+ * "outcomes": 2,
87764
+ * "attributed_outcomes": 1,
87765
+ * "partial": false
87766
+ * },
87767
+ * {
87768
+ * "date": "2026-08-28",
87769
+ * "spend": 30300,
87770
+ * "revenue": 110000,
87771
+ * "outcomes": 1,
87772
+ * "attributed_outcomes": 1,
87773
+ * "partial": false
87774
+ * },
87775
+ * {
87776
+ * "date": "2026-08-29",
87777
+ * "spend": 19700,
87778
+ * "revenue": 70000,
87779
+ * "outcomes": 1,
87780
+ * "attributed_outcomes": 1,
87781
+ * "partial": false
87782
+ * },
87783
+ * {
87784
+ * "date": "2026-08-30",
87785
+ * "spend": 22100,
87786
+ * "revenue": 80000,
87787
+ * "outcomes": 1,
87788
+ * "attributed_outcomes": 1,
87789
+ * "partial": false
87790
+ * },
87791
+ * {
87792
+ * "date": "2026-08-31",
87793
+ * "spend": 28700,
87794
+ * "revenue": 110000,
87795
+ * "outcomes": 1,
87796
+ * "attributed_outcomes": 1,
87797
+ * "partial": false
87798
+ * },
87799
+ * {
87800
+ * "date": "2026-09-01",
87801
+ * "spend": 33400,
87802
+ * "revenue": 120000,
87803
+ * "outcomes": 2,
87804
+ * "attributed_outcomes": 1,
87805
+ * "partial": false
87806
+ * },
87807
+ * {
87808
+ * "date": "2026-09-02",
87809
+ * "spend": 30300,
87810
+ * "revenue": 110000,
87811
+ * "outcomes": 1,
87812
+ * "attributed_outcomes": 1,
87813
+ * "partial": false
87814
+ * },
87815
+ * {
87816
+ * "date": "2026-09-03",
87817
+ * "spend": 31800,
87818
+ * "revenue": 120000,
87819
+ * "outcomes": 2,
87820
+ * "attributed_outcomes": 1,
87821
+ * "partial": false
87822
+ * },
87823
+ * {
87824
+ * "date": "2026-09-04",
87825
+ * "spend": 35700,
87826
+ * "revenue": 130000,
87827
+ * "outcomes": 2,
87828
+ * "attributed_outcomes": 1,
87829
+ * "partial": false
87830
+ * },
87831
+ * {
87832
+ * "date": "2026-09-05",
87833
+ * "spend": 17800,
87834
+ * "revenue": 70000,
87835
+ * "outcomes": 1,
87836
+ * "attributed_outcomes": 1,
87837
+ * "partial": false
87838
+ * },
87839
+ * {
87840
+ * "date": "2026-09-06",
87841
+ * "spend": 20700,
87842
+ * "revenue": 80000,
87843
+ * "outcomes": 1,
87844
+ * "attributed_outcomes": 1,
87845
+ * "partial": false
87846
+ * },
87847
+ * {
87848
+ * "date": "2026-09-07",
87849
+ * "spend": 30300,
87850
+ * "revenue": 110000,
87851
+ * "outcomes": 1,
87852
+ * "attributed_outcomes": 1,
87853
+ * "partial": false
87854
+ * },
87855
+ * {
87856
+ * "date": "2026-09-08",
87857
+ * "spend": 31800,
87858
+ * "revenue": 120000,
87859
+ * "outcomes": 1,
87860
+ * "attributed_outcomes": 1,
87861
+ * "partial": false
87862
+ * },
87863
+ * {
87864
+ * "date": "2026-09-09",
87865
+ * "spend": 35700,
87866
+ * "revenue": 130000,
87867
+ * "outcomes": 2,
87868
+ * "attributed_outcomes": 1,
87869
+ * "partial": false
87870
+ * },
87871
+ * {
87872
+ * "date": "2026-09-10",
87873
+ * "spend": 28700,
87874
+ * "revenue": 110000,
87875
+ * "outcomes": 1,
87876
+ * "attributed_outcomes": 1,
87877
+ * "partial": false
87878
+ * },
87879
+ * {
87880
+ * "date": "2026-09-11",
87881
+ * "spend": 33400,
87882
+ * "revenue": 120000,
87883
+ * "outcomes": 2,
87884
+ * "attributed_outcomes": 1,
87885
+ * "partial": false
87886
+ * },
87887
+ * {
87888
+ * "date": "2026-09-12",
87889
+ * "spend": 18800,
87890
+ * "revenue": 70000,
87891
+ * "outcomes": 1,
87892
+ * "attributed_outcomes": 1,
87893
+ * "partial": false
87894
+ * },
87895
+ * {
87896
+ * "date": "2026-09-13",
87897
+ * "spend": 19700,
87898
+ * "revenue": 70000,
87899
+ * "outcomes": 1,
87900
+ * "attributed_outcomes": 1,
87901
+ * "partial": false
87902
+ * },
87903
+ * {
87904
+ * "date": "2026-09-14",
87905
+ * "spend": 35700,
87906
+ * "revenue": 130000,
87907
+ * "outcomes": 2,
87908
+ * "attributed_outcomes": 1,
87909
+ * "partial": false
87910
+ * },
87911
+ * {
87912
+ * "date": "2026-09-15",
87913
+ * "spend": 28700,
87914
+ * "revenue": 110000,
87915
+ * "outcomes": 1,
87916
+ * "attributed_outcomes": 1,
87917
+ * "partial": false
87918
+ * },
87919
+ * {
87920
+ * "date": "2026-09-16",
87921
+ * "spend": 33400,
87922
+ * "revenue": 120000,
87923
+ * "outcomes": 2,
87924
+ * "attributed_outcomes": 1,
87925
+ * "partial": false
87926
+ * },
87927
+ * {
87928
+ * "date": "2026-09-17",
87929
+ * "spend": 30200,
87930
+ * "revenue": 110000,
87931
+ * "outcomes": 1,
87932
+ * "attributed_outcomes": 1,
87933
+ * "partial": false
87934
+ * },
87935
+ * {
87936
+ * "date": "2026-09-18",
87937
+ * "spend": 31800,
87938
+ * "revenue": 120000,
87939
+ * "outcomes": 1,
87940
+ * "attributed_outcomes": 1,
87941
+ * "partial": false
87942
+ * },
87943
+ * {
87944
+ * "date": "2026-09-19",
87945
+ * "spend": 22100,
87946
+ * "revenue": 80000,
87947
+ * "outcomes": 1,
87948
+ * "attributed_outcomes": 1,
87949
+ * "partial": false
87950
+ * },
87951
+ * {
87952
+ * "date": "2026-09-20",
87953
+ * "spend": 17800,
87954
+ * "revenue": 70000,
87955
+ * "outcomes": 1,
87956
+ * "attributed_outcomes": 1,
87957
+ * "partial": false
87958
+ * },
87959
+ * {
87960
+ * "date": "2026-09-21",
87961
+ * "spend": 33400,
87962
+ * "revenue": 120000,
87963
+ * "outcomes": 2,
87964
+ * "attributed_outcomes": 1,
87965
+ * "partial": false
87966
+ * },
87967
+ * {
87968
+ * "date": "2026-09-22",
87969
+ * "spend": 13600,
87970
+ * "revenue": 50000,
87971
+ * "outcomes": 1,
87972
+ * "attributed_outcomes": 1,
87973
+ * "partial": true
87974
+ * }
87975
+ * ],
87976
+ * "previous_days": [
87977
+ * {
87978
+ * "date": "2026-07-25",
87979
+ * "spend": null,
87980
+ * "revenue": 60000,
87981
+ * "outcomes": 1,
87982
+ * "attributed_outcomes": 1,
87983
+ * "partial": false
87984
+ * },
87985
+ * {
87986
+ * "date": "2026-07-26",
87987
+ * "spend": null,
87988
+ * "revenue": 70000,
87989
+ * "outcomes": 1,
87990
+ * "attributed_outcomes": 1,
87991
+ * "partial": false
87992
+ * },
87993
+ * {
87994
+ * "date": "2026-07-27",
87995
+ * "spend": null,
87996
+ * "revenue": 80000,
87997
+ * "outcomes": 1,
87998
+ * "attributed_outcomes": 1,
87999
+ * "partial": false
88000
+ * },
88001
+ * {
88002
+ * "date": "2026-07-28",
88003
+ * "spend": null,
88004
+ * "revenue": 100000,
88005
+ * "outcomes": 2,
88006
+ * "attributed_outcomes": 1,
88007
+ * "partial": false
88008
+ * },
88009
+ * {
88010
+ * "date": "2026-07-29",
88011
+ * "spend": null,
88012
+ * "revenue": 90000,
88013
+ * "outcomes": 1,
88014
+ * "attributed_outcomes": 1,
88015
+ * "partial": false
88016
+ * },
88017
+ * {
88018
+ * "date": "2026-07-30",
88019
+ * "spend": null,
88020
+ * "revenue": 90000,
88021
+ * "outcomes": 2,
88022
+ * "attributed_outcomes": 1,
88023
+ * "partial": false
88024
+ * },
88025
+ * {
88026
+ * "date": "2026-07-31",
88027
+ * "spend": null,
88028
+ * "revenue": 110000,
88029
+ * "outcomes": 3,
88030
+ * "attributed_outcomes": 2,
88031
+ * "partial": false
88032
+ * },
88033
+ * {
88034
+ * "date": "2026-08-01",
88035
+ * "spend": null,
88036
+ * "revenue": 50000,
88037
+ * "outcomes": 1,
88038
+ * "attributed_outcomes": 1,
88039
+ * "partial": false
88040
+ * },
88041
+ * {
88042
+ * "date": "2026-08-02",
88043
+ * "spend": null,
88044
+ * "revenue": 60000,
88045
+ * "outcomes": 1,
88046
+ * "attributed_outcomes": 1,
88047
+ * "partial": false
88048
+ * },
88049
+ * {
88050
+ * "date": "2026-08-03",
88051
+ * "spend": null,
88052
+ * "revenue": 90000,
88053
+ * "outcomes": 1,
88054
+ * "attributed_outcomes": 1,
88055
+ * "partial": false
88056
+ * },
88057
+ * {
88058
+ * "date": "2026-08-04",
88059
+ * "spend": null,
88060
+ * "revenue": 90000,
88061
+ * "outcomes": 2,
88062
+ * "attributed_outcomes": 1,
88063
+ * "partial": false
88064
+ * },
88065
+ * {
88066
+ * "date": "2026-08-05",
88067
+ * "spend": null,
88068
+ * "revenue": 110000,
88069
+ * "outcomes": 2,
88070
+ * "attributed_outcomes": 1,
88071
+ * "partial": false
88072
+ * },
88073
+ * {
88074
+ * "date": "2026-08-06",
88075
+ * "spend": null,
88076
+ * "revenue": 80000,
88077
+ * "outcomes": 1,
88078
+ * "attributed_outcomes": 1,
88079
+ * "partial": false
88080
+ * },
88081
+ * {
88082
+ * "date": "2026-08-07",
88083
+ * "spend": null,
88084
+ * "revenue": 100000,
88085
+ * "outcomes": 2,
88086
+ * "attributed_outcomes": 1,
88087
+ * "partial": false
88088
+ * },
88089
+ * {
88090
+ * "date": "2026-08-08",
88091
+ * "spend": null,
88092
+ * "revenue": 60000,
88093
+ * "outcomes": 1,
88094
+ * "attributed_outcomes": 1,
88095
+ * "partial": false
88096
+ * },
88097
+ * {
88098
+ * "date": "2026-08-09",
88099
+ * "spend": null,
88100
+ * "revenue": 60000,
88101
+ * "outcomes": 1,
88102
+ * "attributed_outcomes": 1,
88103
+ * "partial": false
88104
+ * },
88105
+ * {
88106
+ * "date": "2026-08-10",
88107
+ * "spend": null,
88108
+ * "revenue": 110000,
88109
+ * "outcomes": 2,
88110
+ * "attributed_outcomes": 1,
88111
+ * "partial": false
88112
+ * },
88113
+ * {
88114
+ * "date": "2026-08-11",
88115
+ * "spend": null,
88116
+ * "revenue": 80000,
88117
+ * "outcomes": 1,
88118
+ * "attributed_outcomes": 1,
88119
+ * "partial": false
88120
+ * },
88121
+ * {
88122
+ * "date": "2026-08-12",
88123
+ * "spend": null,
88124
+ * "revenue": 100000,
88125
+ * "outcomes": 2,
88126
+ * "attributed_outcomes": 1,
88127
+ * "partial": false
88128
+ * },
88129
+ * {
88130
+ * "date": "2026-08-13",
88131
+ * "spend": null,
88132
+ * "revenue": 90000,
88133
+ * "outcomes": 1,
88134
+ * "attributed_outcomes": 1,
88135
+ * "partial": false
88136
+ * },
88137
+ * {
88138
+ * "date": "2026-08-14",
88139
+ * "spend": null,
88140
+ * "revenue": 90000,
88141
+ * "outcomes": 2,
88142
+ * "attributed_outcomes": 1,
88143
+ * "partial": false
88144
+ * },
88145
+ * {
88146
+ * "date": "2026-08-15",
88147
+ * "spend": null,
88148
+ * "revenue": 70000,
88149
+ * "outcomes": 1,
88150
+ * "attributed_outcomes": 1,
88151
+ * "partial": false
88152
+ * },
88153
+ * {
88154
+ * "date": "2026-08-16",
88155
+ * "spend": null,
88156
+ * "revenue": 50000,
88157
+ * "outcomes": 1,
88158
+ * "attributed_outcomes": 1,
88159
+ * "partial": false
88160
+ * },
88161
+ * {
88162
+ * "date": "2026-08-17",
88163
+ * "spend": null,
88164
+ * "revenue": 100000,
88165
+ * "outcomes": 2,
88166
+ * "attributed_outcomes": 1,
88167
+ * "partial": false
88168
+ * },
88169
+ * {
88170
+ * "date": "2026-08-18",
88171
+ * "spend": null,
88172
+ * "revenue": 90000,
88173
+ * "outcomes": 1,
88174
+ * "attributed_outcomes": 1,
88175
+ * "partial": false
88176
+ * },
88177
+ * {
88178
+ * "date": "2026-08-19",
88179
+ * "spend": null,
88180
+ * "revenue": 90000,
88181
+ * "outcomes": 1,
88182
+ * "attributed_outcomes": 1,
88183
+ * "partial": false
88184
+ * },
88185
+ * {
88186
+ * "date": "2026-08-20",
88187
+ * "spend": null,
88188
+ * "revenue": 110000,
88189
+ * "outcomes": 2,
88190
+ * "attributed_outcomes": 1,
88191
+ * "partial": false
88192
+ * },
88193
+ * {
88194
+ * "date": "2026-08-21",
88195
+ * "spend": null,
88196
+ * "revenue": 80000,
88197
+ * "outcomes": 1,
88198
+ * "attributed_outcomes": 1,
88199
+ * "partial": false
88200
+ * },
88201
+ * {
88202
+ * "date": "2026-08-22",
88203
+ * "spend": null,
88204
+ * "revenue": 60000,
88205
+ * "outcomes": 1,
88206
+ * "attributed_outcomes": 1,
88207
+ * "partial": false
88208
+ * },
88209
+ * {
88210
+ * "date": "2026-08-23",
88211
+ * "spend": null,
88212
+ * "revenue": 60000,
88213
+ * "outcomes": 1,
88214
+ * "attributed_outcomes": 1,
88215
+ * "partial": false
88216
+ * }
88217
+ * ]
87732
88218
  * }
87733
88219
  * }
87734
88220
  */
@@ -87862,6 +88348,8 @@ interface paths {
87862
88348
  /** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
87863
88349
  sample?: "1" | "true";
87864
88350
  limit?: number;
88351
+ /** @description `1` adds each row’s `series[]`: one `{date, spend, outcome_count}` per day of the window (the last 92 days at most). */
88352
+ series?: "1" | "true";
87865
88353
  };
87866
88354
  header?: never;
87867
88355
  path?: never;
@@ -87888,7 +88376,164 @@ interface paths {
87888
88376
  * "outcome_value": 3120000,
87889
88377
  * "roas": 3.69,
87890
88378
  * "direct_cash_value": 2100000,
87891
- * "inherited_cash_value": 600000
88379
+ * "inherited_cash_value": 600000,
88380
+ * "top_ad": {
88381
+ * "external_id": "120212000000000009",
88382
+ * "name": "Video testimonio 15s",
88383
+ * "creative_thumbnail_url": "https://cdn.vitrinadev.com/examples/ads/video-testimonio-15s.jpg"
88384
+ * },
88385
+ * "series": [
88386
+ * {
88387
+ * "date": "2026-08-24",
88388
+ * "spend": 31800,
88389
+ * "outcome_count": 1
88390
+ * },
88391
+ * {
88392
+ * "date": "2026-08-25",
88393
+ * "spend": 35700,
88394
+ * "outcome_count": 2
88395
+ * },
88396
+ * {
88397
+ * "date": "2026-08-26",
88398
+ * "spend": 28700,
88399
+ * "outcome_count": 1
88400
+ * },
88401
+ * {
88402
+ * "date": "2026-08-27",
88403
+ * "spend": 33400,
88404
+ * "outcome_count": 1
88405
+ * },
88406
+ * {
88407
+ * "date": "2026-08-28",
88408
+ * "spend": 30300,
88409
+ * "outcome_count": 1
88410
+ * },
88411
+ * {
88412
+ * "date": "2026-08-29",
88413
+ * "spend": 19700,
88414
+ * "outcome_count": 1
88415
+ * },
88416
+ * {
88417
+ * "date": "2026-08-30",
88418
+ * "spend": 22100,
88419
+ * "outcome_count": 1
88420
+ * },
88421
+ * {
88422
+ * "date": "2026-08-31",
88423
+ * "spend": 28700,
88424
+ * "outcome_count": 1
88425
+ * },
88426
+ * {
88427
+ * "date": "2026-09-01",
88428
+ * "spend": 33400,
88429
+ * "outcome_count": 1
88430
+ * },
88431
+ * {
88432
+ * "date": "2026-09-02",
88433
+ * "spend": 30300,
88434
+ * "outcome_count": 1
88435
+ * },
88436
+ * {
88437
+ * "date": "2026-09-03",
88438
+ * "spend": 31800,
88439
+ * "outcome_count": 1
88440
+ * },
88441
+ * {
88442
+ * "date": "2026-09-04",
88443
+ * "spend": 35700,
88444
+ * "outcome_count": 1
88445
+ * },
88446
+ * {
88447
+ * "date": "2026-09-05",
88448
+ * "spend": 17800,
88449
+ * "outcome_count": 1
88450
+ * },
88451
+ * {
88452
+ * "date": "2026-09-06",
88453
+ * "spend": 20700,
88454
+ * "outcome_count": 1
88455
+ * },
88456
+ * {
88457
+ * "date": "2026-09-07",
88458
+ * "spend": 30300,
88459
+ * "outcome_count": 1
88460
+ * },
88461
+ * {
88462
+ * "date": "2026-09-08",
88463
+ * "spend": 31800,
88464
+ * "outcome_count": 1
88465
+ * },
88466
+ * {
88467
+ * "date": "2026-09-09",
88468
+ * "spend": 35700,
88469
+ * "outcome_count": 1
88470
+ * },
88471
+ * {
88472
+ * "date": "2026-09-10",
88473
+ * "spend": 28700,
88474
+ * "outcome_count": 1
88475
+ * },
88476
+ * {
88477
+ * "date": "2026-09-11",
88478
+ * "spend": 33400,
88479
+ * "outcome_count": 1
88480
+ * },
88481
+ * {
88482
+ * "date": "2026-09-12",
88483
+ * "spend": 18800,
88484
+ * "outcome_count": 1
88485
+ * },
88486
+ * {
88487
+ * "date": "2026-09-13",
88488
+ * "spend": 19700,
88489
+ * "outcome_count": 1
88490
+ * },
88491
+ * {
88492
+ * "date": "2026-09-14",
88493
+ * "spend": 35700,
88494
+ * "outcome_count": 1
88495
+ * },
88496
+ * {
88497
+ * "date": "2026-09-15",
88498
+ * "spend": 28700,
88499
+ * "outcome_count": 1
88500
+ * },
88501
+ * {
88502
+ * "date": "2026-09-16",
88503
+ * "spend": 33400,
88504
+ * "outcome_count": 1
88505
+ * },
88506
+ * {
88507
+ * "date": "2026-09-17",
88508
+ * "spend": 30200,
88509
+ * "outcome_count": 1
88510
+ * },
88511
+ * {
88512
+ * "date": "2026-09-18",
88513
+ * "spend": 31800,
88514
+ * "outcome_count": 1
88515
+ * },
88516
+ * {
88517
+ * "date": "2026-09-19",
88518
+ * "spend": 22100,
88519
+ * "outcome_count": 1
88520
+ * },
88521
+ * {
88522
+ * "date": "2026-09-20",
88523
+ * "spend": 17800,
88524
+ * "outcome_count": 1
88525
+ * },
88526
+ * {
88527
+ * "date": "2026-09-21",
88528
+ * "spend": 33400,
88529
+ * "outcome_count": 1
88530
+ * },
88531
+ * {
88532
+ * "date": "2026-09-22",
88533
+ * "spend": 13600,
88534
+ * "outcome_count": 1
88535
+ * }
88536
+ * ]
87892
88537
  * }
87893
88538
  * ]
87894
88539
  * }
@@ -88056,6 +88701,8 @@ interface paths {
88056
88701
  * "credited_weight": 1,
88057
88702
  * "touch_count": 3,
88058
88703
  * "path_length": 3,
88704
+ * "first_touch_time": "2026-09-06T21:14:00.000Z",
88705
+ * "last_touch_time": "2026-09-11T13:02:00.000Z",
88059
88706
  * "is_inherited": false
88060
88707
  * }
88061
88708
  * ]
@@ -88186,6 +88833,8 @@ interface paths {
88186
88833
  /** @description A rolling lookback, not a date range — Atribu’s `top-performers` operation takes no `from`/`to`. Defaults to `28d`. */
88187
88834
  window?: "7d" | "14d" | "28d" | "lifetime";
88188
88835
  limit?: number;
88836
+ /** @description `1` adds each row’s `series[]`: the last 14 days of `{date, spend, ctr}` (the first 50 rows; later rows answer `series: null`). */
88837
+ series?: "1" | "true";
88189
88838
  /** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
88190
88839
  sample?: "1" | "true";
88191
88840
  };
@@ -88209,6 +88858,10 @@ interface paths {
88209
88858
  * "ad_external_id": "120212000000000009",
88210
88859
  * "ad_name": "Video testimonio 15s",
88211
88860
  * "campaign_name": "Leads · Septiembre",
88861
+ * "campaign": {
88862
+ * "external_id": "120211000000000001",
88863
+ * "name": "Leads · Septiembre"
88864
+ * },
88212
88865
  * "ad_set_name": "Santiago 25-45",
88213
88866
  * "creative_thumbnail_url": null,
88214
88867
  * "score_window": "28d",
@@ -88223,7 +88876,79 @@ interface paths {
88223
88876
  * "attributed_revenue": 480000,
88224
88877
  * "roas": 3.2,
88225
88878
  * "fatigue_state": "active",
88226
- * "fatigue_risk_tier": "low"
88879
+ * "fatigue_risk_tier": "low",
88880
+ * "series": [
88881
+ * {
88882
+ * "date": "2026-09-09",
88883
+ * "spend": 6300,
88884
+ * "ctr": 1.79
88885
+ * },
88886
+ * {
88887
+ * "date": "2026-09-10",
88888
+ * "spend": 7000,
88889
+ * "ctr": 1.8
88890
+ * },
88891
+ * {
88892
+ * "date": "2026-09-11",
88893
+ * "spend": 5600,
88894
+ * "ctr": 1.82
88895
+ * },
88896
+ * {
88897
+ * "date": "2026-09-12",
88898
+ * "spend": 4100,
88899
+ * "ctr": 1.84
88900
+ * },
88901
+ * {
88902
+ * "date": "2026-09-13",
88903
+ * "spend": 3700,
88904
+ * "ctr": 1.86
88905
+ * },
88906
+ * {
88907
+ * "date": "2026-09-14",
88908
+ * "spend": 6300,
88909
+ * "ctr": 1.87
88910
+ * },
88911
+ * {
88912
+ * "date": "2026-09-15",
88913
+ * "spend": 7000,
88914
+ * "ctr": 1.89
88915
+ * },
88916
+ * {
88917
+ * "date": "2026-09-16",
88918
+ * "spend": 5600,
88919
+ * "ctr": 1.91
88920
+ * },
88921
+ * {
88922
+ * "date": "2026-09-17",
88923
+ * "spend": 6600,
88924
+ * "ctr": 1.93
88925
+ * },
88926
+ * {
88927
+ * "date": "2026-09-18",
88928
+ * "spend": 6000,
88929
+ * "ctr": 1.94
88930
+ * },
88931
+ * {
88932
+ * "date": "2026-09-19",
88933
+ * "spend": 3900,
88934
+ * "ctr": 1.96
88935
+ * },
88936
+ * {
88937
+ * "date": "2026-09-20",
88938
+ * "spend": 4300,
88939
+ * "ctr": 1.98
88940
+ * },
88941
+ * {
88942
+ * "date": "2026-09-21",
88943
+ * "spend": 5600,
88944
+ * "ctr": 2
88945
+ * },
88946
+ * {
88947
+ * "date": "2026-09-22",
88948
+ * "spend": 3000,
88949
+ * "ctr": 2.01
88950
+ * }
88951
+ * ]
88227
88952
  * }
88228
88953
  * ]
88229
88954
  * }
@@ -88420,11 +89145,16 @@ interface paths {
88420
89145
  * }
88421
89146
  * },
88422
89147
  * "attribution_coverage": {
88423
- * "total_conversions": 200,
88424
- * "with_full_utms": 162,
88425
- * "with_fbclid_only": 18,
88426
- * "with_no_tracking": 20,
88427
- * "coverage_percent": 90
89148
+ * "total_conversions": 44,
89149
+ * "with_full_utms": 27,
89150
+ * "with_fbclid_only": 5,
89151
+ * "with_no_tracking": 12,
89152
+ * "coverage_percent": 72.7
89153
+ * },
89154
+ * "outcomes_coverage": {
89155
+ * "outcomes": 42,
89156
+ * "attributed_outcomes": 31,
89157
+ * "coverage_percent": 73.8
88428
89158
  * }
88429
89159
  * }
88430
89160
  * }
@@ -89728,6 +90458,207 @@ interface paths {
89728
90458
  patch?: never;
89729
90459
  trace?: never;
89730
90460
  };
90461
+ "/ads/actions/executions": {
90462
+ parameters: {
90463
+ query?: never;
90464
+ header?: never;
90465
+ path?: never;
90466
+ cookie?: never;
90467
+ };
90468
+ /**
90469
+ * The actions journal («Lo que hice»)
90470
+ * @description Every action execution of the workspace (execute and rollback rows), newest first, each with what it touched (`target`) and who confirmed it (`created_by`, a display name — only for a caller holding `memberships:read`). `from`/`to` bound `created_at` by America/Santiago day; page with `before=<meta.next_before>`. Real mode lists real executions only; with `sample=1` it lists what was simulated plus two example rows of today (also readable on `GET /ads/actions/executions/{id}`; not undoable: `rollback_available: false`).
90471
+ */
90472
+ get: {
90473
+ parameters: {
90474
+ query?: {
90475
+ /** @description First day (inclusive, America/Santiago) on `created_at`. */
90476
+ from?: string;
90477
+ /** @description Last day (inclusive, America/Santiago) on `created_at`. */
90478
+ to?: string;
90479
+ /** @description Paging cursor: a previous page’s `meta.next_before`, verbatim. */
90480
+ before?: string;
90481
+ /** @description Rows per page (default 20, max 50). */
90482
+ limit?: number;
90483
+ /** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
90484
+ sample?: "1" | "true";
90485
+ };
90486
+ header?: never;
90487
+ path?: never;
90488
+ cookie?: never;
90489
+ };
90490
+ requestBody?: never;
90491
+ responses: {
90492
+ /** @description A page of the journal */
90493
+ 200: {
90494
+ headers: {
90495
+ [name: string]: unknown;
90496
+ };
90497
+ content: {
90498
+ /**
90499
+ * @example {
90500
+ * "data": [
90501
+ * {
90502
+ * "id": "e5e5e5e5-0000-4000-8000-000000000003",
90503
+ * "action_key": "pause_ad:120212000000000006:2026-09-23",
90504
+ * "kind": "pause_ad",
90505
+ * "status": "succeeded",
90506
+ * "outcome": {
90507
+ * "summary": "Anuncio pausado en Meta.",
90508
+ * "engine_action_id": "f7f7f7f7-0000-4000-8000-000000000002",
90509
+ * "applied_at": "2026-09-23T16:20:04.000Z"
90510
+ * },
90511
+ * "error": null,
90512
+ * "rollback_available": true,
90513
+ * "rollback_of": null,
90514
+ * "simulated": false,
90515
+ * "created_at": "2026-09-23T16:20:01.000Z",
90516
+ * "finished_at": "2026-09-23T16:20:04.000Z",
90517
+ * "target": {
90518
+ * "level": "ad",
90519
+ * "external_id": "120212000000000006",
90520
+ * "name": "Blanqueamiento · Sonrisa"
90521
+ * },
90522
+ * "created_by": "Dueña Ejemplo"
90523
+ * },
90524
+ * {
90525
+ * "id": "e5e5e5e5-0000-4000-8000-000000000001",
90526
+ * "action_key": "budget_change:120211000000000077:2026-09-23",
90527
+ * "kind": "budget_change",
90528
+ * "status": "succeeded",
90529
+ * "outcome": {
90530
+ * "summary": "Cambio aplicado en Meta.",
90531
+ * "engine_action_id": "f7f7f7f7-0000-4000-8000-000000000001",
90532
+ * "applied_at": "2026-09-23T15:01:12.000Z"
90533
+ * },
90534
+ * "error": null,
90535
+ * "rollback_available": true,
90536
+ * "rollback_of": null,
90537
+ * "simulated": false,
90538
+ * "created_at": "2026-09-23T15:01:10.000Z",
90539
+ * "finished_at": "2026-09-23T15:01:12.000Z",
90540
+ * "target": {
90541
+ * "level": "ad_set",
90542
+ * "external_id": "120211000000000077",
90543
+ * "name": "Implantes · Las Condes"
90544
+ * },
90545
+ * "created_by": null
90546
+ * }
90547
+ * ],
90548
+ * "meta": {
90549
+ * "next_before": "2026-09-23T15:01:10.000000Z,e5e5e5e5-0000-4000-8000-000000000001"
90550
+ * }
90551
+ * }
90552
+ */
90553
+ "application/json": {
90554
+ data: components["schemas"]["AdsActionExecutionListItem"][];
90555
+ meta: {
90556
+ /** @description Opaque cursor (`<created_at>,<id>`): pass as `before`. */
90557
+ next_before: string | null;
90558
+ };
90559
+ };
90560
+ };
90561
+ };
90562
+ /** @description Validation error */
90563
+ 400: {
90564
+ headers: {
90565
+ [name: string]: unknown;
90566
+ };
90567
+ content: {
90568
+ "application/json": components["schemas"]["Error"];
90569
+ };
90570
+ };
90571
+ /** @description Unauthorized */
90572
+ 401: {
90573
+ headers: {
90574
+ [name: string]: unknown;
90575
+ };
90576
+ content: {
90577
+ "application/json": components["schemas"]["Error"];
90578
+ };
90579
+ };
90580
+ /** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
90581
+ 402: {
90582
+ headers: {
90583
+ [name: string]: unknown;
90584
+ };
90585
+ content: {
90586
+ /**
90587
+ * @example {
90588
+ * "error": {
90589
+ * "code": "ENTITLEMENT_NOT_ACTIVE",
90590
+ * "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
90591
+ * "details": {
90592
+ * "required": [
90593
+ * "vitrina_ads"
90594
+ * ],
90595
+ * "active": [],
90596
+ * "feature": "vitrina_ads",
90597
+ * "entitlement_state": "off"
90598
+ * }
90599
+ * }
90600
+ * }
90601
+ */
90602
+ "application/json": components["schemas"]["Error"];
90603
+ };
90604
+ };
90605
+ /** @description Forbidden */
90606
+ 403: {
90607
+ headers: {
90608
+ [name: string]: unknown;
90609
+ };
90610
+ content: {
90611
+ "application/json": components["schemas"]["Error"];
90612
+ };
90613
+ };
90614
+ /** @description Not found */
90615
+ 404: {
90616
+ headers: {
90617
+ [name: string]: unknown;
90618
+ };
90619
+ content: {
90620
+ "application/json": components["schemas"]["Error"];
90621
+ };
90622
+ };
90623
+ /** @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. */
90624
+ 409: {
90625
+ headers: {
90626
+ [name: string]: unknown;
90627
+ };
90628
+ content: {
90629
+ /**
90630
+ * @example {
90631
+ * "error": {
90632
+ * "code": "ADS_KEY_NEEDS_REMINT",
90633
+ * "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
90634
+ * "details": {
90635
+ * "key_kind": "core"
90636
+ * }
90637
+ * }
90638
+ * }
90639
+ */
90640
+ "application/json": components["schemas"]["Error"];
90641
+ };
90642
+ };
90643
+ /** @description Rate limited */
90644
+ 429: {
90645
+ headers: {
90646
+ [name: string]: unknown;
90647
+ };
90648
+ content: {
90649
+ "application/json": components["schemas"]["Error"];
90650
+ };
90651
+ };
90652
+ };
90653
+ };
90654
+ put?: never;
90655
+ post?: never;
90656
+ delete?: never;
90657
+ options?: never;
90658
+ head?: never;
90659
+ patch?: never;
90660
+ trace?: never;
90661
+ };
89731
90662
  "/ads/actions/executions/{id}": {
89732
90663
  parameters: {
89733
90664
  query?: never;
@@ -90718,6 +91649,7 @@ interface paths {
90718
91649
  * "ad": {
90719
91650
  * "name": null,
90720
91651
  * "ad_set_name": null,
91652
+ * "creative_thumbnail_url": null,
90721
91653
  * "campaign": {
90722
91654
  * "external_id": "120211000000000001",
90723
91655
  * "name": "Ortodoncia invisible · Septiembre"
@@ -109894,6 +110826,17 @@ interface components {
109894
110826
  last_synced_at: string | null;
109895
110827
  };
109896
110828
  MetaAdsAdsResponse: components["schemas"]["MetaAdsAdsNotConnected"] | components["schemas"]["MetaAdsAdsConnected"];
110829
+ AdsOverviewDay: {
110830
+ date: string;
110831
+ /** @description `null` exactly when the engine could not scope spend. */
110832
+ spend: number | null;
110833
+ /** @description Attributed value that day. */
110834
+ revenue: number;
110835
+ outcomes: number;
110836
+ attributed_outcomes: number;
110837
+ /** @description `true` on the day still running (today, America/Santiago): end the solid line before it. */
110838
+ partial: boolean;
110839
+ };
109897
110840
  AdsOverview: {
109898
110841
  current: {
109899
110842
  spend: number | null;
@@ -109947,6 +110890,10 @@ interface components {
109947
110890
  [key: string]: number;
109948
110891
  };
109949
110892
  };
110893
+ /** @description `grain=day` only: every day of the window, oldest first. */
110894
+ days?: components["schemas"]["AdsOverviewDay"][];
110895
+ /** @description `grain=day` only: every day of the previous window of equal length. */
110896
+ previous_days?: components["schemas"]["AdsOverviewDay"][];
109950
110897
  };
109951
110898
  AdsCampaigns: {
109952
110899
  data: {
@@ -109959,6 +110906,20 @@ interface components {
109959
110906
  roas: number;
109960
110907
  direct_cash_value: number | null;
109961
110908
  inherited_cash_value: number | null;
110909
+ /** @description The campaign’s highest-spend ad among the top-50 scored ads of the creatives read (the rolling window nearest this range: 7d / 14d / 28d); `null` when unknown. */
110910
+ top_ad: {
110911
+ /** @description The ad’s platform (Meta) id. */
110912
+ external_id: string;
110913
+ name: string | null;
110914
+ creative_thumbnail_url: string | null;
110915
+ } | null;
110916
+ /** @description `series=1` only. `null` when the daily delivery read failed. A day without delivery is `spend: 0`. */
110917
+ series?: {
110918
+ date: string;
110919
+ spend: number;
110920
+ /** @description Conversions credited primarily to the campaign that day (each conversion counted once, on its largest-credit campaign). `null` when unknown: credit not available yet, the campaign outside the credited set read (top 25 by outcomes), or a day before the credit window (the last 92 days). Under a multi-touch model the days can sum to less than the row’s `outcome_count`. */
110921
+ outcome_count: number | null;
110922
+ }[] | null;
109962
110923
  }[];
109963
110924
  };
109964
110925
  AdsAttributedSales: {
@@ -109976,6 +110937,8 @@ interface components {
109976
110937
  credited_weight: number;
109977
110938
  touch_count: number;
109978
110939
  path_length: number | null;
110940
+ first_touch_time: string | null;
110941
+ last_touch_time: string | null;
109979
110942
  is_inherited: boolean;
109980
110943
  }[];
109981
110944
  };
@@ -109984,6 +110947,12 @@ interface components {
109984
110947
  ad_external_id: string;
109985
110948
  ad_name: string | null;
109986
110949
  campaign_name: string | null;
110950
+ /** @description The ad’s campaign; `null` when the engine does not say. */
110951
+ campaign: {
110952
+ /** @description The campaign’s platform id = an `/ads/campaigns` row’s `campaign_external_id`. Join by this, never by name. */
110953
+ external_id: string;
110954
+ name: string | null;
110955
+ } | null;
109987
110956
  ad_set_name: string | null;
109988
110957
  creative_thumbnail_url: string | null;
109989
110958
  score_window: string;
@@ -110001,6 +110970,13 @@ interface components {
110001
110970
  fatigue_state: "active" | "paused" | "degraded" | null;
110002
110971
  /** @enum {string|null} */
110003
110972
  fatigue_risk_tier: "low" | "medium" | "high" | "critical" | null;
110973
+ /** @description `series=1` only: the last 14 days (America/Santiago). `null` past the first 50 rows or when this ad’s daily read failed (never a zero-filled line for an unknown); `spend: 0` days are measured no-delivery days. */
110974
+ series?: {
110975
+ date: string;
110976
+ spend: number;
110977
+ /** @description Percent (clicks ÷ impressions × 100), like the row’s `ctr`; `null` on a day without impressions. */
110978
+ ctr: number | null;
110979
+ }[] | null;
110004
110980
  }[];
110005
110981
  };
110006
110982
  AdsHealth: {
@@ -110049,6 +111025,12 @@ interface components {
110049
111025
  with_no_tracking: number;
110050
111026
  coverage_percent: number;
110051
111027
  };
111028
+ /** @description THE population «cobertura» and «outcomes» share: the same counts `/ads/overview` answers for this window and model (`current.outcomes`, `current.attributed_outcomes`, `current.coverage_percent`). Salud prints this; `attribution_coverage` is the tracking-signal diagnostic (the engine’s attribution-eligible conversions and whether each carried a UTM / click id) — a different population, never shown as «de N». `null` when the overview read failed (the rest of the page stands). */
111029
+ outcomes_coverage: {
111030
+ outcomes: number;
111031
+ attributed_outcomes: number;
111032
+ coverage_percent: number;
111033
+ } | null;
110052
111034
  };
110053
111035
  AdsFact: {
110054
111036
  /** @description Stable fact key (`roas`, `best_campaign_name`, …) — a vocabulary name, not a resource id. */
@@ -110060,7 +111042,7 @@ interface components {
110060
111042
  /** @description The exact es-CL string a sentence quotes (`3,7×`, `$845.200`, `—`). */
110061
111043
  display: string;
110062
111044
  /** @enum {string} */
110063
- format: "clp" | "int" | "times" | "pct" | "text" | "date";
111045
+ format: "clp" | "int" | "times" | "pct" | "text" | "date" | "days";
110064
111046
  /** @description Where the value was read. */
110065
111047
  source: string;
110066
111048
  /**
@@ -110088,7 +111070,7 @@ interface components {
110088
111070
  fact_key: string;
110089
111071
  value: number | string | null;
110090
111072
  /** @enum {string} */
110091
- format: "clp" | "int" | "times" | "pct" | "text" | "date";
111073
+ format: "clp" | "int" | "times" | "pct" | "text" | "date" | "days";
110092
111074
  /** @description The substring of `lead.text` to count up. */
110093
111075
  display: string;
110094
111076
  /** @description Where that whole figure starts in `lead.text` — split there, not on the first occurrence of `display` (a `12` can also sit inside `$12.000`). */
@@ -110223,6 +111205,17 @@ interface components {
110223
111205
  created_at: string;
110224
111206
  finished_at: string | null;
110225
111207
  };
111208
+ AdsActionExecutionListItem: components["schemas"]["AdsActionExecution"] & {
111209
+ target: {
111210
+ /** @enum {string} */
111211
+ level: "ad" | "ad_set" | "campaign" | "profile";
111212
+ /** @description The Meta id of what was touched; `null` for a profile-level action. */
111213
+ external_id: string | null;
111214
+ name: string | null;
111215
+ };
111216
+ /** @description Display name of the member who confirmed it — only for a caller holding `memberships:read` (sample mode included, for the rows the owner simulated); `null` otherwise, for an API key, and on the two sample example rows. Write «Vitrina» for `null`. */
111217
+ created_by: string | null;
111218
+ };
110226
111219
  AdsTrackingKey: {
110227
111220
  key_id: string;
110228
111221
  public_key: string;
@@ -110240,6 +111233,7 @@ interface components {
110240
111233
  snippet: string;
110241
111234
  setup_checklist: string[];
110242
111235
  };
111236
+ /** @description No per-day series: tag events are counted over the last 24 hours only (`events_24h`); a day-by-day count is not available. */
110243
111237
  AdsTrackingStatus: {
110244
111238
  installed: boolean;
110245
111239
  last_seen_at: string | null;
@@ -110274,6 +111268,8 @@ interface components {
110274
111268
  ad: {
110275
111269
  name: string | null;
110276
111270
  ad_set_name: string | null;
111271
+ /** @description The ad’s thumbnail (Ads v3). `null` on real data today (the engine’s credit is campaign-grain — it names no ad) and in sample mode (the UI draws a placeholder); render the megaphone glyph for `null`. */
111272
+ creative_thumbnail_url: string | null;
110277
111273
  campaign: {
110278
111274
  /** @description The campaign’s PLATFORM id (what `campaign_id` filters on). */
110279
111275
  external_id: string;