@happyvertical/smrt-ads 0.30.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.
@@ -0,0 +1,3506 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 1782177103794,
4
+ "packageName": "@happyvertical/smrt-ads",
5
+ "packageVersion": "0.30.0",
6
+ "objects": {
7
+ "@happyvertical/smrt-ads:AdDeliveryTierCollection": {
8
+ "name": "addeliverytiercollection",
9
+ "className": "AdDeliveryTierCollection",
10
+ "qualifiedName": "@happyvertical/smrt-ads:AdDeliveryTierCollection",
11
+ "collection": "addeliverytiers",
12
+ "filePath": "/home/runner/_work/smrt/smrt/packages/ads/src/collections/AdDeliveryTierCollection.ts",
13
+ "packageName": "@happyvertical/smrt-ads",
14
+ "fields": {},
15
+ "methods": {
16
+ "findByPriority": {
17
+ "name": "findByPriority",
18
+ "async": true,
19
+ "parameters": [],
20
+ "returnType": "Promise<AdDeliveryTier[]>",
21
+ "isStatic": false,
22
+ "isPublic": true
23
+ },
24
+ "findByPricingModel": {
25
+ "name": "findByPricingModel",
26
+ "async": true,
27
+ "parameters": [
28
+ {
29
+ "name": "pricingModel",
30
+ "type": "PricingModel",
31
+ "optional": false
32
+ }
33
+ ],
34
+ "returnType": "Promise<AdDeliveryTier[]>",
35
+ "isStatic": false,
36
+ "isPublic": true
37
+ },
38
+ "getHighestPriority": {
39
+ "name": "getHighestPriority",
40
+ "async": true,
41
+ "parameters": [],
42
+ "returnType": "Promise<AdDeliveryTier | null>",
43
+ "isStatic": false,
44
+ "isPublic": true
45
+ },
46
+ "findFixedPricing": {
47
+ "name": "findFixedPricing",
48
+ "async": true,
49
+ "parameters": [],
50
+ "returnType": "Promise<AdDeliveryTier[]>",
51
+ "isStatic": false,
52
+ "isPublic": true
53
+ },
54
+ "findCPM": {
55
+ "name": "findCPM",
56
+ "async": true,
57
+ "parameters": [],
58
+ "returnType": "Promise<AdDeliveryTier[]>",
59
+ "isStatic": false,
60
+ "isPublic": true
61
+ },
62
+ "findPerformanceBased": {
63
+ "name": "findPerformanceBased",
64
+ "async": true,
65
+ "parameters": [],
66
+ "returnType": "Promise<AdDeliveryTier[]>",
67
+ "isStatic": false,
68
+ "isPublic": true
69
+ }
70
+ },
71
+ "decoratorConfig": {},
72
+ "extends": "SmrtCollection",
73
+ "extendsTypeArg": "AdDeliveryTier",
74
+ "exportName": "AdDeliveryTierCollection",
75
+ "collectionExportName": "AdDeliveryTierCollectionCollection",
76
+ "schema": {
77
+ "tableName": "ad_delivery_tier_collections",
78
+ "ddl": "CREATE TABLE IF NOT EXISTS \"ad_delivery_tier_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
79
+ "columns": {
80
+ "id": {
81
+ "type": "UUID",
82
+ "primaryKey": true,
83
+ "referenceKind": "id",
84
+ "notNull": true
85
+ },
86
+ "slug": {
87
+ "type": "TEXT",
88
+ "notNull": true
89
+ },
90
+ "context": {
91
+ "type": "TEXT",
92
+ "notNull": true,
93
+ "default": ""
94
+ },
95
+ "created_at": {
96
+ "type": "TIMESTAMP",
97
+ "notNull": true,
98
+ "default": "current_timestamp"
99
+ },
100
+ "updated_at": {
101
+ "type": "TIMESTAMP",
102
+ "notNull": true,
103
+ "default": "current_timestamp"
104
+ }
105
+ },
106
+ "indexes": [
107
+ {
108
+ "name": "ad_delivery_tier_collections_id_idx",
109
+ "columns": [
110
+ "id"
111
+ ]
112
+ },
113
+ {
114
+ "name": "ad_delivery_tier_collections_slug_context_idx",
115
+ "columns": [
116
+ "slug",
117
+ "context"
118
+ ],
119
+ "unique": true
120
+ }
121
+ ],
122
+ "version": "fcb1bac2"
123
+ }
124
+ },
125
+ "@happyvertical/smrt-ads:AdEventCollection": {
126
+ "name": "adeventcollection",
127
+ "className": "AdEventCollection",
128
+ "qualifiedName": "@happyvertical/smrt-ads:AdEventCollection",
129
+ "collection": "adevents",
130
+ "filePath": "/home/runner/_work/smrt/smrt/packages/ads/src/collections/AdEventCollection.ts",
131
+ "packageName": "@happyvertical/smrt-ads",
132
+ "fields": {},
133
+ "methods": {
134
+ "findByVariation": {
135
+ "name": "findByVariation",
136
+ "async": true,
137
+ "parameters": [
138
+ {
139
+ "name": "variationId",
140
+ "type": "string",
141
+ "optional": false
142
+ }
143
+ ],
144
+ "returnType": "Promise<AdEvent[]>",
145
+ "isStatic": false,
146
+ "isPublic": true
147
+ },
148
+ "findByZone": {
149
+ "name": "findByZone",
150
+ "async": true,
151
+ "parameters": [
152
+ {
153
+ "name": "zoneId",
154
+ "type": "string",
155
+ "optional": false
156
+ }
157
+ ],
158
+ "returnType": "Promise<AdEvent[]>",
159
+ "isStatic": false,
160
+ "isPublic": true
161
+ },
162
+ "findBySite": {
163
+ "name": "findBySite",
164
+ "async": true,
165
+ "parameters": [
166
+ {
167
+ "name": "siteId",
168
+ "type": "string",
169
+ "optional": false
170
+ }
171
+ ],
172
+ "returnType": "Promise<AdEvent[]>",
173
+ "isStatic": false,
174
+ "isPublic": true
175
+ },
176
+ "findByDateRange": {
177
+ "name": "findByDateRange",
178
+ "async": true,
179
+ "parameters": [
180
+ {
181
+ "name": "start",
182
+ "type": "Date",
183
+ "optional": false
184
+ },
185
+ {
186
+ "name": "end",
187
+ "type": "Date",
188
+ "optional": false
189
+ }
190
+ ],
191
+ "returnType": "Promise<AdEvent[]>",
192
+ "isStatic": false,
193
+ "isPublic": true
194
+ },
195
+ "findByType": {
196
+ "name": "findByType",
197
+ "async": true,
198
+ "parameters": [
199
+ {
200
+ "name": "eventType",
201
+ "type": "AdEventType",
202
+ "optional": false
203
+ }
204
+ ],
205
+ "returnType": "Promise<AdEvent[]>",
206
+ "isStatic": false,
207
+ "isPublic": true
208
+ },
209
+ "countByType": {
210
+ "name": "countByType",
211
+ "async": true,
212
+ "parameters": [
213
+ {
214
+ "name": "variationId",
215
+ "type": "string",
216
+ "optional": false
217
+ },
218
+ {
219
+ "name": "eventType",
220
+ "type": "AdEventType",
221
+ "optional": false
222
+ }
223
+ ],
224
+ "returnType": "Promise<number>",
225
+ "isStatic": false,
226
+ "isPublic": true
227
+ },
228
+ "countImpressions": {
229
+ "name": "countImpressions",
230
+ "async": true,
231
+ "parameters": [
232
+ {
233
+ "name": "variationId",
234
+ "type": "string",
235
+ "optional": false
236
+ }
237
+ ],
238
+ "returnType": "Promise<number>",
239
+ "isStatic": false,
240
+ "isPublic": true
241
+ },
242
+ "countClicks": {
243
+ "name": "countClicks",
244
+ "async": true,
245
+ "parameters": [
246
+ {
247
+ "name": "variationId",
248
+ "type": "string",
249
+ "optional": false
250
+ }
251
+ ],
252
+ "returnType": "Promise<number>",
253
+ "isStatic": false,
254
+ "isPublic": true
255
+ },
256
+ "countConversions": {
257
+ "name": "countConversions",
258
+ "async": true,
259
+ "parameters": [
260
+ {
261
+ "name": "variationId",
262
+ "type": "string",
263
+ "optional": false
264
+ }
265
+ ],
266
+ "returnType": "Promise<number>",
267
+ "isStatic": false,
268
+ "isPublic": true
269
+ },
270
+ "findImpressions": {
271
+ "name": "findImpressions",
272
+ "async": true,
273
+ "parameters": [],
274
+ "returnType": "Promise<AdEvent[]>",
275
+ "isStatic": false,
276
+ "isPublic": true
277
+ },
278
+ "findClicks": {
279
+ "name": "findClicks",
280
+ "async": true,
281
+ "parameters": [],
282
+ "returnType": "Promise<AdEvent[]>",
283
+ "isStatic": false,
284
+ "isPublic": true
285
+ },
286
+ "findConversions": {
287
+ "name": "findConversions",
288
+ "async": true,
289
+ "parameters": [],
290
+ "returnType": "Promise<AdEvent[]>",
291
+ "isStatic": false,
292
+ "isPublic": true
293
+ },
294
+ "getVariationStats": {
295
+ "name": "getVariationStats",
296
+ "async": true,
297
+ "parameters": [
298
+ {
299
+ "name": "variationId",
300
+ "type": "string",
301
+ "optional": false
302
+ }
303
+ ],
304
+ "returnType": "Promise<object>",
305
+ "isStatic": false,
306
+ "isPublic": true
307
+ },
308
+ "findByTenant": {
309
+ "name": "findByTenant",
310
+ "async": true,
311
+ "parameters": [
312
+ {
313
+ "name": "tenantId",
314
+ "type": "string",
315
+ "optional": false
316
+ }
317
+ ],
318
+ "returnType": "Promise<AdEvent[]>",
319
+ "isStatic": false,
320
+ "isPublic": true
321
+ },
322
+ "findGlobal": {
323
+ "name": "findGlobal",
324
+ "async": true,
325
+ "parameters": [],
326
+ "returnType": "Promise<AdEvent[]>",
327
+ "isStatic": false,
328
+ "isPublic": true
329
+ },
330
+ "findWithGlobals": {
331
+ "name": "findWithGlobals",
332
+ "async": true,
333
+ "parameters": [
334
+ {
335
+ "name": "tenantId",
336
+ "type": "string",
337
+ "optional": false
338
+ }
339
+ ],
340
+ "returnType": "Promise<AdEvent[]>",
341
+ "isStatic": false,
342
+ "isPublic": true
343
+ }
344
+ },
345
+ "decoratorConfig": {},
346
+ "extends": "SmrtCollection",
347
+ "extendsTypeArg": "AdEvent",
348
+ "exportName": "AdEventCollection",
349
+ "collectionExportName": "AdEventCollectionCollection",
350
+ "schema": {
351
+ "tableName": "ad_event_collections",
352
+ "ddl": "CREATE TABLE IF NOT EXISTS \"ad_event_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
353
+ "columns": {
354
+ "id": {
355
+ "type": "UUID",
356
+ "primaryKey": true,
357
+ "referenceKind": "id",
358
+ "notNull": true
359
+ },
360
+ "slug": {
361
+ "type": "TEXT",
362
+ "notNull": true
363
+ },
364
+ "context": {
365
+ "type": "TEXT",
366
+ "notNull": true,
367
+ "default": ""
368
+ },
369
+ "created_at": {
370
+ "type": "TIMESTAMP",
371
+ "notNull": true,
372
+ "default": "current_timestamp"
373
+ },
374
+ "updated_at": {
375
+ "type": "TIMESTAMP",
376
+ "notNull": true,
377
+ "default": "current_timestamp"
378
+ }
379
+ },
380
+ "indexes": [
381
+ {
382
+ "name": "ad_event_collections_id_idx",
383
+ "columns": [
384
+ "id"
385
+ ]
386
+ },
387
+ {
388
+ "name": "ad_event_collections_slug_context_idx",
389
+ "columns": [
390
+ "slug",
391
+ "context"
392
+ ],
393
+ "unique": true
394
+ }
395
+ ],
396
+ "version": "f21d5055"
397
+ }
398
+ },
399
+ "@happyvertical/smrt-ads:AdFormatCollection": {
400
+ "name": "adformatcollection",
401
+ "className": "AdFormatCollection",
402
+ "qualifiedName": "@happyvertical/smrt-ads:AdFormatCollection",
403
+ "collection": "adformats",
404
+ "filePath": "/home/runner/_work/smrt/smrt/packages/ads/src/collections/AdFormatCollection.ts",
405
+ "packageName": "@happyvertical/smrt-ads",
406
+ "fields": {},
407
+ "methods": {
408
+ "findByDimensions": {
409
+ "name": "findByDimensions",
410
+ "async": true,
411
+ "parameters": [
412
+ {
413
+ "name": "width",
414
+ "type": "number",
415
+ "optional": false
416
+ },
417
+ {
418
+ "name": "height",
419
+ "type": "number",
420
+ "optional": false
421
+ }
422
+ ],
423
+ "returnType": "Promise<AdFormat | null>",
424
+ "isStatic": false,
425
+ "isPublic": true
426
+ },
427
+ "findByType": {
428
+ "name": "findByType",
429
+ "async": true,
430
+ "parameters": [
431
+ {
432
+ "name": "formatType",
433
+ "type": "AdFormatType",
434
+ "optional": false
435
+ }
436
+ ],
437
+ "returnType": "Promise<AdFormat[]>",
438
+ "isStatic": false,
439
+ "isPublic": true
440
+ },
441
+ "findBanners": {
442
+ "name": "findBanners",
443
+ "async": true,
444
+ "parameters": [],
445
+ "returnType": "Promise<AdFormat[]>",
446
+ "isStatic": false,
447
+ "isPublic": true
448
+ },
449
+ "findNative": {
450
+ "name": "findNative",
451
+ "async": true,
452
+ "parameters": [],
453
+ "returnType": "Promise<AdFormat[]>",
454
+ "isStatic": false,
455
+ "isPublic": true
456
+ },
457
+ "findVideo": {
458
+ "name": "findVideo",
459
+ "async": true,
460
+ "parameters": [],
461
+ "returnType": "Promise<AdFormat[]>",
462
+ "isStatic": false,
463
+ "isPublic": true
464
+ }
465
+ },
466
+ "decoratorConfig": {},
467
+ "extends": "SmrtCollection",
468
+ "extendsTypeArg": "AdFormat",
469
+ "exportName": "AdFormatCollection",
470
+ "collectionExportName": "AdFormatCollectionCollection",
471
+ "schema": {
472
+ "tableName": "ad_format_collections",
473
+ "ddl": "CREATE TABLE IF NOT EXISTS \"ad_format_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
474
+ "columns": {
475
+ "id": {
476
+ "type": "UUID",
477
+ "primaryKey": true,
478
+ "referenceKind": "id",
479
+ "notNull": true
480
+ },
481
+ "slug": {
482
+ "type": "TEXT",
483
+ "notNull": true
484
+ },
485
+ "context": {
486
+ "type": "TEXT",
487
+ "notNull": true,
488
+ "default": ""
489
+ },
490
+ "created_at": {
491
+ "type": "TIMESTAMP",
492
+ "notNull": true,
493
+ "default": "current_timestamp"
494
+ },
495
+ "updated_at": {
496
+ "type": "TIMESTAMP",
497
+ "notNull": true,
498
+ "default": "current_timestamp"
499
+ }
500
+ },
501
+ "indexes": [
502
+ {
503
+ "name": "ad_format_collections_id_idx",
504
+ "columns": [
505
+ "id"
506
+ ]
507
+ },
508
+ {
509
+ "name": "ad_format_collections_slug_context_idx",
510
+ "columns": [
511
+ "slug",
512
+ "context"
513
+ ],
514
+ "unique": true
515
+ }
516
+ ],
517
+ "version": "e2df1b16"
518
+ }
519
+ },
520
+ "@happyvertical/smrt-ads:AdGroupCollection": {
521
+ "name": "adgroupcollection",
522
+ "className": "AdGroupCollection",
523
+ "qualifiedName": "@happyvertical/smrt-ads:AdGroupCollection",
524
+ "collection": "adgroups",
525
+ "filePath": "/home/runner/_work/smrt/smrt/packages/ads/src/collections/AdGroupCollection.ts",
526
+ "packageName": "@happyvertical/smrt-ads",
527
+ "fields": {},
528
+ "methods": {
529
+ "findByContract": {
530
+ "name": "findByContract",
531
+ "async": true,
532
+ "parameters": [
533
+ {
534
+ "name": "contractId",
535
+ "type": "string",
536
+ "optional": false
537
+ }
538
+ ],
539
+ "returnType": "Promise<AdGroup[]>",
540
+ "isStatic": false,
541
+ "isPublic": true
542
+ },
543
+ "findByTier": {
544
+ "name": "findByTier",
545
+ "async": true,
546
+ "parameters": [
547
+ {
548
+ "name": "tierId",
549
+ "type": "string",
550
+ "optional": false
551
+ }
552
+ ],
553
+ "returnType": "Promise<AdGroup[]>",
554
+ "isStatic": false,
555
+ "isPublic": true
556
+ },
557
+ "findByStatus": {
558
+ "name": "findByStatus",
559
+ "async": true,
560
+ "parameters": [
561
+ {
562
+ "name": "status",
563
+ "type": "AdGroupStatus",
564
+ "optional": false
565
+ }
566
+ ],
567
+ "returnType": "Promise<AdGroup[]>",
568
+ "isStatic": false,
569
+ "isPublic": true
570
+ },
571
+ "findActive": {
572
+ "name": "findActive",
573
+ "async": true,
574
+ "parameters": [],
575
+ "returnType": "Promise<AdGroup[]>",
576
+ "isStatic": false,
577
+ "isPublic": true
578
+ },
579
+ "findByVertical": {
580
+ "name": "findByVertical",
581
+ "async": true,
582
+ "parameters": [
583
+ {
584
+ "name": "verticalSlug",
585
+ "type": "string",
586
+ "optional": false
587
+ }
588
+ ],
589
+ "returnType": "Promise<AdGroup[]>",
590
+ "isStatic": false,
591
+ "isPublic": true
592
+ },
593
+ "findByZone": {
594
+ "name": "findByZone",
595
+ "async": true,
596
+ "parameters": [
597
+ {
598
+ "name": "zoneId",
599
+ "type": "string",
600
+ "optional": false
601
+ }
602
+ ],
603
+ "returnType": "Promise<AdGroup[]>",
604
+ "isStatic": false,
605
+ "isPublic": true
606
+ },
607
+ "findEligibleForZone": {
608
+ "name": "findEligibleForZone",
609
+ "async": true,
610
+ "parameters": [
611
+ {
612
+ "name": "zoneId",
613
+ "type": "string",
614
+ "optional": false
615
+ }
616
+ ],
617
+ "returnType": "Promise<AdGroup[]>",
618
+ "isStatic": false,
619
+ "isPublic": true
620
+ },
621
+ "findDrafts": {
622
+ "name": "findDrafts",
623
+ "async": true,
624
+ "parameters": [],
625
+ "returnType": "Promise<AdGroup[]>",
626
+ "isStatic": false,
627
+ "isPublic": true
628
+ },
629
+ "findPaused": {
630
+ "name": "findPaused",
631
+ "async": true,
632
+ "parameters": [],
633
+ "returnType": "Promise<AdGroup[]>",
634
+ "isStatic": false,
635
+ "isPublic": true
636
+ },
637
+ "findCompleted": {
638
+ "name": "findCompleted",
639
+ "async": true,
640
+ "parameters": [],
641
+ "returnType": "Promise<AdGroup[]>",
642
+ "isStatic": false,
643
+ "isPublic": true
644
+ },
645
+ "findByTenant": {
646
+ "name": "findByTenant",
647
+ "async": true,
648
+ "parameters": [
649
+ {
650
+ "name": "tenantId",
651
+ "type": "string",
652
+ "optional": false
653
+ }
654
+ ],
655
+ "returnType": "Promise<AdGroup[]>",
656
+ "isStatic": false,
657
+ "isPublic": true
658
+ },
659
+ "findGlobal": {
660
+ "name": "findGlobal",
661
+ "async": true,
662
+ "parameters": [],
663
+ "returnType": "Promise<AdGroup[]>",
664
+ "isStatic": false,
665
+ "isPublic": true
666
+ },
667
+ "findWithGlobals": {
668
+ "name": "findWithGlobals",
669
+ "async": true,
670
+ "parameters": [
671
+ {
672
+ "name": "tenantId",
673
+ "type": "string",
674
+ "optional": false
675
+ }
676
+ ],
677
+ "returnType": "Promise<AdGroup[]>",
678
+ "isStatic": false,
679
+ "isPublic": true
680
+ }
681
+ },
682
+ "decoratorConfig": {},
683
+ "extends": "SmrtCollection",
684
+ "extendsTypeArg": "AdGroup",
685
+ "exportName": "AdGroupCollection",
686
+ "collectionExportName": "AdGroupCollectionCollection",
687
+ "schema": {
688
+ "tableName": "ad_group_collections",
689
+ "ddl": "CREATE TABLE IF NOT EXISTS \"ad_group_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
690
+ "columns": {
691
+ "id": {
692
+ "type": "UUID",
693
+ "primaryKey": true,
694
+ "referenceKind": "id",
695
+ "notNull": true
696
+ },
697
+ "slug": {
698
+ "type": "TEXT",
699
+ "notNull": true
700
+ },
701
+ "context": {
702
+ "type": "TEXT",
703
+ "notNull": true,
704
+ "default": ""
705
+ },
706
+ "created_at": {
707
+ "type": "TIMESTAMP",
708
+ "notNull": true,
709
+ "default": "current_timestamp"
710
+ },
711
+ "updated_at": {
712
+ "type": "TIMESTAMP",
713
+ "notNull": true,
714
+ "default": "current_timestamp"
715
+ }
716
+ },
717
+ "indexes": [
718
+ {
719
+ "name": "ad_group_collections_id_idx",
720
+ "columns": [
721
+ "id"
722
+ ]
723
+ },
724
+ {
725
+ "name": "ad_group_collections_slug_context_idx",
726
+ "columns": [
727
+ "slug",
728
+ "context"
729
+ ],
730
+ "unique": true
731
+ }
732
+ ],
733
+ "version": "95b87ec7"
734
+ }
735
+ },
736
+ "@happyvertical/smrt-ads:AdVariationCollection": {
737
+ "name": "advariationcollection",
738
+ "className": "AdVariationCollection",
739
+ "qualifiedName": "@happyvertical/smrt-ads:AdVariationCollection",
740
+ "collection": "advariations",
741
+ "filePath": "/home/runner/_work/smrt/smrt/packages/ads/src/collections/AdVariationCollection.ts",
742
+ "packageName": "@happyvertical/smrt-ads",
743
+ "fields": {},
744
+ "methods": {
745
+ "findByGroup": {
746
+ "name": "findByGroup",
747
+ "async": true,
748
+ "parameters": [
749
+ {
750
+ "name": "groupId",
751
+ "type": "string",
752
+ "optional": false
753
+ }
754
+ ],
755
+ "returnType": "Promise<AdVariation[]>",
756
+ "isStatic": false,
757
+ "isPublic": true
758
+ },
759
+ "findByFormat": {
760
+ "name": "findByFormat",
761
+ "async": true,
762
+ "parameters": [
763
+ {
764
+ "name": "formatId",
765
+ "type": "string",
766
+ "optional": false
767
+ }
768
+ ],
769
+ "returnType": "Promise<AdVariation[]>",
770
+ "isStatic": false,
771
+ "isPublic": true
772
+ },
773
+ "findActiveByGroup": {
774
+ "name": "findActiveByGroup",
775
+ "async": true,
776
+ "parameters": [
777
+ {
778
+ "name": "groupId",
779
+ "type": "string",
780
+ "optional": false
781
+ }
782
+ ],
783
+ "returnType": "Promise<AdVariation[]>",
784
+ "isStatic": false,
785
+ "isPublic": true
786
+ },
787
+ "selectByWeight": {
788
+ "name": "selectByWeight",
789
+ "async": true,
790
+ "parameters": [
791
+ {
792
+ "name": "groupId",
793
+ "type": "string",
794
+ "optional": false
795
+ }
796
+ ],
797
+ "returnType": "Promise<AdVariation | null>",
798
+ "isStatic": false,
799
+ "isPublic": true
800
+ },
801
+ "findByStatus": {
802
+ "name": "findByStatus",
803
+ "async": true,
804
+ "parameters": [
805
+ {
806
+ "name": "status",
807
+ "type": "AdVariationStatus",
808
+ "optional": false
809
+ }
810
+ ],
811
+ "returnType": "Promise<AdVariation[]>",
812
+ "isStatic": false,
813
+ "isPublic": true
814
+ },
815
+ "findActive": {
816
+ "name": "findActive",
817
+ "async": true,
818
+ "parameters": [],
819
+ "returnType": "Promise<AdVariation[]>",
820
+ "isStatic": false,
821
+ "isPublic": true
822
+ },
823
+ "findDrafts": {
824
+ "name": "findDrafts",
825
+ "async": true,
826
+ "parameters": [],
827
+ "returnType": "Promise<AdVariation[]>",
828
+ "isStatic": false,
829
+ "isPublic": true
830
+ },
831
+ "findPaused": {
832
+ "name": "findPaused",
833
+ "async": true,
834
+ "parameters": [],
835
+ "returnType": "Promise<AdVariation[]>",
836
+ "isStatic": false,
837
+ "isPublic": true
838
+ },
839
+ "findTopPerformers": {
840
+ "name": "findTopPerformers",
841
+ "async": true,
842
+ "parameters": [
843
+ {
844
+ "name": "limit",
845
+ "type": "number",
846
+ "optional": true
847
+ }
848
+ ],
849
+ "returnType": "Promise<AdVariation[]>",
850
+ "isStatic": false,
851
+ "isPublic": true
852
+ },
853
+ "findByTenant": {
854
+ "name": "findByTenant",
855
+ "async": true,
856
+ "parameters": [
857
+ {
858
+ "name": "tenantId",
859
+ "type": "string",
860
+ "optional": false
861
+ }
862
+ ],
863
+ "returnType": "Promise<AdVariation[]>",
864
+ "isStatic": false,
865
+ "isPublic": true
866
+ },
867
+ "findGlobal": {
868
+ "name": "findGlobal",
869
+ "async": true,
870
+ "parameters": [],
871
+ "returnType": "Promise<AdVariation[]>",
872
+ "isStatic": false,
873
+ "isPublic": true
874
+ },
875
+ "findWithGlobals": {
876
+ "name": "findWithGlobals",
877
+ "async": true,
878
+ "parameters": [
879
+ {
880
+ "name": "tenantId",
881
+ "type": "string",
882
+ "optional": false
883
+ }
884
+ ],
885
+ "returnType": "Promise<AdVariation[]>",
886
+ "isStatic": false,
887
+ "isPublic": true
888
+ }
889
+ },
890
+ "decoratorConfig": {},
891
+ "extends": "SmrtCollection",
892
+ "extendsTypeArg": "AdVariation",
893
+ "exportName": "AdVariationCollection",
894
+ "collectionExportName": "AdVariationCollectionCollection",
895
+ "schema": {
896
+ "tableName": "ad_variation_collections",
897
+ "ddl": "CREATE TABLE IF NOT EXISTS \"ad_variation_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
898
+ "columns": {
899
+ "id": {
900
+ "type": "UUID",
901
+ "primaryKey": true,
902
+ "referenceKind": "id",
903
+ "notNull": true
904
+ },
905
+ "slug": {
906
+ "type": "TEXT",
907
+ "notNull": true
908
+ },
909
+ "context": {
910
+ "type": "TEXT",
911
+ "notNull": true,
912
+ "default": ""
913
+ },
914
+ "created_at": {
915
+ "type": "TIMESTAMP",
916
+ "notNull": true,
917
+ "default": "current_timestamp"
918
+ },
919
+ "updated_at": {
920
+ "type": "TIMESTAMP",
921
+ "notNull": true,
922
+ "default": "current_timestamp"
923
+ }
924
+ },
925
+ "indexes": [
926
+ {
927
+ "name": "ad_variation_collections_id_idx",
928
+ "columns": [
929
+ "id"
930
+ ]
931
+ },
932
+ {
933
+ "name": "ad_variation_collections_slug_context_idx",
934
+ "columns": [
935
+ "slug",
936
+ "context"
937
+ ],
938
+ "unique": true
939
+ }
940
+ ],
941
+ "version": "6d2b9bb0"
942
+ }
943
+ },
944
+ "@happyvertical/smrt-ads:AdDeliveryTier": {
945
+ "name": "addeliverytier",
946
+ "className": "AdDeliveryTier",
947
+ "qualifiedName": "@happyvertical/smrt-ads:AdDeliveryTier",
948
+ "collection": "addeliverytiers",
949
+ "filePath": "/home/runner/_work/smrt/smrt/packages/ads/src/models/AdDeliveryTier.ts",
950
+ "packageName": "@happyvertical/smrt-ads",
951
+ "fields": {
952
+ "name": {
953
+ "type": "text",
954
+ "required": false,
955
+ "default": ""
956
+ },
957
+ "priority": {
958
+ "type": "integer",
959
+ "required": false,
960
+ "default": 0
961
+ },
962
+ "pricingModel": {
963
+ "type": "text",
964
+ "required": false
965
+ },
966
+ "description": {
967
+ "type": "text",
968
+ "required": false,
969
+ "default": ""
970
+ }
971
+ },
972
+ "methods": {
973
+ "isHigherPriorityThan": {
974
+ "name": "isHigherPriorityThan",
975
+ "async": false,
976
+ "parameters": [
977
+ {
978
+ "name": "other",
979
+ "type": "AdDeliveryTier",
980
+ "optional": false
981
+ }
982
+ ],
983
+ "returnType": "boolean",
984
+ "isStatic": false,
985
+ "isPublic": true
986
+ },
987
+ "isFixedPricing": {
988
+ "name": "isFixedPricing",
989
+ "async": false,
990
+ "parameters": [],
991
+ "returnType": "boolean",
992
+ "isStatic": false,
993
+ "isPublic": true
994
+ },
995
+ "isPerformanceBased": {
996
+ "name": "isPerformanceBased",
997
+ "async": false,
998
+ "parameters": [],
999
+ "returnType": "boolean",
1000
+ "isStatic": false,
1001
+ "isPublic": true
1002
+ }
1003
+ },
1004
+ "decoratorConfig": {
1005
+ "api": {
1006
+ "include": [
1007
+ "list",
1008
+ "get",
1009
+ "create",
1010
+ "update"
1011
+ ]
1012
+ },
1013
+ "mcp": {
1014
+ "include": [
1015
+ "list",
1016
+ "get"
1017
+ ]
1018
+ },
1019
+ "cli": true
1020
+ },
1021
+ "extends": "SmrtObject",
1022
+ "exportName": "AdDeliveryTier",
1023
+ "collectionExportName": "AdDeliveryTierCollection",
1024
+ "schema": {
1025
+ "tableName": "ad_delivery_tiers",
1026
+ "ddl": "CREATE TABLE IF NOT EXISTS \"ad_delivery_tiers\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"priority\" INTEGER DEFAULT 0,\n \"pricing_model\" TEXT,\n \"description\" TEXT DEFAULT ''\n);",
1027
+ "columns": {
1028
+ "id": {
1029
+ "type": "UUID",
1030
+ "primaryKey": true,
1031
+ "referenceKind": "id",
1032
+ "notNull": true
1033
+ },
1034
+ "slug": {
1035
+ "type": "TEXT",
1036
+ "notNull": true
1037
+ },
1038
+ "context": {
1039
+ "type": "TEXT",
1040
+ "notNull": true,
1041
+ "default": ""
1042
+ },
1043
+ "created_at": {
1044
+ "type": "TIMESTAMP",
1045
+ "notNull": true,
1046
+ "default": "current_timestamp"
1047
+ },
1048
+ "updated_at": {
1049
+ "type": "TIMESTAMP",
1050
+ "notNull": true,
1051
+ "default": "current_timestamp"
1052
+ },
1053
+ "name": {
1054
+ "type": "TEXT",
1055
+ "notNull": false,
1056
+ "unique": false,
1057
+ "default": ""
1058
+ },
1059
+ "priority": {
1060
+ "type": "INTEGER",
1061
+ "notNull": false,
1062
+ "unique": false,
1063
+ "default": 0
1064
+ },
1065
+ "pricing_model": {
1066
+ "type": "TEXT",
1067
+ "notNull": false,
1068
+ "unique": false
1069
+ },
1070
+ "description": {
1071
+ "type": "TEXT",
1072
+ "notNull": false,
1073
+ "unique": false,
1074
+ "default": ""
1075
+ }
1076
+ },
1077
+ "indexes": [
1078
+ {
1079
+ "name": "ad_delivery_tiers_id_idx",
1080
+ "columns": [
1081
+ "id"
1082
+ ]
1083
+ },
1084
+ {
1085
+ "name": "ad_delivery_tiers_slug_context_idx",
1086
+ "columns": [
1087
+ "slug",
1088
+ "context"
1089
+ ],
1090
+ "unique": true
1091
+ }
1092
+ ],
1093
+ "version": "df0ec0ff"
1094
+ }
1095
+ },
1096
+ "@happyvertical/smrt-ads:AdEvent": {
1097
+ "name": "adevent",
1098
+ "className": "AdEvent",
1099
+ "qualifiedName": "@happyvertical/smrt-ads:AdEvent",
1100
+ "collection": "adevents",
1101
+ "filePath": "/home/runner/_work/smrt/smrt/packages/ads/src/models/AdEvent.ts",
1102
+ "packageName": "@happyvertical/smrt-ads",
1103
+ "fields": {
1104
+ "created_at": {
1105
+ "type": "datetime",
1106
+ "required": false
1107
+ },
1108
+ "updated_at": {
1109
+ "type": "datetime",
1110
+ "required": false
1111
+ },
1112
+ "tenantId": {
1113
+ "type": "text",
1114
+ "required": false,
1115
+ "_meta": {
1116
+ "sqlType": "UUID",
1117
+ "nullable": true,
1118
+ "__tenancy": {
1119
+ "isTenantIdField": true,
1120
+ "autoFilter": true,
1121
+ "required": false,
1122
+ "autoPopulate": true,
1123
+ "nullable": true,
1124
+ "mode": "optional",
1125
+ "field": "tenantId",
1126
+ "allowSuperAdminBypass": false
1127
+ }
1128
+ }
1129
+ },
1130
+ "variationId": {
1131
+ "type": "foreignKey",
1132
+ "required": false,
1133
+ "related": "AdVariation"
1134
+ },
1135
+ "zoneId": {
1136
+ "type": "crossPackageRef",
1137
+ "required": false,
1138
+ "related": "@happyvertical/smrt-properties:Zone"
1139
+ },
1140
+ "siteId": {
1141
+ "type": "text",
1142
+ "required": false,
1143
+ "default": ""
1144
+ },
1145
+ "eventType": {
1146
+ "type": "text",
1147
+ "required": false
1148
+ },
1149
+ "timestamp": {
1150
+ "type": "datetime",
1151
+ "required": false
1152
+ },
1153
+ "metadata": {
1154
+ "type": "text",
1155
+ "required": false,
1156
+ "default": ""
1157
+ }
1158
+ },
1159
+ "methods": {
1160
+ "getAiUsageSnapshot": {
1161
+ "name": "getAiUsageSnapshot",
1162
+ "async": false,
1163
+ "parameters": [],
1164
+ "returnType": "AiUsageSnapshot | undefined",
1165
+ "isStatic": false,
1166
+ "isPublic": true
1167
+ },
1168
+ "resetAiUsage": {
1169
+ "name": "resetAiUsage",
1170
+ "async": false,
1171
+ "parameters": [],
1172
+ "returnType": "void",
1173
+ "isStatic": false,
1174
+ "isPublic": true
1175
+ },
1176
+ "listAiUsage": {
1177
+ "name": "listAiUsage",
1178
+ "async": true,
1179
+ "parameters": [
1180
+ {
1181
+ "name": "options",
1182
+ "type": "AiUsageListOptions",
1183
+ "optional": true
1184
+ }
1185
+ ],
1186
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
1187
+ "isStatic": false,
1188
+ "isPublic": true
1189
+ },
1190
+ "summarizeAiUsage": {
1191
+ "name": "summarizeAiUsage",
1192
+ "async": true,
1193
+ "parameters": [
1194
+ {
1195
+ "name": "options",
1196
+ "type": "AiUsageSummaryOptions",
1197
+ "optional": true
1198
+ }
1199
+ ],
1200
+ "returnType": "Promise<Record<string, AiUsageStats>>",
1201
+ "isStatic": false,
1202
+ "isPublic": true
1203
+ },
1204
+ "destroy": {
1205
+ "name": "destroy",
1206
+ "async": false,
1207
+ "parameters": [],
1208
+ "returnType": "void",
1209
+ "isStatic": false,
1210
+ "isPublic": true
1211
+ },
1212
+ "markAsPersisted": {
1213
+ "name": "markAsPersisted",
1214
+ "async": false,
1215
+ "parameters": [],
1216
+ "returnType": "void",
1217
+ "isStatic": false,
1218
+ "isPublic": true
1219
+ },
1220
+ "initialize": {
1221
+ "name": "initialize",
1222
+ "async": true,
1223
+ "parameters": [],
1224
+ "returnType": "Promise",
1225
+ "isStatic": false,
1226
+ "isPublic": true
1227
+ },
1228
+ "loadDataFromDb": {
1229
+ "name": "loadDataFromDb",
1230
+ "async": true,
1231
+ "parameters": [
1232
+ {
1233
+ "name": "data",
1234
+ "type": "any",
1235
+ "optional": false
1236
+ }
1237
+ ],
1238
+ "returnType": "any",
1239
+ "isStatic": false,
1240
+ "isPublic": true
1241
+ },
1242
+ "getFields": {
1243
+ "name": "getFields",
1244
+ "async": true,
1245
+ "parameters": [],
1246
+ "returnType": "any",
1247
+ "isStatic": false,
1248
+ "isPublic": true
1249
+ },
1250
+ "toJSON": {
1251
+ "name": "toJSON",
1252
+ "async": false,
1253
+ "parameters": [],
1254
+ "returnType": "any",
1255
+ "isStatic": false,
1256
+ "isPublic": true
1257
+ },
1258
+ "toPlainObject": {
1259
+ "name": "toPlainObject",
1260
+ "async": false,
1261
+ "parameters": [],
1262
+ "returnType": "Record<string>",
1263
+ "isStatic": false,
1264
+ "isPublic": true
1265
+ },
1266
+ "toPublicJSON": {
1267
+ "name": "toPublicJSON",
1268
+ "async": false,
1269
+ "parameters": [],
1270
+ "returnType": "Record<string>",
1271
+ "isStatic": false,
1272
+ "isPublic": true
1273
+ },
1274
+ "getId": {
1275
+ "name": "getId",
1276
+ "async": true,
1277
+ "parameters": [],
1278
+ "returnType": "any",
1279
+ "isStatic": false,
1280
+ "isPublic": true
1281
+ },
1282
+ "getSlug": {
1283
+ "name": "getSlug",
1284
+ "async": true,
1285
+ "parameters": [],
1286
+ "returnType": "any",
1287
+ "isStatic": false,
1288
+ "isPublic": true
1289
+ },
1290
+ "getSavedId": {
1291
+ "name": "getSavedId",
1292
+ "async": true,
1293
+ "parameters": [],
1294
+ "returnType": "any",
1295
+ "isStatic": false,
1296
+ "isPublic": true
1297
+ },
1298
+ "isSaved": {
1299
+ "name": "isSaved",
1300
+ "async": true,
1301
+ "parameters": [],
1302
+ "returnType": "any",
1303
+ "isStatic": false,
1304
+ "isPublic": true
1305
+ },
1306
+ "save": {
1307
+ "name": "save",
1308
+ "async": true,
1309
+ "parameters": [],
1310
+ "returnType": "any",
1311
+ "isStatic": false,
1312
+ "isPublic": true
1313
+ },
1314
+ "classifyConstraintError": {
1315
+ "name": "classifyConstraintError",
1316
+ "async": false,
1317
+ "parameters": [
1318
+ {
1319
+ "name": "message",
1320
+ "type": "string",
1321
+ "optional": false
1322
+ }
1323
+ ],
1324
+ "returnType": "'unique' | 'not_null' | null",
1325
+ "isStatic": true,
1326
+ "isPublic": true
1327
+ },
1328
+ "loadFromId": {
1329
+ "name": "loadFromId",
1330
+ "async": true,
1331
+ "parameters": [],
1332
+ "returnType": "any",
1333
+ "isStatic": false,
1334
+ "isPublic": true
1335
+ },
1336
+ "loadFromSlug": {
1337
+ "name": "loadFromSlug",
1338
+ "async": true,
1339
+ "parameters": [],
1340
+ "returnType": "any",
1341
+ "isStatic": false,
1342
+ "isPublic": true
1343
+ },
1344
+ "is": {
1345
+ "name": "is",
1346
+ "async": true,
1347
+ "parameters": [
1348
+ {
1349
+ "name": "criteria",
1350
+ "type": "string",
1351
+ "optional": false
1352
+ },
1353
+ {
1354
+ "name": "options",
1355
+ "type": "any",
1356
+ "optional": true
1357
+ }
1358
+ ],
1359
+ "returnType": "any",
1360
+ "isStatic": false,
1361
+ "isPublic": true
1362
+ },
1363
+ "do": {
1364
+ "name": "do",
1365
+ "async": true,
1366
+ "parameters": [
1367
+ {
1368
+ "name": "instructions",
1369
+ "type": "string",
1370
+ "optional": false
1371
+ },
1372
+ {
1373
+ "name": "options",
1374
+ "type": "any",
1375
+ "optional": true
1376
+ }
1377
+ ],
1378
+ "returnType": "any",
1379
+ "isStatic": false,
1380
+ "isPublic": true
1381
+ },
1382
+ "describe": {
1383
+ "name": "describe",
1384
+ "async": true,
1385
+ "parameters": [
1386
+ {
1387
+ "name": "options",
1388
+ "type": "any",
1389
+ "optional": true
1390
+ }
1391
+ ],
1392
+ "returnType": "any",
1393
+ "isStatic": false,
1394
+ "isPublic": true
1395
+ },
1396
+ "delete": {
1397
+ "name": "delete",
1398
+ "async": true,
1399
+ "parameters": [],
1400
+ "returnType": "Promise<void>",
1401
+ "isStatic": false,
1402
+ "isPublic": true
1403
+ },
1404
+ "isRelatedLoaded": {
1405
+ "name": "isRelatedLoaded",
1406
+ "async": false,
1407
+ "parameters": [
1408
+ {
1409
+ "name": "fieldName",
1410
+ "type": "string",
1411
+ "optional": false
1412
+ }
1413
+ ],
1414
+ "returnType": "boolean",
1415
+ "isStatic": false,
1416
+ "isPublic": true
1417
+ },
1418
+ "loadRelated": {
1419
+ "name": "loadRelated",
1420
+ "async": true,
1421
+ "parameters": [
1422
+ {
1423
+ "name": "fieldName",
1424
+ "type": "string",
1425
+ "optional": false
1426
+ },
1427
+ {
1428
+ "name": "opts",
1429
+ "type": "LoadRelatedOptions",
1430
+ "optional": true
1431
+ }
1432
+ ],
1433
+ "returnType": "Promise<any>",
1434
+ "isStatic": false,
1435
+ "isPublic": true
1436
+ },
1437
+ "loadRelatedMany": {
1438
+ "name": "loadRelatedMany",
1439
+ "async": true,
1440
+ "parameters": [
1441
+ {
1442
+ "name": "fieldName",
1443
+ "type": "string",
1444
+ "optional": false
1445
+ },
1446
+ {
1447
+ "name": "opts",
1448
+ "type": "LoadRelatedOptions",
1449
+ "optional": true
1450
+ }
1451
+ ],
1452
+ "returnType": "Promise<any[]>",
1453
+ "isStatic": false,
1454
+ "isPublic": true
1455
+ },
1456
+ "getRelated": {
1457
+ "name": "getRelated",
1458
+ "async": true,
1459
+ "parameters": [
1460
+ {
1461
+ "name": "fieldName",
1462
+ "type": "string",
1463
+ "optional": false
1464
+ },
1465
+ {
1466
+ "name": "opts",
1467
+ "type": "LoadRelatedOptions",
1468
+ "optional": true
1469
+ }
1470
+ ],
1471
+ "returnType": "Promise<any>",
1472
+ "isStatic": false,
1473
+ "isPublic": true
1474
+ },
1475
+ "getAvailableTools": {
1476
+ "name": "getAvailableTools",
1477
+ "async": false,
1478
+ "parameters": [],
1479
+ "returnType": "AITool[]",
1480
+ "isStatic": false,
1481
+ "isPublic": true
1482
+ },
1483
+ "executeToolCall": {
1484
+ "name": "executeToolCall",
1485
+ "async": true,
1486
+ "parameters": [
1487
+ {
1488
+ "name": "toolCall",
1489
+ "type": "ToolCall",
1490
+ "optional": false
1491
+ }
1492
+ ],
1493
+ "returnType": "Promise<ToolCallResult>",
1494
+ "isStatic": false,
1495
+ "isPublic": true
1496
+ },
1497
+ "remember": {
1498
+ "name": "remember",
1499
+ "async": true,
1500
+ "parameters": [
1501
+ {
1502
+ "name": "options",
1503
+ "type": "object",
1504
+ "optional": false
1505
+ }
1506
+ ],
1507
+ "returnType": "Promise<void>",
1508
+ "isStatic": false,
1509
+ "isPublic": true
1510
+ },
1511
+ "recall": {
1512
+ "name": "recall",
1513
+ "async": true,
1514
+ "parameters": [
1515
+ {
1516
+ "name": "options",
1517
+ "type": "object",
1518
+ "optional": false
1519
+ }
1520
+ ],
1521
+ "returnType": "Promise<any | null>",
1522
+ "isStatic": false,
1523
+ "isPublic": true
1524
+ },
1525
+ "recallAll": {
1526
+ "name": "recallAll",
1527
+ "async": true,
1528
+ "parameters": [
1529
+ {
1530
+ "name": "options",
1531
+ "type": "object",
1532
+ "optional": true
1533
+ }
1534
+ ],
1535
+ "returnType": "Promise<Map<string, any>>",
1536
+ "isStatic": false,
1537
+ "isPublic": true
1538
+ },
1539
+ "forget": {
1540
+ "name": "forget",
1541
+ "async": true,
1542
+ "parameters": [
1543
+ {
1544
+ "name": "options",
1545
+ "type": "object",
1546
+ "optional": false
1547
+ }
1548
+ ],
1549
+ "returnType": "Promise<void>",
1550
+ "isStatic": false,
1551
+ "isPublic": true
1552
+ },
1553
+ "forgetScope": {
1554
+ "name": "forgetScope",
1555
+ "async": true,
1556
+ "parameters": [
1557
+ {
1558
+ "name": "options",
1559
+ "type": "object",
1560
+ "optional": false
1561
+ }
1562
+ ],
1563
+ "returnType": "Promise<number>",
1564
+ "isStatic": false,
1565
+ "isPublic": true
1566
+ },
1567
+ "generateEmbeddings": {
1568
+ "name": "generateEmbeddings",
1569
+ "async": true,
1570
+ "parameters": [
1571
+ {
1572
+ "name": "options",
1573
+ "type": "GenerateEmbeddingsOptions",
1574
+ "optional": true
1575
+ }
1576
+ ],
1577
+ "returnType": "Promise<void>",
1578
+ "isStatic": false,
1579
+ "isPublic": true
1580
+ },
1581
+ "getEmbedding": {
1582
+ "name": "getEmbedding",
1583
+ "async": true,
1584
+ "parameters": [
1585
+ {
1586
+ "name": "fieldName",
1587
+ "type": "string",
1588
+ "optional": false
1589
+ },
1590
+ {
1591
+ "name": "model",
1592
+ "type": "string",
1593
+ "optional": true
1594
+ }
1595
+ ],
1596
+ "returnType": "Promise<number[] | null>",
1597
+ "isStatic": false,
1598
+ "isPublic": true
1599
+ },
1600
+ "hasStaleEmbeddings": {
1601
+ "name": "hasStaleEmbeddings",
1602
+ "async": true,
1603
+ "parameters": [],
1604
+ "returnType": "Promise<boolean>",
1605
+ "isStatic": false,
1606
+ "isPublic": true
1607
+ },
1608
+ "clearEmbeddings": {
1609
+ "name": "clearEmbeddings",
1610
+ "async": true,
1611
+ "parameters": [],
1612
+ "returnType": "Promise<void>",
1613
+ "isStatic": false,
1614
+ "isPublic": true
1615
+ },
1616
+ "getMetadata": {
1617
+ "name": "getMetadata",
1618
+ "async": false,
1619
+ "parameters": [],
1620
+ "returnType": "Record<string, any>",
1621
+ "isStatic": false,
1622
+ "isPublic": true
1623
+ },
1624
+ "setMetadata": {
1625
+ "name": "setMetadata",
1626
+ "async": false,
1627
+ "parameters": [
1628
+ {
1629
+ "name": "data",
1630
+ "type": "Record<string, any>",
1631
+ "optional": false
1632
+ }
1633
+ ],
1634
+ "returnType": "void",
1635
+ "isStatic": false,
1636
+ "isPublic": true
1637
+ },
1638
+ "isImpression": {
1639
+ "name": "isImpression",
1640
+ "async": false,
1641
+ "parameters": [],
1642
+ "returnType": "boolean",
1643
+ "isStatic": false,
1644
+ "isPublic": true
1645
+ },
1646
+ "isClick": {
1647
+ "name": "isClick",
1648
+ "async": false,
1649
+ "parameters": [],
1650
+ "returnType": "boolean",
1651
+ "isStatic": false,
1652
+ "isPublic": true
1653
+ },
1654
+ "isConversion": {
1655
+ "name": "isConversion",
1656
+ "async": false,
1657
+ "parameters": [],
1658
+ "returnType": "boolean",
1659
+ "isStatic": false,
1660
+ "isPublic": true
1661
+ }
1662
+ },
1663
+ "decoratorConfig": {
1664
+ "tableStrategy": "sti",
1665
+ "api": {
1666
+ "include": [
1667
+ "create",
1668
+ "list"
1669
+ ]
1670
+ },
1671
+ "mcp": {
1672
+ "include": [
1673
+ "create"
1674
+ ]
1675
+ },
1676
+ "cli": false,
1677
+ "tenantScoped": {
1678
+ "mode": "optional"
1679
+ }
1680
+ },
1681
+ "extends": "SmrtObject",
1682
+ "exportName": "AdEvent",
1683
+ "collectionExportName": "AdEventCollection",
1684
+ "schema": {
1685
+ "tableName": "ad_events",
1686
+ "ddl": "CREATE TABLE IF NOT EXISTS \"ad_events\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"variation_id\" UUID,\n \"zone_id\" UUID,\n \"site_id\" TEXT DEFAULT '',\n \"event_type\" TEXT,\n \"timestamp\" TIMESTAMP,\n \"metadata\" TEXT DEFAULT ''\n);",
1687
+ "columns": {
1688
+ "id": {
1689
+ "type": "UUID",
1690
+ "primaryKey": true,
1691
+ "referenceKind": "id",
1692
+ "notNull": true
1693
+ },
1694
+ "slug": {
1695
+ "type": "TEXT",
1696
+ "notNull": true
1697
+ },
1698
+ "context": {
1699
+ "type": "TEXT",
1700
+ "notNull": true,
1701
+ "default": ""
1702
+ },
1703
+ "_meta_type": {
1704
+ "type": "TEXT",
1705
+ "notNull": true
1706
+ },
1707
+ "_meta_data": {
1708
+ "type": "JSON",
1709
+ "notNull": false
1710
+ },
1711
+ "created_at": {
1712
+ "type": "TIMESTAMP",
1713
+ "notNull": true,
1714
+ "default": "current_timestamp"
1715
+ },
1716
+ "updated_at": {
1717
+ "type": "TIMESTAMP",
1718
+ "notNull": true,
1719
+ "default": "current_timestamp"
1720
+ },
1721
+ "tenant_id": {
1722
+ "type": "UUID",
1723
+ "referenceKind": "tenantId",
1724
+ "notNull": false
1725
+ },
1726
+ "variation_id": {
1727
+ "type": "UUID",
1728
+ "referenceKind": "foreignKey",
1729
+ "notNull": false
1730
+ },
1731
+ "zone_id": {
1732
+ "type": "UUID",
1733
+ "referenceKind": "crossPackageRef",
1734
+ "notNull": false
1735
+ },
1736
+ "site_id": {
1737
+ "type": "TEXT",
1738
+ "notNull": false,
1739
+ "default": ""
1740
+ },
1741
+ "event_type": {
1742
+ "type": "TEXT",
1743
+ "notNull": false
1744
+ },
1745
+ "timestamp": {
1746
+ "type": "TIMESTAMP",
1747
+ "notNull": false
1748
+ },
1749
+ "metadata": {
1750
+ "type": "TEXT",
1751
+ "notNull": false,
1752
+ "default": ""
1753
+ }
1754
+ },
1755
+ "indexes": [
1756
+ {
1757
+ "name": "ad_events_id_idx",
1758
+ "columns": [
1759
+ "id"
1760
+ ]
1761
+ },
1762
+ {
1763
+ "name": "ad_events_slug_context_meta_type_idx",
1764
+ "columns": [
1765
+ "slug",
1766
+ "context",
1767
+ "_meta_type"
1768
+ ],
1769
+ "unique": true
1770
+ },
1771
+ {
1772
+ "name": "ad_events_meta_type_idx",
1773
+ "columns": [
1774
+ "_meta_type"
1775
+ ]
1776
+ }
1777
+ ],
1778
+ "version": "fb3ae252"
1779
+ }
1780
+ },
1781
+ "@happyvertical/smrt-ads:AdFormat": {
1782
+ "name": "adformat",
1783
+ "className": "AdFormat",
1784
+ "qualifiedName": "@happyvertical/smrt-ads:AdFormat",
1785
+ "collection": "adformats",
1786
+ "filePath": "/home/runner/_work/smrt/smrt/packages/ads/src/models/AdFormat.ts",
1787
+ "packageName": "@happyvertical/smrt-ads",
1788
+ "fields": {
1789
+ "name": {
1790
+ "type": "text",
1791
+ "required": false,
1792
+ "default": ""
1793
+ },
1794
+ "width": {
1795
+ "type": "integer",
1796
+ "required": false,
1797
+ "default": 0
1798
+ },
1799
+ "height": {
1800
+ "type": "integer",
1801
+ "required": false,
1802
+ "default": 0
1803
+ },
1804
+ "formatType": {
1805
+ "type": "text",
1806
+ "required": false
1807
+ },
1808
+ "description": {
1809
+ "type": "text",
1810
+ "required": false,
1811
+ "default": ""
1812
+ }
1813
+ },
1814
+ "methods": {
1815
+ "getDimensions": {
1816
+ "name": "getDimensions",
1817
+ "async": false,
1818
+ "parameters": [],
1819
+ "returnType": "string",
1820
+ "isStatic": false,
1821
+ "isPublic": true
1822
+ },
1823
+ "matchesDimensions": {
1824
+ "name": "matchesDimensions",
1825
+ "async": false,
1826
+ "parameters": [
1827
+ {
1828
+ "name": "width",
1829
+ "type": "number",
1830
+ "optional": false
1831
+ },
1832
+ {
1833
+ "name": "height",
1834
+ "type": "number",
1835
+ "optional": false
1836
+ }
1837
+ ],
1838
+ "returnType": "boolean",
1839
+ "isStatic": false,
1840
+ "isPublic": true
1841
+ }
1842
+ },
1843
+ "decoratorConfig": {
1844
+ "api": {
1845
+ "include": [
1846
+ "list",
1847
+ "get",
1848
+ "create",
1849
+ "update"
1850
+ ]
1851
+ },
1852
+ "mcp": {
1853
+ "include": [
1854
+ "list",
1855
+ "get"
1856
+ ]
1857
+ },
1858
+ "cli": true
1859
+ },
1860
+ "extends": "SmrtObject",
1861
+ "exportName": "AdFormat",
1862
+ "collectionExportName": "AdFormatCollection",
1863
+ "schema": {
1864
+ "tableName": "ad_formats",
1865
+ "ddl": "CREATE TABLE IF NOT EXISTS \"ad_formats\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"width\" INTEGER DEFAULT 0,\n \"height\" INTEGER DEFAULT 0,\n \"format_type\" TEXT,\n \"description\" TEXT DEFAULT ''\n);",
1866
+ "columns": {
1867
+ "id": {
1868
+ "type": "UUID",
1869
+ "primaryKey": true,
1870
+ "referenceKind": "id",
1871
+ "notNull": true
1872
+ },
1873
+ "slug": {
1874
+ "type": "TEXT",
1875
+ "notNull": true
1876
+ },
1877
+ "context": {
1878
+ "type": "TEXT",
1879
+ "notNull": true,
1880
+ "default": ""
1881
+ },
1882
+ "created_at": {
1883
+ "type": "TIMESTAMP",
1884
+ "notNull": true,
1885
+ "default": "current_timestamp"
1886
+ },
1887
+ "updated_at": {
1888
+ "type": "TIMESTAMP",
1889
+ "notNull": true,
1890
+ "default": "current_timestamp"
1891
+ },
1892
+ "name": {
1893
+ "type": "TEXT",
1894
+ "notNull": false,
1895
+ "unique": false,
1896
+ "default": ""
1897
+ },
1898
+ "width": {
1899
+ "type": "INTEGER",
1900
+ "notNull": false,
1901
+ "unique": false,
1902
+ "default": 0
1903
+ },
1904
+ "height": {
1905
+ "type": "INTEGER",
1906
+ "notNull": false,
1907
+ "unique": false,
1908
+ "default": 0
1909
+ },
1910
+ "format_type": {
1911
+ "type": "TEXT",
1912
+ "notNull": false,
1913
+ "unique": false
1914
+ },
1915
+ "description": {
1916
+ "type": "TEXT",
1917
+ "notNull": false,
1918
+ "unique": false,
1919
+ "default": ""
1920
+ }
1921
+ },
1922
+ "indexes": [
1923
+ {
1924
+ "name": "ad_formats_id_idx",
1925
+ "columns": [
1926
+ "id"
1927
+ ]
1928
+ },
1929
+ {
1930
+ "name": "ad_formats_slug_context_idx",
1931
+ "columns": [
1932
+ "slug",
1933
+ "context"
1934
+ ],
1935
+ "unique": true
1936
+ }
1937
+ ],
1938
+ "version": "df40cc03"
1939
+ }
1940
+ },
1941
+ "@happyvertical/smrt-ads:AdGroup": {
1942
+ "name": "adgroup",
1943
+ "className": "AdGroup",
1944
+ "qualifiedName": "@happyvertical/smrt-ads:AdGroup",
1945
+ "collection": "adgroups",
1946
+ "filePath": "/home/runner/_work/smrt/smrt/packages/ads/src/models/AdGroup.ts",
1947
+ "packageName": "@happyvertical/smrt-ads",
1948
+ "fields": {
1949
+ "created_at": {
1950
+ "type": "datetime",
1951
+ "required": false
1952
+ },
1953
+ "updated_at": {
1954
+ "type": "datetime",
1955
+ "required": false
1956
+ },
1957
+ "tenantId": {
1958
+ "type": "text",
1959
+ "required": false,
1960
+ "_meta": {
1961
+ "sqlType": "UUID",
1962
+ "nullable": true,
1963
+ "__tenancy": {
1964
+ "isTenantIdField": true,
1965
+ "autoFilter": true,
1966
+ "required": false,
1967
+ "autoPopulate": true,
1968
+ "nullable": true,
1969
+ "mode": "optional",
1970
+ "field": "tenantId",
1971
+ "allowSuperAdminBypass": false
1972
+ }
1973
+ }
1974
+ },
1975
+ "contractId": {
1976
+ "type": "crossPackageRef",
1977
+ "required": false,
1978
+ "related": "@happyvertical/smrt-commerce:Contract"
1979
+ },
1980
+ "tierId": {
1981
+ "type": "foreignKey",
1982
+ "required": false,
1983
+ "related": "AdDeliveryTier"
1984
+ },
1985
+ "name": {
1986
+ "type": "text",
1987
+ "required": false,
1988
+ "default": ""
1989
+ },
1990
+ "verticalSlug": {
1991
+ "type": "text",
1992
+ "required": false,
1993
+ "default": ""
1994
+ },
1995
+ "targeting": {
1996
+ "type": "text",
1997
+ "required": false,
1998
+ "default": ""
1999
+ },
2000
+ "zoneIds": {
2001
+ "type": "text",
2002
+ "required": false,
2003
+ "default": ""
2004
+ },
2005
+ "startDate": {
2006
+ "type": "datetime",
2007
+ "required": false
2008
+ },
2009
+ "endDate": {
2010
+ "type": "datetime",
2011
+ "required": false
2012
+ },
2013
+ "dailyBudget": {
2014
+ "type": "decimal",
2015
+ "required": false,
2016
+ "default": 0
2017
+ },
2018
+ "totalBudget": {
2019
+ "type": "decimal",
2020
+ "required": false,
2021
+ "default": 0
2022
+ },
2023
+ "status": {
2024
+ "type": "text",
2025
+ "required": false
2026
+ }
2027
+ },
2028
+ "methods": {
2029
+ "getAiUsageSnapshot": {
2030
+ "name": "getAiUsageSnapshot",
2031
+ "async": false,
2032
+ "parameters": [],
2033
+ "returnType": "AiUsageSnapshot | undefined",
2034
+ "isStatic": false,
2035
+ "isPublic": true
2036
+ },
2037
+ "resetAiUsage": {
2038
+ "name": "resetAiUsage",
2039
+ "async": false,
2040
+ "parameters": [],
2041
+ "returnType": "void",
2042
+ "isStatic": false,
2043
+ "isPublic": true
2044
+ },
2045
+ "listAiUsage": {
2046
+ "name": "listAiUsage",
2047
+ "async": true,
2048
+ "parameters": [
2049
+ {
2050
+ "name": "options",
2051
+ "type": "AiUsageListOptions",
2052
+ "optional": true
2053
+ }
2054
+ ],
2055
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
2056
+ "isStatic": false,
2057
+ "isPublic": true
2058
+ },
2059
+ "summarizeAiUsage": {
2060
+ "name": "summarizeAiUsage",
2061
+ "async": true,
2062
+ "parameters": [
2063
+ {
2064
+ "name": "options",
2065
+ "type": "AiUsageSummaryOptions",
2066
+ "optional": true
2067
+ }
2068
+ ],
2069
+ "returnType": "Promise<Record<string, AiUsageStats>>",
2070
+ "isStatic": false,
2071
+ "isPublic": true
2072
+ },
2073
+ "destroy": {
2074
+ "name": "destroy",
2075
+ "async": false,
2076
+ "parameters": [],
2077
+ "returnType": "void",
2078
+ "isStatic": false,
2079
+ "isPublic": true
2080
+ },
2081
+ "markAsPersisted": {
2082
+ "name": "markAsPersisted",
2083
+ "async": false,
2084
+ "parameters": [],
2085
+ "returnType": "void",
2086
+ "isStatic": false,
2087
+ "isPublic": true
2088
+ },
2089
+ "initialize": {
2090
+ "name": "initialize",
2091
+ "async": true,
2092
+ "parameters": [],
2093
+ "returnType": "Promise",
2094
+ "isStatic": false,
2095
+ "isPublic": true
2096
+ },
2097
+ "loadDataFromDb": {
2098
+ "name": "loadDataFromDb",
2099
+ "async": true,
2100
+ "parameters": [
2101
+ {
2102
+ "name": "data",
2103
+ "type": "any",
2104
+ "optional": false
2105
+ }
2106
+ ],
2107
+ "returnType": "any",
2108
+ "isStatic": false,
2109
+ "isPublic": true
2110
+ },
2111
+ "getFields": {
2112
+ "name": "getFields",
2113
+ "async": true,
2114
+ "parameters": [],
2115
+ "returnType": "any",
2116
+ "isStatic": false,
2117
+ "isPublic": true
2118
+ },
2119
+ "toJSON": {
2120
+ "name": "toJSON",
2121
+ "async": false,
2122
+ "parameters": [],
2123
+ "returnType": "any",
2124
+ "isStatic": false,
2125
+ "isPublic": true
2126
+ },
2127
+ "toPlainObject": {
2128
+ "name": "toPlainObject",
2129
+ "async": false,
2130
+ "parameters": [],
2131
+ "returnType": "Record<string>",
2132
+ "isStatic": false,
2133
+ "isPublic": true
2134
+ },
2135
+ "toPublicJSON": {
2136
+ "name": "toPublicJSON",
2137
+ "async": false,
2138
+ "parameters": [],
2139
+ "returnType": "Record<string>",
2140
+ "isStatic": false,
2141
+ "isPublic": true
2142
+ },
2143
+ "getId": {
2144
+ "name": "getId",
2145
+ "async": true,
2146
+ "parameters": [],
2147
+ "returnType": "any",
2148
+ "isStatic": false,
2149
+ "isPublic": true
2150
+ },
2151
+ "getSlug": {
2152
+ "name": "getSlug",
2153
+ "async": true,
2154
+ "parameters": [],
2155
+ "returnType": "any",
2156
+ "isStatic": false,
2157
+ "isPublic": true
2158
+ },
2159
+ "getSavedId": {
2160
+ "name": "getSavedId",
2161
+ "async": true,
2162
+ "parameters": [],
2163
+ "returnType": "any",
2164
+ "isStatic": false,
2165
+ "isPublic": true
2166
+ },
2167
+ "isSaved": {
2168
+ "name": "isSaved",
2169
+ "async": true,
2170
+ "parameters": [],
2171
+ "returnType": "any",
2172
+ "isStatic": false,
2173
+ "isPublic": true
2174
+ },
2175
+ "save": {
2176
+ "name": "save",
2177
+ "async": true,
2178
+ "parameters": [],
2179
+ "returnType": "any",
2180
+ "isStatic": false,
2181
+ "isPublic": true
2182
+ },
2183
+ "classifyConstraintError": {
2184
+ "name": "classifyConstraintError",
2185
+ "async": false,
2186
+ "parameters": [
2187
+ {
2188
+ "name": "message",
2189
+ "type": "string",
2190
+ "optional": false
2191
+ }
2192
+ ],
2193
+ "returnType": "'unique' | 'not_null' | null",
2194
+ "isStatic": true,
2195
+ "isPublic": true
2196
+ },
2197
+ "loadFromId": {
2198
+ "name": "loadFromId",
2199
+ "async": true,
2200
+ "parameters": [],
2201
+ "returnType": "any",
2202
+ "isStatic": false,
2203
+ "isPublic": true
2204
+ },
2205
+ "loadFromSlug": {
2206
+ "name": "loadFromSlug",
2207
+ "async": true,
2208
+ "parameters": [],
2209
+ "returnType": "any",
2210
+ "isStatic": false,
2211
+ "isPublic": true
2212
+ },
2213
+ "is": {
2214
+ "name": "is",
2215
+ "async": true,
2216
+ "parameters": [
2217
+ {
2218
+ "name": "criteria",
2219
+ "type": "string",
2220
+ "optional": false
2221
+ },
2222
+ {
2223
+ "name": "options",
2224
+ "type": "any",
2225
+ "optional": true
2226
+ }
2227
+ ],
2228
+ "returnType": "any",
2229
+ "isStatic": false,
2230
+ "isPublic": true
2231
+ },
2232
+ "do": {
2233
+ "name": "do",
2234
+ "async": true,
2235
+ "parameters": [
2236
+ {
2237
+ "name": "instructions",
2238
+ "type": "string",
2239
+ "optional": false
2240
+ },
2241
+ {
2242
+ "name": "options",
2243
+ "type": "any",
2244
+ "optional": true
2245
+ }
2246
+ ],
2247
+ "returnType": "any",
2248
+ "isStatic": false,
2249
+ "isPublic": true
2250
+ },
2251
+ "describe": {
2252
+ "name": "describe",
2253
+ "async": true,
2254
+ "parameters": [
2255
+ {
2256
+ "name": "options",
2257
+ "type": "any",
2258
+ "optional": true
2259
+ }
2260
+ ],
2261
+ "returnType": "any",
2262
+ "isStatic": false,
2263
+ "isPublic": true
2264
+ },
2265
+ "delete": {
2266
+ "name": "delete",
2267
+ "async": true,
2268
+ "parameters": [],
2269
+ "returnType": "Promise<void>",
2270
+ "isStatic": false,
2271
+ "isPublic": true
2272
+ },
2273
+ "isRelatedLoaded": {
2274
+ "name": "isRelatedLoaded",
2275
+ "async": false,
2276
+ "parameters": [
2277
+ {
2278
+ "name": "fieldName",
2279
+ "type": "string",
2280
+ "optional": false
2281
+ }
2282
+ ],
2283
+ "returnType": "boolean",
2284
+ "isStatic": false,
2285
+ "isPublic": true
2286
+ },
2287
+ "loadRelated": {
2288
+ "name": "loadRelated",
2289
+ "async": true,
2290
+ "parameters": [
2291
+ {
2292
+ "name": "fieldName",
2293
+ "type": "string",
2294
+ "optional": false
2295
+ },
2296
+ {
2297
+ "name": "opts",
2298
+ "type": "LoadRelatedOptions",
2299
+ "optional": true
2300
+ }
2301
+ ],
2302
+ "returnType": "Promise<any>",
2303
+ "isStatic": false,
2304
+ "isPublic": true
2305
+ },
2306
+ "loadRelatedMany": {
2307
+ "name": "loadRelatedMany",
2308
+ "async": true,
2309
+ "parameters": [
2310
+ {
2311
+ "name": "fieldName",
2312
+ "type": "string",
2313
+ "optional": false
2314
+ },
2315
+ {
2316
+ "name": "opts",
2317
+ "type": "LoadRelatedOptions",
2318
+ "optional": true
2319
+ }
2320
+ ],
2321
+ "returnType": "Promise<any[]>",
2322
+ "isStatic": false,
2323
+ "isPublic": true
2324
+ },
2325
+ "getRelated": {
2326
+ "name": "getRelated",
2327
+ "async": true,
2328
+ "parameters": [
2329
+ {
2330
+ "name": "fieldName",
2331
+ "type": "string",
2332
+ "optional": false
2333
+ },
2334
+ {
2335
+ "name": "opts",
2336
+ "type": "LoadRelatedOptions",
2337
+ "optional": true
2338
+ }
2339
+ ],
2340
+ "returnType": "Promise<any>",
2341
+ "isStatic": false,
2342
+ "isPublic": true
2343
+ },
2344
+ "getAvailableTools": {
2345
+ "name": "getAvailableTools",
2346
+ "async": false,
2347
+ "parameters": [],
2348
+ "returnType": "AITool[]",
2349
+ "isStatic": false,
2350
+ "isPublic": true
2351
+ },
2352
+ "executeToolCall": {
2353
+ "name": "executeToolCall",
2354
+ "async": true,
2355
+ "parameters": [
2356
+ {
2357
+ "name": "toolCall",
2358
+ "type": "ToolCall",
2359
+ "optional": false
2360
+ }
2361
+ ],
2362
+ "returnType": "Promise<ToolCallResult>",
2363
+ "isStatic": false,
2364
+ "isPublic": true
2365
+ },
2366
+ "remember": {
2367
+ "name": "remember",
2368
+ "async": true,
2369
+ "parameters": [
2370
+ {
2371
+ "name": "options",
2372
+ "type": "object",
2373
+ "optional": false
2374
+ }
2375
+ ],
2376
+ "returnType": "Promise<void>",
2377
+ "isStatic": false,
2378
+ "isPublic": true
2379
+ },
2380
+ "recall": {
2381
+ "name": "recall",
2382
+ "async": true,
2383
+ "parameters": [
2384
+ {
2385
+ "name": "options",
2386
+ "type": "object",
2387
+ "optional": false
2388
+ }
2389
+ ],
2390
+ "returnType": "Promise<any | null>",
2391
+ "isStatic": false,
2392
+ "isPublic": true
2393
+ },
2394
+ "recallAll": {
2395
+ "name": "recallAll",
2396
+ "async": true,
2397
+ "parameters": [
2398
+ {
2399
+ "name": "options",
2400
+ "type": "object",
2401
+ "optional": true
2402
+ }
2403
+ ],
2404
+ "returnType": "Promise<Map<string, any>>",
2405
+ "isStatic": false,
2406
+ "isPublic": true
2407
+ },
2408
+ "forget": {
2409
+ "name": "forget",
2410
+ "async": true,
2411
+ "parameters": [
2412
+ {
2413
+ "name": "options",
2414
+ "type": "object",
2415
+ "optional": false
2416
+ }
2417
+ ],
2418
+ "returnType": "Promise<void>",
2419
+ "isStatic": false,
2420
+ "isPublic": true
2421
+ },
2422
+ "forgetScope": {
2423
+ "name": "forgetScope",
2424
+ "async": true,
2425
+ "parameters": [
2426
+ {
2427
+ "name": "options",
2428
+ "type": "object",
2429
+ "optional": false
2430
+ }
2431
+ ],
2432
+ "returnType": "Promise<number>",
2433
+ "isStatic": false,
2434
+ "isPublic": true
2435
+ },
2436
+ "generateEmbeddings": {
2437
+ "name": "generateEmbeddings",
2438
+ "async": true,
2439
+ "parameters": [
2440
+ {
2441
+ "name": "options",
2442
+ "type": "GenerateEmbeddingsOptions",
2443
+ "optional": true
2444
+ }
2445
+ ],
2446
+ "returnType": "Promise<void>",
2447
+ "isStatic": false,
2448
+ "isPublic": true
2449
+ },
2450
+ "getEmbedding": {
2451
+ "name": "getEmbedding",
2452
+ "async": true,
2453
+ "parameters": [
2454
+ {
2455
+ "name": "fieldName",
2456
+ "type": "string",
2457
+ "optional": false
2458
+ },
2459
+ {
2460
+ "name": "model",
2461
+ "type": "string",
2462
+ "optional": true
2463
+ }
2464
+ ],
2465
+ "returnType": "Promise<number[] | null>",
2466
+ "isStatic": false,
2467
+ "isPublic": true
2468
+ },
2469
+ "hasStaleEmbeddings": {
2470
+ "name": "hasStaleEmbeddings",
2471
+ "async": true,
2472
+ "parameters": [],
2473
+ "returnType": "Promise<boolean>",
2474
+ "isStatic": false,
2475
+ "isPublic": true
2476
+ },
2477
+ "clearEmbeddings": {
2478
+ "name": "clearEmbeddings",
2479
+ "async": true,
2480
+ "parameters": [],
2481
+ "returnType": "Promise<void>",
2482
+ "isStatic": false,
2483
+ "isPublic": true
2484
+ },
2485
+ "getZoneIds": {
2486
+ "name": "getZoneIds",
2487
+ "async": false,
2488
+ "parameters": [],
2489
+ "returnType": "string[]",
2490
+ "isStatic": false,
2491
+ "isPublic": true
2492
+ },
2493
+ "setZoneIds": {
2494
+ "name": "setZoneIds",
2495
+ "async": false,
2496
+ "parameters": [
2497
+ {
2498
+ "name": "ids",
2499
+ "type": "string[]",
2500
+ "optional": false
2501
+ }
2502
+ ],
2503
+ "returnType": "void",
2504
+ "isStatic": false,
2505
+ "isPublic": true
2506
+ },
2507
+ "addZoneId": {
2508
+ "name": "addZoneId",
2509
+ "async": false,
2510
+ "parameters": [
2511
+ {
2512
+ "name": "zoneId",
2513
+ "type": "string",
2514
+ "optional": false
2515
+ }
2516
+ ],
2517
+ "returnType": "void",
2518
+ "isStatic": false,
2519
+ "isPublic": true
2520
+ },
2521
+ "removeZoneId": {
2522
+ "name": "removeZoneId",
2523
+ "async": false,
2524
+ "parameters": [
2525
+ {
2526
+ "name": "zoneId",
2527
+ "type": "string",
2528
+ "optional": false
2529
+ }
2530
+ ],
2531
+ "returnType": "void",
2532
+ "isStatic": false,
2533
+ "isPublic": true
2534
+ },
2535
+ "hasZoneId": {
2536
+ "name": "hasZoneId",
2537
+ "async": false,
2538
+ "parameters": [
2539
+ {
2540
+ "name": "zoneId",
2541
+ "type": "string",
2542
+ "optional": false
2543
+ }
2544
+ ],
2545
+ "returnType": "boolean",
2546
+ "isStatic": false,
2547
+ "isPublic": true
2548
+ },
2549
+ "getTargeting": {
2550
+ "name": "getTargeting",
2551
+ "async": false,
2552
+ "parameters": [],
2553
+ "returnType": "Record<string, any>",
2554
+ "isStatic": false,
2555
+ "isPublic": true
2556
+ },
2557
+ "setTargeting": {
2558
+ "name": "setTargeting",
2559
+ "async": false,
2560
+ "parameters": [
2561
+ {
2562
+ "name": "rules",
2563
+ "type": "Record<string, any>",
2564
+ "optional": false
2565
+ }
2566
+ ],
2567
+ "returnType": "void",
2568
+ "isStatic": false,
2569
+ "isPublic": true
2570
+ },
2571
+ "isActive": {
2572
+ "name": "isActive",
2573
+ "async": false,
2574
+ "parameters": [],
2575
+ "returnType": "boolean",
2576
+ "isStatic": false,
2577
+ "isPublic": true
2578
+ },
2579
+ "isDraft": {
2580
+ "name": "isDraft",
2581
+ "async": false,
2582
+ "parameters": [],
2583
+ "returnType": "boolean",
2584
+ "isStatic": false,
2585
+ "isPublic": true
2586
+ },
2587
+ "isPaused": {
2588
+ "name": "isPaused",
2589
+ "async": false,
2590
+ "parameters": [],
2591
+ "returnType": "boolean",
2592
+ "isStatic": false,
2593
+ "isPublic": true
2594
+ },
2595
+ "isCompleted": {
2596
+ "name": "isCompleted",
2597
+ "async": false,
2598
+ "parameters": [],
2599
+ "returnType": "boolean",
2600
+ "isStatic": false,
2601
+ "isPublic": true
2602
+ },
2603
+ "hasEnded": {
2604
+ "name": "hasEnded",
2605
+ "async": false,
2606
+ "parameters": [],
2607
+ "returnType": "boolean",
2608
+ "isStatic": false,
2609
+ "isPublic": true
2610
+ },
2611
+ "hasStarted": {
2612
+ "name": "hasStarted",
2613
+ "async": false,
2614
+ "parameters": [],
2615
+ "returnType": "boolean",
2616
+ "isStatic": false,
2617
+ "isPublic": true
2618
+ }
2619
+ },
2620
+ "decoratorConfig": {
2621
+ "tableStrategy": "sti",
2622
+ "api": {
2623
+ "include": [
2624
+ "list",
2625
+ "get",
2626
+ "create",
2627
+ "update"
2628
+ ]
2629
+ },
2630
+ "mcp": {
2631
+ "include": [
2632
+ "list",
2633
+ "get",
2634
+ "create"
2635
+ ]
2636
+ },
2637
+ "cli": true,
2638
+ "tenantScoped": {
2639
+ "mode": "optional"
2640
+ }
2641
+ },
2642
+ "extends": "SmrtObject",
2643
+ "exportName": "AdGroup",
2644
+ "collectionExportName": "AdGroupCollection",
2645
+ "schema": {
2646
+ "tableName": "ad_groups",
2647
+ "ddl": "CREATE TABLE IF NOT EXISTS \"ad_groups\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"tier_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"vertical_slug\" TEXT DEFAULT '',\n \"targeting\" TEXT DEFAULT '',\n \"zone_ids\" TEXT DEFAULT '',\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"daily_budget\" REAL DEFAULT 0,\n \"total_budget\" REAL DEFAULT 0,\n \"status\" TEXT\n);",
2648
+ "columns": {
2649
+ "id": {
2650
+ "type": "UUID",
2651
+ "primaryKey": true,
2652
+ "referenceKind": "id",
2653
+ "notNull": true
2654
+ },
2655
+ "slug": {
2656
+ "type": "TEXT",
2657
+ "notNull": true
2658
+ },
2659
+ "context": {
2660
+ "type": "TEXT",
2661
+ "notNull": true,
2662
+ "default": ""
2663
+ },
2664
+ "_meta_type": {
2665
+ "type": "TEXT",
2666
+ "notNull": true
2667
+ },
2668
+ "_meta_data": {
2669
+ "type": "JSON",
2670
+ "notNull": false
2671
+ },
2672
+ "created_at": {
2673
+ "type": "TIMESTAMP",
2674
+ "notNull": true,
2675
+ "default": "current_timestamp"
2676
+ },
2677
+ "updated_at": {
2678
+ "type": "TIMESTAMP",
2679
+ "notNull": true,
2680
+ "default": "current_timestamp"
2681
+ },
2682
+ "tenant_id": {
2683
+ "type": "UUID",
2684
+ "referenceKind": "tenantId",
2685
+ "notNull": false
2686
+ },
2687
+ "contract_id": {
2688
+ "type": "UUID",
2689
+ "referenceKind": "crossPackageRef",
2690
+ "notNull": false
2691
+ },
2692
+ "tier_id": {
2693
+ "type": "UUID",
2694
+ "referenceKind": "foreignKey",
2695
+ "notNull": false
2696
+ },
2697
+ "name": {
2698
+ "type": "TEXT",
2699
+ "notNull": false,
2700
+ "default": ""
2701
+ },
2702
+ "vertical_slug": {
2703
+ "type": "TEXT",
2704
+ "notNull": false,
2705
+ "default": ""
2706
+ },
2707
+ "targeting": {
2708
+ "type": "TEXT",
2709
+ "notNull": false,
2710
+ "default": ""
2711
+ },
2712
+ "zone_ids": {
2713
+ "type": "TEXT",
2714
+ "notNull": false,
2715
+ "default": ""
2716
+ },
2717
+ "start_date": {
2718
+ "type": "TIMESTAMP",
2719
+ "notNull": false
2720
+ },
2721
+ "end_date": {
2722
+ "type": "TIMESTAMP",
2723
+ "notNull": false
2724
+ },
2725
+ "daily_budget": {
2726
+ "type": "REAL",
2727
+ "notNull": false,
2728
+ "default": 0
2729
+ },
2730
+ "total_budget": {
2731
+ "type": "REAL",
2732
+ "notNull": false,
2733
+ "default": 0
2734
+ },
2735
+ "status": {
2736
+ "type": "TEXT",
2737
+ "notNull": false
2738
+ }
2739
+ },
2740
+ "indexes": [
2741
+ {
2742
+ "name": "ad_groups_id_idx",
2743
+ "columns": [
2744
+ "id"
2745
+ ]
2746
+ },
2747
+ {
2748
+ "name": "ad_groups_slug_context_meta_type_idx",
2749
+ "columns": [
2750
+ "slug",
2751
+ "context",
2752
+ "_meta_type"
2753
+ ],
2754
+ "unique": true
2755
+ },
2756
+ {
2757
+ "name": "ad_groups_meta_type_idx",
2758
+ "columns": [
2759
+ "_meta_type"
2760
+ ]
2761
+ }
2762
+ ],
2763
+ "version": "6dbc634e"
2764
+ }
2765
+ },
2766
+ "@happyvertical/smrt-ads:AdVariation": {
2767
+ "name": "advariation",
2768
+ "className": "AdVariation",
2769
+ "qualifiedName": "@happyvertical/smrt-ads:AdVariation",
2770
+ "collection": "advariations",
2771
+ "filePath": "/home/runner/_work/smrt/smrt/packages/ads/src/models/AdVariation.ts",
2772
+ "packageName": "@happyvertical/smrt-ads",
2773
+ "fields": {
2774
+ "created_at": {
2775
+ "type": "datetime",
2776
+ "required": false
2777
+ },
2778
+ "updated_at": {
2779
+ "type": "datetime",
2780
+ "required": false
2781
+ },
2782
+ "tenantId": {
2783
+ "type": "text",
2784
+ "required": false,
2785
+ "_meta": {
2786
+ "sqlType": "UUID",
2787
+ "nullable": true,
2788
+ "__tenancy": {
2789
+ "isTenantIdField": true,
2790
+ "autoFilter": true,
2791
+ "required": false,
2792
+ "autoPopulate": true,
2793
+ "nullable": true,
2794
+ "mode": "optional",
2795
+ "field": "tenantId",
2796
+ "allowSuperAdminBypass": false
2797
+ }
2798
+ }
2799
+ },
2800
+ "groupId": {
2801
+ "type": "foreignKey",
2802
+ "required": false,
2803
+ "related": "AdGroup"
2804
+ },
2805
+ "formatId": {
2806
+ "type": "foreignKey",
2807
+ "required": false,
2808
+ "related": "AdFormat"
2809
+ },
2810
+ "assetId": {
2811
+ "type": "crossPackageRef",
2812
+ "required": false,
2813
+ "related": "@happyvertical/smrt-assets:Asset"
2814
+ },
2815
+ "name": {
2816
+ "type": "text",
2817
+ "required": false,
2818
+ "default": ""
2819
+ },
2820
+ "clickUrl": {
2821
+ "type": "text",
2822
+ "required": false,
2823
+ "default": ""
2824
+ },
2825
+ "altText": {
2826
+ "type": "text",
2827
+ "required": false,
2828
+ "default": ""
2829
+ },
2830
+ "weight": {
2831
+ "type": "integer",
2832
+ "required": false,
2833
+ "default": 1
2834
+ },
2835
+ "status": {
2836
+ "type": "text",
2837
+ "required": false
2838
+ },
2839
+ "impressions": {
2840
+ "type": "integer",
2841
+ "required": false,
2842
+ "default": 0
2843
+ },
2844
+ "clicks": {
2845
+ "type": "integer",
2846
+ "required": false,
2847
+ "default": 0
2848
+ }
2849
+ },
2850
+ "methods": {
2851
+ "getAiUsageSnapshot": {
2852
+ "name": "getAiUsageSnapshot",
2853
+ "async": false,
2854
+ "parameters": [],
2855
+ "returnType": "AiUsageSnapshot | undefined",
2856
+ "isStatic": false,
2857
+ "isPublic": true
2858
+ },
2859
+ "resetAiUsage": {
2860
+ "name": "resetAiUsage",
2861
+ "async": false,
2862
+ "parameters": [],
2863
+ "returnType": "void",
2864
+ "isStatic": false,
2865
+ "isPublic": true
2866
+ },
2867
+ "listAiUsage": {
2868
+ "name": "listAiUsage",
2869
+ "async": true,
2870
+ "parameters": [
2871
+ {
2872
+ "name": "options",
2873
+ "type": "AiUsageListOptions",
2874
+ "optional": true
2875
+ }
2876
+ ],
2877
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
2878
+ "isStatic": false,
2879
+ "isPublic": true
2880
+ },
2881
+ "summarizeAiUsage": {
2882
+ "name": "summarizeAiUsage",
2883
+ "async": true,
2884
+ "parameters": [
2885
+ {
2886
+ "name": "options",
2887
+ "type": "AiUsageSummaryOptions",
2888
+ "optional": true
2889
+ }
2890
+ ],
2891
+ "returnType": "Promise<Record<string, AiUsageStats>>",
2892
+ "isStatic": false,
2893
+ "isPublic": true
2894
+ },
2895
+ "destroy": {
2896
+ "name": "destroy",
2897
+ "async": false,
2898
+ "parameters": [],
2899
+ "returnType": "void",
2900
+ "isStatic": false,
2901
+ "isPublic": true
2902
+ },
2903
+ "markAsPersisted": {
2904
+ "name": "markAsPersisted",
2905
+ "async": false,
2906
+ "parameters": [],
2907
+ "returnType": "void",
2908
+ "isStatic": false,
2909
+ "isPublic": true
2910
+ },
2911
+ "initialize": {
2912
+ "name": "initialize",
2913
+ "async": true,
2914
+ "parameters": [],
2915
+ "returnType": "Promise",
2916
+ "isStatic": false,
2917
+ "isPublic": true
2918
+ },
2919
+ "loadDataFromDb": {
2920
+ "name": "loadDataFromDb",
2921
+ "async": true,
2922
+ "parameters": [
2923
+ {
2924
+ "name": "data",
2925
+ "type": "any",
2926
+ "optional": false
2927
+ }
2928
+ ],
2929
+ "returnType": "any",
2930
+ "isStatic": false,
2931
+ "isPublic": true
2932
+ },
2933
+ "getFields": {
2934
+ "name": "getFields",
2935
+ "async": true,
2936
+ "parameters": [],
2937
+ "returnType": "any",
2938
+ "isStatic": false,
2939
+ "isPublic": true
2940
+ },
2941
+ "toJSON": {
2942
+ "name": "toJSON",
2943
+ "async": false,
2944
+ "parameters": [],
2945
+ "returnType": "any",
2946
+ "isStatic": false,
2947
+ "isPublic": true
2948
+ },
2949
+ "toPlainObject": {
2950
+ "name": "toPlainObject",
2951
+ "async": false,
2952
+ "parameters": [],
2953
+ "returnType": "Record<string>",
2954
+ "isStatic": false,
2955
+ "isPublic": true
2956
+ },
2957
+ "toPublicJSON": {
2958
+ "name": "toPublicJSON",
2959
+ "async": false,
2960
+ "parameters": [],
2961
+ "returnType": "Record<string>",
2962
+ "isStatic": false,
2963
+ "isPublic": true
2964
+ },
2965
+ "getId": {
2966
+ "name": "getId",
2967
+ "async": true,
2968
+ "parameters": [],
2969
+ "returnType": "any",
2970
+ "isStatic": false,
2971
+ "isPublic": true
2972
+ },
2973
+ "getSlug": {
2974
+ "name": "getSlug",
2975
+ "async": true,
2976
+ "parameters": [],
2977
+ "returnType": "any",
2978
+ "isStatic": false,
2979
+ "isPublic": true
2980
+ },
2981
+ "getSavedId": {
2982
+ "name": "getSavedId",
2983
+ "async": true,
2984
+ "parameters": [],
2985
+ "returnType": "any",
2986
+ "isStatic": false,
2987
+ "isPublic": true
2988
+ },
2989
+ "isSaved": {
2990
+ "name": "isSaved",
2991
+ "async": true,
2992
+ "parameters": [],
2993
+ "returnType": "any",
2994
+ "isStatic": false,
2995
+ "isPublic": true
2996
+ },
2997
+ "save": {
2998
+ "name": "save",
2999
+ "async": true,
3000
+ "parameters": [],
3001
+ "returnType": "any",
3002
+ "isStatic": false,
3003
+ "isPublic": true
3004
+ },
3005
+ "classifyConstraintError": {
3006
+ "name": "classifyConstraintError",
3007
+ "async": false,
3008
+ "parameters": [
3009
+ {
3010
+ "name": "message",
3011
+ "type": "string",
3012
+ "optional": false
3013
+ }
3014
+ ],
3015
+ "returnType": "'unique' | 'not_null' | null",
3016
+ "isStatic": true,
3017
+ "isPublic": true
3018
+ },
3019
+ "loadFromId": {
3020
+ "name": "loadFromId",
3021
+ "async": true,
3022
+ "parameters": [],
3023
+ "returnType": "any",
3024
+ "isStatic": false,
3025
+ "isPublic": true
3026
+ },
3027
+ "loadFromSlug": {
3028
+ "name": "loadFromSlug",
3029
+ "async": true,
3030
+ "parameters": [],
3031
+ "returnType": "any",
3032
+ "isStatic": false,
3033
+ "isPublic": true
3034
+ },
3035
+ "is": {
3036
+ "name": "is",
3037
+ "async": true,
3038
+ "parameters": [
3039
+ {
3040
+ "name": "criteria",
3041
+ "type": "string",
3042
+ "optional": false
3043
+ },
3044
+ {
3045
+ "name": "options",
3046
+ "type": "any",
3047
+ "optional": true
3048
+ }
3049
+ ],
3050
+ "returnType": "any",
3051
+ "isStatic": false,
3052
+ "isPublic": true
3053
+ },
3054
+ "do": {
3055
+ "name": "do",
3056
+ "async": true,
3057
+ "parameters": [
3058
+ {
3059
+ "name": "instructions",
3060
+ "type": "string",
3061
+ "optional": false
3062
+ },
3063
+ {
3064
+ "name": "options",
3065
+ "type": "any",
3066
+ "optional": true
3067
+ }
3068
+ ],
3069
+ "returnType": "any",
3070
+ "isStatic": false,
3071
+ "isPublic": true
3072
+ },
3073
+ "describe": {
3074
+ "name": "describe",
3075
+ "async": true,
3076
+ "parameters": [
3077
+ {
3078
+ "name": "options",
3079
+ "type": "any",
3080
+ "optional": true
3081
+ }
3082
+ ],
3083
+ "returnType": "any",
3084
+ "isStatic": false,
3085
+ "isPublic": true
3086
+ },
3087
+ "delete": {
3088
+ "name": "delete",
3089
+ "async": true,
3090
+ "parameters": [],
3091
+ "returnType": "Promise<void>",
3092
+ "isStatic": false,
3093
+ "isPublic": true
3094
+ },
3095
+ "isRelatedLoaded": {
3096
+ "name": "isRelatedLoaded",
3097
+ "async": false,
3098
+ "parameters": [
3099
+ {
3100
+ "name": "fieldName",
3101
+ "type": "string",
3102
+ "optional": false
3103
+ }
3104
+ ],
3105
+ "returnType": "boolean",
3106
+ "isStatic": false,
3107
+ "isPublic": true
3108
+ },
3109
+ "loadRelated": {
3110
+ "name": "loadRelated",
3111
+ "async": true,
3112
+ "parameters": [
3113
+ {
3114
+ "name": "fieldName",
3115
+ "type": "string",
3116
+ "optional": false
3117
+ },
3118
+ {
3119
+ "name": "opts",
3120
+ "type": "LoadRelatedOptions",
3121
+ "optional": true
3122
+ }
3123
+ ],
3124
+ "returnType": "Promise<any>",
3125
+ "isStatic": false,
3126
+ "isPublic": true
3127
+ },
3128
+ "loadRelatedMany": {
3129
+ "name": "loadRelatedMany",
3130
+ "async": true,
3131
+ "parameters": [
3132
+ {
3133
+ "name": "fieldName",
3134
+ "type": "string",
3135
+ "optional": false
3136
+ },
3137
+ {
3138
+ "name": "opts",
3139
+ "type": "LoadRelatedOptions",
3140
+ "optional": true
3141
+ }
3142
+ ],
3143
+ "returnType": "Promise<any[]>",
3144
+ "isStatic": false,
3145
+ "isPublic": true
3146
+ },
3147
+ "getRelated": {
3148
+ "name": "getRelated",
3149
+ "async": true,
3150
+ "parameters": [
3151
+ {
3152
+ "name": "fieldName",
3153
+ "type": "string",
3154
+ "optional": false
3155
+ },
3156
+ {
3157
+ "name": "opts",
3158
+ "type": "LoadRelatedOptions",
3159
+ "optional": true
3160
+ }
3161
+ ],
3162
+ "returnType": "Promise<any>",
3163
+ "isStatic": false,
3164
+ "isPublic": true
3165
+ },
3166
+ "getAvailableTools": {
3167
+ "name": "getAvailableTools",
3168
+ "async": false,
3169
+ "parameters": [],
3170
+ "returnType": "AITool[]",
3171
+ "isStatic": false,
3172
+ "isPublic": true
3173
+ },
3174
+ "executeToolCall": {
3175
+ "name": "executeToolCall",
3176
+ "async": true,
3177
+ "parameters": [
3178
+ {
3179
+ "name": "toolCall",
3180
+ "type": "ToolCall",
3181
+ "optional": false
3182
+ }
3183
+ ],
3184
+ "returnType": "Promise<ToolCallResult>",
3185
+ "isStatic": false,
3186
+ "isPublic": true
3187
+ },
3188
+ "remember": {
3189
+ "name": "remember",
3190
+ "async": true,
3191
+ "parameters": [
3192
+ {
3193
+ "name": "options",
3194
+ "type": "object",
3195
+ "optional": false
3196
+ }
3197
+ ],
3198
+ "returnType": "Promise<void>",
3199
+ "isStatic": false,
3200
+ "isPublic": true
3201
+ },
3202
+ "recall": {
3203
+ "name": "recall",
3204
+ "async": true,
3205
+ "parameters": [
3206
+ {
3207
+ "name": "options",
3208
+ "type": "object",
3209
+ "optional": false
3210
+ }
3211
+ ],
3212
+ "returnType": "Promise<any | null>",
3213
+ "isStatic": false,
3214
+ "isPublic": true
3215
+ },
3216
+ "recallAll": {
3217
+ "name": "recallAll",
3218
+ "async": true,
3219
+ "parameters": [
3220
+ {
3221
+ "name": "options",
3222
+ "type": "object",
3223
+ "optional": true
3224
+ }
3225
+ ],
3226
+ "returnType": "Promise<Map<string, any>>",
3227
+ "isStatic": false,
3228
+ "isPublic": true
3229
+ },
3230
+ "forget": {
3231
+ "name": "forget",
3232
+ "async": true,
3233
+ "parameters": [
3234
+ {
3235
+ "name": "options",
3236
+ "type": "object",
3237
+ "optional": false
3238
+ }
3239
+ ],
3240
+ "returnType": "Promise<void>",
3241
+ "isStatic": false,
3242
+ "isPublic": true
3243
+ },
3244
+ "forgetScope": {
3245
+ "name": "forgetScope",
3246
+ "async": true,
3247
+ "parameters": [
3248
+ {
3249
+ "name": "options",
3250
+ "type": "object",
3251
+ "optional": false
3252
+ }
3253
+ ],
3254
+ "returnType": "Promise<number>",
3255
+ "isStatic": false,
3256
+ "isPublic": true
3257
+ },
3258
+ "generateEmbeddings": {
3259
+ "name": "generateEmbeddings",
3260
+ "async": true,
3261
+ "parameters": [
3262
+ {
3263
+ "name": "options",
3264
+ "type": "GenerateEmbeddingsOptions",
3265
+ "optional": true
3266
+ }
3267
+ ],
3268
+ "returnType": "Promise<void>",
3269
+ "isStatic": false,
3270
+ "isPublic": true
3271
+ },
3272
+ "getEmbedding": {
3273
+ "name": "getEmbedding",
3274
+ "async": true,
3275
+ "parameters": [
3276
+ {
3277
+ "name": "fieldName",
3278
+ "type": "string",
3279
+ "optional": false
3280
+ },
3281
+ {
3282
+ "name": "model",
3283
+ "type": "string",
3284
+ "optional": true
3285
+ }
3286
+ ],
3287
+ "returnType": "Promise<number[] | null>",
3288
+ "isStatic": false,
3289
+ "isPublic": true
3290
+ },
3291
+ "hasStaleEmbeddings": {
3292
+ "name": "hasStaleEmbeddings",
3293
+ "async": true,
3294
+ "parameters": [],
3295
+ "returnType": "Promise<boolean>",
3296
+ "isStatic": false,
3297
+ "isPublic": true
3298
+ },
3299
+ "clearEmbeddings": {
3300
+ "name": "clearEmbeddings",
3301
+ "async": true,
3302
+ "parameters": [],
3303
+ "returnType": "Promise<void>",
3304
+ "isStatic": false,
3305
+ "isPublic": true
3306
+ },
3307
+ "isActive": {
3308
+ "name": "isActive",
3309
+ "async": false,
3310
+ "parameters": [],
3311
+ "returnType": "boolean",
3312
+ "isStatic": false,
3313
+ "isPublic": true
3314
+ },
3315
+ "isDraft": {
3316
+ "name": "isDraft",
3317
+ "async": false,
3318
+ "parameters": [],
3319
+ "returnType": "boolean",
3320
+ "isStatic": false,
3321
+ "isPublic": true
3322
+ },
3323
+ "isPaused": {
3324
+ "name": "isPaused",
3325
+ "async": false,
3326
+ "parameters": [],
3327
+ "returnType": "boolean",
3328
+ "isStatic": false,
3329
+ "isPublic": true
3330
+ },
3331
+ "getCTR": {
3332
+ "name": "getCTR",
3333
+ "async": false,
3334
+ "parameters": [],
3335
+ "returnType": "number",
3336
+ "isStatic": false,
3337
+ "isPublic": true
3338
+ },
3339
+ "recordImpression": {
3340
+ "name": "recordImpression",
3341
+ "async": false,
3342
+ "parameters": [],
3343
+ "returnType": "void",
3344
+ "isStatic": false,
3345
+ "isPublic": true
3346
+ },
3347
+ "recordClick": {
3348
+ "name": "recordClick",
3349
+ "async": false,
3350
+ "parameters": [],
3351
+ "returnType": "void",
3352
+ "isStatic": false,
3353
+ "isPublic": true
3354
+ }
3355
+ },
3356
+ "decoratorConfig": {
3357
+ "tableStrategy": "sti",
3358
+ "api": {
3359
+ "include": [
3360
+ "list",
3361
+ "get",
3362
+ "create",
3363
+ "update"
3364
+ ]
3365
+ },
3366
+ "mcp": {
3367
+ "include": [
3368
+ "list",
3369
+ "get",
3370
+ "create"
3371
+ ]
3372
+ },
3373
+ "cli": true,
3374
+ "tenantScoped": {
3375
+ "mode": "optional"
3376
+ }
3377
+ },
3378
+ "extends": "SmrtObject",
3379
+ "exportName": "AdVariation",
3380
+ "collectionExportName": "AdVariationCollection",
3381
+ "schema": {
3382
+ "tableName": "ad_variations",
3383
+ "ddl": "CREATE TABLE IF NOT EXISTS \"ad_variations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"group_id\" UUID,\n \"format_id\" UUID,\n \"asset_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"click_url\" TEXT DEFAULT '',\n \"alt_text\" TEXT DEFAULT '',\n \"weight\" INTEGER DEFAULT 1,\n \"status\" TEXT,\n \"impressions\" INTEGER DEFAULT 0,\n \"clicks\" INTEGER DEFAULT 0\n);",
3384
+ "columns": {
3385
+ "id": {
3386
+ "type": "UUID",
3387
+ "primaryKey": true,
3388
+ "referenceKind": "id",
3389
+ "notNull": true
3390
+ },
3391
+ "slug": {
3392
+ "type": "TEXT",
3393
+ "notNull": true
3394
+ },
3395
+ "context": {
3396
+ "type": "TEXT",
3397
+ "notNull": true,
3398
+ "default": ""
3399
+ },
3400
+ "_meta_type": {
3401
+ "type": "TEXT",
3402
+ "notNull": true
3403
+ },
3404
+ "_meta_data": {
3405
+ "type": "JSON",
3406
+ "notNull": false
3407
+ },
3408
+ "created_at": {
3409
+ "type": "TIMESTAMP",
3410
+ "notNull": true,
3411
+ "default": "current_timestamp"
3412
+ },
3413
+ "updated_at": {
3414
+ "type": "TIMESTAMP",
3415
+ "notNull": true,
3416
+ "default": "current_timestamp"
3417
+ },
3418
+ "tenant_id": {
3419
+ "type": "UUID",
3420
+ "referenceKind": "tenantId",
3421
+ "notNull": false
3422
+ },
3423
+ "group_id": {
3424
+ "type": "UUID",
3425
+ "referenceKind": "foreignKey",
3426
+ "notNull": false
3427
+ },
3428
+ "format_id": {
3429
+ "type": "UUID",
3430
+ "referenceKind": "foreignKey",
3431
+ "notNull": false
3432
+ },
3433
+ "asset_id": {
3434
+ "type": "UUID",
3435
+ "referenceKind": "crossPackageRef",
3436
+ "notNull": false
3437
+ },
3438
+ "name": {
3439
+ "type": "TEXT",
3440
+ "notNull": false,
3441
+ "default": ""
3442
+ },
3443
+ "click_url": {
3444
+ "type": "TEXT",
3445
+ "notNull": false,
3446
+ "default": ""
3447
+ },
3448
+ "alt_text": {
3449
+ "type": "TEXT",
3450
+ "notNull": false,
3451
+ "default": ""
3452
+ },
3453
+ "weight": {
3454
+ "type": "INTEGER",
3455
+ "notNull": false,
3456
+ "default": 1
3457
+ },
3458
+ "status": {
3459
+ "type": "TEXT",
3460
+ "notNull": false
3461
+ },
3462
+ "impressions": {
3463
+ "type": "INTEGER",
3464
+ "notNull": false,
3465
+ "default": 0
3466
+ },
3467
+ "clicks": {
3468
+ "type": "INTEGER",
3469
+ "notNull": false,
3470
+ "default": 0
3471
+ }
3472
+ },
3473
+ "indexes": [
3474
+ {
3475
+ "name": "ad_variations_id_idx",
3476
+ "columns": [
3477
+ "id"
3478
+ ]
3479
+ },
3480
+ {
3481
+ "name": "ad_variations_slug_context_meta_type_idx",
3482
+ "columns": [
3483
+ "slug",
3484
+ "context",
3485
+ "_meta_type"
3486
+ ],
3487
+ "unique": true
3488
+ },
3489
+ {
3490
+ "name": "ad_variations_meta_type_idx",
3491
+ "columns": [
3492
+ "_meta_type"
3493
+ ]
3494
+ }
3495
+ ],
3496
+ "version": "6ebaaef6"
3497
+ }
3498
+ }
3499
+ },
3500
+ "moduleType": "smrt",
3501
+ "smrtDependencies": [
3502
+ "@happyvertical/smrt-commerce",
3503
+ "@happyvertical/smrt-core",
3504
+ "@happyvertical/smrt-tenancy"
3505
+ ]
3506
+ }