lookout-mcp 0.2.0 → 0.3.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.ts CHANGED
@@ -29,12 +29,21 @@ interface paths {
29
29
  };
30
30
  content: {
31
31
  "application/json": {
32
+ /** @description The workspace's boards. */
32
33
  boards: {
33
- /** Format: uuid */
34
+ /**
35
+ * Format: uuid
36
+ * @description The board's id. Use it in /v1/boards/{id}/… paths.
37
+ */
34
38
  id: string;
39
+ /** @description The board's name. */
35
40
  name: string;
41
+ /** @description How many sites are on the board. */
36
42
  siteCount: number;
37
- /** Format: date-time */
43
+ /**
44
+ * Format: date-time
45
+ * @description When the board was created (ISO 8601).
46
+ */
38
47
  createdAt: string;
39
48
  }[];
40
49
  };
@@ -92,31 +101,54 @@ interface paths {
92
101
  };
93
102
  content: {
94
103
  "application/json": {
104
+ /** @description The board. */
95
105
  board: {
96
- /** Format: uuid */
106
+ /**
107
+ * Format: uuid
108
+ * @description The board's id.
109
+ */
97
110
  id: string;
111
+ /** @description The board's name. */
98
112
  name: string;
99
113
  };
114
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
100
115
  range: string;
116
+ /** @description Every site on the board, busiest first. */
101
117
  sites: {
118
+ /** @description The site's Vercel project id. Use it in /v1/sites/{id}/… paths. */
102
119
  id: string;
120
+ /** @description The site's production domain. */
103
121
  domain: string;
122
+ /** @description Unique visitors in the range. */
104
123
  visitors: number;
124
+ /** @description Visitors in the previous period of the same length; null when there is nothing to compare with. */
105
125
  previousVisitors: number | null;
126
+ /** @description Change in visitors against the previous period, in percent (12.5 is +12.5%); null when there is nothing to compare with. */
106
127
  change: number | null;
128
+ /** @description Page views in the range. */
107
129
  pageviews: number;
130
+ /** @description Page views per visitor; null when it can't be worked out. */
108
131
  pagesPerVisit: number | null;
132
+ /** @description The referrer that sent the most visitors; null when there is none. */
109
133
  topSource: {
134
+ /** @description The referrer host. */
110
135
  name: string;
136
+ /** @description Percent of the site's visitors, 0–100. */
111
137
  share: number;
112
138
  } | null;
139
+ /** @description The country with the most visitors; null when there is none. */
113
140
  topCountry: {
141
+ /** @description The country. */
114
142
  name: string;
143
+ /** @description Percent of the site's visitors, 0–100. */
115
144
  share: number;
116
145
  } | null;
146
+ /** @description The site's goal, a Vercel custom event; null when the site has no goal. */
117
147
  goal: string | null;
148
+ /** @description Goal conversions in the range; null when the site has no goal. */
118
149
  conversions: number | null;
119
150
  }[];
151
+ /** @description Sites whose figures couldn't be read just now (team access lost or Vercel slow), by domain. */
120
152
  unavailable: string[];
121
153
  };
122
154
  };
@@ -180,16 +212,26 @@ interface paths {
180
212
  };
181
213
  content: {
182
214
  "application/json": {
215
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
183
216
  range: string;
217
+ /** @description The board's sites that answered, with their visitors. */
184
218
  nodes: {
219
+ /** @description The site's Vercel project id. */
185
220
  projectId: string;
221
+ /** @description The site's production domain. */
186
222
  domain: string;
223
+ /** @description Unique visitors in the range. */
187
224
  visitors: number;
225
+ /** @description Where most of the site's visitors came from outside the board: up to 3 referrer hosts or Direct, busiest first. */
188
226
  sources: string[];
189
227
  }[];
228
+ /** @description Visitors who arrived at one site of the board from another. */
190
229
  hops: {
230
+ /** @description The project id of the site they came from. */
191
231
  from: string;
232
+ /** @description The project id of the site they arrived at. */
192
233
  to: string;
234
+ /** @description Visitors who arrived at to from from. */
193
235
  visitors: number;
194
236
  }[];
195
237
  };
@@ -254,45 +296,85 @@ interface paths {
254
296
  };
255
297
  content: {
256
298
  "application/json": {
299
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
257
300
  range: string;
301
+ /** @description The board's main site (its busiest), which isn't graded; null when the board has none. */
258
302
  mainSite: {
303
+ /** @description The site's Vercel project id. */
259
304
  projectId: string;
305
+ /** @description The site's production domain. */
260
306
  domain: string;
261
307
  } | null;
308
+ /** @description One row per graded landing page, best first. */
262
309
  rows: {
310
+ /** @description The site's Vercel project id. */
263
311
  projectId: string;
312
+ /** @description The site's production domain. */
264
313
  domain: string;
314
+ /** @description Unique visitors in the range. */
265
315
  visitors: number;
266
- /** @enum {string} */
316
+ /**
317
+ * @description The grade, from A (best) to D.
318
+ * @enum {string}
319
+ */
267
320
  grade: "A" | "B" | "C" | "D";
321
+ /** @description Points out of the most the graded factors allow, 0–1. Rows sort by it. */
268
322
  score: number;
323
+ /** @description What the grade is made of. */
269
324
  factors: {
270
- /** @enum {string} */
271
- key: "trend" | "pages" | "conv" | "speed" | "flow";
325
+ /**
326
+ * @description The factor: trend, pages (pages per visit), conv (conversion), speed (Core Web Vitals), flow (visitors sent onward) or paid (cost per conversion).
327
+ * @enum {string}
328
+ */
329
+ key: "trend" | "pages" | "conv" | "speed" | "flow" | "paid";
330
+ /** @description The factor's name as the dashboard shows it. */
272
331
  label: string;
332
+ /** @description The value as the dashboard shows it (for example +12% or 3.2%); — when not graded. */
273
333
  value: string;
274
- /** @enum {string} */
334
+ /**
335
+ * @description good, ok or weak; na when the factor isn't graded.
336
+ * @enum {string}
337
+ */
275
338
  rating: "good" | "ok" | "weak" | "na";
339
+ /** @description What the value is measured against (for example vs previous week). */
276
340
  bench: string;
341
+ /** @description A short note on the value. */
277
342
  note: string;
343
+ /** @description 0–100: the length of the bar under the value. */
278
344
  bar: number;
279
345
  }[];
346
+ /** @description A short reason: what holds the page back, or what it does well. */
280
347
  why: string;
348
+ /** @description The reason in one full sentence. */
281
349
  reason: string;
350
+ /** @description What to fix first: the fix for the worst factor. */
282
351
  next: string;
352
+ /** @description Whether any factor is weak. */
283
353
  fixable: boolean;
354
+ /** @description Whether some factor couldn't be graded (no goal, or Speed Insights off). */
284
355
  partial: boolean;
356
+ /** @description The p75 Core Web Vitals behind the speed factor; null without Speed Insights. */
285
357
  vitals: {
358
+ /** @description Largest Contentful Paint at p75, in milliseconds; null without samples. */
286
359
  lcp: number | null;
360
+ /** @description Interaction to Next Paint at p75, in milliseconds; null without samples. */
287
361
  inp: number | null;
362
+ /** @description Cumulative Layout Shift at p75 (no unit); null without samples. */
288
363
  cls: number | null;
289
364
  } | null;
290
365
  }[];
366
+ /** @description Sites whose figures couldn't be read just now (team access lost or Vercel slow), by domain. */
291
367
  unavailable: string[];
292
- /** @default [] */
368
+ /**
369
+ * @description Landing pages with too few visitors to grade, busiest first.
370
+ * @default []
371
+ */
293
372
  tooFew: {
373
+ /** @description The site's Vercel project id. */
294
374
  projectId: string;
375
+ /** @description The site's production domain. */
295
376
  domain: string;
377
+ /** @description Unique visitors in the range. */
296
378
  visitors: number;
297
379
  }[];
298
380
  };
@@ -357,29 +439,52 @@ interface paths {
357
439
  };
358
440
  content: {
359
441
  "application/json": {
442
+ /** @description The site. */
360
443
  site: {
444
+ /** @description The site's Vercel project id. */
361
445
  id: string;
446
+ /** @description The project's name in Vercel. */
362
447
  name: string;
448
+ /** @description The site's production domain. */
363
449
  domain: string;
364
450
  };
451
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
365
452
  range: string;
453
+ /** @description Core Web Vitals from Vercel Speed Insights: p75 of real visitors, production only, for the range. */
366
454
  speed: {
455
+ /** @description Largest Contentful Paint at p75, in milliseconds; null without samples. */
367
456
  lcpMs: number | null;
457
+ /** @description Interaction to Next Paint at p75, in milliseconds; null without samples. */
368
458
  inpMs: number | null;
459
+ /** @description Cumulative Layout Shift at p75 (no unit); null without samples. */
369
460
  cls: number | null;
461
+ /** @description How many page loads the values come from. */
370
462
  samples: number;
371
- /** @enum {string} */
463
+ /**
464
+ * @description passing when LCP, INP and CLS are all good on every device with samples; else needs_work or poor; off when there are no samples (Speed Insights not on).
465
+ * @enum {string}
466
+ */
372
467
  status: "passing" | "needs_work" | "poor" | "off";
468
+ /** @description The values for mobile visitors; null when there are none. */
373
469
  mobile: {
470
+ /** @description Largest Contentful Paint at p75, in milliseconds; null without samples. */
374
471
  lcpMs: number | null;
472
+ /** @description Interaction to Next Paint at p75, in milliseconds; null without samples. */
375
473
  inpMs: number | null;
474
+ /** @description Cumulative Layout Shift at p75 (no unit); null without samples. */
376
475
  cls: number | null;
476
+ /** @description How many page loads the values come from. */
377
477
  samples: number;
378
478
  } | null;
479
+ /** @description The values for desktop visitors; null when there are none. */
379
480
  desktop: {
481
+ /** @description Largest Contentful Paint at p75, in milliseconds; null without samples. */
380
482
  lcpMs: number | null;
483
+ /** @description Interaction to Next Paint at p75, in milliseconds; null without samples. */
381
484
  inpMs: number | null;
485
+ /** @description Cumulative Layout Shift at p75 (no unit); null without samples. */
382
486
  cls: number | null;
487
+ /** @description How many page loads the values come from. */
383
488
  samples: number;
384
489
  } | null;
385
490
  };
@@ -445,22 +550,39 @@ interface paths {
445
550
  };
446
551
  content: {
447
552
  "application/json": {
553
+ /** @description The site. */
448
554
  site: {
555
+ /** @description The site's Vercel project id. */
449
556
  id: string;
557
+ /** @description The site's production domain. */
450
558
  domain: string;
451
559
  };
560
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
452
561
  range: string;
453
- /** @enum {string} */
562
+ /**
563
+ * @description hour for 24h, day for every other range.
564
+ * @enum {string}
565
+ */
454
566
  granularity: "hour" | "day";
567
+ /** @description Visitors per hour or day, oldest first. */
455
568
  points: {
456
- /** Format: date-time */
569
+ /**
570
+ * Format: date-time
571
+ * @description The start of the hour or day (ISO 8601).
572
+ */
457
573
  start: string;
574
+ /** @description Visitors in this hour or day. */
458
575
  visitors: number;
576
+ /** @description Visitors in the matching hour or day of the previous period; null when there is nothing to compare with. */
459
577
  previousVisitors: number | null;
460
578
  }[];
579
+ /** @description Unique visitors in the range. */
461
580
  visitors: number;
581
+ /** @description Visitors in the previous period of the same length; null when there is nothing to compare with. */
462
582
  previousVisitors: number | null;
583
+ /** @description Change in visitors against the previous period, in percent (12.5 is +12.5%); null when there is nothing to compare with. */
463
584
  change: number | null;
585
+ /** @description Page views in the range. */
464
586
  pageviews: number;
465
587
  };
466
588
  };
@@ -524,22 +646,44 @@ interface paths {
524
646
  };
525
647
  content: {
526
648
  "application/json": {
649
+ /** @description The site. */
527
650
  site: {
651
+ /** @description The site's Vercel project id. */
528
652
  id: string;
653
+ /** @description The site's production domain. */
529
654
  domain: string;
530
655
  };
656
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
531
657
  range: string;
532
- /** @enum {string} */
658
+ /**
659
+ * @description Always ok. plan_required is no longer sent: see mode.
660
+ * @enum {string}
661
+ */
533
662
  status: "ok" | "plan_required";
663
+ /**
664
+ * @description Where the campaigns come from: utm (Vercel's UTM tags, with Web Analytics Plus or Enterprise), events (the site's campaign custom event) or platform (no Plus: the ad platform of the referrer).
665
+ * @enum {string}
666
+ */
667
+ mode: "utm" | "events" | "platform";
668
+ /** @description The site's goal, a Vercel custom event; null when the site has no goal. */
534
669
  goal: string | null;
670
+ /** @description All the site's visitors in the range, tagged or not. */
535
671
  visitors: number;
672
+ /** @description One row per campaign and source. */
536
673
  campaigns: {
674
+ /** @description The utm_campaign value. In platform mode, the ad platform. */
537
675
  campaign: string;
676
+ /** @description The utm_source value. In platform mode, the referrer host. */
538
677
  source: string;
678
+ /** @description The utm_medium value. In platform mode, referrer. */
539
679
  medium: string;
680
+ /** @description Visitors from this campaign and source. */
540
681
  visitors: number;
682
+ /** @description Visitors from this campaign and source in the previous period. */
541
683
  previousVisitors: number;
684
+ /** @description Page views from this campaign and source. */
542
685
  pageviews: number;
686
+ /** @description Goal conversions from this campaign and source; null when the site has no goal. */
543
687
  conversions: number | null;
544
688
  }[];
545
689
  };
@@ -576,6 +720,251 @@ interface paths {
576
720
  patch?: never;
577
721
  trace?: never;
578
722
  };
723
+ "/v1/sites/{id}/campaigns/{utm}/spend": {
724
+ parameters: {
725
+ query?: never;
726
+ header?: never;
727
+ path?: never;
728
+ cookie?: never;
729
+ };
730
+ get: {
731
+ parameters: {
732
+ query?: never;
733
+ header?: never;
734
+ path: {
735
+ /** @description A site's Vercel project id, from GET /v1/boards/{id}/sites */
736
+ id: string;
737
+ /** @description The utm_campaign value, URL-encoded */
738
+ utm: string;
739
+ };
740
+ cookie?: never;
741
+ };
742
+ requestBody?: never;
743
+ responses: {
744
+ /** @description The campaign's spend: this period's row (else the latest), and every period's, newest first */
745
+ 200: {
746
+ headers: {
747
+ [name: string]: unknown;
748
+ };
749
+ content: {
750
+ "application/json": {
751
+ /** @description The row for this period, else the latest one; null when the campaign has no spend. */
752
+ current: {
753
+ /** @description The campaign (its utm_campaign value). */
754
+ campaign: string;
755
+ /**
756
+ * @description Where the money went: google, meta, linkedin, tiktok or other.
757
+ * @enum {string}
758
+ */
759
+ platform: "google" | "meta" | "linkedin" | "tiktok" | "other";
760
+ /** @description What was paid for the period, in currency. */
761
+ amount: number;
762
+ /**
763
+ * @description ILS, USD, EUR or GBP.
764
+ * @enum {string}
765
+ */
766
+ currency: "USD" | "EUR" | "GBP" | "ILS";
767
+ /**
768
+ * @description month (a calendar month) or 30d (30 days from periodStart).
769
+ * @enum {string}
770
+ */
771
+ period: "month" | "30d";
772
+ /** @description The first day of the period (YYYY-MM-DD). */
773
+ periodStart: string;
774
+ /** @description Whether the amount repeats every month until it is changed. */
775
+ repeatMonthly: boolean;
776
+ } | null;
777
+ /** @description Every row, newest first. */
778
+ history: {
779
+ /** @description The campaign (its utm_campaign value). */
780
+ campaign: string;
781
+ /**
782
+ * @description Where the money went: google, meta, linkedin, tiktok or other.
783
+ * @enum {string}
784
+ */
785
+ platform: "google" | "meta" | "linkedin" | "tiktok" | "other";
786
+ /** @description What was paid for the period, in currency. */
787
+ amount: number;
788
+ /**
789
+ * @description ILS, USD, EUR or GBP.
790
+ * @enum {string}
791
+ */
792
+ currency: "USD" | "EUR" | "GBP" | "ILS";
793
+ /**
794
+ * @description month (a calendar month) or 30d (30 days from periodStart).
795
+ * @enum {string}
796
+ */
797
+ period: "month" | "30d";
798
+ /** @description The first day of the period (YYYY-MM-DD). */
799
+ periodStart: string;
800
+ /** @description Whether the amount repeats every month until it is changed. */
801
+ repeatMonthly: boolean;
802
+ }[];
803
+ };
804
+ };
805
+ };
806
+ /** @description Missing, invalid or revoked API key */
807
+ 401: {
808
+ headers: {
809
+ [name: string]: unknown;
810
+ };
811
+ content?: never;
812
+ };
813
+ /** @description No such site */
814
+ 404: {
815
+ headers: {
816
+ [name: string]: unknown;
817
+ };
818
+ content?: never;
819
+ };
820
+ /** @description Over 600 requests an hour per key; see Retry-After */
821
+ 429: {
822
+ headers: {
823
+ [name: string]: unknown;
824
+ };
825
+ content?: never;
826
+ };
827
+ };
828
+ };
829
+ put: {
830
+ parameters: {
831
+ query?: never;
832
+ header?: never;
833
+ path: {
834
+ /** @description A site's Vercel project id, from GET /v1/boards/{id}/sites */
835
+ id: string;
836
+ /** @description The utm_campaign value, URL-encoded */
837
+ utm: string;
838
+ };
839
+ cookie?: never;
840
+ };
841
+ requestBody: {
842
+ content: {
843
+ "application/json": {
844
+ /** @description What was paid for the period, in currency. */
845
+ amount: number;
846
+ /**
847
+ * @description ILS, USD, EUR or GBP.
848
+ * @enum {string}
849
+ */
850
+ currency: "USD" | "EUR" | "GBP" | "ILS";
851
+ /**
852
+ * @description Where the money went: google, meta, linkedin, tiktok or other.
853
+ * @enum {string}
854
+ */
855
+ platform: "google" | "meta" | "linkedin" | "tiktok" | "other";
856
+ /**
857
+ * @description month (a calendar month) or 30d (30 days from periodStart).
858
+ * @enum {string}
859
+ */
860
+ period: "month" | "30d";
861
+ /** @description The first day of the period to set (YYYY-MM-DD). Without it, the period that holds today. A past period changes only that period. */
862
+ periodStart?: string;
863
+ /** @description Whether the amount repeats every month until it is changed. */
864
+ repeatMonthly: boolean;
865
+ };
866
+ };
867
+ };
868
+ responses: {
869
+ /** @description Saved: that period's row (this period's when periodStart is omitted) replaced; history is kept */
870
+ 200: {
871
+ headers: {
872
+ [name: string]: unknown;
873
+ };
874
+ content: {
875
+ "application/json": {
876
+ /** @description The row for this period, else the latest one; null when the campaign has no spend. */
877
+ current: {
878
+ /** @description The campaign (its utm_campaign value). */
879
+ campaign: string;
880
+ /**
881
+ * @description Where the money went: google, meta, linkedin, tiktok or other.
882
+ * @enum {string}
883
+ */
884
+ platform: "google" | "meta" | "linkedin" | "tiktok" | "other";
885
+ /** @description What was paid for the period, in currency. */
886
+ amount: number;
887
+ /**
888
+ * @description ILS, USD, EUR or GBP.
889
+ * @enum {string}
890
+ */
891
+ currency: "USD" | "EUR" | "GBP" | "ILS";
892
+ /**
893
+ * @description month (a calendar month) or 30d (30 days from periodStart).
894
+ * @enum {string}
895
+ */
896
+ period: "month" | "30d";
897
+ /** @description The first day of the period (YYYY-MM-DD). */
898
+ periodStart: string;
899
+ /** @description Whether the amount repeats every month until it is changed. */
900
+ repeatMonthly: boolean;
901
+ } | null;
902
+ /** @description Every row, newest first. */
903
+ history: {
904
+ /** @description The campaign (its utm_campaign value). */
905
+ campaign: string;
906
+ /**
907
+ * @description Where the money went: google, meta, linkedin, tiktok or other.
908
+ * @enum {string}
909
+ */
910
+ platform: "google" | "meta" | "linkedin" | "tiktok" | "other";
911
+ /** @description What was paid for the period, in currency. */
912
+ amount: number;
913
+ /**
914
+ * @description ILS, USD, EUR or GBP.
915
+ * @enum {string}
916
+ */
917
+ currency: "USD" | "EUR" | "GBP" | "ILS";
918
+ /**
919
+ * @description month (a calendar month) or 30d (30 days from periodStart).
920
+ * @enum {string}
921
+ */
922
+ period: "month" | "30d";
923
+ /** @description The first day of the period (YYYY-MM-DD). */
924
+ periodStart: string;
925
+ /** @description Whether the amount repeats every month until it is changed. */
926
+ repeatMonthly: boolean;
927
+ }[];
928
+ };
929
+ };
930
+ };
931
+ /** @description Missing, invalid or revoked API key */
932
+ 401: {
933
+ headers: {
934
+ [name: string]: unknown;
935
+ };
936
+ content?: never;
937
+ };
938
+ /** @description The key is read-only: create one with "Allow notes and exports" */
939
+ 403: {
940
+ headers: {
941
+ [name: string]: unknown;
942
+ };
943
+ content?: never;
944
+ };
945
+ /** @description No such board (or site on it) */
946
+ 404: {
947
+ headers: {
948
+ [name: string]: unknown;
949
+ };
950
+ content?: never;
951
+ };
952
+ /** @description Over 600 requests an hour per key; see Retry-After */
953
+ 429: {
954
+ headers: {
955
+ [name: string]: unknown;
956
+ };
957
+ content?: never;
958
+ };
959
+ };
960
+ };
961
+ post?: never;
962
+ delete?: never;
963
+ options?: never;
964
+ head?: never;
965
+ patch?: never;
966
+ trace?: never;
967
+ };
579
968
  "/v1/sites/{id}/overview": {
580
969
  parameters: {
581
970
  query?: never;
@@ -606,73 +995,138 @@ interface paths {
606
995
  };
607
996
  content: {
608
997
  "application/json": {
998
+ /** @description The site. */
609
999
  site: {
1000
+ /** @description The site's Vercel project id. */
610
1001
  id: string;
1002
+ /** @description The project's name in Vercel. */
611
1003
  name: string;
1004
+ /** @description The site's production domain. */
612
1005
  domain: string;
613
1006
  };
1007
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
614
1008
  range: string;
1009
+ /** @description The site's goal, a Vercel custom event; null when the site has no goal. */
615
1010
  goal: string | null;
616
- /** @enum {string} */
1011
+ /**
1012
+ * @description hour for 24h, day for every other range.
1013
+ * @enum {string}
1014
+ */
617
1015
  granularity: "hour" | "day";
1016
+ /** @description Unique visitors in the range. */
618
1017
  visitors: number;
1018
+ /** @description Visitors in the previous period of the same length; null when there is nothing to compare with. */
619
1019
  previousVisitors: number | null;
1020
+ /** @description Change in visitors against the previous period, in percent (12.5 is +12.5%); null when there is nothing to compare with. */
620
1021
  change: number | null;
1022
+ /** @description Page views in the range. */
621
1023
  pageviews: number;
1024
+ /** @description Visitors per hour or day, oldest first. */
622
1025
  points: {
623
- /** Format: date-time */
1026
+ /**
1027
+ * Format: date-time
1028
+ * @description The start of the hour or day (ISO 8601).
1029
+ */
624
1030
  start: string;
1031
+ /** @description Visitors in this hour or day. */
625
1032
  visitors: number;
1033
+ /** @description Visitors in the matching hour or day of the previous period; null when there is nothing to compare with. */
626
1034
  previousVisitors: number | null;
627
1035
  }[];
1036
+ /** @description The top 5 referrers. */
628
1037
  referrers: {
1038
+ /** @description The referrer host. */
629
1039
  name: string;
1040
+ /** @description Visitors from this referrer. */
630
1041
  visitors: number;
1042
+ /** @description Percent of the site's visitors, 0–100. */
631
1043
  share: number;
632
1044
  }[];
1045
+ /** @description The top 5 countries. */
633
1046
  countries: {
1047
+ /** @description The country. */
634
1048
  name: string;
1049
+ /** @description Visitors from this country. */
635
1050
  visitors: number;
1051
+ /** @description Percent of the site's visitors, 0–100. */
636
1052
  share: number;
637
1053
  }[];
1054
+ /** @description The top 5 pages. */
638
1055
  pages: {
1056
+ /** @description The page's path. */
639
1057
  name: string;
1058
+ /** @description Visitors who saw this page. */
640
1059
  visitors: number;
1060
+ /** @description Percent of the site's visitors, 0–100. */
641
1061
  share: number;
642
1062
  }[];
1063
+ /** @description Production deployments in the range, newest first (at most 20); null when Vercel didn't answer. */
643
1064
  deployments: {
644
- /** Format: date-time */
1065
+ /**
1066
+ * Format: date-time
1067
+ * @description When the deployment was made (ISO 8601).
1068
+ */
645
1069
  at: string;
1070
+ /** @description The commit message; null when there is none. */
646
1071
  message: string | null;
1072
+ /** @description The git branch; null when there is none. */
647
1073
  branch: string | null;
1074
+ /** @description Vercel's state for the deployment, for example READY. */
648
1075
  state: string;
649
1076
  }[] | null;
1077
+ /** @description Core Web Vitals from Vercel Speed Insights: p75 of real visitors, production only, for the range. */
650
1078
  speed: {
1079
+ /** @description Largest Contentful Paint at p75, in milliseconds; null without samples. */
651
1080
  lcpMs: number | null;
1081
+ /** @description Interaction to Next Paint at p75, in milliseconds; null without samples. */
652
1082
  inpMs: number | null;
1083
+ /** @description Cumulative Layout Shift at p75 (no unit); null without samples. */
653
1084
  cls: number | null;
1085
+ /** @description How many page loads the values come from. */
654
1086
  samples: number;
655
- /** @enum {string} */
1087
+ /**
1088
+ * @description passing when LCP, INP and CLS are all good on every device with samples; else needs_work or poor; off when there are no samples (Speed Insights not on).
1089
+ * @enum {string}
1090
+ */
656
1091
  status: "passing" | "needs_work" | "poor" | "off";
1092
+ /** @description The values for mobile visitors; null when there are none. */
657
1093
  mobile: {
1094
+ /** @description Largest Contentful Paint at p75, in milliseconds; null without samples. */
658
1095
  lcpMs: number | null;
1096
+ /** @description Interaction to Next Paint at p75, in milliseconds; null without samples. */
659
1097
  inpMs: number | null;
1098
+ /** @description Cumulative Layout Shift at p75 (no unit); null without samples. */
660
1099
  cls: number | null;
1100
+ /** @description How many page loads the values come from. */
661
1101
  samples: number;
662
1102
  } | null;
1103
+ /** @description The values for desktop visitors; null when there are none. */
663
1104
  desktop: {
1105
+ /** @description Largest Contentful Paint at p75, in milliseconds; null without samples. */
664
1106
  lcpMs: number | null;
1107
+ /** @description Interaction to Next Paint at p75, in milliseconds; null without samples. */
665
1108
  inpMs: number | null;
1109
+ /** @description Cumulative Layout Shift at p75 (no unit); null without samples. */
666
1110
  cls: number | null;
1111
+ /** @description How many page loads the values come from. */
667
1112
  samples: number;
668
1113
  } | null;
669
1114
  };
1115
+ /** @description The board's notes. */
670
1116
  notes?: {
671
- /** Format: uuid */
1117
+ /**
1118
+ * Format: uuid
1119
+ * @description The note's id.
1120
+ */
672
1121
  id: string;
1122
+ /** @description The site the note is for; null when it is for every site on the board. */
673
1123
  siteId: string | null;
674
- /** Format: date */
1124
+ /**
1125
+ * Format: date
1126
+ * @description The day the note is pinned to (YYYY-MM-DD).
1127
+ */
675
1128
  date: string;
1129
+ /** @description The note's text. */
676
1130
  text: string;
677
1131
  }[];
678
1132
  };
@@ -737,24 +1191,40 @@ interface paths {
737
1191
  };
738
1192
  content: {
739
1193
  "application/json": {
1194
+ /** @description The site. */
740
1195
  site: {
1196
+ /** @description The site's Vercel project id. */
741
1197
  id: string;
1198
+ /** @description The site's production domain. */
742
1199
  domain: string;
743
1200
  };
1201
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
744
1202
  range: string;
1203
+ /** @description The top 5 referrers. */
745
1204
  referrers: {
1205
+ /** @description The referrer host. */
746
1206
  name: string;
1207
+ /** @description Visitors from this referrer. */
747
1208
  visitors: number;
1209
+ /** @description Percent of the site's visitors, 0–100. */
748
1210
  share: number;
749
1211
  }[];
1212
+ /** @description The top 5 countries. */
750
1213
  countries: {
1214
+ /** @description The country. */
751
1215
  name: string;
1216
+ /** @description Visitors from this country. */
752
1217
  visitors: number;
1218
+ /** @description Percent of the site's visitors, 0–100. */
753
1219
  share: number;
754
1220
  }[];
1221
+ /** @description The top 5 pages. */
755
1222
  pages: {
1223
+ /** @description The page's path. */
756
1224
  name: string;
1225
+ /** @description Visitors who saw this page. */
757
1226
  visitors: number;
1227
+ /** @description Percent of the site's visitors, 0–100. */
758
1228
  share: number;
759
1229
  }[];
760
1230
  };
@@ -819,16 +1289,27 @@ interface paths {
819
1289
  };
820
1290
  content: {
821
1291
  "application/json": {
1292
+ /** @description The site. */
822
1293
  site: {
1294
+ /** @description The site's Vercel project id. */
823
1295
  id: string;
1296
+ /** @description The site's production domain. */
824
1297
  domain: string;
825
1298
  };
1299
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
826
1300
  range: string;
1301
+ /** @description Production deployments in the range, newest first (at most 20). */
827
1302
  deployments: {
828
- /** Format: date-time */
1303
+ /**
1304
+ * Format: date-time
1305
+ * @description When the deployment was made (ISO 8601).
1306
+ */
829
1307
  at: string;
1308
+ /** @description The commit message; null when there is none. */
830
1309
  message: string | null;
1310
+ /** @description The git branch; null when there is none. */
831
1311
  branch: string | null;
1312
+ /** @description Vercel's state for the deployment, for example READY. */
832
1313
  state: string;
833
1314
  }[];
834
1315
  };
@@ -895,22 +1376,40 @@ interface paths {
895
1376
  };
896
1377
  content: {
897
1378
  "application/json": {
1379
+ /** @description The site. */
898
1380
  site: {
1381
+ /** @description The site's Vercel project id. */
899
1382
  id: string;
1383
+ /** @description The site's production domain. */
900
1384
  domain: string;
901
1385
  };
1386
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
902
1387
  range: string;
903
- /** @enum {string} */
1388
+ /**
1389
+ * @description all, mobile or desktop.
1390
+ * @enum {string}
1391
+ */
904
1392
  device: "all" | "mobile" | "desktop";
905
- /** @enum {string} */
1393
+ /**
1394
+ * @description passing, needs_work or poor for this device; off when there are no samples (Speed Insights not on).
1395
+ * @enum {string}
1396
+ */
906
1397
  status: "passing" | "needs_work" | "poor" | "off";
1398
+ /** @description Largest Contentful Paint at p75, in milliseconds; null without samples. */
907
1399
  lcpMs: number | null;
1400
+ /** @description Interaction to Next Paint at p75, in milliseconds; null without samples. */
908
1401
  inpMs: number | null;
1402
+ /** @description Cumulative Layout Shift at p75 (no unit); null without samples. */
909
1403
  cls: number | null;
1404
+ /** @description How many page loads the values come from. */
910
1405
  samples: number;
1406
+ /** @description The device's slowest routes by LCP. */
911
1407
  routes: {
1408
+ /** @description The route, as the app names it (for example /blog/[slug]). */
912
1409
  route: string;
1410
+ /** @description The route's Largest Contentful Paint at p75, in milliseconds. */
913
1411
  lcpMs: number;
1412
+ /** @description How many page loads of this route the value comes from. */
914
1413
  samples: number;
915
1414
  }[];
916
1415
  };
@@ -978,19 +1477,36 @@ interface paths {
978
1477
  };
979
1478
  content: {
980
1479
  "application/json": {
1480
+ /** @description The board. */
981
1481
  board: {
982
- /** Format: uuid */
1482
+ /**
1483
+ * Format: uuid
1484
+ * @description The board's id.
1485
+ */
983
1486
  id: string;
1487
+ /** @description The board's name. */
984
1488
  name: string;
985
1489
  };
1490
+ /** @description The board's notes. */
986
1491
  notes: {
987
- /** Format: uuid */
1492
+ /**
1493
+ * Format: uuid
1494
+ * @description The note's id.
1495
+ */
988
1496
  id: string;
989
- /** Format: uuid */
1497
+ /**
1498
+ * Format: uuid
1499
+ * @description The board the note is on.
1500
+ */
990
1501
  boardId: string;
1502
+ /** @description The site the note is for; null when it is for every site on the board. */
991
1503
  siteId: string | null;
992
- /** Format: date */
1504
+ /**
1505
+ * Format: date
1506
+ * @description The day the note is pinned to (YYYY-MM-DD).
1507
+ */
993
1508
  date: string;
1509
+ /** @description The note's text. */
994
1510
  text: string;
995
1511
  }[];
996
1512
  };
@@ -1033,9 +1549,14 @@ interface paths {
1033
1549
  requestBody: {
1034
1550
  content: {
1035
1551
  "application/json": {
1036
- /** Format: date */
1552
+ /**
1553
+ * Format: date
1554
+ * @description The day the note is pinned to (YYYY-MM-DD).
1555
+ */
1037
1556
  date: string;
1557
+ /** @description The note's text. It is trimmed and kept to its first 80 characters. */
1038
1558
  text: string;
1559
+ /** @description Only for this site. Without it, the note is for every site on the board. */
1039
1560
  siteId?: string;
1040
1561
  };
1041
1562
  };
@@ -1048,14 +1569,26 @@ interface paths {
1048
1569
  };
1049
1570
  content: {
1050
1571
  "application/json": {
1572
+ /** @description The note that was added. */
1051
1573
  note: {
1052
- /** Format: uuid */
1574
+ /**
1575
+ * Format: uuid
1576
+ * @description The note's id.
1577
+ */
1053
1578
  id: string;
1054
- /** Format: uuid */
1579
+ /**
1580
+ * Format: uuid
1581
+ * @description The board the note is on.
1582
+ */
1055
1583
  boardId: string;
1584
+ /** @description The site the note is for; null when it is for every site on the board. */
1056
1585
  siteId: string | null;
1057
- /** Format: date */
1586
+ /**
1587
+ * Format: date
1588
+ * @description The day the note is pinned to (YYYY-MM-DD).
1589
+ */
1058
1590
  date: string;
1591
+ /** @description The note's text. */
1059
1592
  text: string;
1060
1593
  };
1061
1594
  };
@@ -1127,11 +1660,13 @@ interface paths {
1127
1660
  content: {
1128
1661
  "application/json": {
1129
1662
  /**
1663
+ * @description pdf (the default) or csv.
1130
1664
  * @default pdf
1131
1665
  * @enum {string}
1132
1666
  */
1133
1667
  format?: "pdf" | "csv";
1134
1668
  /**
1669
+ * @description The period to export: 24h, 7d (the default) or 30d.
1135
1670
  * @default 7d
1136
1671
  * @enum {string}
1137
1672
  */
@@ -1147,17 +1682,32 @@ interface paths {
1147
1682
  };
1148
1683
  content: {
1149
1684
  "application/json": {
1685
+ /** @description The board. */
1150
1686
  board: {
1151
- /** Format: uuid */
1687
+ /**
1688
+ * Format: uuid
1689
+ * @description The board's id.
1690
+ */
1152
1691
  id: string;
1692
+ /** @description The board's name. */
1153
1693
  name: string;
1154
1694
  };
1155
- /** @enum {string} */
1695
+ /**
1696
+ * @description pdf or csv.
1697
+ * @enum {string}
1698
+ */
1156
1699
  format: "pdf" | "csv";
1700
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
1157
1701
  range: string;
1158
- /** Format: uri */
1702
+ /**
1703
+ * Format: uri
1704
+ * @description The download link.
1705
+ */
1159
1706
  url: string;
1160
- /** Format: date-time */
1707
+ /**
1708
+ * Format: date-time
1709
+ * @description When the link stops working, 5 minutes after it was made (ISO 8601).
1710
+ */
1161
1711
  expiresAt: string;
1162
1712
  };
1163
1713
  };
@@ -1234,64 +1784,140 @@ interface paths {
1234
1784
  };
1235
1785
  content: {
1236
1786
  "application/json": {
1787
+ /** @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD). */
1237
1788
  range: string;
1789
+ /** @description The board's items, ranked by visitors affected. */
1238
1790
  items: {
1791
+ /** @description The item's id, kind:domain (for example speed:acme.com). Use it in /v1/fixes/{itemId}/… paths. */
1239
1792
  id: string;
1240
- /** @enum {string} */
1241
- kind: "speed" | "deadend" | "bounce" | "conversion" | "trend" | "campaigns" | "setup";
1793
+ /**
1794
+ * @description speed, deadend, bounce, conversion, trend, campaigns, spend or setup.
1795
+ * @enum {string}
1796
+ */
1797
+ kind: "speed" | "deadend" | "bounce" | "conversion" | "trend" | "campaigns" | "spend" | "setup";
1798
+ /** @description The site's Vercel project id; null for a team project Lookout doesn't track yet. */
1242
1799
  projectId: string | null;
1800
+ /** @description The site's production domain. */
1243
1801
  domain: string;
1802
+ /** @description The site's framework preset in Vercel (for example nextjs); null when it isn't known. */
1244
1803
  framework: string | null;
1804
+ /** @description What to fix. */
1245
1805
  title: string;
1806
+ /** @description The numbers behind it. */
1246
1807
  detail: string;
1808
+ /** @description Why it matters. */
1247
1809
  why: string;
1810
+ /** @description Where the result shows once it is fixed. */
1248
1811
  verify: string;
1812
+ /** @description Visitors affected in the range. For a spend item, the spend in its currency. */
1249
1813
  impact: number;
1250
- /** @enum {string} */
1251
- prompt: "speedfix" | "flow" | "grade" | "utm" | "speed" | "events" | "analytics";
1814
+ /**
1815
+ * @description Which repo-ready prompt the dashboard's Copy prompt builds for the item.
1816
+ * @enum {string}
1817
+ */
1818
+ prompt: "speedfix" | "flow" | "grade" | "utm" | "utm_events" | "speed" | "events" | "analytics";
1819
+ /** @description The data the item's prompt uses. */
1252
1820
  context: {
1821
+ /** @description The site's Vercel team. The public API leaves it out. */
1822
+ teamSlug?: string | null;
1823
+ /** @description The site's Scorecard row, for a grade item. */
1253
1824
  grade?: {
1254
- /** @enum {string} */
1825
+ /**
1826
+ * @description The grade, from A (best) to D.
1827
+ * @enum {string}
1828
+ */
1255
1829
  grade: "A" | "B" | "C" | "D";
1830
+ /** @description What the grade is made of. */
1256
1831
  factors: {
1257
- /** @enum {string} */
1258
- key: "trend" | "pages" | "conv" | "speed" | "flow";
1832
+ /**
1833
+ * @description The factor: trend, pages (pages per visit), conv (conversion), speed (Core Web Vitals), flow (visitors sent onward) or paid (cost per conversion).
1834
+ * @enum {string}
1835
+ */
1836
+ key: "trend" | "pages" | "conv" | "speed" | "flow" | "paid";
1837
+ /** @description The factor's name as the dashboard shows it. */
1259
1838
  label: string;
1839
+ /** @description The value as the dashboard shows it (for example +12% or 3.2%); — when not graded. */
1260
1840
  value: string;
1261
- /** @enum {string} */
1841
+ /**
1842
+ * @description good, ok or weak; na when the factor isn't graded.
1843
+ * @enum {string}
1844
+ */
1262
1845
  rating: "good" | "ok" | "weak" | "na";
1846
+ /** @description What the value is measured against (for example vs previous week). */
1263
1847
  bench: string;
1848
+ /** @description A short note on the value. */
1264
1849
  note: string;
1850
+ /** @description 0–100: the length of the bar under the value. */
1265
1851
  bar: number;
1266
1852
  }[];
1853
+ /** @description The p75 Core Web Vitals behind the speed factor; null without Speed Insights. */
1267
1854
  vitals: {
1855
+ /** @description Largest Contentful Paint at p75, in milliseconds; null without samples. */
1268
1856
  lcp: number | null;
1857
+ /** @description Interaction to Next Paint at p75, in milliseconds; null without samples. */
1269
1858
  inp: number | null;
1859
+ /** @description Cumulative Layout Shift at p75 (no unit); null without samples. */
1270
1860
  cls: number | null;
1271
1861
  } | null;
1272
1862
  };
1863
+ /** @description The values behind a speed item. */
1273
1864
  speed?: {
1274
- /** @enum {string} */
1865
+ /**
1866
+ * @description all, mobile or desktop.
1867
+ * @enum {string}
1868
+ */
1275
1869
  device: "all" | "mobile" | "desktop";
1870
+ /** @description Core Web Vitals at p75. */
1276
1871
  values: {
1872
+ /** @description Largest Contentful Paint at p75, in milliseconds; null without samples. */
1277
1873
  lcp: number | null;
1874
+ /** @description Interaction to Next Paint at p75, in milliseconds; null without samples. */
1278
1875
  inp: number | null;
1876
+ /** @description Cumulative Layout Shift at p75 (no unit); null without samples. */
1279
1877
  cls: number | null;
1280
1878
  };
1281
1879
  };
1880
+ /** @description The board's main site, by domain. */
1282
1881
  mainSite?: string | null;
1882
+ /** @description The campaign behind a spend item. */
1883
+ spend?: {
1884
+ /** @description The campaign (its utm_campaign value). */
1885
+ campaign: string;
1886
+ /** @description The campaign's spend in the range, in currency. */
1887
+ amount: number;
1888
+ /**
1889
+ * @description ILS, USD, EUR or GBP.
1890
+ * @enum {string}
1891
+ */
1892
+ currency: "USD" | "EUR" | "GBP" | "ILS";
1893
+ /** @description The campaign's cost per goal conversion, in currency. */
1894
+ costPerConversion: number;
1895
+ /** @description The median cost per conversion of the board's campaigns in the same currency. */
1896
+ median: number;
1897
+ };
1283
1898
  };
1284
- /** @enum {string} */
1899
+ /**
1900
+ * @description open, snoozed or resolved.
1901
+ * @enum {string}
1902
+ */
1285
1903
  status: "open" | "snoozed" | "resolved";
1904
+ /** @description While snoozed: when the item comes back (epoch milliseconds); else null. */
1286
1905
  snoozedUntil: number | null;
1906
+ /** @description While resolved: when the item was resolved (epoch milliseconds); else null. */
1287
1907
  resolvedAt: number | null;
1288
1908
  }[];
1909
+ /** @description Items per status, before the status filter. */
1289
1910
  counts: {
1911
+ /** @description Open items. */
1290
1912
  open: number;
1913
+ /** @description Snoozed items. */
1291
1914
  snoozed: number;
1915
+ /** @description Resolved items. */
1292
1916
  resolved: number;
1293
1917
  };
1918
+ /** @description Items resolved since the first of the month (UTC), on any board. */
1294
1919
  resolvedThisMonth: number;
1920
+ /** @description Sites whose figures couldn't be read just now: their items may be missing. */
1295
1921
  unavailable: string[];
1296
1922
  };
1297
1923
  };
@@ -1349,7 +1975,9 @@ interface paths {
1349
1975
  requestBody: {
1350
1976
  content: {
1351
1977
  "application/json": {
1978
+ /** @description The board whose Fix list holds the item. The note goes on the item's site there. */
1352
1979
  boardId: string;
1980
+ /** @description The range the item was listed for. The default is 7d. */
1353
1981
  range?: string;
1354
1982
  };
1355
1983
  };
@@ -1362,10 +1990,16 @@ interface paths {
1362
1990
  };
1363
1991
  content: {
1364
1992
  "application/json": {
1993
+ /** @description The item's id, kind:domain. */
1365
1994
  id: string;
1366
- /** @enum {string} */
1995
+ /**
1996
+ * @description open, snoozed or resolved.
1997
+ * @enum {string}
1998
+ */
1367
1999
  status: "open" | "snoozed" | "resolved";
2000
+ /** @description While snoozed: when the item comes back (epoch milliseconds); else null. */
1368
2001
  snoozedUntil: number | null;
2002
+ /** @description While resolved: when the item was resolved (epoch milliseconds); else null. */
1369
2003
  resolvedAt: number | null;
1370
2004
  };
1371
2005
  };
@@ -1434,10 +2068,16 @@ interface paths {
1434
2068
  };
1435
2069
  content: {
1436
2070
  "application/json": {
2071
+ /** @description The item's id, kind:domain. */
1437
2072
  id: string;
1438
- /** @enum {string} */
2073
+ /**
2074
+ * @description open, snoozed or resolved.
2075
+ * @enum {string}
2076
+ */
1439
2077
  status: "open" | "snoozed" | "resolved";
2078
+ /** @description While snoozed: when the item comes back (epoch milliseconds); else null. */
1440
2079
  snoozedUntil: number | null;
2080
+ /** @description While resolved: when the item was resolved (epoch milliseconds); else null. */
1441
2081
  resolvedAt: number | null;
1442
2082
  };
1443
2083
  };
@@ -1506,10 +2146,16 @@ interface paths {
1506
2146
  };
1507
2147
  content: {
1508
2148
  "application/json": {
2149
+ /** @description The item's id, kind:domain. */
1509
2150
  id: string;
1510
- /** @enum {string} */
2151
+ /**
2152
+ * @description open, snoozed or resolved.
2153
+ * @enum {string}
2154
+ */
1511
2155
  status: "open" | "snoozed" | "resolved";
2156
+ /** @description While snoozed: when the item comes back (epoch milliseconds); else null. */
1512
2157
  snoozedUntil: number | null;
2158
+ /** @description While resolved: when the item was resolved (epoch milliseconds); else null. */
1513
2159
  resolvedAt: number | null;
1514
2160
  };
1515
2161
  };
@@ -1573,26 +2219,50 @@ interface paths {
1573
2219
  };
1574
2220
  content: {
1575
2221
  "application/json": {
2222
+ /** @description The workspace's alert rules. */
1576
2223
  alerts: {
1577
- /** Format: uuid */
2224
+ /**
2225
+ * Format: uuid
2226
+ * @description The alert rule's id.
2227
+ */
1578
2228
  id: string;
2229
+ /** @description The board the rule watches. */
1579
2230
  board: {
1580
- /** Format: uuid */
2231
+ /**
2232
+ * Format: uuid
2233
+ * @description The board's id.
2234
+ */
1581
2235
  id: string;
2236
+ /** @description The board's name. */
1582
2237
  name: string;
1583
2238
  };
2239
+ /** @description visitors, pageviews or pages_per_visit. */
1584
2240
  metric: string;
1585
- /** @enum {string} */
2241
+ /**
2242
+ * @description drop or rise.
2243
+ * @enum {string}
2244
+ */
1586
2245
  direction: "drop" | "rise";
2246
+ /** @description The change, in percent, that fires the alert. */
1587
2247
  threshold: number;
2248
+ /** @description Whether the rule is on. */
1588
2249
  enabled: boolean;
1589
- /** Format: date-time */
2250
+ /**
2251
+ * Format: date-time
2252
+ * @description When the rule last fired (ISO 8601); null when it never has.
2253
+ */
1590
2254
  lastFiredAt: string | null;
1591
2255
  }[];
2256
+ /** @description What fired in the last 30 days, newest first. */
1592
2257
  recent: {
1593
- /** Format: date-time */
2258
+ /**
2259
+ * Format: date-time
2260
+ * @description When it fired (ISO 8601).
2261
+ */
1594
2262
  at: string;
2263
+ /** @description What the alert said. */
1595
2264
  text: string;
2265
+ /** @description The board's name; null when the board is gone. */
1596
2266
  board: string | null;
1597
2267
  }[];
1598
2268
  };
@@ -1622,6 +2292,120 @@ interface paths {
1622
2292
  patch?: never;
1623
2293
  trace?: never;
1624
2294
  };
2295
+ "/v1/ask": {
2296
+ parameters: {
2297
+ query?: never;
2298
+ header?: never;
2299
+ path?: never;
2300
+ cookie?: never;
2301
+ };
2302
+ get?: never;
2303
+ put?: never;
2304
+ post: {
2305
+ parameters: {
2306
+ query?: never;
2307
+ header?: never;
2308
+ path?: never;
2309
+ cookie?: never;
2310
+ };
2311
+ requestBody: {
2312
+ content: {
2313
+ "application/json": {
2314
+ /** @description A question about the workspace's sites, in plain words */
2315
+ question: string;
2316
+ /**
2317
+ * @description workspace: every board, sites counted once; board: one board (needs board)
2318
+ * @default workspace
2319
+ * @enum {string}
2320
+ */
2321
+ scope?: "board" | "workspace";
2322
+ /** @description For scope board: the board's id or exact name */
2323
+ board?: string;
2324
+ /**
2325
+ * @description The period of the figures: 24h, 7d, 30d or two dates (YYYY-MM-DD..YYYY-MM-DD).
2326
+ * @default 7d
2327
+ */
2328
+ range?: ("24h" | "7d" | "30d") | string;
2329
+ };
2330
+ };
2331
+ };
2332
+ responses: {
2333
+ /** @description One sentence with the key number, up to three points, the site to open and, comparing several, a small chart. Answered only from the workspace's figures */
2334
+ 200: {
2335
+ headers: {
2336
+ [name: string]: unknown;
2337
+ };
2338
+ content: {
2339
+ "application/json": {
2340
+ /** @description One sentence answering the question, the key number in **bold** (Markdown). */
2341
+ answer: string;
2342
+ /** @description Visitors per hour or day, oldest first. */
2343
+ points: string[];
2344
+ /** @description The site. */
2345
+ site: {
2346
+ /** @description The site's Vercel project id. */
2347
+ id: string;
2348
+ /** @description The site's production domain. */
2349
+ domain: string;
2350
+ } | null;
2351
+ /** @description A few words for a link to `site`, e.g. "Open the site"; null without a site. */
2352
+ action: string | null;
2353
+ /** @description A small bar list, only when the answer compares several sites or boards; null otherwise. */
2354
+ chart: {
2355
+ /** @description What to fix. */
2356
+ title: string;
2357
+ /** @description One row per graded landing page, best first. */
2358
+ rows: {
2359
+ /** @description The factor's name as the dashboard shows it. */
2360
+ label: string;
2361
+ /** @description The value as the dashboard shows it (for example +12% or 3.2%); — when not graded. */
2362
+ value: number;
2363
+ /**
2364
+ * @description What `value` counts: % (change against the previous period) or visitors.
2365
+ * @enum {string}
2366
+ */
2367
+ unit: "%" | "visitors";
2368
+ /** @description The site the note is for; null when it is for every site on the board. */
2369
+ siteId: string | null;
2370
+ }[];
2371
+ } | null;
2372
+ /**
2373
+ * @description The utm_source value. In platform mode, the referrer host.
2374
+ * @enum {string}
2375
+ */
2376
+ source: "model" | "facts";
2377
+ };
2378
+ };
2379
+ };
2380
+ /** @description Missing, invalid or revoked API key */
2381
+ 401: {
2382
+ headers: {
2383
+ [name: string]: unknown;
2384
+ };
2385
+ content?: never;
2386
+ };
2387
+ /** @description No such board */
2388
+ 404: {
2389
+ headers: {
2390
+ [name: string]: unknown;
2391
+ };
2392
+ content?: never;
2393
+ };
2394
+ /** @description Over 600 requests an hour per key; see Retry-After */
2395
+ 429: {
2396
+ headers: {
2397
+ [name: string]: unknown;
2398
+ };
2399
+ content?: never;
2400
+ };
2401
+ };
2402
+ };
2403
+ delete?: never;
2404
+ options?: never;
2405
+ head?: never;
2406
+ patch?: never;
2407
+ trace?: never;
2408
+ };
1625
2409
  }
1626
2410
 
1627
2411
  /** The Lookout REST API this server is a thin client of. */
@@ -1636,6 +2420,7 @@ type Body<P extends keyof paths> = paths[P]["post"] extends {
1636
2420
  type FixStatus = "open" | "snoozed" | "resolved";
1637
2421
  type NoteInput = Body<"/v1/boards/{id}/annotations">;
1638
2422
  type ExportInput = Body<"/v1/boards/{id}/export">;
2423
+ type AskInput = Body<"/v1/ask">;
1639
2424
  type Device = "all" | "mobile" | "desktop";
1640
2425
  /** An error answer from the API: its HTTP status, error code and message, and for a 429 when to retry. */
1641
2426
  declare class LookoutApiError extends Error {
@@ -1724,7 +2509,7 @@ declare function createClient(opts: ClientOptions): {
1724
2509
  range: string;
1725
2510
  items: {
1726
2511
  id: string;
1727
- kind: "speed" | "deadend" | "bounce" | "conversion" | "trend" | "campaigns" | "setup";
2512
+ kind: "speed" | "deadend" | "bounce" | "conversion" | "trend" | "campaigns" | "spend" | "setup";
1728
2513
  projectId: string | null;
1729
2514
  domain: string;
1730
2515
  framework: string | null;
@@ -1733,12 +2518,13 @@ declare function createClient(opts: ClientOptions): {
1733
2518
  why: string;
1734
2519
  verify: string;
1735
2520
  impact: number;
1736
- prompt: "speedfix" | "flow" | "grade" | "utm" | "speed" | "events" | "analytics";
2521
+ prompt: "speedfix" | "flow" | "grade" | "utm" | "utm_events" | "speed" | "events" | "analytics";
1737
2522
  context: {
2523
+ teamSlug?: string | null;
1738
2524
  grade?: {
1739
2525
  grade: "A" | "B" | "C" | "D";
1740
2526
  factors: {
1741
- key: "trend" | "pages" | "conv" | "speed" | "flow";
2527
+ key: "trend" | "pages" | "conv" | "speed" | "flow" | "paid";
1742
2528
  label: string;
1743
2529
  value: string;
1744
2530
  rating: "good" | "ok" | "weak" | "na";
@@ -1761,6 +2547,13 @@ declare function createClient(opts: ClientOptions): {
1761
2547
  };
1762
2548
  };
1763
2549
  mainSite?: string | null;
2550
+ spend?: {
2551
+ campaign: string;
2552
+ amount: number;
2553
+ currency: "USD" | "EUR" | "GBP" | "ILS";
2554
+ costPerConversion: number;
2555
+ median: number;
2556
+ };
1764
2557
  };
1765
2558
  status: "open" | "snoozed" | "resolved";
1766
2559
  snoozedUntil: number | null;
@@ -1976,6 +2769,7 @@ declare function createClient(opts: ClientOptions): {
1976
2769
  };
1977
2770
  range: string;
1978
2771
  status: "ok" | "plan_required";
2772
+ mode: "utm" | "events" | "platform";
1979
2773
  goal: string | null;
1980
2774
  visitors: number;
1981
2775
  campaigns: {
@@ -2007,6 +2801,25 @@ declare function createClient(opts: ClientOptions): {
2007
2801
  board: string | null;
2008
2802
  }[];
2009
2803
  }>;
2804
+ ask: (input: AskInput) => Promise<{
2805
+ answer: string;
2806
+ points: string[];
2807
+ site: {
2808
+ id: string;
2809
+ domain: string;
2810
+ } | null;
2811
+ action: string | null;
2812
+ chart: {
2813
+ title: string;
2814
+ rows: {
2815
+ label: string;
2816
+ value: number;
2817
+ unit: "%" | "visitors";
2818
+ siteId: string | null;
2819
+ }[];
2820
+ } | null;
2821
+ source: "model" | "facts";
2822
+ }>;
2010
2823
  };
2011
2824
 
2012
2825
  /**
@@ -2033,6 +2846,6 @@ declare function createServer(client: LookoutClient, opts?: {
2033
2846
  }): McpServer;
2034
2847
 
2035
2848
  /** Kept in step with package.json (test/version.test.ts checks). */
2036
- declare const VERSION = "0.2.0";
2849
+ declare const VERSION = "0.3.0";
2037
2850
 
2038
2851
  export { type ClientOptions, DEFAULT_BASE_URL, INSTRUCTIONS, LookoutApiError, type LookoutClient, type Range, RangeSchema, SERVER_NAME, VERSION, createClient, createServer, toRangeKey };