@happyvertical/smrt-ads 0.57.38 → 0.57.39

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.
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-ads",
6
- "packageVersion": "0.57.38",
6
+ "packageVersion": "0.57.39",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "b45f708391040d3a6b925b2ed785de6c230ede8cae79a602487c74c0bf3731ee",
11
- "packageJson": "360d40ede9f544e786bde15db22ab274cfcee08610f16628f6694469fae3d2e5",
10
+ "manifest": "038321204c26238fb37ea7dbf5b80ae18052c5d285a972c4980b9859f6533651",
11
+ "packageJson": "9cbc838659a90701ffa193036a39999598b49fd54d38fdc5aa56480e13037924",
12
12
  "agents": "a74f5ff1aea757073496bcd3fe01802b5a4e2f59b39a04c1bb0d11b81343f660"
13
13
  },
14
14
  "exports": [
@@ -52,137 +52,184 @@
52
52
  ],
53
53
  "objects": [
54
54
  {
55
- "name": "AdDeliveryTierCollection",
56
- "qualifiedName": "@happyvertical/smrt-ads:AdDeliveryTierCollection",
55
+ "name": "AdDeliveryTier",
56
+ "qualifiedName": "@happyvertical/smrt-ads:AdDeliveryTier",
57
+ "displayLabelField": "name",
57
58
  "collection": "addeliverytiers",
58
59
  "tableName": "ad_delivery_tiers",
59
60
  "packageName": "@happyvertical/smrt-ads",
60
- "extends": "SmrtCollection",
61
- "fields": [],
61
+ "extends": "SmrtObject",
62
+ "fields": [
63
+ {
64
+ "name": "name",
65
+ "type": "text",
66
+ "required": false,
67
+ "columnType": "TEXT",
68
+ "default": "",
69
+ "description": "What the tier is called, for example Sponsorship, Standard or House."
70
+ },
71
+ {
72
+ "name": "priority",
73
+ "type": "integer",
74
+ "required": false,
75
+ "columnType": "INTEGER",
76
+ "default": 0,
77
+ "description": "The order tiers are tried in: 1 is tried first, then 2, and so on."
78
+ },
79
+ {
80
+ "name": "pricingModel",
81
+ "type": "text",
82
+ "required": false,
83
+ "columnType": "TEXT",
84
+ "description": "How ads in this tier are charged: a fixed price, per thousand showings, per click, or per sale."
85
+ },
86
+ {
87
+ "name": "description",
88
+ "type": "text",
89
+ "required": false,
90
+ "columnType": "TEXT",
91
+ "default": "",
92
+ "description": "A note about what this tier is for."
93
+ }
94
+ ],
62
95
  "relationships": [],
63
96
  "methods": [
64
- "findByPricingModel",
65
- "findByPriority",
66
- "findCPM",
67
- "findFixedPricing",
68
- "findPerformanceBased",
69
- "getHighestPriority"
97
+ "isFixedPricing",
98
+ "isHigherPriorityThan",
99
+ "isPerformanceBased"
70
100
  ],
71
101
  "methodSignatures": [
72
102
  {
73
- "name": "findByPricingModel",
74
- "async": true,
103
+ "name": "isFixedPricing",
104
+ "returns": "boolean"
105
+ },
106
+ {
107
+ "name": "isHigherPriorityThan",
75
108
  "params": [
76
- "pricingModel: PricingModel"
109
+ "other: AdDeliveryTier"
77
110
  ],
78
- "returns": "Promise<AdDeliveryTier[]>"
111
+ "returns": "boolean"
79
112
  },
80
113
  {
81
- "name": "findByPriority",
82
- "async": true,
83
- "returns": "Promise<AdDeliveryTier[]>"
84
- },
114
+ "name": "isPerformanceBased",
115
+ "returns": "boolean"
116
+ }
117
+ ],
118
+ "surfaces": [
85
119
  {
86
- "name": "findCPM",
87
- "async": true,
88
- "returns": "Promise<AdDeliveryTier[]>"
120
+ "kind": "api",
121
+ "name": "addeliverytiers.list",
122
+ "operation": "list",
123
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier",
124
+ "path": "/addeliverytiers",
125
+ "method": "GET"
89
126
  },
90
127
  {
91
- "name": "findFixedPricing",
92
- "async": true,
93
- "returns": "Promise<AdDeliveryTier[]>"
128
+ "kind": "api",
129
+ "name": "addeliverytiers.get",
130
+ "operation": "get",
131
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier",
132
+ "path": "/addeliverytiers/[id]",
133
+ "method": "GET"
94
134
  },
95
135
  {
96
- "name": "findPerformanceBased",
97
- "async": true,
98
- "returns": "Promise<AdDeliveryTier[]>"
136
+ "kind": "api",
137
+ "name": "addeliverytiers.create",
138
+ "operation": "create",
139
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier",
140
+ "path": "/addeliverytiers",
141
+ "method": "POST"
99
142
  },
100
143
  {
101
- "name": "getHighestPriority",
102
- "async": true,
103
- "returns": "Promise<AdDeliveryTier | null>"
104
- }
105
- ],
106
- "surfaces": [
144
+ "kind": "api",
145
+ "name": "addeliverytiers.update",
146
+ "operation": "update",
147
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier",
148
+ "path": "/addeliverytiers/[id]",
149
+ "method": "PATCH"
150
+ },
107
151
  {
108
152
  "kind": "cli",
109
- "name": "addeliverytiercollection_findByPriority",
110
- "operation": "findByPriority",
111
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
153
+ "name": "addeliverytier_list",
154
+ "operation": "list",
155
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
112
156
  },
113
157
  {
114
158
  "kind": "cli",
115
- "name": "addeliverytiercollection_findByPricingModel",
116
- "operation": "findByPricingModel",
117
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
159
+ "name": "addeliverytier_get",
160
+ "operation": "get",
161
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
118
162
  },
119
163
  {
120
164
  "kind": "cli",
121
- "name": "addeliverytiercollection_getHighestPriority",
122
- "operation": "getHighestPriority",
123
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
165
+ "name": "addeliverytier_create",
166
+ "operation": "create",
167
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
124
168
  },
125
169
  {
126
170
  "kind": "cli",
127
- "name": "addeliverytiercollection_findFixedPricing",
128
- "operation": "findFixedPricing",
129
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
171
+ "name": "addeliverytier_update",
172
+ "operation": "update",
173
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
130
174
  },
131
175
  {
132
176
  "kind": "cli",
133
- "name": "addeliverytiercollection_findCPM",
134
- "operation": "findCPM",
135
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
177
+ "name": "addeliverytier_delete",
178
+ "operation": "delete",
179
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
136
180
  },
137
181
  {
138
182
  "kind": "cli",
139
- "name": "addeliverytiercollection_findPerformanceBased",
140
- "operation": "findPerformanceBased",
141
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
142
- }
143
- ],
144
- "withheldSurfaces": [
183
+ "name": "addeliverytier_isHigherPriorityThan",
184
+ "operation": "isHigherPriorityThan",
185
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
186
+ },
145
187
  {
146
- "kind": "api",
147
- "operation": "findByPricingModel",
148
- "code": "not-included",
149
- "reason": "not listed in api.include",
150
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
188
+ "kind": "cli",
189
+ "name": "addeliverytier_isFixedPricing",
190
+ "operation": "isFixedPricing",
191
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
151
192
  },
152
193
  {
153
- "kind": "api",
154
- "operation": "findByPriority",
155
- "code": "not-included",
156
- "reason": "not listed in api.include",
157
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
194
+ "kind": "cli",
195
+ "name": "addeliverytier_isPerformanceBased",
196
+ "operation": "isPerformanceBased",
197
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
158
198
  },
159
199
  {
160
- "kind": "api",
161
- "operation": "findCPM",
162
- "code": "not-included",
163
- "reason": "not listed in api.include",
164
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
200
+ "kind": "mcp",
201
+ "name": "addeliverytier_list",
202
+ "operation": "list",
203
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
165
204
  },
205
+ {
206
+ "kind": "mcp",
207
+ "name": "addeliverytier_get",
208
+ "operation": "get",
209
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
210
+ }
211
+ ],
212
+ "withheldSurfaces": [
166
213
  {
167
214
  "kind": "api",
168
- "operation": "findFixedPricing",
215
+ "operation": "isFixedPricing",
169
216
  "code": "not-included",
170
217
  "reason": "not listed in api.include",
171
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
218
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
172
219
  },
173
220
  {
174
221
  "kind": "api",
175
- "operation": "findPerformanceBased",
222
+ "operation": "isHigherPriorityThan",
176
223
  "code": "not-included",
177
224
  "reason": "not listed in api.include",
178
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
225
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
179
226
  },
180
227
  {
181
228
  "kind": "api",
182
- "operation": "getHighestPriority",
229
+ "operation": "isPerformanceBased",
183
230
  "code": "not-included",
184
231
  "reason": "not listed in api.include",
185
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
232
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
186
233
  }
187
234
  ],
188
235
  "relationshipFeatures": [
@@ -192,390 +239,372 @@
192
239
  "risks": []
193
240
  },
194
241
  {
195
- "name": "AdEventCollection",
196
- "qualifiedName": "@happyvertical/smrt-ads:AdEventCollection",
242
+ "name": "AdEvent",
243
+ "qualifiedName": "@happyvertical/smrt-ads:AdEvent",
197
244
  "collection": "adevents",
245
+ "description": "AdEvent tracks ad impressions, clicks, and conversions. Events are immutable (append-only, no update/delete).",
198
246
  "tableName": "ad_events",
199
247
  "packageName": "@happyvertical/smrt-ads",
200
- "extends": "SmrtCollection",
201
- "fields": [],
202
- "relationships": [],
203
- "methods": [
204
- "countByType",
205
- "countClicks",
206
- "countConversions",
207
- "countImpressions",
208
- "findByDateRange",
209
- "findBySite",
210
- "findByTenant",
211
- "findByType",
212
- "findByVariation",
213
- "findByZone",
214
- "findClicks",
215
- "findConversions",
216
- "findGlobal",
217
- "findImpressions",
218
- "findWithGlobals",
219
- "getVariationStats"
220
- ],
221
- "methodSignatures": [
222
- {
223
- "name": "countByType",
224
- "async": true,
225
- "params": [
226
- "variationId: string",
227
- "eventType: AdEventType"
228
- ],
229
- "returns": "Promise<number>"
230
- },
248
+ "extends": "SmrtObject",
249
+ "fields": [
231
250
  {
232
- "name": "countClicks",
233
- "async": true,
234
- "params": [
235
- "variationId: string"
236
- ],
237
- "returns": "Promise<number>"
251
+ "name": "created_at",
252
+ "type": "datetime",
253
+ "required": false,
254
+ "columnType": "TIMESTAMP"
238
255
  },
239
256
  {
240
- "name": "countConversions",
241
- "async": true,
242
- "params": [
243
- "variationId: string"
244
- ],
245
- "returns": "Promise<number>"
257
+ "name": "updated_at",
258
+ "type": "datetime",
259
+ "required": false,
260
+ "columnType": "TIMESTAMP"
246
261
  },
247
262
  {
248
- "name": "countImpressions",
249
- "async": true,
250
- "params": [
251
- "variationId: string"
252
- ],
253
- "returns": "Promise<number>"
263
+ "name": "tenantId",
264
+ "type": "text",
265
+ "required": false,
266
+ "columnType": "UUID"
254
267
  },
255
268
  {
256
- "name": "findByDateRange",
257
- "async": true,
258
- "params": [
259
- "start: Date",
260
- "end: Date"
261
- ],
262
- "returns": "Promise<AdEvent[]>"
269
+ "name": "variationId",
270
+ "type": "foreignKey",
271
+ "required": false,
272
+ "related": "AdVariation",
273
+ "columnType": "UUID"
263
274
  },
264
275
  {
265
- "name": "findBySite",
266
- "async": true,
267
- "params": [
268
- "siteId: string"
269
- ],
270
- "returns": "Promise<AdEvent[]>"
276
+ "name": "zoneId",
277
+ "type": "crossPackageRef",
278
+ "required": false,
279
+ "related": "@happyvertical/smrt-properties:Zone",
280
+ "columnType": "UUID"
271
281
  },
272
282
  {
273
- "name": "findByTenant",
274
- "async": true,
275
- "params": [
276
- "tenantId: string"
277
- ],
278
- "returns": "Promise<AdEvent[]>"
283
+ "name": "siteId",
284
+ "type": "text",
285
+ "required": false,
286
+ "columnType": "TEXT",
287
+ "default": ""
279
288
  },
280
289
  {
281
- "name": "findByType",
282
- "async": true,
283
- "params": [
284
- "eventType: AdEventType"
285
- ],
286
- "returns": "Promise<AdEvent[]>"
290
+ "name": "eventType",
291
+ "type": "text",
292
+ "required": false,
293
+ "columnType": "TEXT"
287
294
  },
288
295
  {
289
- "name": "findByVariation",
290
- "async": true,
291
- "params": [
292
- "variationId: string"
293
- ],
294
- "returns": "Promise<AdEvent[]>"
296
+ "name": "timestamp",
297
+ "type": "datetime",
298
+ "required": false,
299
+ "columnType": "TIMESTAMP"
295
300
  },
296
301
  {
297
- "name": "findByZone",
298
- "async": true,
299
- "params": [
300
- "zoneId: string"
301
- ],
302
- "returns": "Promise<AdEvent[]>"
303
- },
302
+ "name": "metadata",
303
+ "type": "text",
304
+ "required": false,
305
+ "columnType": "TEXT",
306
+ "default": ""
307
+ }
308
+ ],
309
+ "relationships": [
304
310
  {
305
- "name": "findClicks",
306
- "async": true,
307
- "returns": "Promise<AdEvent[]>"
311
+ "name": "variationId",
312
+ "type": "foreignKey",
313
+ "required": false,
314
+ "related": "AdVariation",
315
+ "columnType": "UUID"
308
316
  },
309
317
  {
310
- "name": "findConversions",
311
- "async": true,
312
- "returns": "Promise<AdEvent[]>"
318
+ "name": "zoneId",
319
+ "type": "crossPackageRef",
320
+ "required": false,
321
+ "related": "@happyvertical/smrt-properties:Zone",
322
+ "columnType": "UUID"
323
+ }
324
+ ],
325
+ "methods": [
326
+ "getMetadata",
327
+ "isClick",
328
+ "isConversion",
329
+ "isImpression",
330
+ "setMetadata"
331
+ ],
332
+ "methodSignatures": [
333
+ {
334
+ "name": "getMetadata",
335
+ "returns": "Record<string, unknown>"
313
336
  },
314
337
  {
315
- "name": "findGlobal",
316
- "async": true,
317
- "returns": "Promise<AdEvent[]>"
338
+ "name": "isClick",
339
+ "returns": "boolean"
318
340
  },
319
341
  {
320
- "name": "findImpressions",
321
- "async": true,
322
- "returns": "Promise<AdEvent[]>"
342
+ "name": "isConversion",
343
+ "returns": "boolean"
323
344
  },
324
345
  {
325
- "name": "findWithGlobals",
326
- "async": true,
327
- "params": [
328
- "tenantId: string"
329
- ],
330
- "returns": "Promise<AdEvent[]>"
346
+ "name": "isImpression",
347
+ "returns": "boolean"
331
348
  },
332
349
  {
333
- "name": "getVariationStats",
334
- "async": true,
350
+ "name": "setMetadata",
335
351
  "params": [
336
- "variationId: string"
352
+ "data: Record<string, unknown>"
337
353
  ],
338
- "returns": "Promise<object>"
354
+ "returns": "void"
339
355
  }
340
356
  ],
341
- "surfaces": [],
342
- "withheldSurfaces": [
343
- {
344
- "kind": "api",
345
- "operation": "countByType",
346
- "code": "not-included",
347
- "reason": "not listed in api.include",
348
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
349
- },
350
- {
351
- "kind": "api",
352
- "operation": "countClicks",
353
- "code": "not-included",
354
- "reason": "not listed in api.include",
355
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
356
- },
357
- {
358
- "kind": "api",
359
- "operation": "countConversions",
360
- "code": "not-included",
361
- "reason": "not listed in api.include",
362
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
363
- },
364
- {
365
- "kind": "api",
366
- "operation": "countImpressions",
367
- "code": "not-included",
368
- "reason": "not listed in api.include",
369
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
370
- },
371
- {
372
- "kind": "api",
373
- "operation": "findByDateRange",
374
- "code": "not-included",
375
- "reason": "not listed in api.include",
376
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
377
- },
378
- {
379
- "kind": "api",
380
- "operation": "findBySite",
381
- "code": "not-included",
382
- "reason": "not listed in api.include",
383
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
384
- },
385
- {
386
- "kind": "api",
387
- "operation": "findByTenant",
388
- "code": "not-included",
389
- "reason": "not listed in api.include",
390
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
391
- },
392
- {
393
- "kind": "api",
394
- "operation": "findByType",
395
- "code": "not-included",
396
- "reason": "not listed in api.include",
397
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
398
- },
357
+ "tenant": {
358
+ "scoped": true,
359
+ "mode": "optional",
360
+ "field": "tenantId"
361
+ },
362
+ "tableStrategy": "sti",
363
+ "conflictColumns": [
364
+ "tenant_id",
365
+ "slug",
366
+ "context",
367
+ "_meta_type"
368
+ ],
369
+ "surfaces": [
399
370
  {
400
371
  "kind": "api",
401
- "operation": "findByVariation",
402
- "code": "not-included",
403
- "reason": "not listed in api.include",
404
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
372
+ "name": "adevents.list",
373
+ "operation": "list",
374
+ "objectName": "@happyvertical/smrt-ads:AdEvent",
375
+ "path": "/adevents",
376
+ "method": "GET"
405
377
  },
406
378
  {
407
379
  "kind": "api",
408
- "operation": "findByZone",
409
- "code": "not-included",
410
- "reason": "not listed in api.include",
411
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
380
+ "name": "adevents.create",
381
+ "operation": "create",
382
+ "objectName": "@happyvertical/smrt-ads:AdEvent",
383
+ "path": "/adevents",
384
+ "method": "POST"
412
385
  },
413
386
  {
414
- "kind": "api",
415
- "operation": "findClicks",
416
- "code": "not-included",
417
- "reason": "not listed in api.include",
418
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
419
- },
387
+ "kind": "mcp",
388
+ "name": "adevent_create",
389
+ "operation": "create",
390
+ "objectName": "@happyvertical/smrt-ads:AdEvent"
391
+ }
392
+ ],
393
+ "withheldSurfaces": [
420
394
  {
421
395
  "kind": "api",
422
- "operation": "findConversions",
396
+ "operation": "getMetadata",
423
397
  "code": "not-included",
424
398
  "reason": "not listed in api.include",
425
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
399
+ "objectName": "@happyvertical/smrt-ads:AdEvent"
426
400
  },
427
401
  {
428
402
  "kind": "api",
429
- "operation": "findGlobal",
403
+ "operation": "isClick",
430
404
  "code": "not-included",
431
405
  "reason": "not listed in api.include",
432
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
406
+ "objectName": "@happyvertical/smrt-ads:AdEvent"
433
407
  },
434
408
  {
435
409
  "kind": "api",
436
- "operation": "findImpressions",
410
+ "operation": "isConversion",
437
411
  "code": "not-included",
438
412
  "reason": "not listed in api.include",
439
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
413
+ "objectName": "@happyvertical/smrt-ads:AdEvent"
440
414
  },
441
415
  {
442
416
  "kind": "api",
443
- "operation": "findWithGlobals",
417
+ "operation": "isImpression",
444
418
  "code": "not-included",
445
419
  "reason": "not listed in api.include",
446
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
420
+ "objectName": "@happyvertical/smrt-ads:AdEvent"
447
421
  },
448
422
  {
449
423
  "kind": "api",
450
- "operation": "getVariationStats",
424
+ "operation": "setMetadata",
451
425
  "code": "not-included",
452
426
  "reason": "not listed in api.include",
453
- "objectName": "@happyvertical/smrt-ads:AdEventCollection"
427
+ "objectName": "@happyvertical/smrt-ads:AdEvent"
454
428
  }
455
429
  ],
456
430
  "relationshipFeatures": [
431
+ "crossPackageRef",
432
+ "foreignKey",
457
433
  "uuidColumns"
458
434
  ],
459
435
  "tags": [],
460
436
  "risks": []
461
437
  },
462
438
  {
463
- "name": "AdFormatCollection",
464
- "qualifiedName": "@happyvertical/smrt-ads:AdFormatCollection",
439
+ "name": "AdFormat",
440
+ "qualifiedName": "@happyvertical/smrt-ads:AdFormat",
441
+ "displayLabelField": "name",
465
442
  "collection": "adformats",
466
443
  "tableName": "ad_formats",
467
444
  "packageName": "@happyvertical/smrt-ads",
468
- "extends": "SmrtCollection",
469
- "fields": [],
445
+ "extends": "SmrtObject",
446
+ "fields": [
447
+ {
448
+ "name": "name",
449
+ "type": "text",
450
+ "required": false,
451
+ "columnType": "TEXT",
452
+ "default": "",
453
+ "description": "What the size is called, for example Leaderboard."
454
+ },
455
+ {
456
+ "name": "width",
457
+ "type": "integer",
458
+ "required": false,
459
+ "columnType": "INTEGER",
460
+ "default": 0,
461
+ "description": "How wide the ad is, in pixels."
462
+ },
463
+ {
464
+ "name": "height",
465
+ "type": "integer",
466
+ "required": false,
467
+ "columnType": "INTEGER",
468
+ "default": 0,
469
+ "description": "How tall the ad is, in pixels."
470
+ },
471
+ {
472
+ "name": "formatType",
473
+ "type": "text",
474
+ "required": false,
475
+ "columnType": "TEXT",
476
+ "description": "What kind of ad fits this size: a picture, a piece written to look like your own content, or a video."
477
+ },
478
+ {
479
+ "name": "description",
480
+ "type": "text",
481
+ "required": false,
482
+ "columnType": "TEXT",
483
+ "default": "",
484
+ "description": "A note about where this size is usually used."
485
+ }
486
+ ],
470
487
  "relationships": [],
471
488
  "methods": [
472
- "findBanners",
473
- "findByDimensions",
474
- "findByType",
475
- "findNative",
476
- "findVideo"
489
+ "getDimensions",
490
+ "matchesDimensions"
477
491
  ],
478
492
  "methodSignatures": [
479
493
  {
480
- "name": "findBanners",
481
- "async": true,
482
- "returns": "Promise<AdFormat[]>"
494
+ "name": "getDimensions",
495
+ "returns": "string"
483
496
  },
484
497
  {
485
- "name": "findByDimensions",
486
- "async": true,
498
+ "name": "matchesDimensions",
487
499
  "params": [
488
500
  "width: number",
489
501
  "height: number"
490
502
  ],
491
- "returns": "Promise<AdFormat | null>"
503
+ "returns": "boolean"
504
+ }
505
+ ],
506
+ "surfaces": [
507
+ {
508
+ "kind": "api",
509
+ "name": "adformats.list",
510
+ "operation": "list",
511
+ "objectName": "@happyvertical/smrt-ads:AdFormat",
512
+ "path": "/adformats",
513
+ "method": "GET"
492
514
  },
493
515
  {
494
- "name": "findByType",
495
- "async": true,
496
- "params": [
497
- "formatType: AdFormatType"
498
- ],
499
- "returns": "Promise<AdFormat[]>"
516
+ "kind": "api",
517
+ "name": "adformats.get",
518
+ "operation": "get",
519
+ "objectName": "@happyvertical/smrt-ads:AdFormat",
520
+ "path": "/adformats/[id]",
521
+ "method": "GET"
500
522
  },
501
523
  {
502
- "name": "findNative",
503
- "async": true,
504
- "returns": "Promise<AdFormat[]>"
524
+ "kind": "api",
525
+ "name": "adformats.create",
526
+ "operation": "create",
527
+ "objectName": "@happyvertical/smrt-ads:AdFormat",
528
+ "path": "/adformats",
529
+ "method": "POST"
505
530
  },
506
531
  {
507
- "name": "findVideo",
508
- "async": true,
509
- "returns": "Promise<AdFormat[]>"
510
- }
511
- ],
512
- "surfaces": [
532
+ "kind": "api",
533
+ "name": "adformats.update",
534
+ "operation": "update",
535
+ "objectName": "@happyvertical/smrt-ads:AdFormat",
536
+ "path": "/adformats/[id]",
537
+ "method": "PATCH"
538
+ },
513
539
  {
514
540
  "kind": "cli",
515
- "name": "adformatcollection_findByDimensions",
516
- "operation": "findByDimensions",
517
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
541
+ "name": "adformat_list",
542
+ "operation": "list",
543
+ "objectName": "@happyvertical/smrt-ads:AdFormat"
518
544
  },
519
545
  {
520
546
  "kind": "cli",
521
- "name": "adformatcollection_findByType",
522
- "operation": "findByType",
523
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
547
+ "name": "adformat_get",
548
+ "operation": "get",
549
+ "objectName": "@happyvertical/smrt-ads:AdFormat"
524
550
  },
525
551
  {
526
552
  "kind": "cli",
527
- "name": "adformatcollection_findBanners",
528
- "operation": "findBanners",
529
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
553
+ "name": "adformat_create",
554
+ "operation": "create",
555
+ "objectName": "@happyvertical/smrt-ads:AdFormat"
530
556
  },
531
557
  {
532
558
  "kind": "cli",
533
- "name": "adformatcollection_findNative",
534
- "operation": "findNative",
535
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
559
+ "name": "adformat_update",
560
+ "operation": "update",
561
+ "objectName": "@happyvertical/smrt-ads:AdFormat"
536
562
  },
537
563
  {
538
564
  "kind": "cli",
539
- "name": "adformatcollection_findVideo",
540
- "operation": "findVideo",
541
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
542
- }
543
- ],
544
- "withheldSurfaces": [
565
+ "name": "adformat_delete",
566
+ "operation": "delete",
567
+ "objectName": "@happyvertical/smrt-ads:AdFormat"
568
+ },
545
569
  {
546
- "kind": "api",
547
- "operation": "findBanners",
548
- "code": "not-included",
549
- "reason": "not listed in api.include",
550
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
570
+ "kind": "cli",
571
+ "name": "adformat_getDimensions",
572
+ "operation": "getDimensions",
573
+ "objectName": "@happyvertical/smrt-ads:AdFormat"
551
574
  },
552
575
  {
553
- "kind": "api",
554
- "operation": "findByDimensions",
555
- "code": "not-included",
556
- "reason": "not listed in api.include",
557
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
576
+ "kind": "cli",
577
+ "name": "adformat_matchesDimensions",
578
+ "operation": "matchesDimensions",
579
+ "objectName": "@happyvertical/smrt-ads:AdFormat"
558
580
  },
559
581
  {
560
- "kind": "api",
561
- "operation": "findByType",
562
- "code": "not-included",
563
- "reason": "not listed in api.include",
564
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
582
+ "kind": "mcp",
583
+ "name": "adformat_list",
584
+ "operation": "list",
585
+ "objectName": "@happyvertical/smrt-ads:AdFormat"
565
586
  },
587
+ {
588
+ "kind": "mcp",
589
+ "name": "adformat_get",
590
+ "operation": "get",
591
+ "objectName": "@happyvertical/smrt-ads:AdFormat"
592
+ }
593
+ ],
594
+ "withheldSurfaces": [
566
595
  {
567
596
  "kind": "api",
568
- "operation": "findNative",
597
+ "operation": "getDimensions",
569
598
  "code": "not-included",
570
599
  "reason": "not listed in api.include",
571
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
600
+ "objectName": "@happyvertical/smrt-ads:AdFormat"
572
601
  },
573
602
  {
574
603
  "kind": "api",
575
- "operation": "findVideo",
604
+ "operation": "matchesDimensions",
576
605
  "code": "not-included",
577
606
  "reason": "not listed in api.include",
578
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
607
+ "objectName": "@happyvertical/smrt-ads:AdFormat"
579
608
  }
580
609
  ],
581
610
  "relationshipFeatures": [
@@ -585,753 +614,969 @@
585
614
  "risks": []
586
615
  },
587
616
  {
588
- "name": "AdGroupCollection",
589
- "qualifiedName": "@happyvertical/smrt-ads:AdGroupCollection",
617
+ "name": "AdGroup",
618
+ "qualifiedName": "@happyvertical/smrt-ads:AdGroup",
619
+ "displayLabelField": "name",
590
620
  "collection": "adgroups",
621
+ "description": "AdGroup organizes ad creatives with targeting and budget controls.",
591
622
  "tableName": "ad_groups",
592
623
  "packageName": "@happyvertical/smrt-ads",
593
- "extends": "SmrtCollection",
594
- "fields": [],
595
- "relationships": [],
596
- "methods": [
597
- "findActive",
598
- "findByContract",
599
- "findByStatus",
600
- "findByTenant",
601
- "findByTier",
602
- "findByVertical",
603
- "findByZone",
604
- "findCompleted",
605
- "findDrafts",
606
- "findEligibleForZone",
607
- "findGlobal",
608
- "findPaused",
609
- "findWithGlobals"
610
- ],
611
- "methodSignatures": [
624
+ "extends": "SmrtObject",
625
+ "fields": [
612
626
  {
613
- "name": "findActive",
614
- "async": true,
615
- "returns": "Promise<AdGroup[]>"
627
+ "name": "created_at",
628
+ "type": "datetime",
629
+ "required": false,
630
+ "columnType": "TIMESTAMP"
616
631
  },
617
632
  {
618
- "name": "findByContract",
619
- "async": true,
620
- "params": [
621
- "contractId: string"
622
- ],
623
- "returns": "Promise<AdGroup[]>"
633
+ "name": "updated_at",
634
+ "type": "datetime",
635
+ "required": false,
636
+ "columnType": "TIMESTAMP"
624
637
  },
625
638
  {
626
- "name": "findByStatus",
627
- "async": true,
628
- "params": [
629
- "status: AdGroupStatus"
630
- ],
631
- "returns": "Promise<AdGroup[]>"
639
+ "name": "tenantId",
640
+ "type": "text",
641
+ "required": false,
642
+ "columnType": "UUID"
632
643
  },
633
644
  {
634
- "name": "findByTenant",
635
- "async": true,
636
- "params": [
637
- "tenantId: string"
638
- ],
639
- "returns": "Promise<AdGroup[]>"
645
+ "name": "contractId",
646
+ "type": "crossPackageRef",
647
+ "required": false,
648
+ "related": "@happyvertical/smrt-commerce:SalesContract",
649
+ "columnType": "UUID",
650
+ "description": "The sales contract this campaign is sold under, if there is one."
640
651
  },
641
652
  {
642
- "name": "findByTier",
643
- "async": true,
644
- "params": [
645
- "tierId: string"
646
- ],
647
- "returns": "Promise<AdGroup[]>"
653
+ "name": "tierId",
654
+ "type": "foreignKey",
655
+ "required": false,
656
+ "related": "AdDeliveryTier",
657
+ "columnType": "UUID",
658
+ "description": "The priority tier the campaign runs in. Tiers are tried in order when more than one campaign could show."
648
659
  },
649
660
  {
650
- "name": "findByVertical",
651
- "async": true,
652
- "params": [
653
- "verticalSlug: string"
654
- ],
655
- "returns": "Promise<AdGroup[]>"
661
+ "name": "name",
662
+ "type": "text",
663
+ "required": false,
664
+ "columnType": "TEXT",
665
+ "default": "",
666
+ "description": "What you call the campaign, for example Summer sale."
656
667
  },
657
668
  {
658
- "name": "findByZone",
659
- "async": true,
660
- "params": [
661
- "zoneId: string"
662
- ],
663
- "returns": "Promise<AdGroup[]>"
669
+ "name": "verticalSlug",
670
+ "type": "text",
671
+ "required": false,
672
+ "columnType": "TEXT",
673
+ "default": "",
674
+ "description": "The category the campaign belongs to, such as retail."
664
675
  },
665
676
  {
666
- "name": "findCompleted",
667
- "async": true,
668
- "returns": "Promise<AdGroup[]>"
677
+ "name": "targeting",
678
+ "type": "text",
679
+ "required": false,
680
+ "columnType": "TEXT",
681
+ "default": ""
669
682
  },
670
683
  {
671
- "name": "findDrafts",
672
- "async": true,
673
- "returns": "Promise<AdGroup[]>"
684
+ "name": "zoneIds",
685
+ "type": "text",
686
+ "required": false,
687
+ "columnType": "TEXT",
688
+ "default": ""
674
689
  },
675
690
  {
676
- "name": "findEligibleForZone",
677
- "async": true,
678
- "params": [
679
- "zoneId: string"
680
- ],
681
- "returns": "Promise<AdGroup[]>"
691
+ "name": "startDate",
692
+ "type": "datetime",
693
+ "required": false,
694
+ "columnType": "TIMESTAMP",
695
+ "description": "The first day the campaign can show."
682
696
  },
683
697
  {
684
- "name": "findGlobal",
685
- "async": true,
686
- "returns": "Promise<AdGroup[]>"
698
+ "name": "endDate",
699
+ "type": "datetime",
700
+ "required": false,
701
+ "columnType": "TIMESTAMP",
702
+ "description": "The last day the campaign can show."
687
703
  },
688
704
  {
689
- "name": "findPaused",
690
- "async": true,
691
- "returns": "Promise<AdGroup[]>"
705
+ "name": "dailyBudget",
706
+ "type": "decimal",
707
+ "required": false,
708
+ "columnType": "REAL",
709
+ "default": 0,
710
+ "description": "The most to spend in one day. The app shows this but does not stop the campaign by itself."
692
711
  },
693
712
  {
694
- "name": "findWithGlobals",
695
- "async": true,
696
- "params": [
697
- "tenantId: string"
698
- ],
699
- "returns": "Promise<AdGroup[]>"
713
+ "name": "totalBudget",
714
+ "type": "decimal",
715
+ "required": false,
716
+ "columnType": "REAL",
717
+ "default": 0,
718
+ "description": "The most to spend over the whole campaign."
719
+ },
720
+ {
721
+ "name": "status",
722
+ "type": "text",
723
+ "required": false,
724
+ "columnType": "TEXT",
725
+ "description": "Where the campaign stands: draft, active, paused or completed. Only active campaigns show ads."
700
726
  }
701
727
  ],
702
- "surfaces": [
728
+ "relationships": [
703
729
  {
704
- "kind": "cli",
705
- "name": "adgroupcollection_findByContract",
706
- "operation": "findByContract",
707
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
730
+ "name": "contractId",
731
+ "type": "crossPackageRef",
732
+ "required": false,
733
+ "related": "@happyvertical/smrt-commerce:SalesContract",
734
+ "columnType": "UUID"
708
735
  },
709
736
  {
710
- "kind": "cli",
711
- "name": "adgroupcollection_findByTier",
712
- "operation": "findByTier",
713
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
737
+ "name": "tierId",
738
+ "type": "foreignKey",
739
+ "required": false,
740
+ "related": "AdDeliveryTier",
741
+ "columnType": "UUID"
742
+ }
743
+ ],
744
+ "methods": [
745
+ "addZoneId",
746
+ "getTargeting",
747
+ "getZoneIds",
748
+ "hasEnded",
749
+ "hasStarted",
750
+ "hasZoneId",
751
+ "isActive",
752
+ "isCompleted",
753
+ "isDraft",
754
+ "isPaused",
755
+ "removeZoneId",
756
+ "setTargeting",
757
+ "setZoneIds"
758
+ ],
759
+ "methodSignatures": [
760
+ {
761
+ "name": "addZoneId",
762
+ "params": [
763
+ "zoneId: string"
764
+ ],
765
+ "returns": "void"
714
766
  },
715
767
  {
716
- "kind": "cli",
717
- "name": "adgroupcollection_findByStatus",
718
- "operation": "findByStatus",
719
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
768
+ "name": "getTargeting",
769
+ "returns": "Record<string, unknown>"
720
770
  },
721
771
  {
722
- "kind": "cli",
723
- "name": "adgroupcollection_findActive",
724
- "operation": "findActive",
725
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
772
+ "name": "getZoneIds",
773
+ "returns": "string[]"
726
774
  },
727
775
  {
728
- "kind": "cli",
729
- "name": "adgroupcollection_findByVertical",
730
- "operation": "findByVertical",
731
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
776
+ "name": "hasEnded",
777
+ "returns": "boolean"
732
778
  },
733
779
  {
734
- "kind": "cli",
735
- "name": "adgroupcollection_findByZone",
736
- "operation": "findByZone",
737
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
780
+ "name": "hasStarted",
781
+ "returns": "boolean"
738
782
  },
739
783
  {
740
- "kind": "cli",
741
- "name": "adgroupcollection_findEligibleForZone",
742
- "operation": "findEligibleForZone",
743
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
784
+ "name": "hasZoneId",
785
+ "params": [
786
+ "zoneId: string"
787
+ ],
788
+ "returns": "boolean"
744
789
  },
745
790
  {
746
- "kind": "cli",
747
- "name": "adgroupcollection_findDrafts",
748
- "operation": "findDrafts",
749
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
791
+ "name": "isActive",
792
+ "returns": "boolean"
750
793
  },
751
794
  {
752
- "kind": "cli",
753
- "name": "adgroupcollection_findPaused",
754
- "operation": "findPaused",
755
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
795
+ "name": "isCompleted",
796
+ "returns": "boolean"
756
797
  },
757
798
  {
758
- "kind": "cli",
759
- "name": "adgroupcollection_findCompleted",
760
- "operation": "findCompleted",
761
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
799
+ "name": "isDraft",
800
+ "returns": "boolean"
762
801
  },
763
802
  {
764
- "kind": "cli",
765
- "name": "adgroupcollection_findByTenant",
766
- "operation": "findByTenant",
767
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
803
+ "name": "isPaused",
804
+ "returns": "boolean"
768
805
  },
769
806
  {
770
- "kind": "cli",
771
- "name": "adgroupcollection_findGlobal",
772
- "operation": "findGlobal",
773
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
807
+ "name": "removeZoneId",
808
+ "params": [
809
+ "zoneId: string"
810
+ ],
811
+ "returns": "void"
774
812
  },
775
813
  {
776
- "kind": "cli",
777
- "name": "adgroupcollection_findWithGlobals",
778
- "operation": "findWithGlobals",
779
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
814
+ "name": "setTargeting",
815
+ "params": [
816
+ "rules: Record<string, unknown>"
817
+ ],
818
+ "returns": "void"
819
+ },
820
+ {
821
+ "name": "setZoneIds",
822
+ "params": [
823
+ "ids: string[]"
824
+ ],
825
+ "returns": "void"
780
826
  }
781
827
  ],
782
- "withheldSurfaces": [
828
+ "tenant": {
829
+ "scoped": true,
830
+ "mode": "optional",
831
+ "field": "tenantId"
832
+ },
833
+ "tableStrategy": "sti",
834
+ "conflictColumns": [
835
+ "tenant_id",
836
+ "slug",
837
+ "context",
838
+ "_meta_type"
839
+ ],
840
+ "surfaces": [
783
841
  {
784
842
  "kind": "api",
785
- "operation": "findActive",
786
- "code": "not-included",
787
- "reason": "not listed in api.include",
788
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
843
+ "name": "adgroups.list",
844
+ "operation": "list",
845
+ "objectName": "@happyvertical/smrt-ads:AdGroup",
846
+ "path": "/adgroups",
847
+ "method": "GET"
789
848
  },
790
849
  {
791
850
  "kind": "api",
792
- "operation": "findByContract",
793
- "code": "not-included",
794
- "reason": "not listed in api.include",
795
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
851
+ "name": "adgroups.get",
852
+ "operation": "get",
853
+ "objectName": "@happyvertical/smrt-ads:AdGroup",
854
+ "path": "/adgroups/[id]",
855
+ "method": "GET"
796
856
  },
797
857
  {
798
858
  "kind": "api",
799
- "operation": "findByStatus",
800
- "code": "not-included",
859
+ "name": "adgroups.create",
860
+ "operation": "create",
861
+ "objectName": "@happyvertical/smrt-ads:AdGroup",
862
+ "path": "/adgroups",
863
+ "method": "POST"
864
+ },
865
+ {
866
+ "kind": "api",
867
+ "name": "adgroups.update",
868
+ "operation": "update",
869
+ "objectName": "@happyvertical/smrt-ads:AdGroup",
870
+ "path": "/adgroups/[id]",
871
+ "method": "PATCH"
872
+ },
873
+ {
874
+ "kind": "cli",
875
+ "name": "adgroup_list",
876
+ "operation": "list",
877
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
878
+ },
879
+ {
880
+ "kind": "cli",
881
+ "name": "adgroup_get",
882
+ "operation": "get",
883
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
884
+ },
885
+ {
886
+ "kind": "cli",
887
+ "name": "adgroup_create",
888
+ "operation": "create",
889
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
890
+ },
891
+ {
892
+ "kind": "cli",
893
+ "name": "adgroup_update",
894
+ "operation": "update",
895
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
896
+ },
897
+ {
898
+ "kind": "cli",
899
+ "name": "adgroup_delete",
900
+ "operation": "delete",
901
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
902
+ },
903
+ {
904
+ "kind": "cli",
905
+ "name": "adgroup_getZoneIds",
906
+ "operation": "getZoneIds",
907
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
908
+ },
909
+ {
910
+ "kind": "cli",
911
+ "name": "adgroup_setZoneIds",
912
+ "operation": "setZoneIds",
913
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
914
+ },
915
+ {
916
+ "kind": "cli",
917
+ "name": "adgroup_addZoneId",
918
+ "operation": "addZoneId",
919
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
920
+ },
921
+ {
922
+ "kind": "cli",
923
+ "name": "adgroup_removeZoneId",
924
+ "operation": "removeZoneId",
925
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
926
+ },
927
+ {
928
+ "kind": "cli",
929
+ "name": "adgroup_hasZoneId",
930
+ "operation": "hasZoneId",
931
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
932
+ },
933
+ {
934
+ "kind": "cli",
935
+ "name": "adgroup_getTargeting",
936
+ "operation": "getTargeting",
937
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
938
+ },
939
+ {
940
+ "kind": "cli",
941
+ "name": "adgroup_setTargeting",
942
+ "operation": "setTargeting",
943
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
944
+ },
945
+ {
946
+ "kind": "cli",
947
+ "name": "adgroup_isActive",
948
+ "operation": "isActive",
949
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
950
+ },
951
+ {
952
+ "kind": "cli",
953
+ "name": "adgroup_isDraft",
954
+ "operation": "isDraft",
955
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
956
+ },
957
+ {
958
+ "kind": "cli",
959
+ "name": "adgroup_isPaused",
960
+ "operation": "isPaused",
961
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
962
+ },
963
+ {
964
+ "kind": "cli",
965
+ "name": "adgroup_isCompleted",
966
+ "operation": "isCompleted",
967
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
968
+ },
969
+ {
970
+ "kind": "cli",
971
+ "name": "adgroup_hasEnded",
972
+ "operation": "hasEnded",
973
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
974
+ },
975
+ {
976
+ "kind": "cli",
977
+ "name": "adgroup_hasStarted",
978
+ "operation": "hasStarted",
979
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
980
+ },
981
+ {
982
+ "kind": "mcp",
983
+ "name": "adgroup_list",
984
+ "operation": "list",
985
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
986
+ },
987
+ {
988
+ "kind": "mcp",
989
+ "name": "adgroup_get",
990
+ "operation": "get",
991
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
992
+ },
993
+ {
994
+ "kind": "mcp",
995
+ "name": "adgroup_create",
996
+ "operation": "create",
997
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
998
+ }
999
+ ],
1000
+ "withheldSurfaces": [
1001
+ {
1002
+ "kind": "api",
1003
+ "operation": "addZoneId",
1004
+ "code": "not-included",
801
1005
  "reason": "not listed in api.include",
802
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1006
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
803
1007
  },
804
1008
  {
805
1009
  "kind": "api",
806
- "operation": "findByTenant",
1010
+ "operation": "getTargeting",
807
1011
  "code": "not-included",
808
1012
  "reason": "not listed in api.include",
809
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1013
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
810
1014
  },
811
1015
  {
812
1016
  "kind": "api",
813
- "operation": "findByTier",
1017
+ "operation": "getZoneIds",
814
1018
  "code": "not-included",
815
1019
  "reason": "not listed in api.include",
816
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1020
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
817
1021
  },
818
1022
  {
819
1023
  "kind": "api",
820
- "operation": "findByVertical",
1024
+ "operation": "hasEnded",
821
1025
  "code": "not-included",
822
1026
  "reason": "not listed in api.include",
823
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1027
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
824
1028
  },
825
1029
  {
826
1030
  "kind": "api",
827
- "operation": "findByZone",
1031
+ "operation": "hasStarted",
828
1032
  "code": "not-included",
829
1033
  "reason": "not listed in api.include",
830
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1034
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
831
1035
  },
832
1036
  {
833
1037
  "kind": "api",
834
- "operation": "findCompleted",
1038
+ "operation": "hasZoneId",
835
1039
  "code": "not-included",
836
1040
  "reason": "not listed in api.include",
837
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1041
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
838
1042
  },
839
1043
  {
840
1044
  "kind": "api",
841
- "operation": "findDrafts",
1045
+ "operation": "isActive",
842
1046
  "code": "not-included",
843
1047
  "reason": "not listed in api.include",
844
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1048
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
845
1049
  },
846
1050
  {
847
1051
  "kind": "api",
848
- "operation": "findEligibleForZone",
1052
+ "operation": "isCompleted",
849
1053
  "code": "not-included",
850
1054
  "reason": "not listed in api.include",
851
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1055
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
852
1056
  },
853
1057
  {
854
1058
  "kind": "api",
855
- "operation": "findGlobal",
1059
+ "operation": "isDraft",
856
1060
  "code": "not-included",
857
1061
  "reason": "not listed in api.include",
858
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1062
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
859
1063
  },
860
1064
  {
861
1065
  "kind": "api",
862
- "operation": "findPaused",
1066
+ "operation": "isPaused",
863
1067
  "code": "not-included",
864
1068
  "reason": "not listed in api.include",
865
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1069
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
866
1070
  },
867
1071
  {
868
1072
  "kind": "api",
869
- "operation": "findWithGlobals",
1073
+ "operation": "removeZoneId",
870
1074
  "code": "not-included",
871
1075
  "reason": "not listed in api.include",
872
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1076
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
1077
+ },
1078
+ {
1079
+ "kind": "api",
1080
+ "operation": "setTargeting",
1081
+ "code": "not-included",
1082
+ "reason": "not listed in api.include",
1083
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
1084
+ },
1085
+ {
1086
+ "kind": "api",
1087
+ "operation": "setZoneIds",
1088
+ "code": "not-included",
1089
+ "reason": "not listed in api.include",
1090
+ "objectName": "@happyvertical/smrt-ads:AdGroup"
873
1091
  }
874
1092
  ],
875
1093
  "relationshipFeatures": [
1094
+ "crossPackageRef",
1095
+ "foreignKey",
876
1096
  "uuidColumns"
877
1097
  ],
878
1098
  "tags": [],
879
1099
  "risks": []
880
1100
  },
881
1101
  {
882
- "name": "AdVariationCollection",
883
- "qualifiedName": "@happyvertical/smrt-ads:AdVariationCollection",
1102
+ "name": "AdVariation",
1103
+ "qualifiedName": "@happyvertical/smrt-ads:AdVariation",
1104
+ "displayLabelField": "name",
884
1105
  "collection": "advariations",
1106
+ "description": "AdVariation represents a creative asset within an ad group. Supports A/B testing via weighted selection.",
885
1107
  "tableName": "ad_variations",
886
1108
  "packageName": "@happyvertical/smrt-ads",
887
- "extends": "SmrtCollection",
888
- "fields": [],
889
- "relationships": [],
890
- "methods": [
891
- "findActive",
892
- "findActiveByGroup",
893
- "findByFormat",
894
- "findByGroup",
895
- "findByStatus",
896
- "findByTenant",
897
- "findDrafts",
898
- "findGlobal",
899
- "findPaused",
900
- "findTopPerformers",
901
- "findWithGlobals",
902
- "selectByWeight"
903
- ],
904
- "methodSignatures": [
905
- {
906
- "name": "findActive",
907
- "async": true,
908
- "returns": "Promise<AdVariation[]>"
909
- },
1109
+ "extends": "SmrtObject",
1110
+ "fields": [
910
1111
  {
911
- "name": "findActiveByGroup",
912
- "async": true,
913
- "params": [
914
- "groupId: string"
915
- ],
916
- "returns": "Promise<AdVariation[]>"
1112
+ "name": "created_at",
1113
+ "type": "datetime",
1114
+ "required": false,
1115
+ "columnType": "TIMESTAMP"
917
1116
  },
918
1117
  {
919
- "name": "findByFormat",
920
- "async": true,
921
- "params": [
922
- "formatId: string"
923
- ],
924
- "returns": "Promise<AdVariation[]>"
1118
+ "name": "updated_at",
1119
+ "type": "datetime",
1120
+ "required": false,
1121
+ "columnType": "TIMESTAMP"
925
1122
  },
926
1123
  {
927
- "name": "findByGroup",
928
- "async": true,
929
- "params": [
930
- "groupId: string"
931
- ],
932
- "returns": "Promise<AdVariation[]>"
1124
+ "name": "tenantId",
1125
+ "type": "text",
1126
+ "required": false,
1127
+ "columnType": "UUID"
933
1128
  },
934
1129
  {
935
- "name": "findByStatus",
936
- "async": true,
937
- "params": [
938
- "status: AdVariationStatus"
939
- ],
940
- "returns": "Promise<AdVariation[]>"
1130
+ "name": "groupId",
1131
+ "type": "foreignKey",
1132
+ "required": false,
1133
+ "related": "AdGroup",
1134
+ "columnType": "UUID",
1135
+ "description": "The campaign this ad belongs to."
941
1136
  },
942
1137
  {
943
- "name": "findByTenant",
944
- "async": true,
945
- "params": [
946
- "tenantId: string"
947
- ],
948
- "returns": "Promise<AdVariation[]>"
1138
+ "name": "formatId",
1139
+ "type": "foreignKey",
1140
+ "required": false,
1141
+ "related": "AdFormat",
1142
+ "columnType": "UUID",
1143
+ "description": "The ad size this ad is made for."
949
1144
  },
950
1145
  {
951
- "name": "findDrafts",
952
- "async": true,
953
- "returns": "Promise<AdVariation[]>"
1146
+ "name": "assetId",
1147
+ "type": "crossPackageRef",
1148
+ "required": false,
1149
+ "related": "@happyvertical/smrt-assets:Asset",
1150
+ "columnType": "UUID",
1151
+ "description": "The picture people see."
954
1152
  },
955
1153
  {
956
- "name": "findGlobal",
957
- "async": true,
958
- "returns": "Promise<AdVariation[]>"
1154
+ "name": "name",
1155
+ "type": "text",
1156
+ "required": false,
1157
+ "columnType": "TEXT",
1158
+ "default": "",
1159
+ "description": "What you call this ad, for example Version A, blue button."
959
1160
  },
960
1161
  {
961
- "name": "findPaused",
962
- "async": true,
963
- "returns": "Promise<AdVariation[]>"
1162
+ "name": "clickUrl",
1163
+ "type": "text",
1164
+ "required": false,
1165
+ "columnType": "TEXT",
1166
+ "default": "",
1167
+ "description": "The web address people go to when they tap the ad."
964
1168
  },
965
1169
  {
966
- "name": "findTopPerformers",
967
- "async": true,
968
- "params": [
969
- "limit?: number"
970
- ],
971
- "returns": "Promise<AdVariation[]>"
1170
+ "name": "altText",
1171
+ "type": "text",
1172
+ "required": false,
1173
+ "columnType": "TEXT",
1174
+ "default": "",
1175
+ "description": "A few words that describe the picture for people who cannot see it."
972
1176
  },
973
1177
  {
974
- "name": "findWithGlobals",
975
- "async": true,
976
- "params": [
977
- "tenantId: string"
978
- ],
979
- "returns": "Promise<AdVariation[]>"
1178
+ "name": "weight",
1179
+ "type": "integer",
1180
+ "required": false,
1181
+ "columnType": "INTEGER",
1182
+ "default": 1,
1183
+ "description": "How often this ad shows compared with the others in its campaign: an ad with weight 2 shows twice as often as one with weight 1."
980
1184
  },
981
1185
  {
982
- "name": "selectByWeight",
983
- "async": true,
984
- "params": [
985
- "groupId: string"
986
- ],
987
- "returns": "Promise<AdVariation | null>"
988
- }
989
- ],
990
- "surfaces": [
991
- {
992
- "kind": "cli",
993
- "name": "advariationcollection_findByGroup",
994
- "operation": "findByGroup",
995
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1186
+ "name": "status",
1187
+ "type": "text",
1188
+ "required": false,
1189
+ "columnType": "TEXT",
1190
+ "description": "Where the ad stands: draft, active or paused. Only active ads show."
996
1191
  },
997
1192
  {
998
- "kind": "cli",
999
- "name": "advariationcollection_findByFormat",
1000
- "operation": "findByFormat",
1001
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1193
+ "name": "impressions",
1194
+ "type": "integer",
1195
+ "required": false,
1196
+ "columnType": "INTEGER",
1197
+ "default": 0,
1198
+ "description": "How many times the ad has been shown. The app counts this as it serves ads and refreshes it a little later."
1002
1199
  },
1003
1200
  {
1004
- "kind": "cli",
1005
- "name": "advariationcollection_findActiveByGroup",
1006
- "operation": "findActiveByGroup",
1007
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1008
- },
1201
+ "name": "clicks",
1202
+ "type": "integer",
1203
+ "required": false,
1204
+ "columnType": "INTEGER",
1205
+ "default": 0,
1206
+ "description": "How many times the ad has been tapped. The app counts this as it serves ads and refreshes it a little later."
1207
+ }
1208
+ ],
1209
+ "relationships": [
1009
1210
  {
1010
- "kind": "cli",
1011
- "name": "advariationcollection_selectByWeight",
1012
- "operation": "selectByWeight",
1013
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1211
+ "name": "groupId",
1212
+ "type": "foreignKey",
1213
+ "required": false,
1214
+ "related": "AdGroup",
1215
+ "columnType": "UUID"
1014
1216
  },
1015
1217
  {
1016
- "kind": "cli",
1017
- "name": "advariationcollection_findByStatus",
1018
- "operation": "findByStatus",
1019
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1218
+ "name": "formatId",
1219
+ "type": "foreignKey",
1220
+ "required": false,
1221
+ "related": "AdFormat",
1222
+ "columnType": "UUID"
1020
1223
  },
1021
1224
  {
1022
- "kind": "cli",
1023
- "name": "advariationcollection_findActive",
1024
- "operation": "findActive",
1025
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1026
- },
1225
+ "name": "assetId",
1226
+ "type": "crossPackageRef",
1227
+ "required": false,
1228
+ "related": "@happyvertical/smrt-assets:Asset",
1229
+ "columnType": "UUID"
1230
+ }
1231
+ ],
1232
+ "methods": [
1233
+ "getCTR",
1234
+ "isActive",
1235
+ "isDraft",
1236
+ "isPaused",
1237
+ "recordClick",
1238
+ "recordImpression"
1239
+ ],
1240
+ "methodSignatures": [
1027
1241
  {
1028
- "kind": "cli",
1029
- "name": "advariationcollection_findDrafts",
1030
- "operation": "findDrafts",
1031
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1242
+ "name": "getCTR",
1243
+ "returns": "number"
1032
1244
  },
1033
1245
  {
1034
- "kind": "cli",
1035
- "name": "advariationcollection_findPaused",
1036
- "operation": "findPaused",
1037
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1246
+ "name": "isActive",
1247
+ "returns": "boolean"
1038
1248
  },
1039
1249
  {
1040
- "kind": "cli",
1041
- "name": "advariationcollection_findTopPerformers",
1042
- "operation": "findTopPerformers",
1043
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1250
+ "name": "isDraft",
1251
+ "returns": "boolean"
1044
1252
  },
1045
1253
  {
1046
- "kind": "cli",
1047
- "name": "advariationcollection_findByTenant",
1048
- "operation": "findByTenant",
1049
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1254
+ "name": "isPaused",
1255
+ "returns": "boolean"
1050
1256
  },
1051
1257
  {
1052
- "kind": "cli",
1053
- "name": "advariationcollection_findGlobal",
1054
- "operation": "findGlobal",
1055
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1258
+ "name": "recordClick",
1259
+ "returns": "void"
1056
1260
  },
1057
1261
  {
1058
- "kind": "cli",
1059
- "name": "advariationcollection_findWithGlobals",
1060
- "operation": "findWithGlobals",
1061
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1262
+ "name": "recordImpression",
1263
+ "returns": "void"
1062
1264
  }
1063
1265
  ],
1064
- "withheldSurfaces": [
1266
+ "tenant": {
1267
+ "scoped": true,
1268
+ "mode": "optional",
1269
+ "field": "tenantId"
1270
+ },
1271
+ "tableStrategy": "sti",
1272
+ "conflictColumns": [
1273
+ "tenant_id",
1274
+ "slug",
1275
+ "context",
1276
+ "_meta_type"
1277
+ ],
1278
+ "surfaces": [
1065
1279
  {
1066
1280
  "kind": "api",
1067
- "operation": "findActive",
1068
- "code": "not-included",
1069
- "reason": "not listed in api.include",
1070
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1281
+ "name": "advariations.list",
1282
+ "operation": "list",
1283
+ "objectName": "@happyvertical/smrt-ads:AdVariation",
1284
+ "path": "/advariations",
1285
+ "method": "GET"
1071
1286
  },
1072
1287
  {
1073
1288
  "kind": "api",
1074
- "operation": "findActiveByGroup",
1075
- "code": "not-included",
1076
- "reason": "not listed in api.include",
1077
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1289
+ "name": "advariations.get",
1290
+ "operation": "get",
1291
+ "objectName": "@happyvertical/smrt-ads:AdVariation",
1292
+ "path": "/advariations/[id]",
1293
+ "method": "GET"
1078
1294
  },
1079
1295
  {
1080
1296
  "kind": "api",
1081
- "operation": "findByFormat",
1082
- "code": "not-included",
1083
- "reason": "not listed in api.include",
1084
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1297
+ "name": "advariations.create",
1298
+ "operation": "create",
1299
+ "objectName": "@happyvertical/smrt-ads:AdVariation",
1300
+ "path": "/advariations",
1301
+ "method": "POST"
1085
1302
  },
1086
1303
  {
1087
1304
  "kind": "api",
1088
- "operation": "findByGroup",
1089
- "code": "not-included",
1090
- "reason": "not listed in api.include",
1091
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1305
+ "name": "advariations.update",
1306
+ "operation": "update",
1307
+ "objectName": "@happyvertical/smrt-ads:AdVariation",
1308
+ "path": "/advariations/[id]",
1309
+ "method": "PATCH"
1092
1310
  },
1093
1311
  {
1094
- "kind": "api",
1095
- "operation": "findByStatus",
1096
- "code": "not-included",
1097
- "reason": "not listed in api.include",
1098
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1312
+ "kind": "cli",
1313
+ "name": "advariation_list",
1314
+ "operation": "list",
1315
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1099
1316
  },
1100
1317
  {
1101
- "kind": "api",
1102
- "operation": "findByTenant",
1103
- "code": "not-included",
1104
- "reason": "not listed in api.include",
1105
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1318
+ "kind": "cli",
1319
+ "name": "advariation_get",
1320
+ "operation": "get",
1321
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1322
+ },
1323
+ {
1324
+ "kind": "cli",
1325
+ "name": "advariation_create",
1326
+ "operation": "create",
1327
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1328
+ },
1329
+ {
1330
+ "kind": "cli",
1331
+ "name": "advariation_update",
1332
+ "operation": "update",
1333
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1334
+ },
1335
+ {
1336
+ "kind": "cli",
1337
+ "name": "advariation_delete",
1338
+ "operation": "delete",
1339
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1340
+ },
1341
+ {
1342
+ "kind": "cli",
1343
+ "name": "advariation_isActive",
1344
+ "operation": "isActive",
1345
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1346
+ },
1347
+ {
1348
+ "kind": "cli",
1349
+ "name": "advariation_isDraft",
1350
+ "operation": "isDraft",
1351
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1352
+ },
1353
+ {
1354
+ "kind": "cli",
1355
+ "name": "advariation_isPaused",
1356
+ "operation": "isPaused",
1357
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1358
+ },
1359
+ {
1360
+ "kind": "cli",
1361
+ "name": "advariation_getCTR",
1362
+ "operation": "getCTR",
1363
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1364
+ },
1365
+ {
1366
+ "kind": "cli",
1367
+ "name": "advariation_recordImpression",
1368
+ "operation": "recordImpression",
1369
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1370
+ },
1371
+ {
1372
+ "kind": "cli",
1373
+ "name": "advariation_recordClick",
1374
+ "operation": "recordClick",
1375
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1376
+ },
1377
+ {
1378
+ "kind": "mcp",
1379
+ "name": "advariation_list",
1380
+ "operation": "list",
1381
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1382
+ },
1383
+ {
1384
+ "kind": "mcp",
1385
+ "name": "advariation_get",
1386
+ "operation": "get",
1387
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1106
1388
  },
1389
+ {
1390
+ "kind": "mcp",
1391
+ "name": "advariation_create",
1392
+ "operation": "create",
1393
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1394
+ }
1395
+ ],
1396
+ "withheldSurfaces": [
1107
1397
  {
1108
1398
  "kind": "api",
1109
- "operation": "findDrafts",
1399
+ "operation": "getCTR",
1110
1400
  "code": "not-included",
1111
1401
  "reason": "not listed in api.include",
1112
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1402
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1113
1403
  },
1114
1404
  {
1115
1405
  "kind": "api",
1116
- "operation": "findGlobal",
1406
+ "operation": "isActive",
1117
1407
  "code": "not-included",
1118
1408
  "reason": "not listed in api.include",
1119
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1409
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1120
1410
  },
1121
1411
  {
1122
1412
  "kind": "api",
1123
- "operation": "findPaused",
1413
+ "operation": "isDraft",
1124
1414
  "code": "not-included",
1125
1415
  "reason": "not listed in api.include",
1126
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1416
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1127
1417
  },
1128
1418
  {
1129
1419
  "kind": "api",
1130
- "operation": "findTopPerformers",
1420
+ "operation": "isPaused",
1131
1421
  "code": "not-included",
1132
1422
  "reason": "not listed in api.include",
1133
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1423
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1134
1424
  },
1135
1425
  {
1136
1426
  "kind": "api",
1137
- "operation": "findWithGlobals",
1427
+ "operation": "recordClick",
1138
1428
  "code": "not-included",
1139
1429
  "reason": "not listed in api.include",
1140
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1430
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1141
1431
  },
1142
1432
  {
1143
1433
  "kind": "api",
1144
- "operation": "selectByWeight",
1434
+ "operation": "recordImpression",
1145
1435
  "code": "not-included",
1146
1436
  "reason": "not listed in api.include",
1147
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
1437
+ "objectName": "@happyvertical/smrt-ads:AdVariation"
1148
1438
  }
1149
1439
  ],
1150
1440
  "relationshipFeatures": [
1441
+ "crossPackageRef",
1442
+ "foreignKey",
1151
1443
  "uuidColumns"
1152
1444
  ],
1153
1445
  "tags": [],
1154
1446
  "risks": []
1155
1447
  },
1156
1448
  {
1157
- "name": "AdDeliveryTier",
1158
- "qualifiedName": "@happyvertical/smrt-ads:AdDeliveryTier",
1159
- "displayLabelField": "name",
1449
+ "name": "AdDeliveryTierCollection",
1450
+ "qualifiedName": "@happyvertical/smrt-ads:AdDeliveryTierCollection",
1160
1451
  "collection": "addeliverytiers",
1161
1452
  "tableName": "ad_delivery_tiers",
1162
1453
  "packageName": "@happyvertical/smrt-ads",
1163
- "extends": "SmrtObject",
1164
- "fields": [
1165
- {
1166
- "name": "name",
1167
- "type": "text",
1168
- "required": false,
1169
- "columnType": "TEXT",
1170
- "default": "",
1171
- "description": "What the tier is called, for example Sponsorship, Standard or House."
1172
- },
1173
- {
1174
- "name": "priority",
1175
- "type": "integer",
1176
- "required": false,
1177
- "columnType": "INTEGER",
1178
- "default": 0,
1179
- "description": "The order tiers are tried in: 1 is tried first, then 2, and so on."
1180
- },
1181
- {
1182
- "name": "pricingModel",
1183
- "type": "text",
1184
- "required": false,
1185
- "columnType": "TEXT",
1186
- "description": "How ads in this tier are charged: a fixed price, per thousand showings, per click, or per sale."
1187
- },
1188
- {
1189
- "name": "description",
1190
- "type": "text",
1191
- "required": false,
1192
- "columnType": "TEXT",
1193
- "default": "",
1194
- "description": "A note about what this tier is for."
1195
- }
1196
- ],
1454
+ "extends": "SmrtCollection",
1455
+ "fields": [],
1197
1456
  "relationships": [],
1198
1457
  "methods": [
1199
- "isFixedPricing",
1200
- "isHigherPriorityThan",
1201
- "isPerformanceBased"
1458
+ "findByPricingModel",
1459
+ "findByPriority",
1460
+ "findCPM",
1461
+ "findFixedPricing",
1462
+ "findPerformanceBased",
1463
+ "getHighestPriority"
1202
1464
  ],
1203
1465
  "methodSignatures": [
1204
1466
  {
1205
- "name": "isFixedPricing",
1206
- "returns": "boolean"
1207
- },
1208
- {
1209
- "name": "isHigherPriorityThan",
1467
+ "name": "findByPricingModel",
1468
+ "async": true,
1210
1469
  "params": [
1211
- "other: AdDeliveryTier"
1470
+ "pricingModel: PricingModel"
1212
1471
  ],
1213
- "returns": "boolean"
1472
+ "returns": "Promise<AdDeliveryTier[]>"
1214
1473
  },
1215
1474
  {
1216
- "name": "isPerformanceBased",
1217
- "returns": "boolean"
1218
- }
1219
- ],
1220
- "surfaces": [
1221
- {
1222
- "kind": "api",
1223
- "name": "addeliverytiers.list",
1224
- "operation": "list",
1225
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier",
1226
- "path": "/addeliverytiers",
1227
- "method": "GET"
1475
+ "name": "findByPriority",
1476
+ "async": true,
1477
+ "returns": "Promise<AdDeliveryTier[]>"
1228
1478
  },
1229
1479
  {
1230
- "kind": "api",
1231
- "name": "addeliverytiers.get",
1232
- "operation": "get",
1233
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier",
1234
- "path": "/addeliverytiers/[id]",
1235
- "method": "GET"
1480
+ "name": "findCPM",
1481
+ "async": true,
1482
+ "returns": "Promise<AdDeliveryTier[]>"
1236
1483
  },
1237
1484
  {
1238
- "kind": "api",
1239
- "name": "addeliverytiers.create",
1240
- "operation": "create",
1241
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier",
1242
- "path": "/addeliverytiers",
1243
- "method": "POST"
1485
+ "name": "findFixedPricing",
1486
+ "async": true,
1487
+ "returns": "Promise<AdDeliveryTier[]>"
1244
1488
  },
1245
1489
  {
1246
- "kind": "api",
1247
- "name": "addeliverytiers.update",
1248
- "operation": "update",
1249
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier",
1250
- "path": "/addeliverytiers/[id]",
1251
- "method": "PATCH"
1490
+ "name": "findPerformanceBased",
1491
+ "async": true,
1492
+ "returns": "Promise<AdDeliveryTier[]>"
1252
1493
  },
1494
+ {
1495
+ "name": "getHighestPriority",
1496
+ "async": true,
1497
+ "returns": "Promise<AdDeliveryTier | null>"
1498
+ }
1499
+ ],
1500
+ "surfaces": [
1253
1501
  {
1254
1502
  "kind": "cli",
1255
- "name": "addeliverytier_list",
1256
- "operation": "list",
1257
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1503
+ "name": "addeliverytiercollection_findByPriority",
1504
+ "operation": "findByPriority",
1505
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1258
1506
  },
1259
1507
  {
1260
1508
  "kind": "cli",
1261
- "name": "addeliverytier_get",
1262
- "operation": "get",
1263
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1509
+ "name": "addeliverytiercollection_findByPricingModel",
1510
+ "operation": "findByPricingModel",
1511
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1264
1512
  },
1265
1513
  {
1266
1514
  "kind": "cli",
1267
- "name": "addeliverytier_create",
1268
- "operation": "create",
1269
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1515
+ "name": "addeliverytiercollection_getHighestPriority",
1516
+ "operation": "getHighestPriority",
1517
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1270
1518
  },
1271
1519
  {
1272
1520
  "kind": "cli",
1273
- "name": "addeliverytier_update",
1274
- "operation": "update",
1275
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1521
+ "name": "addeliverytiercollection_findFixedPricing",
1522
+ "operation": "findFixedPricing",
1523
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1276
1524
  },
1277
1525
  {
1278
1526
  "kind": "cli",
1279
- "name": "addeliverytier_delete",
1280
- "operation": "delete",
1281
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1527
+ "name": "addeliverytiercollection_findCPM",
1528
+ "operation": "findCPM",
1529
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1282
1530
  },
1283
1531
  {
1284
1532
  "kind": "cli",
1285
- "name": "addeliverytier_isHigherPriorityThan",
1286
- "operation": "isHigherPriorityThan",
1287
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1288
- },
1533
+ "name": "addeliverytiercollection_findPerformanceBased",
1534
+ "operation": "findPerformanceBased",
1535
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1536
+ }
1537
+ ],
1538
+ "withheldSurfaces": [
1289
1539
  {
1290
- "kind": "cli",
1291
- "name": "addeliverytier_isFixedPricing",
1292
- "operation": "isFixedPricing",
1293
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1540
+ "kind": "api",
1541
+ "operation": "findByPricingModel",
1542
+ "code": "not-included",
1543
+ "reason": "not listed in api.include",
1544
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1294
1545
  },
1295
1546
  {
1296
- "kind": "cli",
1297
- "name": "addeliverytier_isPerformanceBased",
1298
- "operation": "isPerformanceBased",
1299
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1547
+ "kind": "api",
1548
+ "operation": "findByPriority",
1549
+ "code": "not-included",
1550
+ "reason": "not listed in api.include",
1551
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1300
1552
  },
1301
1553
  {
1302
- "kind": "mcp",
1303
- "name": "addeliverytier_list",
1304
- "operation": "list",
1305
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1554
+ "kind": "api",
1555
+ "operation": "findCPM",
1556
+ "code": "not-included",
1557
+ "reason": "not listed in api.include",
1558
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1306
1559
  },
1307
- {
1308
- "kind": "mcp",
1309
- "name": "addeliverytier_get",
1310
- "operation": "get",
1311
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1312
- }
1313
- ],
1314
- "withheldSurfaces": [
1315
1560
  {
1316
1561
  "kind": "api",
1317
- "operation": "isFixedPricing",
1562
+ "operation": "findFixedPricing",
1318
1563
  "code": "not-included",
1319
1564
  "reason": "not listed in api.include",
1320
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1565
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1321
1566
  },
1322
1567
  {
1323
1568
  "kind": "api",
1324
- "operation": "isHigherPriorityThan",
1569
+ "operation": "findPerformanceBased",
1325
1570
  "code": "not-included",
1326
1571
  "reason": "not listed in api.include",
1327
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1572
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1328
1573
  },
1329
1574
  {
1330
1575
  "kind": "api",
1331
- "operation": "isPerformanceBased",
1576
+ "operation": "getHighestPriority",
1332
1577
  "code": "not-included",
1333
1578
  "reason": "not listed in api.include",
1334
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTier"
1579
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
1335
1580
  }
1336
1581
  ],
1337
1582
  "relationshipFeatures": [
@@ -1341,372 +1586,390 @@
1341
1586
  "risks": []
1342
1587
  },
1343
1588
  {
1344
- "name": "AdEvent",
1345
- "qualifiedName": "@happyvertical/smrt-ads:AdEvent",
1589
+ "name": "AdEventCollection",
1590
+ "qualifiedName": "@happyvertical/smrt-ads:AdEventCollection",
1346
1591
  "collection": "adevents",
1347
- "description": "AdEvent tracks ad impressions, clicks, and conversions. Events are immutable (append-only, no update/delete).",
1348
1592
  "tableName": "ad_events",
1349
1593
  "packageName": "@happyvertical/smrt-ads",
1350
- "extends": "SmrtObject",
1351
- "fields": [
1594
+ "extends": "SmrtCollection",
1595
+ "fields": [],
1596
+ "relationships": [],
1597
+ "methods": [
1598
+ "countByType",
1599
+ "countClicks",
1600
+ "countConversions",
1601
+ "countImpressions",
1602
+ "findByDateRange",
1603
+ "findBySite",
1604
+ "findByTenant",
1605
+ "findByType",
1606
+ "findByVariation",
1607
+ "findByZone",
1608
+ "findClicks",
1609
+ "findConversions",
1610
+ "findGlobal",
1611
+ "findImpressions",
1612
+ "findWithGlobals",
1613
+ "getVariationStats"
1614
+ ],
1615
+ "methodSignatures": [
1352
1616
  {
1353
- "name": "created_at",
1354
- "type": "datetime",
1355
- "required": false,
1356
- "columnType": "TIMESTAMP"
1617
+ "name": "countByType",
1618
+ "async": true,
1619
+ "params": [
1620
+ "variationId: string",
1621
+ "eventType: AdEventType"
1622
+ ],
1623
+ "returns": "Promise<number>"
1357
1624
  },
1358
1625
  {
1359
- "name": "updated_at",
1360
- "type": "datetime",
1361
- "required": false,
1362
- "columnType": "TIMESTAMP"
1626
+ "name": "countClicks",
1627
+ "async": true,
1628
+ "params": [
1629
+ "variationId: string"
1630
+ ],
1631
+ "returns": "Promise<number>"
1363
1632
  },
1364
1633
  {
1365
- "name": "tenantId",
1366
- "type": "text",
1367
- "required": false,
1368
- "columnType": "UUID"
1634
+ "name": "countConversions",
1635
+ "async": true,
1636
+ "params": [
1637
+ "variationId: string"
1638
+ ],
1639
+ "returns": "Promise<number>"
1369
1640
  },
1370
1641
  {
1371
- "name": "variationId",
1372
- "type": "foreignKey",
1373
- "required": false,
1374
- "related": "AdVariation",
1375
- "columnType": "UUID"
1642
+ "name": "countImpressions",
1643
+ "async": true,
1644
+ "params": [
1645
+ "variationId: string"
1646
+ ],
1647
+ "returns": "Promise<number>"
1376
1648
  },
1377
1649
  {
1378
- "name": "zoneId",
1379
- "type": "crossPackageRef",
1380
- "required": false,
1381
- "related": "@happyvertical/smrt-properties:Zone",
1382
- "columnType": "UUID"
1650
+ "name": "findByDateRange",
1651
+ "async": true,
1652
+ "params": [
1653
+ "start: Date",
1654
+ "end: Date"
1655
+ ],
1656
+ "returns": "Promise<AdEvent[]>"
1383
1657
  },
1384
1658
  {
1385
- "name": "siteId",
1386
- "type": "text",
1387
- "required": false,
1388
- "columnType": "TEXT",
1389
- "default": ""
1659
+ "name": "findBySite",
1660
+ "async": true,
1661
+ "params": [
1662
+ "siteId: string"
1663
+ ],
1664
+ "returns": "Promise<AdEvent[]>"
1390
1665
  },
1391
1666
  {
1392
- "name": "eventType",
1393
- "type": "text",
1394
- "required": false,
1395
- "columnType": "TEXT"
1667
+ "name": "findByTenant",
1668
+ "async": true,
1669
+ "params": [
1670
+ "tenantId: string"
1671
+ ],
1672
+ "returns": "Promise<AdEvent[]>"
1396
1673
  },
1397
1674
  {
1398
- "name": "timestamp",
1399
- "type": "datetime",
1400
- "required": false,
1401
- "columnType": "TIMESTAMP"
1675
+ "name": "findByType",
1676
+ "async": true,
1677
+ "params": [
1678
+ "eventType: AdEventType"
1679
+ ],
1680
+ "returns": "Promise<AdEvent[]>"
1402
1681
  },
1403
1682
  {
1404
- "name": "metadata",
1405
- "type": "text",
1406
- "required": false,
1407
- "columnType": "TEXT",
1408
- "default": ""
1409
- }
1410
- ],
1411
- "relationships": [
1683
+ "name": "findByVariation",
1684
+ "async": true,
1685
+ "params": [
1686
+ "variationId: string"
1687
+ ],
1688
+ "returns": "Promise<AdEvent[]>"
1689
+ },
1412
1690
  {
1413
- "name": "variationId",
1414
- "type": "foreignKey",
1415
- "required": false,
1416
- "related": "AdVariation",
1417
- "columnType": "UUID"
1691
+ "name": "findByZone",
1692
+ "async": true,
1693
+ "params": [
1694
+ "zoneId: string"
1695
+ ],
1696
+ "returns": "Promise<AdEvent[]>"
1418
1697
  },
1419
1698
  {
1420
- "name": "zoneId",
1421
- "type": "crossPackageRef",
1422
- "required": false,
1423
- "related": "@happyvertical/smrt-properties:Zone",
1424
- "columnType": "UUID"
1425
- }
1426
- ],
1427
- "methods": [
1428
- "getMetadata",
1429
- "isClick",
1430
- "isConversion",
1431
- "isImpression",
1432
- "setMetadata"
1433
- ],
1434
- "methodSignatures": [
1699
+ "name": "findClicks",
1700
+ "async": true,
1701
+ "returns": "Promise<AdEvent[]>"
1702
+ },
1435
1703
  {
1436
- "name": "getMetadata",
1437
- "returns": "Record<string, unknown>"
1704
+ "name": "findConversions",
1705
+ "async": true,
1706
+ "returns": "Promise<AdEvent[]>"
1438
1707
  },
1439
1708
  {
1440
- "name": "isClick",
1441
- "returns": "boolean"
1709
+ "name": "findGlobal",
1710
+ "async": true,
1711
+ "returns": "Promise<AdEvent[]>"
1442
1712
  },
1443
1713
  {
1444
- "name": "isConversion",
1445
- "returns": "boolean"
1714
+ "name": "findImpressions",
1715
+ "async": true,
1716
+ "returns": "Promise<AdEvent[]>"
1446
1717
  },
1447
1718
  {
1448
- "name": "isImpression",
1449
- "returns": "boolean"
1719
+ "name": "findWithGlobals",
1720
+ "async": true,
1721
+ "params": [
1722
+ "tenantId: string"
1723
+ ],
1724
+ "returns": "Promise<AdEvent[]>"
1450
1725
  },
1451
1726
  {
1452
- "name": "setMetadata",
1727
+ "name": "getVariationStats",
1728
+ "async": true,
1453
1729
  "params": [
1454
- "data: Record<string, unknown>"
1730
+ "variationId: string"
1455
1731
  ],
1456
- "returns": "void"
1732
+ "returns": "Promise<object>"
1457
1733
  }
1458
1734
  ],
1459
- "tenant": {
1460
- "scoped": true,
1461
- "mode": "optional",
1462
- "field": "tenantId"
1463
- },
1464
- "tableStrategy": "sti",
1465
- "conflictColumns": [
1466
- "tenant_id",
1467
- "slug",
1468
- "context",
1469
- "_meta_type"
1470
- ],
1471
- "surfaces": [
1735
+ "surfaces": [],
1736
+ "withheldSurfaces": [
1472
1737
  {
1473
1738
  "kind": "api",
1474
- "name": "adevents.list",
1475
- "operation": "list",
1476
- "objectName": "@happyvertical/smrt-ads:AdEvent",
1477
- "path": "/adevents",
1478
- "method": "GET"
1739
+ "operation": "countByType",
1740
+ "code": "not-included",
1741
+ "reason": "not listed in api.include",
1742
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1479
1743
  },
1480
1744
  {
1481
1745
  "kind": "api",
1482
- "name": "adevents.create",
1483
- "operation": "create",
1484
- "objectName": "@happyvertical/smrt-ads:AdEvent",
1485
- "path": "/adevents",
1486
- "method": "POST"
1746
+ "operation": "countClicks",
1747
+ "code": "not-included",
1748
+ "reason": "not listed in api.include",
1749
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1487
1750
  },
1488
1751
  {
1489
- "kind": "mcp",
1490
- "name": "adevent_create",
1491
- "operation": "create",
1492
- "objectName": "@happyvertical/smrt-ads:AdEvent"
1493
- }
1494
- ],
1495
- "withheldSurfaces": [
1752
+ "kind": "api",
1753
+ "operation": "countConversions",
1754
+ "code": "not-included",
1755
+ "reason": "not listed in api.include",
1756
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1757
+ },
1496
1758
  {
1497
1759
  "kind": "api",
1498
- "operation": "getMetadata",
1760
+ "operation": "countImpressions",
1499
1761
  "code": "not-included",
1500
1762
  "reason": "not listed in api.include",
1501
- "objectName": "@happyvertical/smrt-ads:AdEvent"
1763
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1502
1764
  },
1503
1765
  {
1504
1766
  "kind": "api",
1505
- "operation": "isClick",
1767
+ "operation": "findByDateRange",
1506
1768
  "code": "not-included",
1507
1769
  "reason": "not listed in api.include",
1508
- "objectName": "@happyvertical/smrt-ads:AdEvent"
1770
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1509
1771
  },
1510
1772
  {
1511
1773
  "kind": "api",
1512
- "operation": "isConversion",
1774
+ "operation": "findBySite",
1513
1775
  "code": "not-included",
1514
1776
  "reason": "not listed in api.include",
1515
- "objectName": "@happyvertical/smrt-ads:AdEvent"
1777
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1516
1778
  },
1517
1779
  {
1518
1780
  "kind": "api",
1519
- "operation": "isImpression",
1781
+ "operation": "findByTenant",
1520
1782
  "code": "not-included",
1521
1783
  "reason": "not listed in api.include",
1522
- "objectName": "@happyvertical/smrt-ads:AdEvent"
1784
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1523
1785
  },
1524
1786
  {
1525
1787
  "kind": "api",
1526
- "operation": "setMetadata",
1788
+ "operation": "findByType",
1527
1789
  "code": "not-included",
1528
1790
  "reason": "not listed in api.include",
1529
- "objectName": "@happyvertical/smrt-ads:AdEvent"
1791
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1792
+ },
1793
+ {
1794
+ "kind": "api",
1795
+ "operation": "findByVariation",
1796
+ "code": "not-included",
1797
+ "reason": "not listed in api.include",
1798
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1799
+ },
1800
+ {
1801
+ "kind": "api",
1802
+ "operation": "findByZone",
1803
+ "code": "not-included",
1804
+ "reason": "not listed in api.include",
1805
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1806
+ },
1807
+ {
1808
+ "kind": "api",
1809
+ "operation": "findClicks",
1810
+ "code": "not-included",
1811
+ "reason": "not listed in api.include",
1812
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1813
+ },
1814
+ {
1815
+ "kind": "api",
1816
+ "operation": "findConversions",
1817
+ "code": "not-included",
1818
+ "reason": "not listed in api.include",
1819
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1820
+ },
1821
+ {
1822
+ "kind": "api",
1823
+ "operation": "findGlobal",
1824
+ "code": "not-included",
1825
+ "reason": "not listed in api.include",
1826
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1827
+ },
1828
+ {
1829
+ "kind": "api",
1830
+ "operation": "findImpressions",
1831
+ "code": "not-included",
1832
+ "reason": "not listed in api.include",
1833
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1834
+ },
1835
+ {
1836
+ "kind": "api",
1837
+ "operation": "findWithGlobals",
1838
+ "code": "not-included",
1839
+ "reason": "not listed in api.include",
1840
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1841
+ },
1842
+ {
1843
+ "kind": "api",
1844
+ "operation": "getVariationStats",
1845
+ "code": "not-included",
1846
+ "reason": "not listed in api.include",
1847
+ "objectName": "@happyvertical/smrt-ads:AdEventCollection"
1530
1848
  }
1531
1849
  ],
1532
1850
  "relationshipFeatures": [
1533
- "crossPackageRef",
1534
- "foreignKey",
1535
1851
  "uuidColumns"
1536
1852
  ],
1537
1853
  "tags": [],
1538
1854
  "risks": []
1539
1855
  },
1540
1856
  {
1541
- "name": "AdFormat",
1542
- "qualifiedName": "@happyvertical/smrt-ads:AdFormat",
1543
- "displayLabelField": "name",
1857
+ "name": "AdFormatCollection",
1858
+ "qualifiedName": "@happyvertical/smrt-ads:AdFormatCollection",
1544
1859
  "collection": "adformats",
1545
1860
  "tableName": "ad_formats",
1546
1861
  "packageName": "@happyvertical/smrt-ads",
1547
- "extends": "SmrtObject",
1548
- "fields": [
1549
- {
1550
- "name": "name",
1551
- "type": "text",
1552
- "required": false,
1553
- "columnType": "TEXT",
1554
- "default": "",
1555
- "description": "What the size is called, for example Leaderboard."
1556
- },
1557
- {
1558
- "name": "width",
1559
- "type": "integer",
1560
- "required": false,
1561
- "columnType": "INTEGER",
1562
- "default": 0,
1563
- "description": "How wide the ad is, in pixels."
1564
- },
1565
- {
1566
- "name": "height",
1567
- "type": "integer",
1568
- "required": false,
1569
- "columnType": "INTEGER",
1570
- "default": 0,
1571
- "description": "How tall the ad is, in pixels."
1572
- },
1573
- {
1574
- "name": "formatType",
1575
- "type": "text",
1576
- "required": false,
1577
- "columnType": "TEXT",
1578
- "description": "What kind of ad fits this size: a picture, a piece written to look like your own content, or a video."
1579
- },
1580
- {
1581
- "name": "description",
1582
- "type": "text",
1583
- "required": false,
1584
- "columnType": "TEXT",
1585
- "default": "",
1586
- "description": "A note about where this size is usually used."
1587
- }
1588
- ],
1862
+ "extends": "SmrtCollection",
1863
+ "fields": [],
1589
1864
  "relationships": [],
1590
1865
  "methods": [
1591
- "getDimensions",
1592
- "matchesDimensions"
1866
+ "findBanners",
1867
+ "findByDimensions",
1868
+ "findByType",
1869
+ "findNative",
1870
+ "findVideo"
1593
1871
  ],
1594
1872
  "methodSignatures": [
1595
1873
  {
1596
- "name": "getDimensions",
1597
- "returns": "string"
1874
+ "name": "findBanners",
1875
+ "async": true,
1876
+ "returns": "Promise<AdFormat[]>"
1598
1877
  },
1599
1878
  {
1600
- "name": "matchesDimensions",
1879
+ "name": "findByDimensions",
1880
+ "async": true,
1601
1881
  "params": [
1602
1882
  "width: number",
1603
1883
  "height: number"
1604
1884
  ],
1605
- "returns": "boolean"
1606
- }
1607
- ],
1608
- "surfaces": [
1609
- {
1610
- "kind": "api",
1611
- "name": "adformats.list",
1612
- "operation": "list",
1613
- "objectName": "@happyvertical/smrt-ads:AdFormat",
1614
- "path": "/adformats",
1615
- "method": "GET"
1885
+ "returns": "Promise<AdFormat | null>"
1616
1886
  },
1617
1887
  {
1618
- "kind": "api",
1619
- "name": "adformats.get",
1620
- "operation": "get",
1621
- "objectName": "@happyvertical/smrt-ads:AdFormat",
1622
- "path": "/adformats/[id]",
1623
- "method": "GET"
1888
+ "name": "findByType",
1889
+ "async": true,
1890
+ "params": [
1891
+ "formatType: AdFormatType"
1892
+ ],
1893
+ "returns": "Promise<AdFormat[]>"
1624
1894
  },
1625
1895
  {
1626
- "kind": "api",
1627
- "name": "adformats.create",
1628
- "operation": "create",
1629
- "objectName": "@happyvertical/smrt-ads:AdFormat",
1630
- "path": "/adformats",
1631
- "method": "POST"
1896
+ "name": "findNative",
1897
+ "async": true,
1898
+ "returns": "Promise<AdFormat[]>"
1632
1899
  },
1633
1900
  {
1634
- "kind": "api",
1635
- "name": "adformats.update",
1636
- "operation": "update",
1637
- "objectName": "@happyvertical/smrt-ads:AdFormat",
1638
- "path": "/adformats/[id]",
1639
- "method": "PATCH"
1640
- },
1901
+ "name": "findVideo",
1902
+ "async": true,
1903
+ "returns": "Promise<AdFormat[]>"
1904
+ }
1905
+ ],
1906
+ "surfaces": [
1641
1907
  {
1642
1908
  "kind": "cli",
1643
- "name": "adformat_list",
1644
- "operation": "list",
1645
- "objectName": "@happyvertical/smrt-ads:AdFormat"
1909
+ "name": "adformatcollection_findByDimensions",
1910
+ "operation": "findByDimensions",
1911
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
1646
1912
  },
1647
1913
  {
1648
1914
  "kind": "cli",
1649
- "name": "adformat_get",
1650
- "operation": "get",
1651
- "objectName": "@happyvertical/smrt-ads:AdFormat"
1915
+ "name": "adformatcollection_findByType",
1916
+ "operation": "findByType",
1917
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
1652
1918
  },
1653
1919
  {
1654
1920
  "kind": "cli",
1655
- "name": "adformat_create",
1656
- "operation": "create",
1657
- "objectName": "@happyvertical/smrt-ads:AdFormat"
1921
+ "name": "adformatcollection_findBanners",
1922
+ "operation": "findBanners",
1923
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
1658
1924
  },
1659
1925
  {
1660
1926
  "kind": "cli",
1661
- "name": "adformat_update",
1662
- "operation": "update",
1663
- "objectName": "@happyvertical/smrt-ads:AdFormat"
1927
+ "name": "adformatcollection_findNative",
1928
+ "operation": "findNative",
1929
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
1664
1930
  },
1665
1931
  {
1666
1932
  "kind": "cli",
1667
- "name": "adformat_delete",
1668
- "operation": "delete",
1669
- "objectName": "@happyvertical/smrt-ads:AdFormat"
1670
- },
1933
+ "name": "adformatcollection_findVideo",
1934
+ "operation": "findVideo",
1935
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
1936
+ }
1937
+ ],
1938
+ "withheldSurfaces": [
1671
1939
  {
1672
- "kind": "cli",
1673
- "name": "adformat_getDimensions",
1674
- "operation": "getDimensions",
1675
- "objectName": "@happyvertical/smrt-ads:AdFormat"
1940
+ "kind": "api",
1941
+ "operation": "findBanners",
1942
+ "code": "not-included",
1943
+ "reason": "not listed in api.include",
1944
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
1676
1945
  },
1677
1946
  {
1678
- "kind": "cli",
1679
- "name": "adformat_matchesDimensions",
1680
- "operation": "matchesDimensions",
1681
- "objectName": "@happyvertical/smrt-ads:AdFormat"
1947
+ "kind": "api",
1948
+ "operation": "findByDimensions",
1949
+ "code": "not-included",
1950
+ "reason": "not listed in api.include",
1951
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
1682
1952
  },
1683
1953
  {
1684
- "kind": "mcp",
1685
- "name": "adformat_list",
1686
- "operation": "list",
1687
- "objectName": "@happyvertical/smrt-ads:AdFormat"
1954
+ "kind": "api",
1955
+ "operation": "findByType",
1956
+ "code": "not-included",
1957
+ "reason": "not listed in api.include",
1958
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
1688
1959
  },
1689
- {
1690
- "kind": "mcp",
1691
- "name": "adformat_get",
1692
- "operation": "get",
1693
- "objectName": "@happyvertical/smrt-ads:AdFormat"
1694
- }
1695
- ],
1696
- "withheldSurfaces": [
1697
1960
  {
1698
1961
  "kind": "api",
1699
- "operation": "getDimensions",
1962
+ "operation": "findNative",
1700
1963
  "code": "not-included",
1701
1964
  "reason": "not listed in api.include",
1702
- "objectName": "@happyvertical/smrt-ads:AdFormat"
1965
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
1703
1966
  },
1704
1967
  {
1705
1968
  "kind": "api",
1706
- "operation": "matchesDimensions",
1969
+ "operation": "findVideo",
1707
1970
  "code": "not-included",
1708
1971
  "reason": "not listed in api.include",
1709
- "objectName": "@happyvertical/smrt-ads:AdFormat"
1972
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
1710
1973
  }
1711
1974
  ],
1712
1975
  "relationshipFeatures": [
@@ -1716,1055 +1979,576 @@
1716
1979
  "risks": []
1717
1980
  },
1718
1981
  {
1719
- "name": "AdGroup",
1720
- "qualifiedName": "@happyvertical/smrt-ads:AdGroup",
1721
- "displayLabelField": "name",
1982
+ "name": "AdGroupCollection",
1983
+ "qualifiedName": "@happyvertical/smrt-ads:AdGroupCollection",
1722
1984
  "collection": "adgroups",
1723
- "description": "AdGroup organizes ad creatives with targeting and budget controls.",
1724
1985
  "tableName": "ad_groups",
1725
1986
  "packageName": "@happyvertical/smrt-ads",
1726
- "extends": "SmrtObject",
1727
- "fields": [
1728
- {
1729
- "name": "created_at",
1730
- "type": "datetime",
1731
- "required": false,
1732
- "columnType": "TIMESTAMP"
1733
- },
1987
+ "extends": "SmrtCollection",
1988
+ "fields": [],
1989
+ "relationships": [],
1990
+ "methods": [
1991
+ "findActive",
1992
+ "findByContract",
1993
+ "findByStatus",
1994
+ "findByTenant",
1995
+ "findByTier",
1996
+ "findByVertical",
1997
+ "findByZone",
1998
+ "findCompleted",
1999
+ "findDrafts",
2000
+ "findEligibleForZone",
2001
+ "findGlobal",
2002
+ "findPaused",
2003
+ "findWithGlobals"
2004
+ ],
2005
+ "methodSignatures": [
1734
2006
  {
1735
- "name": "updated_at",
1736
- "type": "datetime",
1737
- "required": false,
1738
- "columnType": "TIMESTAMP"
2007
+ "name": "findActive",
2008
+ "async": true,
2009
+ "returns": "Promise<AdGroup[]>"
1739
2010
  },
1740
2011
  {
1741
- "name": "tenantId",
1742
- "type": "text",
1743
- "required": false,
1744
- "columnType": "UUID"
2012
+ "name": "findByContract",
2013
+ "async": true,
2014
+ "params": [
2015
+ "contractId: string"
2016
+ ],
2017
+ "returns": "Promise<AdGroup[]>"
1745
2018
  },
1746
2019
  {
1747
- "name": "contractId",
1748
- "type": "crossPackageRef",
1749
- "required": false,
1750
- "related": "@happyvertical/smrt-commerce:SalesContract",
1751
- "columnType": "UUID",
1752
- "description": "The sales contract this campaign is sold under, if there is one."
2020
+ "name": "findByStatus",
2021
+ "async": true,
2022
+ "params": [
2023
+ "status: AdGroupStatus"
2024
+ ],
2025
+ "returns": "Promise<AdGroup[]>"
1753
2026
  },
1754
2027
  {
1755
- "name": "tierId",
1756
- "type": "foreignKey",
1757
- "required": false,
1758
- "related": "AdDeliveryTier",
1759
- "columnType": "UUID",
1760
- "description": "The priority tier the campaign runs in. Tiers are tried in order when more than one campaign could show."
2028
+ "name": "findByTenant",
2029
+ "async": true,
2030
+ "params": [
2031
+ "tenantId: string"
2032
+ ],
2033
+ "returns": "Promise<AdGroup[]>"
1761
2034
  },
1762
2035
  {
1763
- "name": "name",
1764
- "type": "text",
1765
- "required": false,
1766
- "columnType": "TEXT",
1767
- "default": "",
1768
- "description": "What you call the campaign, for example Summer sale."
2036
+ "name": "findByTier",
2037
+ "async": true,
2038
+ "params": [
2039
+ "tierId: string"
2040
+ ],
2041
+ "returns": "Promise<AdGroup[]>"
1769
2042
  },
1770
2043
  {
1771
- "name": "verticalSlug",
1772
- "type": "text",
1773
- "required": false,
1774
- "columnType": "TEXT",
1775
- "default": "",
1776
- "description": "The category the campaign belongs to, such as retail."
2044
+ "name": "findByVertical",
2045
+ "async": true,
2046
+ "params": [
2047
+ "verticalSlug: string"
2048
+ ],
2049
+ "returns": "Promise<AdGroup[]>"
1777
2050
  },
1778
2051
  {
1779
- "name": "targeting",
1780
- "type": "text",
1781
- "required": false,
1782
- "columnType": "TEXT",
1783
- "default": ""
2052
+ "name": "findByZone",
2053
+ "async": true,
2054
+ "params": [
2055
+ "zoneId: string"
2056
+ ],
2057
+ "returns": "Promise<AdGroup[]>"
1784
2058
  },
1785
2059
  {
1786
- "name": "zoneIds",
1787
- "type": "text",
1788
- "required": false,
1789
- "columnType": "TEXT",
1790
- "default": ""
2060
+ "name": "findCompleted",
2061
+ "async": true,
2062
+ "returns": "Promise<AdGroup[]>"
1791
2063
  },
1792
2064
  {
1793
- "name": "startDate",
1794
- "type": "datetime",
1795
- "required": false,
1796
- "columnType": "TIMESTAMP",
1797
- "description": "The first day the campaign can show."
2065
+ "name": "findDrafts",
2066
+ "async": true,
2067
+ "returns": "Promise<AdGroup[]>"
1798
2068
  },
1799
2069
  {
1800
- "name": "endDate",
1801
- "type": "datetime",
1802
- "required": false,
1803
- "columnType": "TIMESTAMP",
1804
- "description": "The last day the campaign can show."
2070
+ "name": "findEligibleForZone",
2071
+ "async": true,
2072
+ "params": [
2073
+ "zoneId: string"
2074
+ ],
2075
+ "returns": "Promise<AdGroup[]>"
1805
2076
  },
1806
2077
  {
1807
- "name": "dailyBudget",
1808
- "type": "decimal",
1809
- "required": false,
1810
- "columnType": "REAL",
1811
- "default": 0,
1812
- "description": "The most to spend in one day. The app shows this but does not stop the campaign by itself."
2078
+ "name": "findGlobal",
2079
+ "async": true,
2080
+ "returns": "Promise<AdGroup[]>"
1813
2081
  },
1814
2082
  {
1815
- "name": "totalBudget",
1816
- "type": "decimal",
1817
- "required": false,
1818
- "columnType": "REAL",
1819
- "default": 0,
1820
- "description": "The most to spend over the whole campaign."
2083
+ "name": "findPaused",
2084
+ "async": true,
2085
+ "returns": "Promise<AdGroup[]>"
1821
2086
  },
1822
2087
  {
1823
- "name": "status",
1824
- "type": "text",
1825
- "required": false,
1826
- "columnType": "TEXT",
1827
- "description": "Where the campaign stands: draft, active, paused or completed. Only active campaigns show ads."
2088
+ "name": "findWithGlobals",
2089
+ "async": true,
2090
+ "params": [
2091
+ "tenantId: string"
2092
+ ],
2093
+ "returns": "Promise<AdGroup[]>"
1828
2094
  }
1829
2095
  ],
1830
- "relationships": [
2096
+ "surfaces": [
1831
2097
  {
1832
- "name": "contractId",
1833
- "type": "crossPackageRef",
1834
- "required": false,
1835
- "related": "@happyvertical/smrt-commerce:SalesContract",
1836
- "columnType": "UUID"
2098
+ "kind": "cli",
2099
+ "name": "adgroupcollection_findByContract",
2100
+ "operation": "findByContract",
2101
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
1837
2102
  },
1838
2103
  {
1839
- "name": "tierId",
1840
- "type": "foreignKey",
1841
- "required": false,
1842
- "related": "AdDeliveryTier",
1843
- "columnType": "UUID"
1844
- }
1845
- ],
1846
- "methods": [
1847
- "addZoneId",
1848
- "getTargeting",
1849
- "getZoneIds",
1850
- "hasEnded",
1851
- "hasStarted",
1852
- "hasZoneId",
1853
- "isActive",
1854
- "isCompleted",
1855
- "isDraft",
1856
- "isPaused",
1857
- "removeZoneId",
1858
- "setTargeting",
1859
- "setZoneIds"
1860
- ],
1861
- "methodSignatures": [
2104
+ "kind": "cli",
2105
+ "name": "adgroupcollection_findByTier",
2106
+ "operation": "findByTier",
2107
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2108
+ },
1862
2109
  {
1863
- "name": "addZoneId",
1864
- "params": [
1865
- "zoneId: string"
1866
- ],
1867
- "returns": "void"
1868
- },
1869
- {
1870
- "name": "getTargeting",
1871
- "returns": "Record<string, unknown>"
1872
- },
1873
- {
1874
- "name": "getZoneIds",
1875
- "returns": "string[]"
1876
- },
1877
- {
1878
- "name": "hasEnded",
1879
- "returns": "boolean"
1880
- },
1881
- {
1882
- "name": "hasStarted",
1883
- "returns": "boolean"
1884
- },
1885
- {
1886
- "name": "hasZoneId",
1887
- "params": [
1888
- "zoneId: string"
1889
- ],
1890
- "returns": "boolean"
1891
- },
1892
- {
1893
- "name": "isActive",
1894
- "returns": "boolean"
1895
- },
1896
- {
1897
- "name": "isCompleted",
1898
- "returns": "boolean"
1899
- },
1900
- {
1901
- "name": "isDraft",
1902
- "returns": "boolean"
1903
- },
1904
- {
1905
- "name": "isPaused",
1906
- "returns": "boolean"
1907
- },
1908
- {
1909
- "name": "removeZoneId",
1910
- "params": [
1911
- "zoneId: string"
1912
- ],
1913
- "returns": "void"
1914
- },
1915
- {
1916
- "name": "setTargeting",
1917
- "params": [
1918
- "rules: Record<string, unknown>"
1919
- ],
1920
- "returns": "void"
1921
- },
1922
- {
1923
- "name": "setZoneIds",
1924
- "params": [
1925
- "ids: string[]"
1926
- ],
1927
- "returns": "void"
1928
- }
1929
- ],
1930
- "tenant": {
1931
- "scoped": true,
1932
- "mode": "optional",
1933
- "field": "tenantId"
1934
- },
1935
- "tableStrategy": "sti",
1936
- "conflictColumns": [
1937
- "tenant_id",
1938
- "slug",
1939
- "context",
1940
- "_meta_type"
1941
- ],
1942
- "surfaces": [
1943
- {
1944
- "kind": "api",
1945
- "name": "adgroups.list",
1946
- "operation": "list",
1947
- "objectName": "@happyvertical/smrt-ads:AdGroup",
1948
- "path": "/adgroups",
1949
- "method": "GET"
1950
- },
1951
- {
1952
- "kind": "api",
1953
- "name": "adgroups.get",
1954
- "operation": "get",
1955
- "objectName": "@happyvertical/smrt-ads:AdGroup",
1956
- "path": "/adgroups/[id]",
1957
- "method": "GET"
1958
- },
1959
- {
1960
- "kind": "api",
1961
- "name": "adgroups.create",
1962
- "operation": "create",
1963
- "objectName": "@happyvertical/smrt-ads:AdGroup",
1964
- "path": "/adgroups",
1965
- "method": "POST"
1966
- },
1967
- {
1968
- "kind": "api",
1969
- "name": "adgroups.update",
1970
- "operation": "update",
1971
- "objectName": "@happyvertical/smrt-ads:AdGroup",
1972
- "path": "/adgroups/[id]",
1973
- "method": "PATCH"
1974
- },
1975
- {
1976
- "kind": "cli",
1977
- "name": "adgroup_list",
1978
- "operation": "list",
1979
- "objectName": "@happyvertical/smrt-ads:AdGroup"
1980
- },
1981
- {
1982
- "kind": "cli",
1983
- "name": "adgroup_get",
1984
- "operation": "get",
1985
- "objectName": "@happyvertical/smrt-ads:AdGroup"
1986
- },
1987
- {
1988
- "kind": "cli",
1989
- "name": "adgroup_create",
1990
- "operation": "create",
1991
- "objectName": "@happyvertical/smrt-ads:AdGroup"
1992
- },
1993
- {
1994
- "kind": "cli",
1995
- "name": "adgroup_update",
1996
- "operation": "update",
1997
- "objectName": "@happyvertical/smrt-ads:AdGroup"
1998
- },
1999
- {
2000
- "kind": "cli",
2001
- "name": "adgroup_delete",
2002
- "operation": "delete",
2003
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2004
- },
2005
- {
2006
- "kind": "cli",
2007
- "name": "adgroup_getZoneIds",
2008
- "operation": "getZoneIds",
2009
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2010
- },
2011
- {
2012
- "kind": "cli",
2013
- "name": "adgroup_setZoneIds",
2014
- "operation": "setZoneIds",
2015
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2016
- },
2017
- {
2018
- "kind": "cli",
2019
- "name": "adgroup_addZoneId",
2020
- "operation": "addZoneId",
2021
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2110
+ "kind": "cli",
2111
+ "name": "adgroupcollection_findByStatus",
2112
+ "operation": "findByStatus",
2113
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2022
2114
  },
2023
2115
  {
2024
2116
  "kind": "cli",
2025
- "name": "adgroup_removeZoneId",
2026
- "operation": "removeZoneId",
2027
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2117
+ "name": "adgroupcollection_findActive",
2118
+ "operation": "findActive",
2119
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2028
2120
  },
2029
2121
  {
2030
2122
  "kind": "cli",
2031
- "name": "adgroup_hasZoneId",
2032
- "operation": "hasZoneId",
2033
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2123
+ "name": "adgroupcollection_findByVertical",
2124
+ "operation": "findByVertical",
2125
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2034
2126
  },
2035
2127
  {
2036
2128
  "kind": "cli",
2037
- "name": "adgroup_getTargeting",
2038
- "operation": "getTargeting",
2039
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2129
+ "name": "adgroupcollection_findByZone",
2130
+ "operation": "findByZone",
2131
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2040
2132
  },
2041
2133
  {
2042
2134
  "kind": "cli",
2043
- "name": "adgroup_setTargeting",
2044
- "operation": "setTargeting",
2045
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2135
+ "name": "adgroupcollection_findEligibleForZone",
2136
+ "operation": "findEligibleForZone",
2137
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2046
2138
  },
2047
2139
  {
2048
2140
  "kind": "cli",
2049
- "name": "adgroup_isActive",
2050
- "operation": "isActive",
2051
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2141
+ "name": "adgroupcollection_findDrafts",
2142
+ "operation": "findDrafts",
2143
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2052
2144
  },
2053
2145
  {
2054
2146
  "kind": "cli",
2055
- "name": "adgroup_isDraft",
2056
- "operation": "isDraft",
2057
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2147
+ "name": "adgroupcollection_findPaused",
2148
+ "operation": "findPaused",
2149
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2058
2150
  },
2059
2151
  {
2060
2152
  "kind": "cli",
2061
- "name": "adgroup_isPaused",
2062
- "operation": "isPaused",
2063
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2153
+ "name": "adgroupcollection_findCompleted",
2154
+ "operation": "findCompleted",
2155
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2064
2156
  },
2065
2157
  {
2066
2158
  "kind": "cli",
2067
- "name": "adgroup_isCompleted",
2068
- "operation": "isCompleted",
2069
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2159
+ "name": "adgroupcollection_findByTenant",
2160
+ "operation": "findByTenant",
2161
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2070
2162
  },
2071
2163
  {
2072
2164
  "kind": "cli",
2073
- "name": "adgroup_hasEnded",
2074
- "operation": "hasEnded",
2075
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2165
+ "name": "adgroupcollection_findGlobal",
2166
+ "operation": "findGlobal",
2167
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2076
2168
  },
2077
2169
  {
2078
2170
  "kind": "cli",
2079
- "name": "adgroup_hasStarted",
2080
- "operation": "hasStarted",
2081
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2082
- },
2083
- {
2084
- "kind": "mcp",
2085
- "name": "adgroup_list",
2086
- "operation": "list",
2087
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2088
- },
2089
- {
2090
- "kind": "mcp",
2091
- "name": "adgroup_get",
2092
- "operation": "get",
2093
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2094
- },
2095
- {
2096
- "kind": "mcp",
2097
- "name": "adgroup_create",
2098
- "operation": "create",
2099
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2171
+ "name": "adgroupcollection_findWithGlobals",
2172
+ "operation": "findWithGlobals",
2173
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2100
2174
  }
2101
2175
  ],
2102
2176
  "withheldSurfaces": [
2103
2177
  {
2104
2178
  "kind": "api",
2105
- "operation": "addZoneId",
2179
+ "operation": "findActive",
2106
2180
  "code": "not-included",
2107
2181
  "reason": "not listed in api.include",
2108
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2182
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2109
2183
  },
2110
2184
  {
2111
2185
  "kind": "api",
2112
- "operation": "getTargeting",
2186
+ "operation": "findByContract",
2113
2187
  "code": "not-included",
2114
2188
  "reason": "not listed in api.include",
2115
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2189
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2116
2190
  },
2117
2191
  {
2118
2192
  "kind": "api",
2119
- "operation": "getZoneIds",
2193
+ "operation": "findByStatus",
2120
2194
  "code": "not-included",
2121
2195
  "reason": "not listed in api.include",
2122
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2196
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2123
2197
  },
2124
2198
  {
2125
2199
  "kind": "api",
2126
- "operation": "hasEnded",
2200
+ "operation": "findByTenant",
2127
2201
  "code": "not-included",
2128
2202
  "reason": "not listed in api.include",
2129
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2203
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2130
2204
  },
2131
2205
  {
2132
2206
  "kind": "api",
2133
- "operation": "hasStarted",
2207
+ "operation": "findByTier",
2134
2208
  "code": "not-included",
2135
2209
  "reason": "not listed in api.include",
2136
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2210
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2137
2211
  },
2138
2212
  {
2139
2213
  "kind": "api",
2140
- "operation": "hasZoneId",
2214
+ "operation": "findByVertical",
2141
2215
  "code": "not-included",
2142
2216
  "reason": "not listed in api.include",
2143
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2217
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2144
2218
  },
2145
2219
  {
2146
2220
  "kind": "api",
2147
- "operation": "isActive",
2221
+ "operation": "findByZone",
2148
2222
  "code": "not-included",
2149
2223
  "reason": "not listed in api.include",
2150
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2224
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2151
2225
  },
2152
2226
  {
2153
2227
  "kind": "api",
2154
- "operation": "isCompleted",
2228
+ "operation": "findCompleted",
2155
2229
  "code": "not-included",
2156
2230
  "reason": "not listed in api.include",
2157
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2231
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2158
2232
  },
2159
2233
  {
2160
2234
  "kind": "api",
2161
- "operation": "isDraft",
2235
+ "operation": "findDrafts",
2162
2236
  "code": "not-included",
2163
2237
  "reason": "not listed in api.include",
2164
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2238
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2165
2239
  },
2166
2240
  {
2167
2241
  "kind": "api",
2168
- "operation": "isPaused",
2242
+ "operation": "findEligibleForZone",
2169
2243
  "code": "not-included",
2170
2244
  "reason": "not listed in api.include",
2171
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2245
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2172
2246
  },
2173
2247
  {
2174
2248
  "kind": "api",
2175
- "operation": "removeZoneId",
2249
+ "operation": "findGlobal",
2176
2250
  "code": "not-included",
2177
2251
  "reason": "not listed in api.include",
2178
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2252
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2179
2253
  },
2180
2254
  {
2181
2255
  "kind": "api",
2182
- "operation": "setTargeting",
2256
+ "operation": "findPaused",
2183
2257
  "code": "not-included",
2184
2258
  "reason": "not listed in api.include",
2185
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2259
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2186
2260
  },
2187
2261
  {
2188
2262
  "kind": "api",
2189
- "operation": "setZoneIds",
2263
+ "operation": "findWithGlobals",
2190
2264
  "code": "not-included",
2191
2265
  "reason": "not listed in api.include",
2192
- "objectName": "@happyvertical/smrt-ads:AdGroup"
2266
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2193
2267
  }
2194
2268
  ],
2195
2269
  "relationshipFeatures": [
2196
- "crossPackageRef",
2197
- "foreignKey",
2198
2270
  "uuidColumns"
2199
2271
  ],
2200
2272
  "tags": [],
2201
2273
  "risks": []
2202
2274
  },
2203
2275
  {
2204
- "name": "AdVariation",
2205
- "qualifiedName": "@happyvertical/smrt-ads:AdVariation",
2206
- "displayLabelField": "name",
2276
+ "name": "AdVariationCollection",
2277
+ "qualifiedName": "@happyvertical/smrt-ads:AdVariationCollection",
2207
2278
  "collection": "advariations",
2208
- "description": "AdVariation represents a creative asset within an ad group. Supports A/B testing via weighted selection.",
2209
2279
  "tableName": "ad_variations",
2210
2280
  "packageName": "@happyvertical/smrt-ads",
2211
- "extends": "SmrtObject",
2212
- "fields": [
2213
- {
2214
- "name": "created_at",
2215
- "type": "datetime",
2216
- "required": false,
2217
- "columnType": "TIMESTAMP"
2218
- },
2281
+ "extends": "SmrtCollection",
2282
+ "fields": [],
2283
+ "relationships": [],
2284
+ "methods": [
2285
+ "findActive",
2286
+ "findActiveByGroup",
2287
+ "findByFormat",
2288
+ "findByGroup",
2289
+ "findByStatus",
2290
+ "findByTenant",
2291
+ "findDrafts",
2292
+ "findGlobal",
2293
+ "findPaused",
2294
+ "findTopPerformers",
2295
+ "findWithGlobals",
2296
+ "selectByWeight"
2297
+ ],
2298
+ "methodSignatures": [
2219
2299
  {
2220
- "name": "updated_at",
2221
- "type": "datetime",
2222
- "required": false,
2223
- "columnType": "TIMESTAMP"
2300
+ "name": "findActive",
2301
+ "async": true,
2302
+ "returns": "Promise<AdVariation[]>"
2224
2303
  },
2225
2304
  {
2226
- "name": "tenantId",
2227
- "type": "text",
2228
- "required": false,
2229
- "columnType": "UUID"
2305
+ "name": "findActiveByGroup",
2306
+ "async": true,
2307
+ "params": [
2308
+ "groupId: string"
2309
+ ],
2310
+ "returns": "Promise<AdVariation[]>"
2230
2311
  },
2231
2312
  {
2232
- "name": "groupId",
2233
- "type": "foreignKey",
2234
- "required": false,
2235
- "related": "AdGroup",
2236
- "columnType": "UUID",
2237
- "description": "The campaign this ad belongs to."
2313
+ "name": "findByFormat",
2314
+ "async": true,
2315
+ "params": [
2316
+ "formatId: string"
2317
+ ],
2318
+ "returns": "Promise<AdVariation[]>"
2238
2319
  },
2239
2320
  {
2240
- "name": "formatId",
2241
- "type": "foreignKey",
2242
- "required": false,
2243
- "related": "AdFormat",
2244
- "columnType": "UUID",
2245
- "description": "The ad size this ad is made for."
2321
+ "name": "findByGroup",
2322
+ "async": true,
2323
+ "params": [
2324
+ "groupId: string"
2325
+ ],
2326
+ "returns": "Promise<AdVariation[]>"
2246
2327
  },
2247
2328
  {
2248
- "name": "assetId",
2249
- "type": "crossPackageRef",
2250
- "required": false,
2251
- "related": "@happyvertical/smrt-assets:Asset",
2252
- "columnType": "UUID",
2253
- "description": "The picture people see."
2329
+ "name": "findByStatus",
2330
+ "async": true,
2331
+ "params": [
2332
+ "status: AdVariationStatus"
2333
+ ],
2334
+ "returns": "Promise<AdVariation[]>"
2254
2335
  },
2255
2336
  {
2256
- "name": "name",
2257
- "type": "text",
2258
- "required": false,
2259
- "columnType": "TEXT",
2260
- "default": "",
2261
- "description": "What you call this ad, for example Version A, blue button."
2337
+ "name": "findByTenant",
2338
+ "async": true,
2339
+ "params": [
2340
+ "tenantId: string"
2341
+ ],
2342
+ "returns": "Promise<AdVariation[]>"
2262
2343
  },
2263
2344
  {
2264
- "name": "clickUrl",
2265
- "type": "text",
2266
- "required": false,
2267
- "columnType": "TEXT",
2268
- "default": "",
2269
- "description": "The web address people go to when they tap the ad."
2345
+ "name": "findDrafts",
2346
+ "async": true,
2347
+ "returns": "Promise<AdVariation[]>"
2270
2348
  },
2271
2349
  {
2272
- "name": "altText",
2273
- "type": "text",
2274
- "required": false,
2275
- "columnType": "TEXT",
2276
- "default": "",
2277
- "description": "A few words that describe the picture for people who cannot see it."
2350
+ "name": "findGlobal",
2351
+ "async": true,
2352
+ "returns": "Promise<AdVariation[]>"
2278
2353
  },
2279
2354
  {
2280
- "name": "weight",
2281
- "type": "integer",
2282
- "required": false,
2283
- "columnType": "INTEGER",
2284
- "default": 1,
2285
- "description": "How often this ad shows compared with the others in its campaign: an ad with weight 2 shows twice as often as one with weight 1."
2355
+ "name": "findPaused",
2356
+ "async": true,
2357
+ "returns": "Promise<AdVariation[]>"
2286
2358
  },
2287
2359
  {
2288
- "name": "status",
2289
- "type": "text",
2290
- "required": false,
2291
- "columnType": "TEXT",
2292
- "description": "Where the ad stands: draft, active or paused. Only active ads show."
2360
+ "name": "findTopPerformers",
2361
+ "async": true,
2362
+ "params": [
2363
+ "limit?: number"
2364
+ ],
2365
+ "returns": "Promise<AdVariation[]>"
2293
2366
  },
2294
2367
  {
2295
- "name": "impressions",
2296
- "type": "integer",
2297
- "required": false,
2298
- "columnType": "INTEGER",
2299
- "default": 0,
2300
- "description": "How many times the ad has been shown. The app counts this as it serves ads and refreshes it a little later."
2368
+ "name": "findWithGlobals",
2369
+ "async": true,
2370
+ "params": [
2371
+ "tenantId: string"
2372
+ ],
2373
+ "returns": "Promise<AdVariation[]>"
2301
2374
  },
2302
2375
  {
2303
- "name": "clicks",
2304
- "type": "integer",
2305
- "required": false,
2306
- "columnType": "INTEGER",
2307
- "default": 0,
2308
- "description": "How many times the ad has been tapped. The app counts this as it serves ads and refreshes it a little later."
2376
+ "name": "selectByWeight",
2377
+ "async": true,
2378
+ "params": [
2379
+ "groupId: string"
2380
+ ],
2381
+ "returns": "Promise<AdVariation | null>"
2309
2382
  }
2310
2383
  ],
2311
- "relationships": [
2384
+ "surfaces": [
2312
2385
  {
2313
- "name": "groupId",
2314
- "type": "foreignKey",
2315
- "required": false,
2316
- "related": "AdGroup",
2317
- "columnType": "UUID"
2386
+ "kind": "cli",
2387
+ "name": "advariationcollection_findByGroup",
2388
+ "operation": "findByGroup",
2389
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2318
2390
  },
2319
2391
  {
2320
- "name": "formatId",
2321
- "type": "foreignKey",
2322
- "required": false,
2323
- "related": "AdFormat",
2324
- "columnType": "UUID"
2392
+ "kind": "cli",
2393
+ "name": "advariationcollection_findByFormat",
2394
+ "operation": "findByFormat",
2395
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2325
2396
  },
2326
2397
  {
2327
- "name": "assetId",
2328
- "type": "crossPackageRef",
2329
- "required": false,
2330
- "related": "@happyvertical/smrt-assets:Asset",
2331
- "columnType": "UUID"
2332
- }
2333
- ],
2334
- "methods": [
2335
- "getCTR",
2336
- "isActive",
2337
- "isDraft",
2338
- "isPaused",
2339
- "recordClick",
2340
- "recordImpression"
2341
- ],
2342
- "methodSignatures": [
2343
- {
2344
- "name": "getCTR",
2345
- "returns": "number"
2398
+ "kind": "cli",
2399
+ "name": "advariationcollection_findActiveByGroup",
2400
+ "operation": "findActiveByGroup",
2401
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2346
2402
  },
2347
2403
  {
2348
- "name": "isActive",
2349
- "returns": "boolean"
2404
+ "kind": "cli",
2405
+ "name": "advariationcollection_selectByWeight",
2406
+ "operation": "selectByWeight",
2407
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2350
2408
  },
2351
2409
  {
2352
- "name": "isDraft",
2353
- "returns": "boolean"
2410
+ "kind": "cli",
2411
+ "name": "advariationcollection_findByStatus",
2412
+ "operation": "findByStatus",
2413
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2354
2414
  },
2355
2415
  {
2356
- "name": "isPaused",
2357
- "returns": "boolean"
2416
+ "kind": "cli",
2417
+ "name": "advariationcollection_findActive",
2418
+ "operation": "findActive",
2419
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2358
2420
  },
2359
2421
  {
2360
- "name": "recordClick",
2361
- "returns": "void"
2362
- },
2363
- {
2364
- "name": "recordImpression",
2365
- "returns": "void"
2366
- }
2367
- ],
2368
- "tenant": {
2369
- "scoped": true,
2370
- "mode": "optional",
2371
- "field": "tenantId"
2372
- },
2373
- "tableStrategy": "sti",
2374
- "conflictColumns": [
2375
- "tenant_id",
2376
- "slug",
2377
- "context",
2378
- "_meta_type"
2379
- ],
2380
- "surfaces": [
2381
- {
2382
- "kind": "api",
2383
- "name": "advariations.list",
2384
- "operation": "list",
2385
- "objectName": "@happyvertical/smrt-ads:AdVariation",
2386
- "path": "/advariations",
2387
- "method": "GET"
2388
- },
2389
- {
2390
- "kind": "api",
2391
- "name": "advariations.get",
2392
- "operation": "get",
2393
- "objectName": "@happyvertical/smrt-ads:AdVariation",
2394
- "path": "/advariations/[id]",
2395
- "method": "GET"
2396
- },
2397
- {
2398
- "kind": "api",
2399
- "name": "advariations.create",
2400
- "operation": "create",
2401
- "objectName": "@happyvertical/smrt-ads:AdVariation",
2402
- "path": "/advariations",
2403
- "method": "POST"
2404
- },
2405
- {
2406
- "kind": "api",
2407
- "name": "advariations.update",
2408
- "operation": "update",
2409
- "objectName": "@happyvertical/smrt-ads:AdVariation",
2410
- "path": "/advariations/[id]",
2411
- "method": "PATCH"
2422
+ "kind": "cli",
2423
+ "name": "advariationcollection_findDrafts",
2424
+ "operation": "findDrafts",
2425
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2412
2426
  },
2413
2427
  {
2414
2428
  "kind": "cli",
2415
- "name": "advariation_list",
2416
- "operation": "list",
2417
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2418
- },
2419
- {
2420
- "kind": "cli",
2421
- "name": "advariation_get",
2422
- "operation": "get",
2423
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2424
- },
2425
- {
2426
- "kind": "cli",
2427
- "name": "advariation_create",
2428
- "operation": "create",
2429
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2430
- },
2431
- {
2432
- "kind": "cli",
2433
- "name": "advariation_update",
2434
- "operation": "update",
2435
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2436
- },
2437
- {
2438
- "kind": "cli",
2439
- "name": "advariation_delete",
2440
- "operation": "delete",
2441
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2442
- },
2443
- {
2444
- "kind": "cli",
2445
- "name": "advariation_isActive",
2446
- "operation": "isActive",
2447
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2448
- },
2449
- {
2450
- "kind": "cli",
2451
- "name": "advariation_isDraft",
2452
- "operation": "isDraft",
2453
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2429
+ "name": "advariationcollection_findPaused",
2430
+ "operation": "findPaused",
2431
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2454
2432
  },
2455
2433
  {
2456
2434
  "kind": "cli",
2457
- "name": "advariation_isPaused",
2458
- "operation": "isPaused",
2459
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2435
+ "name": "advariationcollection_findTopPerformers",
2436
+ "operation": "findTopPerformers",
2437
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2460
2438
  },
2461
2439
  {
2462
2440
  "kind": "cli",
2463
- "name": "advariation_getCTR",
2464
- "operation": "getCTR",
2465
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2441
+ "name": "advariationcollection_findByTenant",
2442
+ "operation": "findByTenant",
2443
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2466
2444
  },
2467
2445
  {
2468
2446
  "kind": "cli",
2469
- "name": "advariation_recordImpression",
2470
- "operation": "recordImpression",
2471
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2447
+ "name": "advariationcollection_findGlobal",
2448
+ "operation": "findGlobal",
2449
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2472
2450
  },
2473
2451
  {
2474
2452
  "kind": "cli",
2475
- "name": "advariation_recordClick",
2476
- "operation": "recordClick",
2477
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2478
- },
2479
- {
2480
- "kind": "mcp",
2481
- "name": "advariation_list",
2482
- "operation": "list",
2483
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2484
- },
2485
- {
2486
- "kind": "mcp",
2487
- "name": "advariation_get",
2488
- "operation": "get",
2489
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2490
- },
2491
- {
2492
- "kind": "mcp",
2493
- "name": "advariation_create",
2494
- "operation": "create",
2495
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2453
+ "name": "advariationcollection_findWithGlobals",
2454
+ "operation": "findWithGlobals",
2455
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2496
2456
  }
2497
2457
  ],
2498
2458
  "withheldSurfaces": [
2499
2459
  {
2500
2460
  "kind": "api",
2501
- "operation": "getCTR",
2461
+ "operation": "findActive",
2502
2462
  "code": "not-included",
2503
2463
  "reason": "not listed in api.include",
2504
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2464
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2505
2465
  },
2506
2466
  {
2507
2467
  "kind": "api",
2508
- "operation": "isActive",
2468
+ "operation": "findActiveByGroup",
2509
2469
  "code": "not-included",
2510
2470
  "reason": "not listed in api.include",
2511
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2471
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2512
2472
  },
2513
2473
  {
2514
2474
  "kind": "api",
2515
- "operation": "isDraft",
2475
+ "operation": "findByFormat",
2516
2476
  "code": "not-included",
2517
2477
  "reason": "not listed in api.include",
2518
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2478
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2519
2479
  },
2520
2480
  {
2521
2481
  "kind": "api",
2522
- "operation": "isPaused",
2482
+ "operation": "findByGroup",
2523
2483
  "code": "not-included",
2524
2484
  "reason": "not listed in api.include",
2525
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2485
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2526
2486
  },
2527
2487
  {
2528
2488
  "kind": "api",
2529
- "operation": "recordClick",
2489
+ "operation": "findByStatus",
2530
2490
  "code": "not-included",
2531
2491
  "reason": "not listed in api.include",
2532
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2492
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2533
2493
  },
2534
2494
  {
2535
2495
  "kind": "api",
2536
- "operation": "recordImpression",
2496
+ "operation": "findByTenant",
2537
2497
  "code": "not-included",
2538
2498
  "reason": "not listed in api.include",
2539
- "objectName": "@happyvertical/smrt-ads:AdVariation"
2540
- }
2541
- ],
2542
- "relationshipFeatures": [
2543
- "crossPackageRef",
2544
- "foreignKey",
2545
- "uuidColumns"
2546
- ],
2547
- "tags": [],
2548
- "risks": []
2549
- }
2550
- ],
2551
- "surfaces": [
2552
- {
2553
- "kind": "cli",
2554
- "name": "addeliverytiercollection_findByPriority",
2555
- "operation": "findByPriority",
2556
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
2557
- },
2558
- {
2559
- "kind": "cli",
2560
- "name": "addeliverytiercollection_findByPricingModel",
2561
- "operation": "findByPricingModel",
2562
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
2563
- },
2564
- {
2565
- "kind": "cli",
2566
- "name": "addeliverytiercollection_getHighestPriority",
2567
- "operation": "getHighestPriority",
2568
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
2569
- },
2570
- {
2571
- "kind": "cli",
2572
- "name": "addeliverytiercollection_findFixedPricing",
2573
- "operation": "findFixedPricing",
2574
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
2575
- },
2576
- {
2577
- "kind": "cli",
2578
- "name": "addeliverytiercollection_findCPM",
2579
- "operation": "findCPM",
2580
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
2581
- },
2582
- {
2583
- "kind": "cli",
2584
- "name": "addeliverytiercollection_findPerformanceBased",
2585
- "operation": "findPerformanceBased",
2586
- "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
2587
- },
2588
- {
2589
- "kind": "cli",
2590
- "name": "adformatcollection_findByDimensions",
2591
- "operation": "findByDimensions",
2592
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
2593
- },
2594
- {
2595
- "kind": "cli",
2596
- "name": "adformatcollection_findByType",
2597
- "operation": "findByType",
2598
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
2599
- },
2600
- {
2601
- "kind": "cli",
2602
- "name": "adformatcollection_findBanners",
2603
- "operation": "findBanners",
2604
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
2605
- },
2606
- {
2607
- "kind": "cli",
2608
- "name": "adformatcollection_findNative",
2609
- "operation": "findNative",
2610
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
2611
- },
2612
- {
2613
- "kind": "cli",
2614
- "name": "adformatcollection_findVideo",
2615
- "operation": "findVideo",
2616
- "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
2617
- },
2618
- {
2619
- "kind": "cli",
2620
- "name": "adgroupcollection_findByContract",
2621
- "operation": "findByContract",
2622
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2623
- },
2624
- {
2625
- "kind": "cli",
2626
- "name": "adgroupcollection_findByTier",
2627
- "operation": "findByTier",
2628
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2629
- },
2630
- {
2631
- "kind": "cli",
2632
- "name": "adgroupcollection_findByStatus",
2633
- "operation": "findByStatus",
2634
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2635
- },
2636
- {
2637
- "kind": "cli",
2638
- "name": "adgroupcollection_findActive",
2639
- "operation": "findActive",
2640
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2641
- },
2642
- {
2643
- "kind": "cli",
2644
- "name": "adgroupcollection_findByVertical",
2645
- "operation": "findByVertical",
2646
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2647
- },
2648
- {
2649
- "kind": "cli",
2650
- "name": "adgroupcollection_findByZone",
2651
- "operation": "findByZone",
2652
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2653
- },
2654
- {
2655
- "kind": "cli",
2656
- "name": "adgroupcollection_findEligibleForZone",
2657
- "operation": "findEligibleForZone",
2658
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2659
- },
2660
- {
2661
- "kind": "cli",
2662
- "name": "adgroupcollection_findDrafts",
2663
- "operation": "findDrafts",
2664
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2665
- },
2666
- {
2667
- "kind": "cli",
2668
- "name": "adgroupcollection_findPaused",
2669
- "operation": "findPaused",
2670
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2671
- },
2672
- {
2673
- "kind": "cli",
2674
- "name": "adgroupcollection_findCompleted",
2675
- "operation": "findCompleted",
2676
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2677
- },
2678
- {
2679
- "kind": "cli",
2680
- "name": "adgroupcollection_findByTenant",
2681
- "operation": "findByTenant",
2682
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2683
- },
2684
- {
2685
- "kind": "cli",
2686
- "name": "adgroupcollection_findGlobal",
2687
- "operation": "findGlobal",
2688
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2689
- },
2690
- {
2691
- "kind": "cli",
2692
- "name": "adgroupcollection_findWithGlobals",
2693
- "operation": "findWithGlobals",
2694
- "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
2695
- },
2696
- {
2697
- "kind": "cli",
2698
- "name": "advariationcollection_findByGroup",
2699
- "operation": "findByGroup",
2700
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2701
- },
2702
- {
2703
- "kind": "cli",
2704
- "name": "advariationcollection_findByFormat",
2705
- "operation": "findByFormat",
2706
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2707
- },
2708
- {
2709
- "kind": "cli",
2710
- "name": "advariationcollection_findActiveByGroup",
2711
- "operation": "findActiveByGroup",
2712
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2713
- },
2714
- {
2715
- "kind": "cli",
2716
- "name": "advariationcollection_selectByWeight",
2717
- "operation": "selectByWeight",
2718
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2719
- },
2720
- {
2721
- "kind": "cli",
2722
- "name": "advariationcollection_findByStatus",
2723
- "operation": "findByStatus",
2724
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2725
- },
2726
- {
2727
- "kind": "cli",
2728
- "name": "advariationcollection_findActive",
2729
- "operation": "findActive",
2730
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2731
- },
2732
- {
2733
- "kind": "cli",
2734
- "name": "advariationcollection_findDrafts",
2735
- "operation": "findDrafts",
2736
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2737
- },
2738
- {
2739
- "kind": "cli",
2740
- "name": "advariationcollection_findPaused",
2741
- "operation": "findPaused",
2742
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2743
- },
2744
- {
2745
- "kind": "cli",
2746
- "name": "advariationcollection_findTopPerformers",
2747
- "operation": "findTopPerformers",
2748
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2749
- },
2750
- {
2751
- "kind": "cli",
2752
- "name": "advariationcollection_findByTenant",
2753
- "operation": "findByTenant",
2754
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2755
- },
2756
- {
2757
- "kind": "cli",
2758
- "name": "advariationcollection_findGlobal",
2759
- "operation": "findGlobal",
2760
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2761
- },
2762
- {
2763
- "kind": "cli",
2764
- "name": "advariationcollection_findWithGlobals",
2765
- "operation": "findWithGlobals",
2766
- "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2767
- },
2499
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2500
+ },
2501
+ {
2502
+ "kind": "api",
2503
+ "operation": "findDrafts",
2504
+ "code": "not-included",
2505
+ "reason": "not listed in api.include",
2506
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2507
+ },
2508
+ {
2509
+ "kind": "api",
2510
+ "operation": "findGlobal",
2511
+ "code": "not-included",
2512
+ "reason": "not listed in api.include",
2513
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2514
+ },
2515
+ {
2516
+ "kind": "api",
2517
+ "operation": "findPaused",
2518
+ "code": "not-included",
2519
+ "reason": "not listed in api.include",
2520
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2521
+ },
2522
+ {
2523
+ "kind": "api",
2524
+ "operation": "findTopPerformers",
2525
+ "code": "not-included",
2526
+ "reason": "not listed in api.include",
2527
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2528
+ },
2529
+ {
2530
+ "kind": "api",
2531
+ "operation": "findWithGlobals",
2532
+ "code": "not-included",
2533
+ "reason": "not listed in api.include",
2534
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2535
+ },
2536
+ {
2537
+ "kind": "api",
2538
+ "operation": "selectByWeight",
2539
+ "code": "not-included",
2540
+ "reason": "not listed in api.include",
2541
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
2542
+ }
2543
+ ],
2544
+ "relationshipFeatures": [
2545
+ "uuidColumns"
2546
+ ],
2547
+ "tags": [],
2548
+ "risks": []
2549
+ }
2550
+ ],
2551
+ "surfaces": [
2768
2552
  {
2769
2553
  "kind": "api",
2770
2554
  "name": "addeliverytiers.list",
@@ -3238,6 +3022,222 @@
3238
3022
  "name": "advariation_create",
3239
3023
  "operation": "create",
3240
3024
  "objectName": "@happyvertical/smrt-ads:AdVariation"
3025
+ },
3026
+ {
3027
+ "kind": "cli",
3028
+ "name": "addeliverytiercollection_findByPriority",
3029
+ "operation": "findByPriority",
3030
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
3031
+ },
3032
+ {
3033
+ "kind": "cli",
3034
+ "name": "addeliverytiercollection_findByPricingModel",
3035
+ "operation": "findByPricingModel",
3036
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
3037
+ },
3038
+ {
3039
+ "kind": "cli",
3040
+ "name": "addeliverytiercollection_getHighestPriority",
3041
+ "operation": "getHighestPriority",
3042
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
3043
+ },
3044
+ {
3045
+ "kind": "cli",
3046
+ "name": "addeliverytiercollection_findFixedPricing",
3047
+ "operation": "findFixedPricing",
3048
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
3049
+ },
3050
+ {
3051
+ "kind": "cli",
3052
+ "name": "addeliverytiercollection_findCPM",
3053
+ "operation": "findCPM",
3054
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
3055
+ },
3056
+ {
3057
+ "kind": "cli",
3058
+ "name": "addeliverytiercollection_findPerformanceBased",
3059
+ "operation": "findPerformanceBased",
3060
+ "objectName": "@happyvertical/smrt-ads:AdDeliveryTierCollection"
3061
+ },
3062
+ {
3063
+ "kind": "cli",
3064
+ "name": "adformatcollection_findByDimensions",
3065
+ "operation": "findByDimensions",
3066
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
3067
+ },
3068
+ {
3069
+ "kind": "cli",
3070
+ "name": "adformatcollection_findByType",
3071
+ "operation": "findByType",
3072
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
3073
+ },
3074
+ {
3075
+ "kind": "cli",
3076
+ "name": "adformatcollection_findBanners",
3077
+ "operation": "findBanners",
3078
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
3079
+ },
3080
+ {
3081
+ "kind": "cli",
3082
+ "name": "adformatcollection_findNative",
3083
+ "operation": "findNative",
3084
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
3085
+ },
3086
+ {
3087
+ "kind": "cli",
3088
+ "name": "adformatcollection_findVideo",
3089
+ "operation": "findVideo",
3090
+ "objectName": "@happyvertical/smrt-ads:AdFormatCollection"
3091
+ },
3092
+ {
3093
+ "kind": "cli",
3094
+ "name": "adgroupcollection_findByContract",
3095
+ "operation": "findByContract",
3096
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3097
+ },
3098
+ {
3099
+ "kind": "cli",
3100
+ "name": "adgroupcollection_findByTier",
3101
+ "operation": "findByTier",
3102
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3103
+ },
3104
+ {
3105
+ "kind": "cli",
3106
+ "name": "adgroupcollection_findByStatus",
3107
+ "operation": "findByStatus",
3108
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3109
+ },
3110
+ {
3111
+ "kind": "cli",
3112
+ "name": "adgroupcollection_findActive",
3113
+ "operation": "findActive",
3114
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3115
+ },
3116
+ {
3117
+ "kind": "cli",
3118
+ "name": "adgroupcollection_findByVertical",
3119
+ "operation": "findByVertical",
3120
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3121
+ },
3122
+ {
3123
+ "kind": "cli",
3124
+ "name": "adgroupcollection_findByZone",
3125
+ "operation": "findByZone",
3126
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3127
+ },
3128
+ {
3129
+ "kind": "cli",
3130
+ "name": "adgroupcollection_findEligibleForZone",
3131
+ "operation": "findEligibleForZone",
3132
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3133
+ },
3134
+ {
3135
+ "kind": "cli",
3136
+ "name": "adgroupcollection_findDrafts",
3137
+ "operation": "findDrafts",
3138
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3139
+ },
3140
+ {
3141
+ "kind": "cli",
3142
+ "name": "adgroupcollection_findPaused",
3143
+ "operation": "findPaused",
3144
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3145
+ },
3146
+ {
3147
+ "kind": "cli",
3148
+ "name": "adgroupcollection_findCompleted",
3149
+ "operation": "findCompleted",
3150
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3151
+ },
3152
+ {
3153
+ "kind": "cli",
3154
+ "name": "adgroupcollection_findByTenant",
3155
+ "operation": "findByTenant",
3156
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3157
+ },
3158
+ {
3159
+ "kind": "cli",
3160
+ "name": "adgroupcollection_findGlobal",
3161
+ "operation": "findGlobal",
3162
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3163
+ },
3164
+ {
3165
+ "kind": "cli",
3166
+ "name": "adgroupcollection_findWithGlobals",
3167
+ "operation": "findWithGlobals",
3168
+ "objectName": "@happyvertical/smrt-ads:AdGroupCollection"
3169
+ },
3170
+ {
3171
+ "kind": "cli",
3172
+ "name": "advariationcollection_findByGroup",
3173
+ "operation": "findByGroup",
3174
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3175
+ },
3176
+ {
3177
+ "kind": "cli",
3178
+ "name": "advariationcollection_findByFormat",
3179
+ "operation": "findByFormat",
3180
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3181
+ },
3182
+ {
3183
+ "kind": "cli",
3184
+ "name": "advariationcollection_findActiveByGroup",
3185
+ "operation": "findActiveByGroup",
3186
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3187
+ },
3188
+ {
3189
+ "kind": "cli",
3190
+ "name": "advariationcollection_selectByWeight",
3191
+ "operation": "selectByWeight",
3192
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3193
+ },
3194
+ {
3195
+ "kind": "cli",
3196
+ "name": "advariationcollection_findByStatus",
3197
+ "operation": "findByStatus",
3198
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3199
+ },
3200
+ {
3201
+ "kind": "cli",
3202
+ "name": "advariationcollection_findActive",
3203
+ "operation": "findActive",
3204
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3205
+ },
3206
+ {
3207
+ "kind": "cli",
3208
+ "name": "advariationcollection_findDrafts",
3209
+ "operation": "findDrafts",
3210
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3211
+ },
3212
+ {
3213
+ "kind": "cli",
3214
+ "name": "advariationcollection_findPaused",
3215
+ "operation": "findPaused",
3216
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3217
+ },
3218
+ {
3219
+ "kind": "cli",
3220
+ "name": "advariationcollection_findTopPerformers",
3221
+ "operation": "findTopPerformers",
3222
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3223
+ },
3224
+ {
3225
+ "kind": "cli",
3226
+ "name": "advariationcollection_findByTenant",
3227
+ "operation": "findByTenant",
3228
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3229
+ },
3230
+ {
3231
+ "kind": "cli",
3232
+ "name": "advariationcollection_findGlobal",
3233
+ "operation": "findGlobal",
3234
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3235
+ },
3236
+ {
3237
+ "kind": "cli",
3238
+ "name": "advariationcollection_findWithGlobals",
3239
+ "operation": "findWithGlobals",
3240
+ "objectName": "@happyvertical/smrt-ads:AdVariationCollection"
3241
3241
  }
3242
3242
  ],
3243
3243
  "prompts": [],