@crvouga/mockingbird-service-vibe 0.1.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/openapi.yaml ADDED
@@ -0,0 +1,917 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "paths": {
4
+ "/reports": {
5
+ "post": {
6
+ "description": "Creates an asynchronous report and returns the report resource. Poll GET /reports/{report_id} until the report reaches a terminal state.\n**Scopes:**\n`reporting:read`\n<br>*Rate limits*:<br>Burst: `1/s`<br>Steady: `20/m`\n",
7
+ "operationId": "CreateReport",
8
+ "parameters": [],
9
+ "requestBody": {
10
+ "required": true,
11
+ "content": {
12
+ "application/json": {
13
+ "schema": {
14
+ "$ref": "#/components/schemas/ReportCreate"
15
+ },
16
+ "example": {
17
+ "start_date": "2026-01-01",
18
+ "end_date": "2026-01-02",
19
+ "advertiser_ids": [
20
+ "00000000-0000-4000-8000-000000000001"
21
+ ],
22
+ "dimensions": [
23
+ "impression_date",
24
+ "campaign_id"
25
+ ],
26
+ "metrics": [
27
+ "spend"
28
+ ],
29
+ "granularity": "DAY",
30
+ "format": "JSON"
31
+ }
32
+ }
33
+ }
34
+ },
35
+ "responses": {
36
+ "201": {
37
+ "description": "Report",
38
+ "content": {
39
+ "application/json": {
40
+ "schema": {
41
+ "$ref": "#/components/schemas/Report"
42
+ }
43
+ }
44
+ }
45
+ },
46
+ "400": {
47
+ "description": "Vibe resource error",
48
+ "content": {
49
+ "application/json": {
50
+ "schema": {
51
+ "type": "object",
52
+ "required": [
53
+ "error"
54
+ ],
55
+ "properties": {
56
+ "error": {
57
+ "type": "object",
58
+ "required": [
59
+ "type",
60
+ "message",
61
+ "status",
62
+ "request_id"
63
+ ],
64
+ "properties": {
65
+ "type": {
66
+ "type": "string"
67
+ },
68
+ "message": {
69
+ "type": "string"
70
+ },
71
+ "status": {
72
+ "type": "integer"
73
+ },
74
+ "request_id": {
75
+ "type": "string"
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ },
84
+ "401": {
85
+ "description": "Vibe resource error",
86
+ "content": {
87
+ "application/json": {
88
+ "schema": {
89
+ "type": "object",
90
+ "required": [
91
+ "error"
92
+ ],
93
+ "properties": {
94
+ "error": {
95
+ "type": "object",
96
+ "required": [
97
+ "type",
98
+ "message",
99
+ "status",
100
+ "request_id"
101
+ ],
102
+ "properties": {
103
+ "type": {
104
+ "type": "string"
105
+ },
106
+ "message": {
107
+ "type": "string"
108
+ },
109
+ "status": {
110
+ "type": "integer"
111
+ },
112
+ "request_id": {
113
+ "type": "string"
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
121
+ },
122
+ "403": {
123
+ "description": "Vibe resource error",
124
+ "content": {
125
+ "application/json": {
126
+ "schema": {
127
+ "type": "object",
128
+ "required": [
129
+ "error"
130
+ ],
131
+ "properties": {
132
+ "error": {
133
+ "type": "object",
134
+ "required": [
135
+ "type",
136
+ "message",
137
+ "status",
138
+ "request_id"
139
+ ],
140
+ "properties": {
141
+ "type": {
142
+ "type": "string"
143
+ },
144
+ "message": {
145
+ "type": "string"
146
+ },
147
+ "status": {
148
+ "type": "integer"
149
+ },
150
+ "request_id": {
151
+ "type": "string"
152
+ }
153
+ }
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ },
161
+ "summary": "Create an async report",
162
+ "tags": [
163
+ "Reporting"
164
+ ],
165
+ "x-rate-limit": {
166
+ "rps": 1,
167
+ "rpm": 20
168
+ },
169
+ "x-scopes": [
170
+ "reporting:read"
171
+ ],
172
+ "x-mockingbird": {
173
+ "supported": true,
174
+ "parity": {
175
+ "enabled": true,
176
+ "safe": false
177
+ }
178
+ }
179
+ }
180
+ },
181
+ "/reports/{report_id}": {
182
+ "get": {
183
+ "operationId": "GetReport",
184
+ "parameters": [
185
+ {
186
+ "name": "report_id",
187
+ "in": "path",
188
+ "required": true,
189
+ "schema": {
190
+ "type": "string"
191
+ }
192
+ }
193
+ ],
194
+ "responses": {
195
+ "200": {
196
+ "description": "Report",
197
+ "content": {
198
+ "application/json": {
199
+ "schema": {
200
+ "$ref": "#/components/schemas/Report"
201
+ }
202
+ }
203
+ }
204
+ },
205
+ "400": {
206
+ "description": "Vibe resource error",
207
+ "content": {
208
+ "application/json": {
209
+ "schema": {
210
+ "type": "object",
211
+ "required": [
212
+ "error"
213
+ ],
214
+ "properties": {
215
+ "error": {
216
+ "type": "object",
217
+ "required": [
218
+ "type",
219
+ "message",
220
+ "status",
221
+ "request_id"
222
+ ],
223
+ "properties": {
224
+ "type": {
225
+ "type": "string"
226
+ },
227
+ "message": {
228
+ "type": "string"
229
+ },
230
+ "status": {
231
+ "type": "integer"
232
+ },
233
+ "request_id": {
234
+ "type": "string"
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
240
+ }
241
+ }
242
+ },
243
+ "401": {
244
+ "description": "Vibe resource error",
245
+ "content": {
246
+ "application/json": {
247
+ "schema": {
248
+ "type": "object",
249
+ "required": [
250
+ "error"
251
+ ],
252
+ "properties": {
253
+ "error": {
254
+ "type": "object",
255
+ "required": [
256
+ "type",
257
+ "message",
258
+ "status",
259
+ "request_id"
260
+ ],
261
+ "properties": {
262
+ "type": {
263
+ "type": "string"
264
+ },
265
+ "message": {
266
+ "type": "string"
267
+ },
268
+ "status": {
269
+ "type": "integer"
270
+ },
271
+ "request_id": {
272
+ "type": "string"
273
+ }
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
279
+ }
280
+ },
281
+ "403": {
282
+ "description": "Vibe resource error",
283
+ "content": {
284
+ "application/json": {
285
+ "schema": {
286
+ "type": "object",
287
+ "required": [
288
+ "error"
289
+ ],
290
+ "properties": {
291
+ "error": {
292
+ "type": "object",
293
+ "required": [
294
+ "type",
295
+ "message",
296
+ "status",
297
+ "request_id"
298
+ ],
299
+ "properties": {
300
+ "type": {
301
+ "type": "string"
302
+ },
303
+ "message": {
304
+ "type": "string"
305
+ },
306
+ "status": {
307
+ "type": "integer"
308
+ },
309
+ "request_id": {
310
+ "type": "string"
311
+ }
312
+ }
313
+ }
314
+ }
315
+ }
316
+ }
317
+ }
318
+ },
319
+ "404": {
320
+ "description": "Vibe resource error",
321
+ "content": {
322
+ "application/json": {
323
+ "schema": {
324
+ "type": "object",
325
+ "required": [
326
+ "error"
327
+ ],
328
+ "properties": {
329
+ "error": {
330
+ "type": "object",
331
+ "required": [
332
+ "type",
333
+ "message",
334
+ "status",
335
+ "request_id"
336
+ ],
337
+ "properties": {
338
+ "type": {
339
+ "type": "string"
340
+ },
341
+ "message": {
342
+ "type": "string"
343
+ },
344
+ "status": {
345
+ "type": "integer"
346
+ },
347
+ "request_id": {
348
+ "type": "string"
349
+ }
350
+ }
351
+ }
352
+ }
353
+ }
354
+ }
355
+ }
356
+ }
357
+ },
358
+ "x-mockingbird": {
359
+ "supported": true,
360
+ "parity": {
361
+ "enabled": true,
362
+ "safe": true
363
+ }
364
+ }
365
+ }
366
+ },
367
+ "/oauth2/token": {
368
+ "post": {
369
+ "operationId": "OAuthToken",
370
+ "requestBody": {
371
+ "required": true,
372
+ "content": {
373
+ "application/x-www-form-urlencoded": {
374
+ "schema": {
375
+ "type": "object",
376
+ "required": [
377
+ "grant_type"
378
+ ],
379
+ "properties": {
380
+ "grant_type": {
381
+ "type": "string",
382
+ "enum": [
383
+ "client_credentials"
384
+ ]
385
+ },
386
+ "scope": {
387
+ "type": "string",
388
+ "maxLength": 100
389
+ }
390
+ }
391
+ }
392
+ }
393
+ }
394
+ },
395
+ "responses": {
396
+ "200": {
397
+ "description": "Token",
398
+ "content": {
399
+ "application/json": {
400
+ "schema": {
401
+ "type": "object",
402
+ "required": [
403
+ "access_token",
404
+ "token_type",
405
+ "expires_in"
406
+ ],
407
+ "properties": {
408
+ "access_token": {
409
+ "type": "string"
410
+ },
411
+ "token_type": {
412
+ "type": "string"
413
+ },
414
+ "expires_in": {
415
+ "type": "integer"
416
+ },
417
+ "scope": {
418
+ "type": "string"
419
+ }
420
+ }
421
+ }
422
+ }
423
+ }
424
+ },
425
+ "400": {
426
+ "description": "OAuth error",
427
+ "content": {
428
+ "application/json": {
429
+ "schema": {
430
+ "type": "object",
431
+ "required": [
432
+ "error"
433
+ ],
434
+ "properties": {
435
+ "error": {
436
+ "type": "string"
437
+ }
438
+ }
439
+ }
440
+ }
441
+ }
442
+ },
443
+ "401": {
444
+ "description": "OAuth error",
445
+ "content": {
446
+ "application/json": {
447
+ "schema": {
448
+ "type": "object",
449
+ "required": [
450
+ "error"
451
+ ],
452
+ "properties": {
453
+ "error": {
454
+ "type": "string"
455
+ }
456
+ }
457
+ }
458
+ }
459
+ }
460
+ }
461
+ },
462
+ "x-mockingbird": {
463
+ "supported": true,
464
+ "parity": {
465
+ "enabled": true,
466
+ "safe": false
467
+ }
468
+ }
469
+ }
470
+ },
471
+ "/__admin/blobs/{id}": {
472
+ "x-mockingbird-internal": true,
473
+ "get": {
474
+ "operationId": "DownloadReport",
475
+ "parameters": [
476
+ {
477
+ "name": "id",
478
+ "in": "path",
479
+ "required": true,
480
+ "schema": {
481
+ "type": "string"
482
+ }
483
+ },
484
+ {
485
+ "name": "token",
486
+ "in": "query",
487
+ "required": true,
488
+ "schema": {
489
+ "type": "string"
490
+ }
491
+ }
492
+ ],
493
+ "responses": {
494
+ "200": {
495
+ "description": "Synthetic JSON rows",
496
+ "content": {
497
+ "application/json": {
498
+ "schema": {
499
+ "type": "array",
500
+ "items": {
501
+ "type": "object"
502
+ }
503
+ }
504
+ }
505
+ }
506
+ },
507
+ "403": {
508
+ "description": "Vibe resource error",
509
+ "content": {
510
+ "application/json": {
511
+ "schema": {
512
+ "type": "object",
513
+ "required": [
514
+ "error"
515
+ ],
516
+ "properties": {
517
+ "error": {
518
+ "type": "object",
519
+ "required": [
520
+ "type",
521
+ "message",
522
+ "status",
523
+ "request_id"
524
+ ],
525
+ "properties": {
526
+ "type": {
527
+ "type": "string"
528
+ },
529
+ "message": {
530
+ "type": "string"
531
+ },
532
+ "status": {
533
+ "type": "integer"
534
+ },
535
+ "request_id": {
536
+ "type": "string"
537
+ }
538
+ }
539
+ }
540
+ }
541
+ }
542
+ }
543
+ }
544
+ },
545
+ "404": {
546
+ "description": "Vibe resource error",
547
+ "content": {
548
+ "application/json": {
549
+ "schema": {
550
+ "type": "object",
551
+ "required": [
552
+ "error"
553
+ ],
554
+ "properties": {
555
+ "error": {
556
+ "type": "object",
557
+ "required": [
558
+ "type",
559
+ "message",
560
+ "status",
561
+ "request_id"
562
+ ],
563
+ "properties": {
564
+ "type": {
565
+ "type": "string"
566
+ },
567
+ "message": {
568
+ "type": "string"
569
+ },
570
+ "status": {
571
+ "type": "integer"
572
+ },
573
+ "request_id": {
574
+ "type": "string"
575
+ }
576
+ }
577
+ }
578
+ }
579
+ }
580
+ }
581
+ }
582
+ }
583
+ },
584
+ "x-mockingbird": {
585
+ "supported": true,
586
+ "parity": {
587
+ "enabled": false,
588
+ "reason": "Mock-only capability URL; exercised by acceptance tests."
589
+ }
590
+ }
591
+ }
592
+ }
593
+ },
594
+ "info": {
595
+ "title": "Vibe Public API",
596
+ "description": "Vibe Public API revision 2026-06-01",
597
+ "version": "2026-06-01",
598
+ "contact": {},
599
+ "x-mockingbird-upstream": {
600
+ "url": "https://developers.vibe.co/reference/createreport-1"
601
+ }
602
+ },
603
+ "tags": [
604
+ {
605
+ "name": "Reporting",
606
+ "description": "Aggregated delivery, spend, and outcome metrics, plus the purchase events attributed to Vibe campaigns.\n\nReports run asynchronously: create a report, poll it until its status is `READY`, then download it from the signed `download_url`, which is valid for 24 hours. Purchase events are pulled directly and are useful for reconciling Vibe reporting against e-commerce backends.\n\nDate windows are limited to the last 45 days. Reports typically complete within a few minutes — **do not poll more than once every 10 seconds**."
607
+ }
608
+ ],
609
+ "servers": [
610
+ {
611
+ "url": "https://api.vibe.co",
612
+ "description": "Production API"
613
+ }
614
+ ],
615
+ "components": {
616
+ "securitySchemes": {
617
+ "bearer": {
618
+ "scheme": "bearer",
619
+ "bearerFormat": "JWT",
620
+ "type": "http"
621
+ }
622
+ },
623
+ "schemas": {
624
+ "ReportFilter": {
625
+ "type": "object",
626
+ "properties": {
627
+ "dimension": {
628
+ "type": "string",
629
+ "description": "Dimension to filter on",
630
+ "enum": [
631
+ "event_source_id",
632
+ "campaign_id",
633
+ "strategy_id"
634
+ ]
635
+ },
636
+ "values": {
637
+ "minItems": 1,
638
+ "description": "Values to include",
639
+ "type": "array",
640
+ "items": {
641
+ "type": "string"
642
+ }
643
+ }
644
+ },
645
+ "required": [
646
+ "dimension"
647
+ ]
648
+ },
649
+ "ReportCreate": {
650
+ "type": "object",
651
+ "properties": {
652
+ "start_date": {
653
+ "type": "string",
654
+ "description": "Minimum date (inclusive) for which to return data",
655
+ "format": "date"
656
+ },
657
+ "end_date": {
658
+ "type": "string",
659
+ "description": "Maximum date (exclusive) for which to return data",
660
+ "format": "date"
661
+ },
662
+ "timezone": {
663
+ "type": "string",
664
+ "description": "Timezone identifier for reported data",
665
+ "enum": [
666
+ "UTC",
667
+ "Europe/Amsterdam",
668
+ "Europe/Berlin",
669
+ "Europe/Helsinki",
670
+ "Europe/Istanbul",
671
+ "Europe/London",
672
+ "Europe/Stockholm",
673
+ "Asia/Seoul",
674
+ "Asia/Shanghai",
675
+ "Asia/Tel_Aviv",
676
+ "America/Denver",
677
+ "America/Los_Angeles",
678
+ "America/New_York",
679
+ "America/Phoenix"
680
+ ],
681
+ "default": "UTC"
682
+ },
683
+ "advertiser_ids": {
684
+ "minItems": 1,
685
+ "description": "Advertisers to include. Must be owned by the tenant.",
686
+ "type": "array",
687
+ "items": {
688
+ "type": "string",
689
+ "format": "uuid"
690
+ }
691
+ },
692
+ "dimensions": {
693
+ "type": "array",
694
+ "description": "Dimensions to group rows by",
695
+ "items": {
696
+ "type": "string",
697
+ "enum": [
698
+ "impression_date",
699
+ "advertiser_id",
700
+ "advertiser_name",
701
+ "campaign_id",
702
+ "campaign_name",
703
+ "strategy_id",
704
+ "strategy_name",
705
+ "creative_id",
706
+ "creative_name",
707
+ "event_source_id",
708
+ "event_source_platform",
709
+ "purchase_id",
710
+ "screen",
711
+ "channel_name",
712
+ "content_name",
713
+ "geo_region",
714
+ "geo_metro",
715
+ "geo_city",
716
+ "geo_zip",
717
+ "segment_ages",
718
+ "segment_career",
719
+ "segment_educations",
720
+ "segment_estimated_incomes",
721
+ "segment_estimated_net_worth",
722
+ "segment_ethnicity",
723
+ "segment_family_composition",
724
+ "segment_genders",
725
+ "segment_interests",
726
+ "segment_languages",
727
+ "segment_political_status",
728
+ "segment_retargeting",
729
+ "custom_audiences"
730
+ ]
731
+ }
732
+ },
733
+ "metrics": {
734
+ "type": "array",
735
+ "minItems": 1,
736
+ "description": "Metrics to compute",
737
+ "items": {
738
+ "type": "string",
739
+ "enum": [
740
+ "spend",
741
+ "impressions",
742
+ "households",
743
+ "frequency",
744
+ "cpm",
745
+ "completed_views",
746
+ "cost_per_completed_view",
747
+ "view_through_rate",
748
+ "number_of_page_views",
749
+ "cost_per_page_view",
750
+ "number_of_sessions",
751
+ "cost_per_session",
752
+ "number_of_leads",
753
+ "cost_per_lead",
754
+ "installs",
755
+ "cost_per_install",
756
+ "number_of_purchases",
757
+ "cost_per_purchase",
758
+ "amount_of_purchases",
759
+ "number_of_signups",
760
+ "cost_per_signup",
761
+ "number_of_custom_1",
762
+ "cost_per_custom_1",
763
+ "number_of_custom_2",
764
+ "cost_per_custom_2",
765
+ "number_of_custom_3",
766
+ "cost_per_custom_3",
767
+ "roas"
768
+ ]
769
+ }
770
+ },
771
+ "attribution_window": {
772
+ "type": "string",
773
+ "enum": [
774
+ "1h",
775
+ "6h",
776
+ "12h",
777
+ "24h",
778
+ "48h",
779
+ "72h",
780
+ "7 days",
781
+ "30 days"
782
+ ],
783
+ "default": "7 days"
784
+ },
785
+ "granularity": {
786
+ "type": "string",
787
+ "default": "DAY",
788
+ "description": "Time aggregation granularity for rows in the report",
789
+ "enum": [
790
+ "HOUR",
791
+ "DAY",
792
+ "WEEK",
793
+ "MONTH"
794
+ ]
795
+ },
796
+ "filters": {
797
+ "description": "Optional filters, combined with AND",
798
+ "type": "array",
799
+ "items": {
800
+ "$ref": "#/components/schemas/ReportFilter"
801
+ }
802
+ },
803
+ "format": {
804
+ "type": "string",
805
+ "enum": [
806
+ "JSON",
807
+ "CSV"
808
+ ],
809
+ "default": "JSON"
810
+ }
811
+ },
812
+ "required": [
813
+ "start_date",
814
+ "end_date",
815
+ "advertiser_ids",
816
+ "metrics"
817
+ ]
818
+ },
819
+ "ReportFailureReason": {
820
+ "type": "object",
821
+ "properties": {
822
+ "code": {
823
+ "type": "string",
824
+ "description": "Stable machine-readable error code"
825
+ },
826
+ "message": {
827
+ "type": "string",
828
+ "description": "Human-readable explanation"
829
+ },
830
+ "details": {
831
+ "type": "object",
832
+ "nullable": true,
833
+ "description": "Additional context specific to the failure code"
834
+ }
835
+ },
836
+ "required": [
837
+ "code",
838
+ "message"
839
+ ]
840
+ },
841
+ "Report": {
842
+ "type": "object",
843
+ "properties": {
844
+ "id": {
845
+ "type": "string",
846
+ "description": "Stable identifier of the report",
847
+ "format": "uuid"
848
+ },
849
+ "status": {
850
+ "type": "string",
851
+ "enum": [
852
+ "CREATED",
853
+ "PROCESSING",
854
+ "READY",
855
+ "FAILED"
856
+ ]
857
+ },
858
+ "download_url": {
859
+ "type": [
860
+ "string",
861
+ "null"
862
+ ],
863
+ "format": "uri",
864
+ "description": "Pre-signed URL to download the report. Populated only when status is READY."
865
+ },
866
+ "generated_url_time": {
867
+ "type": [
868
+ "string",
869
+ "null"
870
+ ],
871
+ "format": "date-time"
872
+ },
873
+ "url_expiration_time": {
874
+ "type": [
875
+ "string",
876
+ "null"
877
+ ],
878
+ "format": "date-time"
879
+ },
880
+ "failure_reason": {
881
+ "oneOf": [
882
+ {
883
+ "$ref": "#/components/schemas/ReportFailureReason"
884
+ },
885
+ {
886
+ "type": "null"
887
+ }
888
+ ]
889
+ },
890
+ "created_at": {
891
+ "type": "string",
892
+ "description": "Time at which the report was created",
893
+ "format": "date-time"
894
+ },
895
+ "completed_at": {
896
+ "type": [
897
+ "string",
898
+ "null"
899
+ ],
900
+ "description": "Time at which the report reached a terminal state",
901
+ "format": "date-time"
902
+ }
903
+ },
904
+ "required": [
905
+ "id",
906
+ "status",
907
+ "created_at"
908
+ ]
909
+ }
910
+ }
911
+ },
912
+ "security": [
913
+ {
914
+ "bearer": []
915
+ }
916
+ ]
917
+ }