@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.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +1172 -1172
- package/dist/smrt-knowledge.json +1866 -1866
- package/package.json +6 -6
package/dist/manifest.json
CHANGED
|
@@ -2,68 +2,86 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-ads",
|
|
5
|
-
"packageVersion": "0.57.
|
|
5
|
+
"packageVersion": "0.57.39",
|
|
6
6
|
"objects": {
|
|
7
|
-
"@happyvertical/smrt-ads:
|
|
8
|
-
"name": "
|
|
9
|
-
"className": "
|
|
10
|
-
"qualifiedName": "@happyvertical/smrt-ads:
|
|
7
|
+
"@happyvertical/smrt-ads:AdDeliveryTier": {
|
|
8
|
+
"name": "addeliverytier",
|
|
9
|
+
"className": "AdDeliveryTier",
|
|
10
|
+
"qualifiedName": "@happyvertical/smrt-ads:AdDeliveryTier",
|
|
11
11
|
"collection": "addeliverytiers",
|
|
12
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/
|
|
12
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/models/AdDeliveryTier.ts",
|
|
13
13
|
"packageName": "@happyvertical/smrt-ads",
|
|
14
|
-
"fields": {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
"fields": {
|
|
15
|
+
"name": {
|
|
16
|
+
"type": "text",
|
|
17
|
+
"required": false,
|
|
18
|
+
"default": "",
|
|
19
|
+
"description": "What the tier is called, for example Sponsorship, Standard or House.",
|
|
20
|
+
"_meta": {
|
|
21
|
+
"description": "What the tier is called, for example Sponsorship, Standard or House."
|
|
22
|
+
}
|
|
23
23
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
24
|
+
"priority": {
|
|
25
|
+
"type": "integer",
|
|
26
|
+
"required": false,
|
|
27
|
+
"default": 0,
|
|
28
|
+
"description": "The order tiers are tried in: 1 is tried first, then 2, and so on.",
|
|
29
|
+
"_meta": {
|
|
30
|
+
"description": "The order tiers are tried in: 1 is tried first, then 2, and so on."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"pricingModel": {
|
|
34
|
+
"type": "text",
|
|
35
|
+
"required": false,
|
|
36
|
+
"description": "How ads in this tier are charged: a fixed price, per thousand showings, per click, or per sale.",
|
|
37
|
+
"_meta": {
|
|
38
|
+
"description": "How ads in this tier are charged: a fixed price, per thousand showings, per click, or per sale."
|
|
39
|
+
},
|
|
40
|
+
"enum": [
|
|
41
|
+
"fixed",
|
|
42
|
+
"cpm",
|
|
43
|
+
"cpc",
|
|
44
|
+
"cpa"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"description": {
|
|
48
|
+
"type": "text",
|
|
49
|
+
"required": false,
|
|
50
|
+
"default": "",
|
|
51
|
+
"description": "A note about what this tier is for.",
|
|
52
|
+
"_meta": {
|
|
53
|
+
"description": "A note about what this tier is for."
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"methods": {
|
|
58
|
+
"isHigherPriorityThan": {
|
|
59
|
+
"name": "isHigherPriorityThan",
|
|
60
|
+
"async": false,
|
|
27
61
|
"parameters": [
|
|
28
62
|
{
|
|
29
|
-
"name": "
|
|
30
|
-
"type": "
|
|
63
|
+
"name": "other",
|
|
64
|
+
"type": "AdDeliveryTier",
|
|
31
65
|
"optional": false
|
|
32
66
|
}
|
|
33
67
|
],
|
|
34
|
-
"returnType": "
|
|
35
|
-
"isStatic": false,
|
|
36
|
-
"isPublic": true
|
|
37
|
-
},
|
|
38
|
-
"getHighestPriority": {
|
|
39
|
-
"name": "getHighestPriority",
|
|
40
|
-
"async": true,
|
|
41
|
-
"parameters": [],
|
|
42
|
-
"returnType": "Promise<AdDeliveryTier | null>",
|
|
43
|
-
"isStatic": false,
|
|
44
|
-
"isPublic": true
|
|
45
|
-
},
|
|
46
|
-
"findFixedPricing": {
|
|
47
|
-
"name": "findFixedPricing",
|
|
48
|
-
"async": true,
|
|
49
|
-
"parameters": [],
|
|
50
|
-
"returnType": "Promise<AdDeliveryTier[]>",
|
|
68
|
+
"returnType": "boolean",
|
|
51
69
|
"isStatic": false,
|
|
52
70
|
"isPublic": true
|
|
53
71
|
},
|
|
54
|
-
"
|
|
55
|
-
"name": "
|
|
56
|
-
"async":
|
|
72
|
+
"isFixedPricing": {
|
|
73
|
+
"name": "isFixedPricing",
|
|
74
|
+
"async": false,
|
|
57
75
|
"parameters": [],
|
|
58
|
-
"returnType": "
|
|
76
|
+
"returnType": "boolean",
|
|
59
77
|
"isStatic": false,
|
|
60
78
|
"isPublic": true
|
|
61
79
|
},
|
|
62
|
-
"
|
|
63
|
-
"name": "
|
|
64
|
-
"async":
|
|
80
|
+
"isPerformanceBased": {
|
|
81
|
+
"name": "isPerformanceBased",
|
|
82
|
+
"async": false,
|
|
65
83
|
"parameters": [],
|
|
66
|
-
"returnType": "
|
|
84
|
+
"returnType": "boolean",
|
|
67
85
|
"isStatic": false,
|
|
68
86
|
"isPublic": true
|
|
69
87
|
}
|
|
@@ -82,12 +100,15 @@
|
|
|
82
100
|
"list",
|
|
83
101
|
"get"
|
|
84
102
|
]
|
|
103
|
+
},
|
|
104
|
+
"cli": {
|
|
105
|
+
"skipApiCheck": true
|
|
85
106
|
}
|
|
86
107
|
},
|
|
87
|
-
"extends": "
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
108
|
+
"extends": "SmrtObject",
|
|
109
|
+
"exportName": "AdDeliveryTier",
|
|
110
|
+
"collectionExportName": "AdDeliveryTierCollection",
|
|
111
|
+
"displayLabelField": "name",
|
|
91
112
|
"schema": {
|
|
92
113
|
"tableName": "ad_delivery_tiers",
|
|
93
114
|
"ddl": "CREATE TABLE IF NOT EXISTS \"ad_delivery_tiers\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"priority\" INTEGER DEFAULT 0,\n \"pricing_model\" TEXT,\n \"description\" TEXT DEFAULT ''\n);",
|
|
@@ -161,227 +182,125 @@
|
|
|
161
182
|
},
|
|
162
183
|
"importPath": "@happyvertical/smrt-ads"
|
|
163
184
|
},
|
|
164
|
-
"@happyvertical/smrt-ads:
|
|
165
|
-
"name": "
|
|
166
|
-
"className": "
|
|
167
|
-
"qualifiedName": "@happyvertical/smrt-ads:
|
|
185
|
+
"@happyvertical/smrt-ads:AdEvent": {
|
|
186
|
+
"name": "adevent",
|
|
187
|
+
"className": "AdEvent",
|
|
188
|
+
"qualifiedName": "@happyvertical/smrt-ads:AdEvent",
|
|
168
189
|
"collection": "adevents",
|
|
169
|
-
"
|
|
190
|
+
"description": "AdEvent tracks ad impressions, clicks, and conversions. Events are immutable (append-only, no update/delete).",
|
|
191
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/models/AdEvent.ts",
|
|
170
192
|
"packageName": "@happyvertical/smrt-ads",
|
|
171
|
-
"fields": {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
"
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
193
|
+
"fields": {
|
|
194
|
+
"created_at": {
|
|
195
|
+
"type": "datetime",
|
|
196
|
+
"required": false
|
|
197
|
+
},
|
|
198
|
+
"updated_at": {
|
|
199
|
+
"type": "datetime",
|
|
200
|
+
"required": false
|
|
201
|
+
},
|
|
202
|
+
"tenantId": {
|
|
203
|
+
"type": "text",
|
|
204
|
+
"required": false,
|
|
205
|
+
"_meta": {
|
|
206
|
+
"sqlType": "UUID",
|
|
207
|
+
"nullable": true,
|
|
208
|
+
"__tenancy": {
|
|
209
|
+
"isTenantIdField": true,
|
|
210
|
+
"autoFilter": true,
|
|
211
|
+
"required": false,
|
|
212
|
+
"autoPopulate": true,
|
|
213
|
+
"nullable": true,
|
|
214
|
+
"mode": "optional",
|
|
215
|
+
"field": "tenantId",
|
|
216
|
+
"allowSuperAdminBypass": false
|
|
181
217
|
}
|
|
182
|
-
|
|
183
|
-
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"variationId": {
|
|
221
|
+
"type": "foreignKey",
|
|
222
|
+
"required": false,
|
|
223
|
+
"related": "AdVariation"
|
|
224
|
+
},
|
|
225
|
+
"zoneId": {
|
|
226
|
+
"type": "crossPackageRef",
|
|
227
|
+
"required": false,
|
|
228
|
+
"related": "@happyvertical/smrt-properties:Zone"
|
|
229
|
+
},
|
|
230
|
+
"siteId": {
|
|
231
|
+
"type": "text",
|
|
232
|
+
"required": false,
|
|
233
|
+
"default": ""
|
|
234
|
+
},
|
|
235
|
+
"eventType": {
|
|
236
|
+
"type": "text",
|
|
237
|
+
"required": false,
|
|
238
|
+
"enum": [
|
|
239
|
+
"impression",
|
|
240
|
+
"click",
|
|
241
|
+
"conversion"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"timestamp": {
|
|
245
|
+
"type": "datetime",
|
|
246
|
+
"required": false
|
|
247
|
+
},
|
|
248
|
+
"metadata": {
|
|
249
|
+
"type": "text",
|
|
250
|
+
"required": false,
|
|
251
|
+
"default": ""
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"methods": {
|
|
255
|
+
"getMetadata": {
|
|
256
|
+
"name": "getMetadata",
|
|
257
|
+
"async": false,
|
|
258
|
+
"parameters": [],
|
|
259
|
+
"returnType": "Record<string, unknown>",
|
|
184
260
|
"isStatic": false,
|
|
185
261
|
"isPublic": true
|
|
186
262
|
},
|
|
187
|
-
"
|
|
188
|
-
"name": "
|
|
189
|
-
"async":
|
|
263
|
+
"setMetadata": {
|
|
264
|
+
"name": "setMetadata",
|
|
265
|
+
"async": false,
|
|
190
266
|
"parameters": [
|
|
191
267
|
{
|
|
192
|
-
"name": "
|
|
193
|
-
"type": "string",
|
|
268
|
+
"name": "data",
|
|
269
|
+
"type": "Record<string, unknown>",
|
|
194
270
|
"optional": false
|
|
195
271
|
}
|
|
196
272
|
],
|
|
197
|
-
"returnType": "
|
|
273
|
+
"returnType": "void",
|
|
198
274
|
"isStatic": false,
|
|
199
275
|
"isPublic": true
|
|
200
276
|
},
|
|
201
|
-
"
|
|
202
|
-
"name": "
|
|
203
|
-
"async":
|
|
204
|
-
"parameters": [
|
|
205
|
-
|
|
206
|
-
"name": "siteId",
|
|
207
|
-
"type": "string",
|
|
208
|
-
"optional": false
|
|
209
|
-
}
|
|
210
|
-
],
|
|
211
|
-
"returnType": "Promise<AdEvent[]>",
|
|
277
|
+
"isImpression": {
|
|
278
|
+
"name": "isImpression",
|
|
279
|
+
"async": false,
|
|
280
|
+
"parameters": [],
|
|
281
|
+
"returnType": "boolean",
|
|
212
282
|
"isStatic": false,
|
|
213
283
|
"isPublic": true
|
|
214
284
|
},
|
|
215
|
-
"
|
|
216
|
-
"name": "
|
|
217
|
-
"async":
|
|
218
|
-
"parameters": [
|
|
219
|
-
|
|
220
|
-
"name": "start",
|
|
221
|
-
"type": "Date",
|
|
222
|
-
"optional": false
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"name": "end",
|
|
226
|
-
"type": "Date",
|
|
227
|
-
"optional": false
|
|
228
|
-
}
|
|
229
|
-
],
|
|
230
|
-
"returnType": "Promise<AdEvent[]>",
|
|
285
|
+
"isClick": {
|
|
286
|
+
"name": "isClick",
|
|
287
|
+
"async": false,
|
|
288
|
+
"parameters": [],
|
|
289
|
+
"returnType": "boolean",
|
|
231
290
|
"isStatic": false,
|
|
232
291
|
"isPublic": true
|
|
233
292
|
},
|
|
234
|
-
"
|
|
235
|
-
"name": "
|
|
236
|
-
"async":
|
|
237
|
-
"parameters": [
|
|
238
|
-
{
|
|
239
|
-
"name": "eventType",
|
|
240
|
-
"type": "AdEventType",
|
|
241
|
-
"optional": false
|
|
242
|
-
}
|
|
243
|
-
],
|
|
244
|
-
"returnType": "Promise<AdEvent[]>",
|
|
245
|
-
"isStatic": false,
|
|
246
|
-
"isPublic": true
|
|
247
|
-
},
|
|
248
|
-
"countByType": {
|
|
249
|
-
"name": "countByType",
|
|
250
|
-
"async": true,
|
|
251
|
-
"parameters": [
|
|
252
|
-
{
|
|
253
|
-
"name": "variationId",
|
|
254
|
-
"type": "string",
|
|
255
|
-
"optional": false
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
"name": "eventType",
|
|
259
|
-
"type": "AdEventType",
|
|
260
|
-
"optional": false
|
|
261
|
-
}
|
|
262
|
-
],
|
|
263
|
-
"returnType": "Promise<number>",
|
|
264
|
-
"isStatic": false,
|
|
265
|
-
"isPublic": true
|
|
266
|
-
},
|
|
267
|
-
"countImpressions": {
|
|
268
|
-
"name": "countImpressions",
|
|
269
|
-
"async": true,
|
|
270
|
-
"parameters": [
|
|
271
|
-
{
|
|
272
|
-
"name": "variationId",
|
|
273
|
-
"type": "string",
|
|
274
|
-
"optional": false
|
|
275
|
-
}
|
|
276
|
-
],
|
|
277
|
-
"returnType": "Promise<number>",
|
|
278
|
-
"isStatic": false,
|
|
279
|
-
"isPublic": true
|
|
280
|
-
},
|
|
281
|
-
"countClicks": {
|
|
282
|
-
"name": "countClicks",
|
|
283
|
-
"async": true,
|
|
284
|
-
"parameters": [
|
|
285
|
-
{
|
|
286
|
-
"name": "variationId",
|
|
287
|
-
"type": "string",
|
|
288
|
-
"optional": false
|
|
289
|
-
}
|
|
290
|
-
],
|
|
291
|
-
"returnType": "Promise<number>",
|
|
292
|
-
"isStatic": false,
|
|
293
|
-
"isPublic": true
|
|
294
|
-
},
|
|
295
|
-
"countConversions": {
|
|
296
|
-
"name": "countConversions",
|
|
297
|
-
"async": true,
|
|
298
|
-
"parameters": [
|
|
299
|
-
{
|
|
300
|
-
"name": "variationId",
|
|
301
|
-
"type": "string",
|
|
302
|
-
"optional": false
|
|
303
|
-
}
|
|
304
|
-
],
|
|
305
|
-
"returnType": "Promise<number>",
|
|
306
|
-
"isStatic": false,
|
|
307
|
-
"isPublic": true
|
|
308
|
-
},
|
|
309
|
-
"findImpressions": {
|
|
310
|
-
"name": "findImpressions",
|
|
311
|
-
"async": true,
|
|
312
|
-
"parameters": [],
|
|
313
|
-
"returnType": "Promise<AdEvent[]>",
|
|
314
|
-
"isStatic": false,
|
|
315
|
-
"isPublic": true
|
|
316
|
-
},
|
|
317
|
-
"findClicks": {
|
|
318
|
-
"name": "findClicks",
|
|
319
|
-
"async": true,
|
|
320
|
-
"parameters": [],
|
|
321
|
-
"returnType": "Promise<AdEvent[]>",
|
|
322
|
-
"isStatic": false,
|
|
323
|
-
"isPublic": true
|
|
324
|
-
},
|
|
325
|
-
"findConversions": {
|
|
326
|
-
"name": "findConversions",
|
|
327
|
-
"async": true,
|
|
328
|
-
"parameters": [],
|
|
329
|
-
"returnType": "Promise<AdEvent[]>",
|
|
330
|
-
"isStatic": false,
|
|
331
|
-
"isPublic": true
|
|
332
|
-
},
|
|
333
|
-
"getVariationStats": {
|
|
334
|
-
"name": "getVariationStats",
|
|
335
|
-
"async": true,
|
|
336
|
-
"parameters": [
|
|
337
|
-
{
|
|
338
|
-
"name": "variationId",
|
|
339
|
-
"type": "string",
|
|
340
|
-
"optional": false
|
|
341
|
-
}
|
|
342
|
-
],
|
|
343
|
-
"returnType": "Promise<object>",
|
|
344
|
-
"isStatic": false,
|
|
345
|
-
"isPublic": true
|
|
346
|
-
},
|
|
347
|
-
"findByTenant": {
|
|
348
|
-
"name": "findByTenant",
|
|
349
|
-
"async": true,
|
|
350
|
-
"parameters": [
|
|
351
|
-
{
|
|
352
|
-
"name": "tenantId",
|
|
353
|
-
"type": "string",
|
|
354
|
-
"optional": false
|
|
355
|
-
}
|
|
356
|
-
],
|
|
357
|
-
"returnType": "Promise<AdEvent[]>",
|
|
358
|
-
"isStatic": false,
|
|
359
|
-
"isPublic": true
|
|
360
|
-
},
|
|
361
|
-
"findGlobal": {
|
|
362
|
-
"name": "findGlobal",
|
|
363
|
-
"async": true,
|
|
293
|
+
"isConversion": {
|
|
294
|
+
"name": "isConversion",
|
|
295
|
+
"async": false,
|
|
364
296
|
"parameters": [],
|
|
365
|
-
"returnType": "
|
|
366
|
-
"isStatic": false,
|
|
367
|
-
"isPublic": true
|
|
368
|
-
},
|
|
369
|
-
"findWithGlobals": {
|
|
370
|
-
"name": "findWithGlobals",
|
|
371
|
-
"async": true,
|
|
372
|
-
"parameters": [
|
|
373
|
-
{
|
|
374
|
-
"name": "tenantId",
|
|
375
|
-
"type": "string",
|
|
376
|
-
"optional": false
|
|
377
|
-
}
|
|
378
|
-
],
|
|
379
|
-
"returnType": "Promise<AdEvent[]>",
|
|
297
|
+
"returnType": "boolean",
|
|
380
298
|
"isStatic": false,
|
|
381
299
|
"isPublic": true
|
|
382
300
|
}
|
|
383
301
|
},
|
|
384
302
|
"decoratorConfig": {
|
|
303
|
+
"tableStrategy": "sti",
|
|
385
304
|
"api": {
|
|
386
305
|
"include": [
|
|
387
306
|
"create",
|
|
@@ -393,12 +312,20 @@
|
|
|
393
312
|
"create"
|
|
394
313
|
]
|
|
395
314
|
},
|
|
396
|
-
"cli": false
|
|
315
|
+
"cli": false,
|
|
316
|
+
"tenantScoped": {
|
|
317
|
+
"mode": "optional"
|
|
318
|
+
},
|
|
319
|
+
"conflictColumns": [
|
|
320
|
+
"tenant_id",
|
|
321
|
+
"slug",
|
|
322
|
+
"context",
|
|
323
|
+
"_meta_type"
|
|
324
|
+
]
|
|
397
325
|
},
|
|
398
|
-
"extends": "
|
|
399
|
-
"
|
|
400
|
-
"
|
|
401
|
-
"collectionExportName": "AdEventCollectionCollection",
|
|
326
|
+
"extends": "SmrtObject",
|
|
327
|
+
"exportName": "AdEvent",
|
|
328
|
+
"collectionExportName": "AdEventCollection",
|
|
402
329
|
"schema": {
|
|
403
330
|
"tableName": "ad_events",
|
|
404
331
|
"ddl": "CREATE TABLE IF NOT EXISTS \"ad_events\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"variation_id\" UUID,\n \"zone_id\" UUID,\n \"site_id\" TEXT DEFAULT '',\n \"event_type\" TEXT,\n \"timestamp\" TIMESTAMP,\n \"metadata\" TEXT DEFAULT ''\n);",
|
|
@@ -518,18 +445,76 @@
|
|
|
518
445
|
},
|
|
519
446
|
"importPath": "@happyvertical/smrt-ads"
|
|
520
447
|
},
|
|
521
|
-
"@happyvertical/smrt-ads:
|
|
522
|
-
"name": "
|
|
523
|
-
"className": "
|
|
524
|
-
"qualifiedName": "@happyvertical/smrt-ads:
|
|
448
|
+
"@happyvertical/smrt-ads:AdFormat": {
|
|
449
|
+
"name": "adformat",
|
|
450
|
+
"className": "AdFormat",
|
|
451
|
+
"qualifiedName": "@happyvertical/smrt-ads:AdFormat",
|
|
525
452
|
"collection": "adformats",
|
|
526
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/
|
|
453
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/models/AdFormat.ts",
|
|
527
454
|
"packageName": "@happyvertical/smrt-ads",
|
|
528
|
-
"fields": {
|
|
455
|
+
"fields": {
|
|
456
|
+
"name": {
|
|
457
|
+
"type": "text",
|
|
458
|
+
"required": false,
|
|
459
|
+
"default": "",
|
|
460
|
+
"description": "What the size is called, for example Leaderboard.",
|
|
461
|
+
"_meta": {
|
|
462
|
+
"description": "What the size is called, for example Leaderboard."
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"width": {
|
|
466
|
+
"type": "integer",
|
|
467
|
+
"required": false,
|
|
468
|
+
"default": 0,
|
|
469
|
+
"description": "How wide the ad is, in pixels.",
|
|
470
|
+
"_meta": {
|
|
471
|
+
"description": "How wide the ad is, in pixels."
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"height": {
|
|
475
|
+
"type": "integer",
|
|
476
|
+
"required": false,
|
|
477
|
+
"default": 0,
|
|
478
|
+
"description": "How tall the ad is, in pixels.",
|
|
479
|
+
"_meta": {
|
|
480
|
+
"description": "How tall the ad is, in pixels."
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"formatType": {
|
|
484
|
+
"type": "text",
|
|
485
|
+
"required": false,
|
|
486
|
+
"description": "What kind of ad fits this size: a picture, a piece written to look like your own content, or a video.",
|
|
487
|
+
"_meta": {
|
|
488
|
+
"description": "What kind of ad fits this size: a picture, a piece written to look like your own content, or a video."
|
|
489
|
+
},
|
|
490
|
+
"enum": [
|
|
491
|
+
"banner",
|
|
492
|
+
"native",
|
|
493
|
+
"video"
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
"description": {
|
|
497
|
+
"type": "text",
|
|
498
|
+
"required": false,
|
|
499
|
+
"default": "",
|
|
500
|
+
"description": "A note about where this size is usually used.",
|
|
501
|
+
"_meta": {
|
|
502
|
+
"description": "A note about where this size is usually used."
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
},
|
|
529
506
|
"methods": {
|
|
530
|
-
"
|
|
531
|
-
"name": "
|
|
532
|
-
"async":
|
|
507
|
+
"getDimensions": {
|
|
508
|
+
"name": "getDimensions",
|
|
509
|
+
"async": false,
|
|
510
|
+
"parameters": [],
|
|
511
|
+
"returnType": "string",
|
|
512
|
+
"isStatic": false,
|
|
513
|
+
"isPublic": true
|
|
514
|
+
},
|
|
515
|
+
"matchesDimensions": {
|
|
516
|
+
"name": "matchesDimensions",
|
|
517
|
+
"async": false,
|
|
533
518
|
"parameters": [
|
|
534
519
|
{
|
|
535
520
|
"name": "width",
|
|
@@ -542,69 +527,34 @@
|
|
|
542
527
|
"optional": false
|
|
543
528
|
}
|
|
544
529
|
],
|
|
545
|
-
"returnType": "
|
|
530
|
+
"returnType": "boolean",
|
|
546
531
|
"isStatic": false,
|
|
547
532
|
"isPublic": true
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
"
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
],
|
|
559
|
-
"returnType": "Promise<AdFormat[]>",
|
|
560
|
-
"isStatic": false,
|
|
561
|
-
"isPublic": true
|
|
562
|
-
},
|
|
563
|
-
"findBanners": {
|
|
564
|
-
"name": "findBanners",
|
|
565
|
-
"async": true,
|
|
566
|
-
"parameters": [],
|
|
567
|
-
"returnType": "Promise<AdFormat[]>",
|
|
568
|
-
"isStatic": false,
|
|
569
|
-
"isPublic": true
|
|
570
|
-
},
|
|
571
|
-
"findNative": {
|
|
572
|
-
"name": "findNative",
|
|
573
|
-
"async": true,
|
|
574
|
-
"parameters": [],
|
|
575
|
-
"returnType": "Promise<AdFormat[]>",
|
|
576
|
-
"isStatic": false,
|
|
577
|
-
"isPublic": true
|
|
578
|
-
},
|
|
579
|
-
"findVideo": {
|
|
580
|
-
"name": "findVideo",
|
|
581
|
-
"async": true,
|
|
582
|
-
"parameters": [],
|
|
583
|
-
"returnType": "Promise<AdFormat[]>",
|
|
584
|
-
"isStatic": false,
|
|
585
|
-
"isPublic": true
|
|
586
|
-
}
|
|
587
|
-
},
|
|
588
|
-
"decoratorConfig": {
|
|
589
|
-
"api": {
|
|
590
|
-
"include": [
|
|
591
|
-
"list",
|
|
592
|
-
"get",
|
|
593
|
-
"create",
|
|
594
|
-
"update"
|
|
595
|
-
]
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
"decoratorConfig": {
|
|
536
|
+
"api": {
|
|
537
|
+
"include": [
|
|
538
|
+
"list",
|
|
539
|
+
"get",
|
|
540
|
+
"create",
|
|
541
|
+
"update"
|
|
542
|
+
]
|
|
596
543
|
},
|
|
597
544
|
"mcp": {
|
|
598
545
|
"include": [
|
|
599
546
|
"list",
|
|
600
547
|
"get"
|
|
601
548
|
]
|
|
549
|
+
},
|
|
550
|
+
"cli": {
|
|
551
|
+
"skipApiCheck": true
|
|
602
552
|
}
|
|
603
553
|
},
|
|
604
|
-
"extends": "
|
|
605
|
-
"
|
|
606
|
-
"
|
|
607
|
-
"
|
|
554
|
+
"extends": "SmrtObject",
|
|
555
|
+
"exportName": "AdFormat",
|
|
556
|
+
"collectionExportName": "AdFormatCollection",
|
|
557
|
+
"displayLabelField": "name",
|
|
608
558
|
"schema": {
|
|
609
559
|
"tableName": "ad_formats",
|
|
610
560
|
"ddl": "CREATE TABLE IF NOT EXISTS \"ad_formats\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"width\" INTEGER DEFAULT 0,\n \"height\" INTEGER DEFAULT 0,\n \"format_type\" TEXT,\n \"description\" TEXT DEFAULT ''\n);",
|
|
@@ -684,169 +634,275 @@
|
|
|
684
634
|
},
|
|
685
635
|
"importPath": "@happyvertical/smrt-ads"
|
|
686
636
|
},
|
|
687
|
-
"@happyvertical/smrt-ads:
|
|
688
|
-
"name": "
|
|
689
|
-
"className": "
|
|
690
|
-
"qualifiedName": "@happyvertical/smrt-ads:
|
|
637
|
+
"@happyvertical/smrt-ads:AdGroup": {
|
|
638
|
+
"name": "adgroup",
|
|
639
|
+
"className": "AdGroup",
|
|
640
|
+
"qualifiedName": "@happyvertical/smrt-ads:AdGroup",
|
|
691
641
|
"collection": "adgroups",
|
|
692
|
-
"
|
|
642
|
+
"description": "AdGroup organizes ad creatives with targeting and budget controls.",
|
|
643
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/models/AdGroup.ts",
|
|
693
644
|
"packageName": "@happyvertical/smrt-ads",
|
|
694
|
-
"fields": {
|
|
645
|
+
"fields": {
|
|
646
|
+
"created_at": {
|
|
647
|
+
"type": "datetime",
|
|
648
|
+
"required": false
|
|
649
|
+
},
|
|
650
|
+
"updated_at": {
|
|
651
|
+
"type": "datetime",
|
|
652
|
+
"required": false
|
|
653
|
+
},
|
|
654
|
+
"tenantId": {
|
|
655
|
+
"type": "text",
|
|
656
|
+
"required": false,
|
|
657
|
+
"_meta": {
|
|
658
|
+
"sqlType": "UUID",
|
|
659
|
+
"nullable": true,
|
|
660
|
+
"__tenancy": {
|
|
661
|
+
"isTenantIdField": true,
|
|
662
|
+
"autoFilter": true,
|
|
663
|
+
"required": false,
|
|
664
|
+
"autoPopulate": true,
|
|
665
|
+
"nullable": true,
|
|
666
|
+
"mode": "optional",
|
|
667
|
+
"field": "tenantId",
|
|
668
|
+
"allowSuperAdminBypass": false
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"contractId": {
|
|
673
|
+
"type": "crossPackageRef",
|
|
674
|
+
"required": false,
|
|
675
|
+
"related": "@happyvertical/smrt-commerce:SalesContract",
|
|
676
|
+
"description": "The sales contract this campaign is sold under, if there is one.",
|
|
677
|
+
"_meta": {
|
|
678
|
+
"description": "The sales contract this campaign is sold under, if there is one.",
|
|
679
|
+
"validateSubtype": true
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
"tierId": {
|
|
683
|
+
"type": "foreignKey",
|
|
684
|
+
"required": false,
|
|
685
|
+
"related": "AdDeliveryTier",
|
|
686
|
+
"description": "The priority tier the campaign runs in. Tiers are tried in order when more than one campaign could show.",
|
|
687
|
+
"_meta": {
|
|
688
|
+
"description": "The priority tier the campaign runs in. Tiers are tried in order when more than one campaign could show."
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
"name": {
|
|
692
|
+
"type": "text",
|
|
693
|
+
"required": false,
|
|
694
|
+
"default": "",
|
|
695
|
+
"description": "What you call the campaign, for example Summer sale.",
|
|
696
|
+
"_meta": {
|
|
697
|
+
"description": "What you call the campaign, for example Summer sale."
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
"verticalSlug": {
|
|
701
|
+
"type": "text",
|
|
702
|
+
"required": false,
|
|
703
|
+
"default": "",
|
|
704
|
+
"description": "The category the campaign belongs to, such as retail.",
|
|
705
|
+
"_meta": {
|
|
706
|
+
"description": "The category the campaign belongs to, such as retail."
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
"targeting": {
|
|
710
|
+
"type": "text",
|
|
711
|
+
"required": false,
|
|
712
|
+
"default": ""
|
|
713
|
+
},
|
|
714
|
+
"zoneIds": {
|
|
715
|
+
"type": "text",
|
|
716
|
+
"required": false,
|
|
717
|
+
"default": ""
|
|
718
|
+
},
|
|
719
|
+
"startDate": {
|
|
720
|
+
"type": "datetime",
|
|
721
|
+
"required": false,
|
|
722
|
+
"description": "The first day the campaign can show.",
|
|
723
|
+
"_meta": {
|
|
724
|
+
"description": "The first day the campaign can show."
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
"endDate": {
|
|
728
|
+
"type": "datetime",
|
|
729
|
+
"required": false,
|
|
730
|
+
"description": "The last day the campaign can show.",
|
|
731
|
+
"_meta": {
|
|
732
|
+
"description": "The last day the campaign can show."
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
"dailyBudget": {
|
|
736
|
+
"type": "decimal",
|
|
737
|
+
"required": false,
|
|
738
|
+
"default": 0,
|
|
739
|
+
"description": "The most to spend in one day. The app shows this but does not stop the campaign by itself.",
|
|
740
|
+
"_meta": {
|
|
741
|
+
"description": "The most to spend in one day. The app shows this but does not stop the campaign by itself."
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
"totalBudget": {
|
|
745
|
+
"type": "decimal",
|
|
746
|
+
"required": false,
|
|
747
|
+
"default": 0,
|
|
748
|
+
"description": "The most to spend over the whole campaign.",
|
|
749
|
+
"_meta": {
|
|
750
|
+
"description": "The most to spend over the whole campaign."
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
"status": {
|
|
754
|
+
"type": "text",
|
|
755
|
+
"required": false,
|
|
756
|
+
"description": "Where the campaign stands: draft, active, paused or completed. Only active campaigns show ads.",
|
|
757
|
+
"_meta": {
|
|
758
|
+
"description": "Where the campaign stands: draft, active, paused or completed. Only active campaigns show ads."
|
|
759
|
+
},
|
|
760
|
+
"enum": [
|
|
761
|
+
"draft",
|
|
762
|
+
"active",
|
|
763
|
+
"paused",
|
|
764
|
+
"completed"
|
|
765
|
+
]
|
|
766
|
+
}
|
|
767
|
+
},
|
|
695
768
|
"methods": {
|
|
696
|
-
"
|
|
697
|
-
"name": "
|
|
698
|
-
"async":
|
|
769
|
+
"getZoneIds": {
|
|
770
|
+
"name": "getZoneIds",
|
|
771
|
+
"async": false,
|
|
772
|
+
"parameters": [],
|
|
773
|
+
"returnType": "string[]",
|
|
774
|
+
"isStatic": false,
|
|
775
|
+
"isPublic": true
|
|
776
|
+
},
|
|
777
|
+
"setZoneIds": {
|
|
778
|
+
"name": "setZoneIds",
|
|
779
|
+
"async": false,
|
|
699
780
|
"parameters": [
|
|
700
781
|
{
|
|
701
|
-
"name": "
|
|
702
|
-
"type": "string",
|
|
782
|
+
"name": "ids",
|
|
783
|
+
"type": "string[]",
|
|
703
784
|
"optional": false
|
|
704
785
|
}
|
|
705
786
|
],
|
|
706
|
-
"returnType": "
|
|
787
|
+
"returnType": "void",
|
|
707
788
|
"isStatic": false,
|
|
708
789
|
"isPublic": true
|
|
709
790
|
},
|
|
710
|
-
"
|
|
711
|
-
"name": "
|
|
712
|
-
"async":
|
|
791
|
+
"addZoneId": {
|
|
792
|
+
"name": "addZoneId",
|
|
793
|
+
"async": false,
|
|
713
794
|
"parameters": [
|
|
714
795
|
{
|
|
715
|
-
"name": "
|
|
796
|
+
"name": "zoneId",
|
|
716
797
|
"type": "string",
|
|
717
798
|
"optional": false
|
|
718
799
|
}
|
|
719
800
|
],
|
|
720
|
-
"returnType": "
|
|
801
|
+
"returnType": "void",
|
|
721
802
|
"isStatic": false,
|
|
722
803
|
"isPublic": true
|
|
723
804
|
},
|
|
724
|
-
"
|
|
725
|
-
"name": "
|
|
726
|
-
"async":
|
|
805
|
+
"removeZoneId": {
|
|
806
|
+
"name": "removeZoneId",
|
|
807
|
+
"async": false,
|
|
727
808
|
"parameters": [
|
|
728
809
|
{
|
|
729
|
-
"name": "
|
|
730
|
-
"type": "
|
|
810
|
+
"name": "zoneId",
|
|
811
|
+
"type": "string",
|
|
731
812
|
"optional": false
|
|
732
813
|
}
|
|
733
814
|
],
|
|
734
|
-
"returnType": "
|
|
735
|
-
"isStatic": false,
|
|
736
|
-
"isPublic": true
|
|
737
|
-
},
|
|
738
|
-
"findActive": {
|
|
739
|
-
"name": "findActive",
|
|
740
|
-
"async": true,
|
|
741
|
-
"parameters": [],
|
|
742
|
-
"returnType": "Promise<AdGroup[]>",
|
|
815
|
+
"returnType": "void",
|
|
743
816
|
"isStatic": false,
|
|
744
817
|
"isPublic": true
|
|
745
818
|
},
|
|
746
|
-
"
|
|
747
|
-
"name": "
|
|
748
|
-
"async":
|
|
819
|
+
"hasZoneId": {
|
|
820
|
+
"name": "hasZoneId",
|
|
821
|
+
"async": false,
|
|
749
822
|
"parameters": [
|
|
750
823
|
{
|
|
751
|
-
"name": "
|
|
824
|
+
"name": "zoneId",
|
|
752
825
|
"type": "string",
|
|
753
826
|
"optional": false
|
|
754
827
|
}
|
|
755
828
|
],
|
|
756
|
-
"returnType": "
|
|
829
|
+
"returnType": "boolean",
|
|
757
830
|
"isStatic": false,
|
|
758
831
|
"isPublic": true
|
|
759
832
|
},
|
|
760
|
-
"
|
|
761
|
-
"name": "
|
|
762
|
-
"async":
|
|
763
|
-
"parameters": [
|
|
764
|
-
|
|
765
|
-
"name": "zoneId",
|
|
766
|
-
"type": "string",
|
|
767
|
-
"optional": false
|
|
768
|
-
}
|
|
769
|
-
],
|
|
770
|
-
"returnType": "Promise<AdGroup[]>",
|
|
833
|
+
"getTargeting": {
|
|
834
|
+
"name": "getTargeting",
|
|
835
|
+
"async": false,
|
|
836
|
+
"parameters": [],
|
|
837
|
+
"returnType": "Record<string, unknown>",
|
|
771
838
|
"isStatic": false,
|
|
772
839
|
"isPublic": true
|
|
773
840
|
},
|
|
774
|
-
"
|
|
775
|
-
"name": "
|
|
776
|
-
"async":
|
|
841
|
+
"setTargeting": {
|
|
842
|
+
"name": "setTargeting",
|
|
843
|
+
"async": false,
|
|
777
844
|
"parameters": [
|
|
778
845
|
{
|
|
779
|
-
"name": "
|
|
780
|
-
"type": "string",
|
|
846
|
+
"name": "rules",
|
|
847
|
+
"type": "Record<string, unknown>",
|
|
781
848
|
"optional": false
|
|
782
849
|
}
|
|
783
850
|
],
|
|
784
|
-
"returnType": "
|
|
851
|
+
"returnType": "void",
|
|
785
852
|
"isStatic": false,
|
|
786
853
|
"isPublic": true
|
|
787
854
|
},
|
|
788
|
-
"
|
|
789
|
-
"name": "
|
|
790
|
-
"async":
|
|
855
|
+
"isActive": {
|
|
856
|
+
"name": "isActive",
|
|
857
|
+
"async": false,
|
|
791
858
|
"parameters": [],
|
|
792
|
-
"returnType": "
|
|
859
|
+
"returnType": "boolean",
|
|
793
860
|
"isStatic": false,
|
|
794
861
|
"isPublic": true
|
|
795
862
|
},
|
|
796
|
-
"
|
|
797
|
-
"name": "
|
|
798
|
-
"async":
|
|
863
|
+
"isDraft": {
|
|
864
|
+
"name": "isDraft",
|
|
865
|
+
"async": false,
|
|
799
866
|
"parameters": [],
|
|
800
|
-
"returnType": "
|
|
867
|
+
"returnType": "boolean",
|
|
801
868
|
"isStatic": false,
|
|
802
869
|
"isPublic": true
|
|
803
870
|
},
|
|
804
|
-
"
|
|
805
|
-
"name": "
|
|
806
|
-
"async":
|
|
871
|
+
"isPaused": {
|
|
872
|
+
"name": "isPaused",
|
|
873
|
+
"async": false,
|
|
807
874
|
"parameters": [],
|
|
808
|
-
"returnType": "
|
|
875
|
+
"returnType": "boolean",
|
|
809
876
|
"isStatic": false,
|
|
810
877
|
"isPublic": true
|
|
811
878
|
},
|
|
812
|
-
"
|
|
813
|
-
"name": "
|
|
814
|
-
"async":
|
|
815
|
-
"parameters": [
|
|
816
|
-
|
|
817
|
-
"name": "tenantId",
|
|
818
|
-
"type": "string",
|
|
819
|
-
"optional": false
|
|
820
|
-
}
|
|
821
|
-
],
|
|
822
|
-
"returnType": "Promise<AdGroup[]>",
|
|
879
|
+
"isCompleted": {
|
|
880
|
+
"name": "isCompleted",
|
|
881
|
+
"async": false,
|
|
882
|
+
"parameters": [],
|
|
883
|
+
"returnType": "boolean",
|
|
823
884
|
"isStatic": false,
|
|
824
885
|
"isPublic": true
|
|
825
886
|
},
|
|
826
|
-
"
|
|
827
|
-
"name": "
|
|
828
|
-
"async":
|
|
887
|
+
"hasEnded": {
|
|
888
|
+
"name": "hasEnded",
|
|
889
|
+
"async": false,
|
|
829
890
|
"parameters": [],
|
|
830
|
-
"returnType": "
|
|
891
|
+
"returnType": "boolean",
|
|
831
892
|
"isStatic": false,
|
|
832
893
|
"isPublic": true
|
|
833
894
|
},
|
|
834
|
-
"
|
|
835
|
-
"name": "
|
|
836
|
-
"async":
|
|
837
|
-
"parameters": [
|
|
838
|
-
|
|
839
|
-
"name": "tenantId",
|
|
840
|
-
"type": "string",
|
|
841
|
-
"optional": false
|
|
842
|
-
}
|
|
843
|
-
],
|
|
844
|
-
"returnType": "Promise<AdGroup[]>",
|
|
895
|
+
"hasStarted": {
|
|
896
|
+
"name": "hasStarted",
|
|
897
|
+
"async": false,
|
|
898
|
+
"parameters": [],
|
|
899
|
+
"returnType": "boolean",
|
|
845
900
|
"isStatic": false,
|
|
846
901
|
"isPublic": true
|
|
847
902
|
}
|
|
848
903
|
},
|
|
849
904
|
"decoratorConfig": {
|
|
905
|
+
"tableStrategy": "sti",
|
|
850
906
|
"api": {
|
|
851
907
|
"include": [
|
|
852
908
|
"list",
|
|
@@ -861,12 +917,24 @@
|
|
|
861
917
|
"get",
|
|
862
918
|
"create"
|
|
863
919
|
]
|
|
864
|
-
}
|
|
920
|
+
},
|
|
921
|
+
"cli": {
|
|
922
|
+
"skipApiCheck": true
|
|
923
|
+
},
|
|
924
|
+
"tenantScoped": {
|
|
925
|
+
"mode": "optional"
|
|
926
|
+
},
|
|
927
|
+
"conflictColumns": [
|
|
928
|
+
"tenant_id",
|
|
929
|
+
"slug",
|
|
930
|
+
"context",
|
|
931
|
+
"_meta_type"
|
|
932
|
+
]
|
|
865
933
|
},
|
|
866
|
-
"extends": "
|
|
867
|
-
"
|
|
868
|
-
"
|
|
869
|
-
"
|
|
934
|
+
"extends": "SmrtObject",
|
|
935
|
+
"exportName": "AdGroup",
|
|
936
|
+
"collectionExportName": "AdGroupCollection",
|
|
937
|
+
"displayLabelField": "name",
|
|
870
938
|
"schema": {
|
|
871
939
|
"tableName": "ad_groups",
|
|
872
940
|
"ddl": "CREATE TABLE IF NOT EXISTS \"ad_groups\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"tier_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"vertical_slug\" TEXT DEFAULT '',\n \"targeting\" TEXT DEFAULT '',\n \"zone_ids\" TEXT DEFAULT '',\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"daily_budget\" REAL DEFAULT 0,\n \"total_budget\" REAL DEFAULT 0,\n \"status\" TEXT\n);",
|
|
@@ -1010,161 +1078,188 @@
|
|
|
1010
1078
|
},
|
|
1011
1079
|
"importPath": "@happyvertical/smrt-ads"
|
|
1012
1080
|
},
|
|
1013
|
-
"@happyvertical/smrt-ads:
|
|
1014
|
-
"name": "
|
|
1015
|
-
"className": "
|
|
1016
|
-
"qualifiedName": "@happyvertical/smrt-ads:
|
|
1081
|
+
"@happyvertical/smrt-ads:AdVariation": {
|
|
1082
|
+
"name": "advariation",
|
|
1083
|
+
"className": "AdVariation",
|
|
1084
|
+
"qualifiedName": "@happyvertical/smrt-ads:AdVariation",
|
|
1017
1085
|
"collection": "advariations",
|
|
1018
|
-
"
|
|
1086
|
+
"description": "AdVariation represents a creative asset within an ad group. Supports A/B testing via weighted selection.",
|
|
1087
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/models/AdVariation.ts",
|
|
1019
1088
|
"packageName": "@happyvertical/smrt-ads",
|
|
1020
|
-
"fields": {
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
"
|
|
1024
|
-
"async": true,
|
|
1025
|
-
"parameters": [
|
|
1026
|
-
{
|
|
1027
|
-
"name": "groupId",
|
|
1028
|
-
"type": "string",
|
|
1029
|
-
"optional": false
|
|
1030
|
-
}
|
|
1031
|
-
],
|
|
1032
|
-
"returnType": "Promise<AdVariation[]>",
|
|
1033
|
-
"isStatic": false,
|
|
1034
|
-
"isPublic": true
|
|
1035
|
-
},
|
|
1036
|
-
"findByFormat": {
|
|
1037
|
-
"name": "findByFormat",
|
|
1038
|
-
"async": true,
|
|
1039
|
-
"parameters": [
|
|
1040
|
-
{
|
|
1041
|
-
"name": "formatId",
|
|
1042
|
-
"type": "string",
|
|
1043
|
-
"optional": false
|
|
1044
|
-
}
|
|
1045
|
-
],
|
|
1046
|
-
"returnType": "Promise<AdVariation[]>",
|
|
1047
|
-
"isStatic": false,
|
|
1048
|
-
"isPublic": true
|
|
1089
|
+
"fields": {
|
|
1090
|
+
"created_at": {
|
|
1091
|
+
"type": "datetime",
|
|
1092
|
+
"required": false
|
|
1049
1093
|
},
|
|
1050
|
-
"
|
|
1051
|
-
"
|
|
1052
|
-
"
|
|
1053
|
-
"parameters": [
|
|
1054
|
-
{
|
|
1055
|
-
"name": "groupId",
|
|
1056
|
-
"type": "string",
|
|
1057
|
-
"optional": false
|
|
1058
|
-
}
|
|
1059
|
-
],
|
|
1060
|
-
"returnType": "Promise<AdVariation[]>",
|
|
1061
|
-
"isStatic": false,
|
|
1062
|
-
"isPublic": true
|
|
1094
|
+
"updated_at": {
|
|
1095
|
+
"type": "datetime",
|
|
1096
|
+
"required": false
|
|
1063
1097
|
},
|
|
1064
|
-
"
|
|
1065
|
-
"
|
|
1066
|
-
"
|
|
1067
|
-
"
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
"
|
|
1098
|
+
"tenantId": {
|
|
1099
|
+
"type": "text",
|
|
1100
|
+
"required": false,
|
|
1101
|
+
"_meta": {
|
|
1102
|
+
"sqlType": "UUID",
|
|
1103
|
+
"nullable": true,
|
|
1104
|
+
"__tenancy": {
|
|
1105
|
+
"isTenantIdField": true,
|
|
1106
|
+
"autoFilter": true,
|
|
1107
|
+
"required": false,
|
|
1108
|
+
"autoPopulate": true,
|
|
1109
|
+
"nullable": true,
|
|
1110
|
+
"mode": "optional",
|
|
1111
|
+
"field": "tenantId",
|
|
1112
|
+
"allowSuperAdminBypass": false
|
|
1072
1113
|
}
|
|
1073
|
-
|
|
1074
|
-
"returnType": "Promise<AdVariation | null>",
|
|
1075
|
-
"isStatic": false,
|
|
1076
|
-
"isPublic": true
|
|
1114
|
+
}
|
|
1077
1115
|
},
|
|
1078
|
-
"
|
|
1079
|
-
"
|
|
1080
|
-
"
|
|
1081
|
-
"
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
}
|
|
1087
|
-
],
|
|
1088
|
-
"returnType": "Promise<AdVariation[]>",
|
|
1089
|
-
"isStatic": false,
|
|
1090
|
-
"isPublic": true
|
|
1116
|
+
"groupId": {
|
|
1117
|
+
"type": "foreignKey",
|
|
1118
|
+
"required": false,
|
|
1119
|
+
"related": "AdGroup",
|
|
1120
|
+
"description": "The campaign this ad belongs to.",
|
|
1121
|
+
"_meta": {
|
|
1122
|
+
"description": "The campaign this ad belongs to."
|
|
1123
|
+
}
|
|
1091
1124
|
},
|
|
1092
|
-
"
|
|
1093
|
-
"
|
|
1094
|
-
"
|
|
1095
|
-
"
|
|
1096
|
-
"
|
|
1097
|
-
"
|
|
1098
|
-
|
|
1125
|
+
"formatId": {
|
|
1126
|
+
"type": "foreignKey",
|
|
1127
|
+
"required": false,
|
|
1128
|
+
"related": "AdFormat",
|
|
1129
|
+
"description": "The ad size this ad is made for.",
|
|
1130
|
+
"_meta": {
|
|
1131
|
+
"description": "The ad size this ad is made for."
|
|
1132
|
+
}
|
|
1099
1133
|
},
|
|
1100
|
-
"
|
|
1101
|
-
"
|
|
1102
|
-
"
|
|
1103
|
-
"
|
|
1104
|
-
"
|
|
1105
|
-
"
|
|
1106
|
-
|
|
1134
|
+
"assetId": {
|
|
1135
|
+
"type": "crossPackageRef",
|
|
1136
|
+
"required": false,
|
|
1137
|
+
"related": "@happyvertical/smrt-assets:Asset",
|
|
1138
|
+
"description": "The picture people see.",
|
|
1139
|
+
"_meta": {
|
|
1140
|
+
"description": "The picture people see."
|
|
1141
|
+
}
|
|
1107
1142
|
},
|
|
1108
|
-
"
|
|
1109
|
-
"
|
|
1110
|
-
"
|
|
1111
|
-
"
|
|
1112
|
-
"
|
|
1143
|
+
"name": {
|
|
1144
|
+
"type": "text",
|
|
1145
|
+
"required": false,
|
|
1146
|
+
"default": "",
|
|
1147
|
+
"description": "What you call this ad, for example Version A, blue button.",
|
|
1148
|
+
"_meta": {
|
|
1149
|
+
"description": "What you call this ad, for example Version A, blue button."
|
|
1150
|
+
}
|
|
1151
|
+
},
|
|
1152
|
+
"clickUrl": {
|
|
1153
|
+
"type": "text",
|
|
1154
|
+
"required": false,
|
|
1155
|
+
"default": "",
|
|
1156
|
+
"description": "The web address people go to when they tap the ad.",
|
|
1157
|
+
"_meta": {
|
|
1158
|
+
"description": "The web address people go to when they tap the ad."
|
|
1159
|
+
}
|
|
1160
|
+
},
|
|
1161
|
+
"altText": {
|
|
1162
|
+
"type": "text",
|
|
1163
|
+
"required": false,
|
|
1164
|
+
"default": "",
|
|
1165
|
+
"description": "A few words that describe the picture for people who cannot see it.",
|
|
1166
|
+
"_meta": {
|
|
1167
|
+
"description": "A few words that describe the picture for people who cannot see it."
|
|
1168
|
+
}
|
|
1169
|
+
},
|
|
1170
|
+
"weight": {
|
|
1171
|
+
"type": "integer",
|
|
1172
|
+
"required": false,
|
|
1173
|
+
"default": 1,
|
|
1174
|
+
"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.",
|
|
1175
|
+
"_meta": {
|
|
1176
|
+
"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."
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1179
|
+
"status": {
|
|
1180
|
+
"type": "text",
|
|
1181
|
+
"required": false,
|
|
1182
|
+
"description": "Where the ad stands: draft, active or paused. Only active ads show.",
|
|
1183
|
+
"_meta": {
|
|
1184
|
+
"description": "Where the ad stands: draft, active or paused. Only active ads show."
|
|
1185
|
+
},
|
|
1186
|
+
"enum": [
|
|
1187
|
+
"draft",
|
|
1188
|
+
"active",
|
|
1189
|
+
"paused"
|
|
1190
|
+
]
|
|
1191
|
+
},
|
|
1192
|
+
"impressions": {
|
|
1193
|
+
"type": "integer",
|
|
1194
|
+
"required": false,
|
|
1195
|
+
"default": 0,
|
|
1196
|
+
"description": "How many times the ad has been shown. The app counts this as it serves ads and refreshes it a little later.",
|
|
1197
|
+
"_meta": {
|
|
1198
|
+
"description": "How many times the ad has been shown. The app counts this as it serves ads and refreshes it a little later."
|
|
1199
|
+
}
|
|
1200
|
+
},
|
|
1201
|
+
"clicks": {
|
|
1202
|
+
"type": "integer",
|
|
1203
|
+
"required": false,
|
|
1204
|
+
"default": 0,
|
|
1205
|
+
"description": "How many times the ad has been tapped. The app counts this as it serves ads and refreshes it a little later.",
|
|
1206
|
+
"_meta": {
|
|
1207
|
+
"description": "How many times the ad has been tapped. The app counts this as it serves ads and refreshes it a little later."
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
},
|
|
1211
|
+
"methods": {
|
|
1212
|
+
"isActive": {
|
|
1213
|
+
"name": "isActive",
|
|
1214
|
+
"async": false,
|
|
1215
|
+
"parameters": [],
|
|
1216
|
+
"returnType": "boolean",
|
|
1113
1217
|
"isStatic": false,
|
|
1114
1218
|
"isPublic": true
|
|
1115
1219
|
},
|
|
1116
|
-
"
|
|
1117
|
-
"name": "
|
|
1118
|
-
"async":
|
|
1119
|
-
"parameters": [
|
|
1120
|
-
|
|
1121
|
-
"name": "limit",
|
|
1122
|
-
"type": "number",
|
|
1123
|
-
"optional": true
|
|
1124
|
-
}
|
|
1125
|
-
],
|
|
1126
|
-
"returnType": "Promise<AdVariation[]>",
|
|
1220
|
+
"isDraft": {
|
|
1221
|
+
"name": "isDraft",
|
|
1222
|
+
"async": false,
|
|
1223
|
+
"parameters": [],
|
|
1224
|
+
"returnType": "boolean",
|
|
1127
1225
|
"isStatic": false,
|
|
1128
1226
|
"isPublic": true
|
|
1129
1227
|
},
|
|
1130
|
-
"
|
|
1131
|
-
"name": "
|
|
1132
|
-
"async":
|
|
1133
|
-
"parameters": [
|
|
1134
|
-
|
|
1135
|
-
"name": "tenantId",
|
|
1136
|
-
"type": "string",
|
|
1137
|
-
"optional": false
|
|
1138
|
-
}
|
|
1139
|
-
],
|
|
1140
|
-
"returnType": "Promise<AdVariation[]>",
|
|
1228
|
+
"isPaused": {
|
|
1229
|
+
"name": "isPaused",
|
|
1230
|
+
"async": false,
|
|
1231
|
+
"parameters": [],
|
|
1232
|
+
"returnType": "boolean",
|
|
1141
1233
|
"isStatic": false,
|
|
1142
1234
|
"isPublic": true
|
|
1143
1235
|
},
|
|
1144
|
-
"
|
|
1145
|
-
"name": "
|
|
1146
|
-
"async":
|
|
1236
|
+
"getCTR": {
|
|
1237
|
+
"name": "getCTR",
|
|
1238
|
+
"async": false,
|
|
1147
1239
|
"parameters": [],
|
|
1148
|
-
"returnType": "
|
|
1240
|
+
"returnType": "number",
|
|
1149
1241
|
"isStatic": false,
|
|
1150
1242
|
"isPublic": true
|
|
1151
1243
|
},
|
|
1152
|
-
"
|
|
1153
|
-
"name": "
|
|
1154
|
-
"async":
|
|
1155
|
-
"parameters": [
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
"
|
|
1244
|
+
"recordImpression": {
|
|
1245
|
+
"name": "recordImpression",
|
|
1246
|
+
"async": false,
|
|
1247
|
+
"parameters": [],
|
|
1248
|
+
"returnType": "void",
|
|
1249
|
+
"isStatic": false,
|
|
1250
|
+
"isPublic": true
|
|
1251
|
+
},
|
|
1252
|
+
"recordClick": {
|
|
1253
|
+
"name": "recordClick",
|
|
1254
|
+
"async": false,
|
|
1255
|
+
"parameters": [],
|
|
1256
|
+
"returnType": "void",
|
|
1163
1257
|
"isStatic": false,
|
|
1164
1258
|
"isPublic": true
|
|
1165
1259
|
}
|
|
1166
1260
|
},
|
|
1167
1261
|
"decoratorConfig": {
|
|
1262
|
+
"tableStrategy": "sti",
|
|
1168
1263
|
"api": {
|
|
1169
1264
|
"include": [
|
|
1170
1265
|
"list",
|
|
@@ -1179,12 +1274,24 @@
|
|
|
1179
1274
|
"get",
|
|
1180
1275
|
"create"
|
|
1181
1276
|
]
|
|
1182
|
-
}
|
|
1277
|
+
},
|
|
1278
|
+
"cli": {
|
|
1279
|
+
"skipApiCheck": true
|
|
1280
|
+
},
|
|
1281
|
+
"tenantScoped": {
|
|
1282
|
+
"mode": "optional"
|
|
1283
|
+
},
|
|
1284
|
+
"conflictColumns": [
|
|
1285
|
+
"tenant_id",
|
|
1286
|
+
"slug",
|
|
1287
|
+
"context",
|
|
1288
|
+
"_meta_type"
|
|
1289
|
+
]
|
|
1183
1290
|
},
|
|
1184
|
-
"extends": "
|
|
1185
|
-
"
|
|
1186
|
-
"
|
|
1187
|
-
"
|
|
1291
|
+
"extends": "SmrtObject",
|
|
1292
|
+
"exportName": "AdVariation",
|
|
1293
|
+
"collectionExportName": "AdVariationCollection",
|
|
1294
|
+
"displayLabelField": "name",
|
|
1188
1295
|
"schema": {
|
|
1189
1296
|
"tableName": "ad_variations",
|
|
1190
1297
|
"ddl": "CREATE TABLE IF NOT EXISTS \"ad_variations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"group_id\" UUID,\n \"format_id\" UUID,\n \"asset_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"click_url\" TEXT DEFAULT '',\n \"alt_text\" TEXT DEFAULT '',\n \"weight\" INTEGER DEFAULT 1,\n \"status\" TEXT,\n \"impressions\" INTEGER DEFAULT 0,\n \"clicks\" INTEGER DEFAULT 0\n);",
|
|
@@ -1337,91 +1444,73 @@
|
|
|
1337
1444
|
},
|
|
1338
1445
|
"importPath": "@happyvertical/smrt-ads"
|
|
1339
1446
|
},
|
|
1340
|
-
"@happyvertical/smrt-ads:
|
|
1341
|
-
"name": "
|
|
1342
|
-
"className": "
|
|
1343
|
-
"qualifiedName": "@happyvertical/smrt-ads:
|
|
1447
|
+
"@happyvertical/smrt-ads:AdDeliveryTierCollection": {
|
|
1448
|
+
"name": "addeliverytiercollection",
|
|
1449
|
+
"className": "AdDeliveryTierCollection",
|
|
1450
|
+
"qualifiedName": "@happyvertical/smrt-ads:AdDeliveryTierCollection",
|
|
1344
1451
|
"collection": "addeliverytiers",
|
|
1345
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/
|
|
1452
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/collections/AdDeliveryTierCollection.ts",
|
|
1346
1453
|
"packageName": "@happyvertical/smrt-ads",
|
|
1347
|
-
"fields": {
|
|
1348
|
-
"name": {
|
|
1349
|
-
"type": "text",
|
|
1350
|
-
"required": false,
|
|
1351
|
-
"default": "",
|
|
1352
|
-
"description": "What the tier is called, for example Sponsorship, Standard or House.",
|
|
1353
|
-
"_meta": {
|
|
1354
|
-
"description": "What the tier is called, for example Sponsorship, Standard or House."
|
|
1355
|
-
}
|
|
1356
|
-
},
|
|
1357
|
-
"priority": {
|
|
1358
|
-
"type": "integer",
|
|
1359
|
-
"required": false,
|
|
1360
|
-
"default": 0,
|
|
1361
|
-
"description": "The order tiers are tried in: 1 is tried first, then 2, and so on.",
|
|
1362
|
-
"_meta": {
|
|
1363
|
-
"description": "The order tiers are tried in: 1 is tried first, then 2, and so on."
|
|
1364
|
-
}
|
|
1365
|
-
},
|
|
1366
|
-
"pricingModel": {
|
|
1367
|
-
"type": "text",
|
|
1368
|
-
"required": false,
|
|
1369
|
-
"description": "How ads in this tier are charged: a fixed price, per thousand showings, per click, or per sale.",
|
|
1370
|
-
"_meta": {
|
|
1371
|
-
"description": "How ads in this tier are charged: a fixed price, per thousand showings, per click, or per sale."
|
|
1372
|
-
},
|
|
1373
|
-
"enum": [
|
|
1374
|
-
"fixed",
|
|
1375
|
-
"cpm",
|
|
1376
|
-
"cpc",
|
|
1377
|
-
"cpa"
|
|
1378
|
-
]
|
|
1379
|
-
},
|
|
1380
|
-
"description": {
|
|
1381
|
-
"type": "text",
|
|
1382
|
-
"required": false,
|
|
1383
|
-
"default": "",
|
|
1384
|
-
"description": "A note about what this tier is for.",
|
|
1385
|
-
"_meta": {
|
|
1386
|
-
"description": "A note about what this tier is for."
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
},
|
|
1454
|
+
"fields": {},
|
|
1390
1455
|
"methods": {
|
|
1391
|
-
"
|
|
1392
|
-
"name": "
|
|
1393
|
-
"async":
|
|
1456
|
+
"findByPriority": {
|
|
1457
|
+
"name": "findByPriority",
|
|
1458
|
+
"async": true,
|
|
1459
|
+
"parameters": [],
|
|
1460
|
+
"returnType": "Promise<AdDeliveryTier[]>",
|
|
1461
|
+
"isStatic": false,
|
|
1462
|
+
"isPublic": true
|
|
1463
|
+
},
|
|
1464
|
+
"findByPricingModel": {
|
|
1465
|
+
"name": "findByPricingModel",
|
|
1466
|
+
"async": true,
|
|
1394
1467
|
"parameters": [
|
|
1395
1468
|
{
|
|
1396
|
-
"name": "
|
|
1397
|
-
"type": "
|
|
1469
|
+
"name": "pricingModel",
|
|
1470
|
+
"type": "PricingModel",
|
|
1398
1471
|
"optional": false
|
|
1399
1472
|
}
|
|
1400
1473
|
],
|
|
1401
|
-
"returnType": "
|
|
1474
|
+
"returnType": "Promise<AdDeliveryTier[]>",
|
|
1402
1475
|
"isStatic": false,
|
|
1403
1476
|
"isPublic": true
|
|
1404
1477
|
},
|
|
1405
|
-
"
|
|
1406
|
-
"name": "
|
|
1407
|
-
"async":
|
|
1478
|
+
"getHighestPriority": {
|
|
1479
|
+
"name": "getHighestPriority",
|
|
1480
|
+
"async": true,
|
|
1408
1481
|
"parameters": [],
|
|
1409
|
-
"returnType": "
|
|
1482
|
+
"returnType": "Promise<AdDeliveryTier | null>",
|
|
1410
1483
|
"isStatic": false,
|
|
1411
1484
|
"isPublic": true
|
|
1412
1485
|
},
|
|
1413
|
-
"
|
|
1414
|
-
"name": "
|
|
1415
|
-
"async":
|
|
1486
|
+
"findFixedPricing": {
|
|
1487
|
+
"name": "findFixedPricing",
|
|
1488
|
+
"async": true,
|
|
1416
1489
|
"parameters": [],
|
|
1417
|
-
"returnType": "
|
|
1490
|
+
"returnType": "Promise<AdDeliveryTier[]>",
|
|
1418
1491
|
"isStatic": false,
|
|
1419
1492
|
"isPublic": true
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
"
|
|
1493
|
+
},
|
|
1494
|
+
"findCPM": {
|
|
1495
|
+
"name": "findCPM",
|
|
1496
|
+
"async": true,
|
|
1497
|
+
"parameters": [],
|
|
1498
|
+
"returnType": "Promise<AdDeliveryTier[]>",
|
|
1499
|
+
"isStatic": false,
|
|
1500
|
+
"isPublic": true
|
|
1501
|
+
},
|
|
1502
|
+
"findPerformanceBased": {
|
|
1503
|
+
"name": "findPerformanceBased",
|
|
1504
|
+
"async": true,
|
|
1505
|
+
"parameters": [],
|
|
1506
|
+
"returnType": "Promise<AdDeliveryTier[]>",
|
|
1507
|
+
"isStatic": false,
|
|
1508
|
+
"isPublic": true
|
|
1509
|
+
}
|
|
1510
|
+
},
|
|
1511
|
+
"decoratorConfig": {
|
|
1512
|
+
"api": {
|
|
1513
|
+
"include": [
|
|
1425
1514
|
"list",
|
|
1426
1515
|
"get",
|
|
1427
1516
|
"create",
|
|
@@ -1433,15 +1522,12 @@
|
|
|
1433
1522
|
"list",
|
|
1434
1523
|
"get"
|
|
1435
1524
|
]
|
|
1436
|
-
},
|
|
1437
|
-
"cli": {
|
|
1438
|
-
"skipApiCheck": true
|
|
1439
1525
|
}
|
|
1440
1526
|
},
|
|
1441
|
-
"extends": "
|
|
1442
|
-
"
|
|
1443
|
-
"
|
|
1444
|
-
"
|
|
1527
|
+
"extends": "SmrtCollection",
|
|
1528
|
+
"extendsTypeArg": "AdDeliveryTier",
|
|
1529
|
+
"exportName": "AdDeliveryTierCollection",
|
|
1530
|
+
"collectionExportName": "AdDeliveryTierCollectionCollection",
|
|
1445
1531
|
"schema": {
|
|
1446
1532
|
"tableName": "ad_delivery_tiers",
|
|
1447
1533
|
"ddl": "CREATE TABLE IF NOT EXISTS \"ad_delivery_tiers\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"priority\" INTEGER DEFAULT 0,\n \"pricing_model\" TEXT,\n \"description\" TEXT DEFAULT ''\n);",
|
|
@@ -1515,126 +1601,228 @@
|
|
|
1515
1601
|
},
|
|
1516
1602
|
"importPath": "@happyvertical/smrt-ads"
|
|
1517
1603
|
},
|
|
1518
|
-
"@happyvertical/smrt-ads:
|
|
1519
|
-
"name": "
|
|
1520
|
-
"className": "
|
|
1521
|
-
"qualifiedName": "@happyvertical/smrt-ads:
|
|
1604
|
+
"@happyvertical/smrt-ads:AdEventCollection": {
|
|
1605
|
+
"name": "adeventcollection",
|
|
1606
|
+
"className": "AdEventCollection",
|
|
1607
|
+
"qualifiedName": "@happyvertical/smrt-ads:AdEventCollection",
|
|
1522
1608
|
"collection": "adevents",
|
|
1523
|
-
"
|
|
1524
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/models/AdEvent.ts",
|
|
1609
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/collections/AdEventCollection.ts",
|
|
1525
1610
|
"packageName": "@happyvertical/smrt-ads",
|
|
1526
|
-
"fields": {
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
"
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1611
|
+
"fields": {},
|
|
1612
|
+
"methods": {
|
|
1613
|
+
"findByVariation": {
|
|
1614
|
+
"name": "findByVariation",
|
|
1615
|
+
"async": true,
|
|
1616
|
+
"parameters": [
|
|
1617
|
+
{
|
|
1618
|
+
"name": "variationId",
|
|
1619
|
+
"type": "string",
|
|
1620
|
+
"optional": false
|
|
1621
|
+
}
|
|
1622
|
+
],
|
|
1623
|
+
"returnType": "Promise<AdEvent[]>",
|
|
1624
|
+
"isStatic": false,
|
|
1625
|
+
"isPublic": true
|
|
1534
1626
|
},
|
|
1535
|
-
"
|
|
1536
|
-
"
|
|
1537
|
-
"
|
|
1538
|
-
"
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
"
|
|
1543
|
-
"autoFilter": true,
|
|
1544
|
-
"required": false,
|
|
1545
|
-
"autoPopulate": true,
|
|
1546
|
-
"nullable": true,
|
|
1547
|
-
"mode": "optional",
|
|
1548
|
-
"field": "tenantId",
|
|
1549
|
-
"allowSuperAdminBypass": false
|
|
1627
|
+
"findByZone": {
|
|
1628
|
+
"name": "findByZone",
|
|
1629
|
+
"async": true,
|
|
1630
|
+
"parameters": [
|
|
1631
|
+
{
|
|
1632
|
+
"name": "zoneId",
|
|
1633
|
+
"type": "string",
|
|
1634
|
+
"optional": false
|
|
1550
1635
|
}
|
|
1551
|
-
|
|
1636
|
+
],
|
|
1637
|
+
"returnType": "Promise<AdEvent[]>",
|
|
1638
|
+
"isStatic": false,
|
|
1639
|
+
"isPublic": true
|
|
1552
1640
|
},
|
|
1553
|
-
"
|
|
1554
|
-
"
|
|
1555
|
-
"
|
|
1556
|
-
"
|
|
1641
|
+
"findBySite": {
|
|
1642
|
+
"name": "findBySite",
|
|
1643
|
+
"async": true,
|
|
1644
|
+
"parameters": [
|
|
1645
|
+
{
|
|
1646
|
+
"name": "siteId",
|
|
1647
|
+
"type": "string",
|
|
1648
|
+
"optional": false
|
|
1649
|
+
}
|
|
1650
|
+
],
|
|
1651
|
+
"returnType": "Promise<AdEvent[]>",
|
|
1652
|
+
"isStatic": false,
|
|
1653
|
+
"isPublic": true
|
|
1557
1654
|
},
|
|
1558
|
-
"
|
|
1559
|
-
"
|
|
1560
|
-
"
|
|
1561
|
-
"
|
|
1655
|
+
"findByDateRange": {
|
|
1656
|
+
"name": "findByDateRange",
|
|
1657
|
+
"async": true,
|
|
1658
|
+
"parameters": [
|
|
1659
|
+
{
|
|
1660
|
+
"name": "start",
|
|
1661
|
+
"type": "Date",
|
|
1662
|
+
"optional": false
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
"name": "end",
|
|
1666
|
+
"type": "Date",
|
|
1667
|
+
"optional": false
|
|
1668
|
+
}
|
|
1669
|
+
],
|
|
1670
|
+
"returnType": "Promise<AdEvent[]>",
|
|
1671
|
+
"isStatic": false,
|
|
1672
|
+
"isPublic": true
|
|
1562
1673
|
},
|
|
1563
|
-
"
|
|
1564
|
-
"
|
|
1565
|
-
"
|
|
1566
|
-
"
|
|
1674
|
+
"findByType": {
|
|
1675
|
+
"name": "findByType",
|
|
1676
|
+
"async": true,
|
|
1677
|
+
"parameters": [
|
|
1678
|
+
{
|
|
1679
|
+
"name": "eventType",
|
|
1680
|
+
"type": "AdEventType",
|
|
1681
|
+
"optional": false
|
|
1682
|
+
}
|
|
1683
|
+
],
|
|
1684
|
+
"returnType": "Promise<AdEvent[]>",
|
|
1685
|
+
"isStatic": false,
|
|
1686
|
+
"isPublic": true
|
|
1567
1687
|
},
|
|
1568
|
-
"
|
|
1569
|
-
"
|
|
1570
|
-
"
|
|
1571
|
-
"
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1688
|
+
"countByType": {
|
|
1689
|
+
"name": "countByType",
|
|
1690
|
+
"async": true,
|
|
1691
|
+
"parameters": [
|
|
1692
|
+
{
|
|
1693
|
+
"name": "variationId",
|
|
1694
|
+
"type": "string",
|
|
1695
|
+
"optional": false
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
"name": "eventType",
|
|
1699
|
+
"type": "AdEventType",
|
|
1700
|
+
"optional": false
|
|
1701
|
+
}
|
|
1702
|
+
],
|
|
1703
|
+
"returnType": "Promise<number>",
|
|
1704
|
+
"isStatic": false,
|
|
1705
|
+
"isPublic": true
|
|
1576
1706
|
},
|
|
1577
|
-
"
|
|
1578
|
-
"
|
|
1579
|
-
"
|
|
1707
|
+
"countImpressions": {
|
|
1708
|
+
"name": "countImpressions",
|
|
1709
|
+
"async": true,
|
|
1710
|
+
"parameters": [
|
|
1711
|
+
{
|
|
1712
|
+
"name": "variationId",
|
|
1713
|
+
"type": "string",
|
|
1714
|
+
"optional": false
|
|
1715
|
+
}
|
|
1716
|
+
],
|
|
1717
|
+
"returnType": "Promise<number>",
|
|
1718
|
+
"isStatic": false,
|
|
1719
|
+
"isPublic": true
|
|
1580
1720
|
},
|
|
1581
|
-
"
|
|
1582
|
-
"
|
|
1583
|
-
"
|
|
1584
|
-
"
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
"
|
|
1592
|
-
"returnType": "Record<string, unknown>",
|
|
1721
|
+
"countClicks": {
|
|
1722
|
+
"name": "countClicks",
|
|
1723
|
+
"async": true,
|
|
1724
|
+
"parameters": [
|
|
1725
|
+
{
|
|
1726
|
+
"name": "variationId",
|
|
1727
|
+
"type": "string",
|
|
1728
|
+
"optional": false
|
|
1729
|
+
}
|
|
1730
|
+
],
|
|
1731
|
+
"returnType": "Promise<number>",
|
|
1593
1732
|
"isStatic": false,
|
|
1594
1733
|
"isPublic": true
|
|
1595
1734
|
},
|
|
1596
|
-
"
|
|
1597
|
-
"name": "
|
|
1598
|
-
"async":
|
|
1735
|
+
"countConversions": {
|
|
1736
|
+
"name": "countConversions",
|
|
1737
|
+
"async": true,
|
|
1599
1738
|
"parameters": [
|
|
1600
1739
|
{
|
|
1601
|
-
"name": "
|
|
1602
|
-
"type": "
|
|
1740
|
+
"name": "variationId",
|
|
1741
|
+
"type": "string",
|
|
1603
1742
|
"optional": false
|
|
1604
1743
|
}
|
|
1605
1744
|
],
|
|
1606
|
-
"returnType": "
|
|
1745
|
+
"returnType": "Promise<number>",
|
|
1607
1746
|
"isStatic": false,
|
|
1608
1747
|
"isPublic": true
|
|
1609
1748
|
},
|
|
1610
|
-
"
|
|
1611
|
-
"name": "
|
|
1612
|
-
"async":
|
|
1749
|
+
"findImpressions": {
|
|
1750
|
+
"name": "findImpressions",
|
|
1751
|
+
"async": true,
|
|
1613
1752
|
"parameters": [],
|
|
1614
|
-
"returnType": "
|
|
1753
|
+
"returnType": "Promise<AdEvent[]>",
|
|
1615
1754
|
"isStatic": false,
|
|
1616
1755
|
"isPublic": true
|
|
1617
1756
|
},
|
|
1618
|
-
"
|
|
1619
|
-
"name": "
|
|
1620
|
-
"async":
|
|
1757
|
+
"findClicks": {
|
|
1758
|
+
"name": "findClicks",
|
|
1759
|
+
"async": true,
|
|
1621
1760
|
"parameters": [],
|
|
1622
|
-
"returnType": "
|
|
1761
|
+
"returnType": "Promise<AdEvent[]>",
|
|
1623
1762
|
"isStatic": false,
|
|
1624
1763
|
"isPublic": true
|
|
1625
1764
|
},
|
|
1626
|
-
"
|
|
1627
|
-
"name": "
|
|
1628
|
-
"async":
|
|
1765
|
+
"findConversions": {
|
|
1766
|
+
"name": "findConversions",
|
|
1767
|
+
"async": true,
|
|
1629
1768
|
"parameters": [],
|
|
1630
|
-
"returnType": "
|
|
1769
|
+
"returnType": "Promise<AdEvent[]>",
|
|
1631
1770
|
"isStatic": false,
|
|
1632
1771
|
"isPublic": true
|
|
1633
|
-
}
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1772
|
+
},
|
|
1773
|
+
"getVariationStats": {
|
|
1774
|
+
"name": "getVariationStats",
|
|
1775
|
+
"async": true,
|
|
1776
|
+
"parameters": [
|
|
1777
|
+
{
|
|
1778
|
+
"name": "variationId",
|
|
1779
|
+
"type": "string",
|
|
1780
|
+
"optional": false
|
|
1781
|
+
}
|
|
1782
|
+
],
|
|
1783
|
+
"returnType": "Promise<object>",
|
|
1784
|
+
"isStatic": false,
|
|
1785
|
+
"isPublic": true
|
|
1786
|
+
},
|
|
1787
|
+
"findByTenant": {
|
|
1788
|
+
"name": "findByTenant",
|
|
1789
|
+
"async": true,
|
|
1790
|
+
"parameters": [
|
|
1791
|
+
{
|
|
1792
|
+
"name": "tenantId",
|
|
1793
|
+
"type": "string",
|
|
1794
|
+
"optional": false
|
|
1795
|
+
}
|
|
1796
|
+
],
|
|
1797
|
+
"returnType": "Promise<AdEvent[]>",
|
|
1798
|
+
"isStatic": false,
|
|
1799
|
+
"isPublic": true
|
|
1800
|
+
},
|
|
1801
|
+
"findGlobal": {
|
|
1802
|
+
"name": "findGlobal",
|
|
1803
|
+
"async": true,
|
|
1804
|
+
"parameters": [],
|
|
1805
|
+
"returnType": "Promise<AdEvent[]>",
|
|
1806
|
+
"isStatic": false,
|
|
1807
|
+
"isPublic": true
|
|
1808
|
+
},
|
|
1809
|
+
"findWithGlobals": {
|
|
1810
|
+
"name": "findWithGlobals",
|
|
1811
|
+
"async": true,
|
|
1812
|
+
"parameters": [
|
|
1813
|
+
{
|
|
1814
|
+
"name": "tenantId",
|
|
1815
|
+
"type": "string",
|
|
1816
|
+
"optional": false
|
|
1817
|
+
}
|
|
1818
|
+
],
|
|
1819
|
+
"returnType": "Promise<AdEvent[]>",
|
|
1820
|
+
"isStatic": false,
|
|
1821
|
+
"isPublic": true
|
|
1822
|
+
}
|
|
1823
|
+
},
|
|
1824
|
+
"decoratorConfig": {
|
|
1825
|
+
"api": {
|
|
1638
1826
|
"include": [
|
|
1639
1827
|
"create",
|
|
1640
1828
|
"list"
|
|
@@ -1645,20 +1833,12 @@
|
|
|
1645
1833
|
"create"
|
|
1646
1834
|
]
|
|
1647
1835
|
},
|
|
1648
|
-
"cli": false
|
|
1649
|
-
"tenantScoped": {
|
|
1650
|
-
"mode": "optional"
|
|
1651
|
-
},
|
|
1652
|
-
"conflictColumns": [
|
|
1653
|
-
"tenant_id",
|
|
1654
|
-
"slug",
|
|
1655
|
-
"context",
|
|
1656
|
-
"_meta_type"
|
|
1657
|
-
]
|
|
1836
|
+
"cli": false
|
|
1658
1837
|
},
|
|
1659
|
-
"extends": "
|
|
1660
|
-
"
|
|
1661
|
-
"
|
|
1838
|
+
"extends": "SmrtCollection",
|
|
1839
|
+
"extendsTypeArg": "AdEvent",
|
|
1840
|
+
"exportName": "AdEventCollection",
|
|
1841
|
+
"collectionExportName": "AdEventCollectionCollection",
|
|
1662
1842
|
"schema": {
|
|
1663
1843
|
"tableName": "ad_events",
|
|
1664
1844
|
"ddl": "CREATE TABLE IF NOT EXISTS \"ad_events\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"variation_id\" UUID,\n \"zone_id\" UUID,\n \"site_id\" TEXT DEFAULT '',\n \"event_type\" TEXT,\n \"timestamp\" TIMESTAMP,\n \"metadata\" TEXT DEFAULT ''\n);",
|
|
@@ -1778,76 +1958,18 @@
|
|
|
1778
1958
|
},
|
|
1779
1959
|
"importPath": "@happyvertical/smrt-ads"
|
|
1780
1960
|
},
|
|
1781
|
-
"@happyvertical/smrt-ads:
|
|
1782
|
-
"name": "
|
|
1783
|
-
"className": "
|
|
1784
|
-
"qualifiedName": "@happyvertical/smrt-ads:
|
|
1961
|
+
"@happyvertical/smrt-ads:AdFormatCollection": {
|
|
1962
|
+
"name": "adformatcollection",
|
|
1963
|
+
"className": "AdFormatCollection",
|
|
1964
|
+
"qualifiedName": "@happyvertical/smrt-ads:AdFormatCollection",
|
|
1785
1965
|
"collection": "adformats",
|
|
1786
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/
|
|
1966
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/collections/AdFormatCollection.ts",
|
|
1787
1967
|
"packageName": "@happyvertical/smrt-ads",
|
|
1788
|
-
"fields": {
|
|
1789
|
-
"name": {
|
|
1790
|
-
"type": "text",
|
|
1791
|
-
"required": false,
|
|
1792
|
-
"default": "",
|
|
1793
|
-
"description": "What the size is called, for example Leaderboard.",
|
|
1794
|
-
"_meta": {
|
|
1795
|
-
"description": "What the size is called, for example Leaderboard."
|
|
1796
|
-
}
|
|
1797
|
-
},
|
|
1798
|
-
"width": {
|
|
1799
|
-
"type": "integer",
|
|
1800
|
-
"required": false,
|
|
1801
|
-
"default": 0,
|
|
1802
|
-
"description": "How wide the ad is, in pixels.",
|
|
1803
|
-
"_meta": {
|
|
1804
|
-
"description": "How wide the ad is, in pixels."
|
|
1805
|
-
}
|
|
1806
|
-
},
|
|
1807
|
-
"height": {
|
|
1808
|
-
"type": "integer",
|
|
1809
|
-
"required": false,
|
|
1810
|
-
"default": 0,
|
|
1811
|
-
"description": "How tall the ad is, in pixels.",
|
|
1812
|
-
"_meta": {
|
|
1813
|
-
"description": "How tall the ad is, in pixels."
|
|
1814
|
-
}
|
|
1815
|
-
},
|
|
1816
|
-
"formatType": {
|
|
1817
|
-
"type": "text",
|
|
1818
|
-
"required": false,
|
|
1819
|
-
"description": "What kind of ad fits this size: a picture, a piece written to look like your own content, or a video.",
|
|
1820
|
-
"_meta": {
|
|
1821
|
-
"description": "What kind of ad fits this size: a picture, a piece written to look like your own content, or a video."
|
|
1822
|
-
},
|
|
1823
|
-
"enum": [
|
|
1824
|
-
"banner",
|
|
1825
|
-
"native",
|
|
1826
|
-
"video"
|
|
1827
|
-
]
|
|
1828
|
-
},
|
|
1829
|
-
"description": {
|
|
1830
|
-
"type": "text",
|
|
1831
|
-
"required": false,
|
|
1832
|
-
"default": "",
|
|
1833
|
-
"description": "A note about where this size is usually used.",
|
|
1834
|
-
"_meta": {
|
|
1835
|
-
"description": "A note about where this size is usually used."
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
},
|
|
1968
|
+
"fields": {},
|
|
1839
1969
|
"methods": {
|
|
1840
|
-
"
|
|
1841
|
-
"name": "
|
|
1842
|
-
"async":
|
|
1843
|
-
"parameters": [],
|
|
1844
|
-
"returnType": "string",
|
|
1845
|
-
"isStatic": false,
|
|
1846
|
-
"isPublic": true
|
|
1847
|
-
},
|
|
1848
|
-
"matchesDimensions": {
|
|
1849
|
-
"name": "matchesDimensions",
|
|
1850
|
-
"async": false,
|
|
1970
|
+
"findByDimensions": {
|
|
1971
|
+
"name": "findByDimensions",
|
|
1972
|
+
"async": true,
|
|
1851
1973
|
"parameters": [
|
|
1852
1974
|
{
|
|
1853
1975
|
"name": "width",
|
|
@@ -1860,7 +1982,45 @@
|
|
|
1860
1982
|
"optional": false
|
|
1861
1983
|
}
|
|
1862
1984
|
],
|
|
1863
|
-
"returnType": "
|
|
1985
|
+
"returnType": "Promise<AdFormat | null>",
|
|
1986
|
+
"isStatic": false,
|
|
1987
|
+
"isPublic": true
|
|
1988
|
+
},
|
|
1989
|
+
"findByType": {
|
|
1990
|
+
"name": "findByType",
|
|
1991
|
+
"async": true,
|
|
1992
|
+
"parameters": [
|
|
1993
|
+
{
|
|
1994
|
+
"name": "formatType",
|
|
1995
|
+
"type": "AdFormatType",
|
|
1996
|
+
"optional": false
|
|
1997
|
+
}
|
|
1998
|
+
],
|
|
1999
|
+
"returnType": "Promise<AdFormat[]>",
|
|
2000
|
+
"isStatic": false,
|
|
2001
|
+
"isPublic": true
|
|
2002
|
+
},
|
|
2003
|
+
"findBanners": {
|
|
2004
|
+
"name": "findBanners",
|
|
2005
|
+
"async": true,
|
|
2006
|
+
"parameters": [],
|
|
2007
|
+
"returnType": "Promise<AdFormat[]>",
|
|
2008
|
+
"isStatic": false,
|
|
2009
|
+
"isPublic": true
|
|
2010
|
+
},
|
|
2011
|
+
"findNative": {
|
|
2012
|
+
"name": "findNative",
|
|
2013
|
+
"async": true,
|
|
2014
|
+
"parameters": [],
|
|
2015
|
+
"returnType": "Promise<AdFormat[]>",
|
|
2016
|
+
"isStatic": false,
|
|
2017
|
+
"isPublic": true
|
|
2018
|
+
},
|
|
2019
|
+
"findVideo": {
|
|
2020
|
+
"name": "findVideo",
|
|
2021
|
+
"async": true,
|
|
2022
|
+
"parameters": [],
|
|
2023
|
+
"returnType": "Promise<AdFormat[]>",
|
|
1864
2024
|
"isStatic": false,
|
|
1865
2025
|
"isPublic": true
|
|
1866
2026
|
}
|
|
@@ -1879,15 +2039,12 @@
|
|
|
1879
2039
|
"list",
|
|
1880
2040
|
"get"
|
|
1881
2041
|
]
|
|
1882
|
-
},
|
|
1883
|
-
"cli": {
|
|
1884
|
-
"skipApiCheck": true
|
|
1885
2042
|
}
|
|
1886
2043
|
},
|
|
1887
|
-
"extends": "
|
|
1888
|
-
"
|
|
1889
|
-
"
|
|
1890
|
-
"
|
|
2044
|
+
"extends": "SmrtCollection",
|
|
2045
|
+
"extendsTypeArg": "AdFormat",
|
|
2046
|
+
"exportName": "AdFormatCollection",
|
|
2047
|
+
"collectionExportName": "AdFormatCollectionCollection",
|
|
1891
2048
|
"schema": {
|
|
1892
2049
|
"tableName": "ad_formats",
|
|
1893
2050
|
"ddl": "CREATE TABLE IF NOT EXISTS \"ad_formats\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"width\" INTEGER DEFAULT 0,\n \"height\" INTEGER DEFAULT 0,\n \"format_type\" TEXT,\n \"description\" TEXT DEFAULT ''\n);",
|
|
@@ -1967,191 +2124,82 @@
|
|
|
1967
2124
|
},
|
|
1968
2125
|
"importPath": "@happyvertical/smrt-ads"
|
|
1969
2126
|
},
|
|
1970
|
-
"@happyvertical/smrt-ads:
|
|
1971
|
-
"name": "
|
|
1972
|
-
"className": "
|
|
1973
|
-
"qualifiedName": "@happyvertical/smrt-ads:
|
|
2127
|
+
"@happyvertical/smrt-ads:AdGroupCollection": {
|
|
2128
|
+
"name": "adgroupcollection",
|
|
2129
|
+
"className": "AdGroupCollection",
|
|
2130
|
+
"qualifiedName": "@happyvertical/smrt-ads:AdGroupCollection",
|
|
1974
2131
|
"collection": "adgroups",
|
|
1975
|
-
"
|
|
1976
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/models/AdGroup.ts",
|
|
2132
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/collections/AdGroupCollection.ts",
|
|
1977
2133
|
"packageName": "@happyvertical/smrt-ads",
|
|
1978
|
-
"fields": {
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
"
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
"type": "text",
|
|
1989
|
-
"required": false,
|
|
1990
|
-
"_meta": {
|
|
1991
|
-
"sqlType": "UUID",
|
|
1992
|
-
"nullable": true,
|
|
1993
|
-
"__tenancy": {
|
|
1994
|
-
"isTenantIdField": true,
|
|
1995
|
-
"autoFilter": true,
|
|
1996
|
-
"required": false,
|
|
1997
|
-
"autoPopulate": true,
|
|
1998
|
-
"nullable": true,
|
|
1999
|
-
"mode": "optional",
|
|
2000
|
-
"field": "tenantId",
|
|
2001
|
-
"allowSuperAdminBypass": false
|
|
2134
|
+
"fields": {},
|
|
2135
|
+
"methods": {
|
|
2136
|
+
"findByContract": {
|
|
2137
|
+
"name": "findByContract",
|
|
2138
|
+
"async": true,
|
|
2139
|
+
"parameters": [
|
|
2140
|
+
{
|
|
2141
|
+
"name": "contractId",
|
|
2142
|
+
"type": "string",
|
|
2143
|
+
"optional": false
|
|
2002
2144
|
}
|
|
2003
|
-
|
|
2145
|
+
],
|
|
2146
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2147
|
+
"isStatic": false,
|
|
2148
|
+
"isPublic": true
|
|
2004
2149
|
},
|
|
2005
|
-
"
|
|
2006
|
-
"
|
|
2007
|
-
"
|
|
2008
|
-
"related": "@happyvertical/smrt-commerce:SalesContract",
|
|
2009
|
-
"description": "The sales contract this campaign is sold under, if there is one.",
|
|
2010
|
-
"_meta": {
|
|
2011
|
-
"description": "The sales contract this campaign is sold under, if there is one.",
|
|
2012
|
-
"validateSubtype": true
|
|
2013
|
-
}
|
|
2014
|
-
},
|
|
2015
|
-
"tierId": {
|
|
2016
|
-
"type": "foreignKey",
|
|
2017
|
-
"required": false,
|
|
2018
|
-
"related": "AdDeliveryTier",
|
|
2019
|
-
"description": "The priority tier the campaign runs in. Tiers are tried in order when more than one campaign could show.",
|
|
2020
|
-
"_meta": {
|
|
2021
|
-
"description": "The priority tier the campaign runs in. Tiers are tried in order when more than one campaign could show."
|
|
2022
|
-
}
|
|
2023
|
-
},
|
|
2024
|
-
"name": {
|
|
2025
|
-
"type": "text",
|
|
2026
|
-
"required": false,
|
|
2027
|
-
"default": "",
|
|
2028
|
-
"description": "What you call the campaign, for example Summer sale.",
|
|
2029
|
-
"_meta": {
|
|
2030
|
-
"description": "What you call the campaign, for example Summer sale."
|
|
2031
|
-
}
|
|
2032
|
-
},
|
|
2033
|
-
"verticalSlug": {
|
|
2034
|
-
"type": "text",
|
|
2035
|
-
"required": false,
|
|
2036
|
-
"default": "",
|
|
2037
|
-
"description": "The category the campaign belongs to, such as retail.",
|
|
2038
|
-
"_meta": {
|
|
2039
|
-
"description": "The category the campaign belongs to, such as retail."
|
|
2040
|
-
}
|
|
2041
|
-
},
|
|
2042
|
-
"targeting": {
|
|
2043
|
-
"type": "text",
|
|
2044
|
-
"required": false,
|
|
2045
|
-
"default": ""
|
|
2046
|
-
},
|
|
2047
|
-
"zoneIds": {
|
|
2048
|
-
"type": "text",
|
|
2049
|
-
"required": false,
|
|
2050
|
-
"default": ""
|
|
2051
|
-
},
|
|
2052
|
-
"startDate": {
|
|
2053
|
-
"type": "datetime",
|
|
2054
|
-
"required": false,
|
|
2055
|
-
"description": "The first day the campaign can show.",
|
|
2056
|
-
"_meta": {
|
|
2057
|
-
"description": "The first day the campaign can show."
|
|
2058
|
-
}
|
|
2059
|
-
},
|
|
2060
|
-
"endDate": {
|
|
2061
|
-
"type": "datetime",
|
|
2062
|
-
"required": false,
|
|
2063
|
-
"description": "The last day the campaign can show.",
|
|
2064
|
-
"_meta": {
|
|
2065
|
-
"description": "The last day the campaign can show."
|
|
2066
|
-
}
|
|
2067
|
-
},
|
|
2068
|
-
"dailyBudget": {
|
|
2069
|
-
"type": "decimal",
|
|
2070
|
-
"required": false,
|
|
2071
|
-
"default": 0,
|
|
2072
|
-
"description": "The most to spend in one day. The app shows this but does not stop the campaign by itself.",
|
|
2073
|
-
"_meta": {
|
|
2074
|
-
"description": "The most to spend in one day. The app shows this but does not stop the campaign by itself."
|
|
2075
|
-
}
|
|
2076
|
-
},
|
|
2077
|
-
"totalBudget": {
|
|
2078
|
-
"type": "decimal",
|
|
2079
|
-
"required": false,
|
|
2080
|
-
"default": 0,
|
|
2081
|
-
"description": "The most to spend over the whole campaign.",
|
|
2082
|
-
"_meta": {
|
|
2083
|
-
"description": "The most to spend over the whole campaign."
|
|
2084
|
-
}
|
|
2085
|
-
},
|
|
2086
|
-
"status": {
|
|
2087
|
-
"type": "text",
|
|
2088
|
-
"required": false,
|
|
2089
|
-
"description": "Where the campaign stands: draft, active, paused or completed. Only active campaigns show ads.",
|
|
2090
|
-
"_meta": {
|
|
2091
|
-
"description": "Where the campaign stands: draft, active, paused or completed. Only active campaigns show ads."
|
|
2092
|
-
},
|
|
2093
|
-
"enum": [
|
|
2094
|
-
"draft",
|
|
2095
|
-
"active",
|
|
2096
|
-
"paused",
|
|
2097
|
-
"completed"
|
|
2098
|
-
]
|
|
2099
|
-
}
|
|
2100
|
-
},
|
|
2101
|
-
"methods": {
|
|
2102
|
-
"getZoneIds": {
|
|
2103
|
-
"name": "getZoneIds",
|
|
2104
|
-
"async": false,
|
|
2105
|
-
"parameters": [],
|
|
2106
|
-
"returnType": "string[]",
|
|
2107
|
-
"isStatic": false,
|
|
2108
|
-
"isPublic": true
|
|
2109
|
-
},
|
|
2110
|
-
"setZoneIds": {
|
|
2111
|
-
"name": "setZoneIds",
|
|
2112
|
-
"async": false,
|
|
2150
|
+
"findByTier": {
|
|
2151
|
+
"name": "findByTier",
|
|
2152
|
+
"async": true,
|
|
2113
2153
|
"parameters": [
|
|
2114
2154
|
{
|
|
2115
|
-
"name": "
|
|
2116
|
-
"type": "string
|
|
2155
|
+
"name": "tierId",
|
|
2156
|
+
"type": "string",
|
|
2117
2157
|
"optional": false
|
|
2118
2158
|
}
|
|
2119
2159
|
],
|
|
2120
|
-
"returnType": "
|
|
2160
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2121
2161
|
"isStatic": false,
|
|
2122
2162
|
"isPublic": true
|
|
2123
2163
|
},
|
|
2124
|
-
"
|
|
2125
|
-
"name": "
|
|
2126
|
-
"async":
|
|
2164
|
+
"findByStatus": {
|
|
2165
|
+
"name": "findByStatus",
|
|
2166
|
+
"async": true,
|
|
2127
2167
|
"parameters": [
|
|
2128
2168
|
{
|
|
2129
|
-
"name": "
|
|
2130
|
-
"type": "
|
|
2169
|
+
"name": "status",
|
|
2170
|
+
"type": "AdGroupStatus",
|
|
2131
2171
|
"optional": false
|
|
2132
2172
|
}
|
|
2133
2173
|
],
|
|
2134
|
-
"returnType": "
|
|
2174
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2135
2175
|
"isStatic": false,
|
|
2136
2176
|
"isPublic": true
|
|
2137
2177
|
},
|
|
2138
|
-
"
|
|
2139
|
-
"name": "
|
|
2140
|
-
"async":
|
|
2178
|
+
"findActive": {
|
|
2179
|
+
"name": "findActive",
|
|
2180
|
+
"async": true,
|
|
2181
|
+
"parameters": [],
|
|
2182
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2183
|
+
"isStatic": false,
|
|
2184
|
+
"isPublic": true
|
|
2185
|
+
},
|
|
2186
|
+
"findByVertical": {
|
|
2187
|
+
"name": "findByVertical",
|
|
2188
|
+
"async": true,
|
|
2141
2189
|
"parameters": [
|
|
2142
2190
|
{
|
|
2143
|
-
"name": "
|
|
2191
|
+
"name": "verticalSlug",
|
|
2144
2192
|
"type": "string",
|
|
2145
2193
|
"optional": false
|
|
2146
2194
|
}
|
|
2147
2195
|
],
|
|
2148
|
-
"returnType": "
|
|
2196
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2149
2197
|
"isStatic": false,
|
|
2150
2198
|
"isPublic": true
|
|
2151
2199
|
},
|
|
2152
|
-
"
|
|
2153
|
-
"name": "
|
|
2154
|
-
"async":
|
|
2200
|
+
"findByZone": {
|
|
2201
|
+
"name": "findByZone",
|
|
2202
|
+
"async": true,
|
|
2155
2203
|
"parameters": [
|
|
2156
2204
|
{
|
|
2157
2205
|
"name": "zoneId",
|
|
@@ -2159,83 +2207,86 @@
|
|
|
2159
2207
|
"optional": false
|
|
2160
2208
|
}
|
|
2161
2209
|
],
|
|
2162
|
-
"returnType": "
|
|
2163
|
-
"isStatic": false,
|
|
2164
|
-
"isPublic": true
|
|
2165
|
-
},
|
|
2166
|
-
"getTargeting": {
|
|
2167
|
-
"name": "getTargeting",
|
|
2168
|
-
"async": false,
|
|
2169
|
-
"parameters": [],
|
|
2170
|
-
"returnType": "Record<string, unknown>",
|
|
2210
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2171
2211
|
"isStatic": false,
|
|
2172
2212
|
"isPublic": true
|
|
2173
2213
|
},
|
|
2174
|
-
"
|
|
2175
|
-
"name": "
|
|
2176
|
-
"async":
|
|
2214
|
+
"findEligibleForZone": {
|
|
2215
|
+
"name": "findEligibleForZone",
|
|
2216
|
+
"async": true,
|
|
2177
2217
|
"parameters": [
|
|
2178
2218
|
{
|
|
2179
|
-
"name": "
|
|
2180
|
-
"type": "
|
|
2219
|
+
"name": "zoneId",
|
|
2220
|
+
"type": "string",
|
|
2181
2221
|
"optional": false
|
|
2182
2222
|
}
|
|
2183
2223
|
],
|
|
2184
|
-
"returnType": "
|
|
2224
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2185
2225
|
"isStatic": false,
|
|
2186
2226
|
"isPublic": true
|
|
2187
2227
|
},
|
|
2188
|
-
"
|
|
2189
|
-
"name": "
|
|
2190
|
-
"async":
|
|
2228
|
+
"findDrafts": {
|
|
2229
|
+
"name": "findDrafts",
|
|
2230
|
+
"async": true,
|
|
2191
2231
|
"parameters": [],
|
|
2192
|
-
"returnType": "
|
|
2232
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2193
2233
|
"isStatic": false,
|
|
2194
2234
|
"isPublic": true
|
|
2195
2235
|
},
|
|
2196
|
-
"
|
|
2197
|
-
"name": "
|
|
2198
|
-
"async":
|
|
2236
|
+
"findPaused": {
|
|
2237
|
+
"name": "findPaused",
|
|
2238
|
+
"async": true,
|
|
2199
2239
|
"parameters": [],
|
|
2200
|
-
"returnType": "
|
|
2240
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2201
2241
|
"isStatic": false,
|
|
2202
2242
|
"isPublic": true
|
|
2203
2243
|
},
|
|
2204
|
-
"
|
|
2205
|
-
"name": "
|
|
2206
|
-
"async":
|
|
2244
|
+
"findCompleted": {
|
|
2245
|
+
"name": "findCompleted",
|
|
2246
|
+
"async": true,
|
|
2207
2247
|
"parameters": [],
|
|
2208
|
-
"returnType": "
|
|
2248
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2209
2249
|
"isStatic": false,
|
|
2210
2250
|
"isPublic": true
|
|
2211
2251
|
},
|
|
2212
|
-
"
|
|
2213
|
-
"name": "
|
|
2214
|
-
"async":
|
|
2215
|
-
"parameters": [
|
|
2216
|
-
|
|
2252
|
+
"findByTenant": {
|
|
2253
|
+
"name": "findByTenant",
|
|
2254
|
+
"async": true,
|
|
2255
|
+
"parameters": [
|
|
2256
|
+
{
|
|
2257
|
+
"name": "tenantId",
|
|
2258
|
+
"type": "string",
|
|
2259
|
+
"optional": false
|
|
2260
|
+
}
|
|
2261
|
+
],
|
|
2262
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2217
2263
|
"isStatic": false,
|
|
2218
2264
|
"isPublic": true
|
|
2219
2265
|
},
|
|
2220
|
-
"
|
|
2221
|
-
"name": "
|
|
2222
|
-
"async":
|
|
2266
|
+
"findGlobal": {
|
|
2267
|
+
"name": "findGlobal",
|
|
2268
|
+
"async": true,
|
|
2223
2269
|
"parameters": [],
|
|
2224
|
-
"returnType": "
|
|
2270
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2225
2271
|
"isStatic": false,
|
|
2226
2272
|
"isPublic": true
|
|
2227
2273
|
},
|
|
2228
|
-
"
|
|
2229
|
-
"name": "
|
|
2230
|
-
"async":
|
|
2231
|
-
"parameters": [
|
|
2232
|
-
|
|
2274
|
+
"findWithGlobals": {
|
|
2275
|
+
"name": "findWithGlobals",
|
|
2276
|
+
"async": true,
|
|
2277
|
+
"parameters": [
|
|
2278
|
+
{
|
|
2279
|
+
"name": "tenantId",
|
|
2280
|
+
"type": "string",
|
|
2281
|
+
"optional": false
|
|
2282
|
+
}
|
|
2283
|
+
],
|
|
2284
|
+
"returnType": "Promise<AdGroup[]>",
|
|
2233
2285
|
"isStatic": false,
|
|
2234
2286
|
"isPublic": true
|
|
2235
2287
|
}
|
|
2236
2288
|
},
|
|
2237
2289
|
"decoratorConfig": {
|
|
2238
|
-
"tableStrategy": "sti",
|
|
2239
2290
|
"api": {
|
|
2240
2291
|
"include": [
|
|
2241
2292
|
"list",
|
|
@@ -2250,24 +2301,12 @@
|
|
|
2250
2301
|
"get",
|
|
2251
2302
|
"create"
|
|
2252
2303
|
]
|
|
2253
|
-
}
|
|
2254
|
-
"cli": {
|
|
2255
|
-
"skipApiCheck": true
|
|
2256
|
-
},
|
|
2257
|
-
"tenantScoped": {
|
|
2258
|
-
"mode": "optional"
|
|
2259
|
-
},
|
|
2260
|
-
"conflictColumns": [
|
|
2261
|
-
"tenant_id",
|
|
2262
|
-
"slug",
|
|
2263
|
-
"context",
|
|
2264
|
-
"_meta_type"
|
|
2265
|
-
]
|
|
2304
|
+
}
|
|
2266
2305
|
},
|
|
2267
|
-
"extends": "
|
|
2268
|
-
"
|
|
2269
|
-
"
|
|
2270
|
-
"
|
|
2306
|
+
"extends": "SmrtCollection",
|
|
2307
|
+
"extendsTypeArg": "AdGroup",
|
|
2308
|
+
"exportName": "AdGroupCollection",
|
|
2309
|
+
"collectionExportName": "AdGroupCollectionCollection",
|
|
2271
2310
|
"schema": {
|
|
2272
2311
|
"tableName": "ad_groups",
|
|
2273
2312
|
"ddl": "CREATE TABLE IF NOT EXISTS \"ad_groups\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"contract_id\" UUID,\n \"tier_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"vertical_slug\" TEXT DEFAULT '',\n \"targeting\" TEXT DEFAULT '',\n \"zone_ids\" TEXT DEFAULT '',\n \"start_date\" TIMESTAMP,\n \"end_date\" TIMESTAMP,\n \"daily_budget\" REAL DEFAULT 0,\n \"total_budget\" REAL DEFAULT 0,\n \"status\" TEXT\n);",
|
|
@@ -2411,188 +2450,161 @@
|
|
|
2411
2450
|
},
|
|
2412
2451
|
"importPath": "@happyvertical/smrt-ads"
|
|
2413
2452
|
},
|
|
2414
|
-
"@happyvertical/smrt-ads:
|
|
2415
|
-
"name": "
|
|
2416
|
-
"className": "
|
|
2417
|
-
"qualifiedName": "@happyvertical/smrt-ads:
|
|
2453
|
+
"@happyvertical/smrt-ads:AdVariationCollection": {
|
|
2454
|
+
"name": "advariationcollection",
|
|
2455
|
+
"className": "AdVariationCollection",
|
|
2456
|
+
"qualifiedName": "@happyvertical/smrt-ads:AdVariationCollection",
|
|
2418
2457
|
"collection": "advariations",
|
|
2419
|
-
"
|
|
2420
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/models/AdVariation.ts",
|
|
2458
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/ads/src/collections/AdVariationCollection.ts",
|
|
2421
2459
|
"packageName": "@happyvertical/smrt-ads",
|
|
2422
|
-
"fields": {
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
"
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
"type": "text",
|
|
2433
|
-
"required": false,
|
|
2434
|
-
"_meta": {
|
|
2435
|
-
"sqlType": "UUID",
|
|
2436
|
-
"nullable": true,
|
|
2437
|
-
"__tenancy": {
|
|
2438
|
-
"isTenantIdField": true,
|
|
2439
|
-
"autoFilter": true,
|
|
2440
|
-
"required": false,
|
|
2441
|
-
"autoPopulate": true,
|
|
2442
|
-
"nullable": true,
|
|
2443
|
-
"mode": "optional",
|
|
2444
|
-
"field": "tenantId",
|
|
2445
|
-
"allowSuperAdminBypass": false
|
|
2460
|
+
"fields": {},
|
|
2461
|
+
"methods": {
|
|
2462
|
+
"findByGroup": {
|
|
2463
|
+
"name": "findByGroup",
|
|
2464
|
+
"async": true,
|
|
2465
|
+
"parameters": [
|
|
2466
|
+
{
|
|
2467
|
+
"name": "groupId",
|
|
2468
|
+
"type": "string",
|
|
2469
|
+
"optional": false
|
|
2446
2470
|
}
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
"
|
|
2451
|
-
"required": false,
|
|
2452
|
-
"related": "AdGroup",
|
|
2453
|
-
"description": "The campaign this ad belongs to.",
|
|
2454
|
-
"_meta": {
|
|
2455
|
-
"description": "The campaign this ad belongs to."
|
|
2456
|
-
}
|
|
2457
|
-
},
|
|
2458
|
-
"formatId": {
|
|
2459
|
-
"type": "foreignKey",
|
|
2460
|
-
"required": false,
|
|
2461
|
-
"related": "AdFormat",
|
|
2462
|
-
"description": "The ad size this ad is made for.",
|
|
2463
|
-
"_meta": {
|
|
2464
|
-
"description": "The ad size this ad is made for."
|
|
2465
|
-
}
|
|
2466
|
-
},
|
|
2467
|
-
"assetId": {
|
|
2468
|
-
"type": "crossPackageRef",
|
|
2469
|
-
"required": false,
|
|
2470
|
-
"related": "@happyvertical/smrt-assets:Asset",
|
|
2471
|
-
"description": "The picture people see.",
|
|
2472
|
-
"_meta": {
|
|
2473
|
-
"description": "The picture people see."
|
|
2474
|
-
}
|
|
2475
|
-
},
|
|
2476
|
-
"name": {
|
|
2477
|
-
"type": "text",
|
|
2478
|
-
"required": false,
|
|
2479
|
-
"default": "",
|
|
2480
|
-
"description": "What you call this ad, for example Version A, blue button.",
|
|
2481
|
-
"_meta": {
|
|
2482
|
-
"description": "What you call this ad, for example Version A, blue button."
|
|
2483
|
-
}
|
|
2484
|
-
},
|
|
2485
|
-
"clickUrl": {
|
|
2486
|
-
"type": "text",
|
|
2487
|
-
"required": false,
|
|
2488
|
-
"default": "",
|
|
2489
|
-
"description": "The web address people go to when they tap the ad.",
|
|
2490
|
-
"_meta": {
|
|
2491
|
-
"description": "The web address people go to when they tap the ad."
|
|
2492
|
-
}
|
|
2471
|
+
],
|
|
2472
|
+
"returnType": "Promise<AdVariation[]>",
|
|
2473
|
+
"isStatic": false,
|
|
2474
|
+
"isPublic": true
|
|
2493
2475
|
},
|
|
2494
|
-
"
|
|
2495
|
-
"
|
|
2496
|
-
"
|
|
2497
|
-
"
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2476
|
+
"findByFormat": {
|
|
2477
|
+
"name": "findByFormat",
|
|
2478
|
+
"async": true,
|
|
2479
|
+
"parameters": [
|
|
2480
|
+
{
|
|
2481
|
+
"name": "formatId",
|
|
2482
|
+
"type": "string",
|
|
2483
|
+
"optional": false
|
|
2484
|
+
}
|
|
2485
|
+
],
|
|
2486
|
+
"returnType": "Promise<AdVariation[]>",
|
|
2487
|
+
"isStatic": false,
|
|
2488
|
+
"isPublic": true
|
|
2502
2489
|
},
|
|
2503
|
-
"
|
|
2504
|
-
"
|
|
2505
|
-
"
|
|
2506
|
-
"
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2490
|
+
"findActiveByGroup": {
|
|
2491
|
+
"name": "findActiveByGroup",
|
|
2492
|
+
"async": true,
|
|
2493
|
+
"parameters": [
|
|
2494
|
+
{
|
|
2495
|
+
"name": "groupId",
|
|
2496
|
+
"type": "string",
|
|
2497
|
+
"optional": false
|
|
2498
|
+
}
|
|
2499
|
+
],
|
|
2500
|
+
"returnType": "Promise<AdVariation[]>",
|
|
2501
|
+
"isStatic": false,
|
|
2502
|
+
"isPublic": true
|
|
2511
2503
|
},
|
|
2512
|
-
"
|
|
2513
|
-
"
|
|
2514
|
-
"
|
|
2515
|
-
"
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2504
|
+
"selectByWeight": {
|
|
2505
|
+
"name": "selectByWeight",
|
|
2506
|
+
"async": true,
|
|
2507
|
+
"parameters": [
|
|
2508
|
+
{
|
|
2509
|
+
"name": "groupId",
|
|
2510
|
+
"type": "string",
|
|
2511
|
+
"optional": false
|
|
2512
|
+
}
|
|
2513
|
+
],
|
|
2514
|
+
"returnType": "Promise<AdVariation | null>",
|
|
2515
|
+
"isStatic": false,
|
|
2516
|
+
"isPublic": true
|
|
2524
2517
|
},
|
|
2525
|
-
"
|
|
2526
|
-
"
|
|
2527
|
-
"
|
|
2528
|
-
"
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2518
|
+
"findByStatus": {
|
|
2519
|
+
"name": "findByStatus",
|
|
2520
|
+
"async": true,
|
|
2521
|
+
"parameters": [
|
|
2522
|
+
{
|
|
2523
|
+
"name": "status",
|
|
2524
|
+
"type": "AdVariationStatus",
|
|
2525
|
+
"optional": false
|
|
2526
|
+
}
|
|
2527
|
+
],
|
|
2528
|
+
"returnType": "Promise<AdVariation[]>",
|
|
2529
|
+
"isStatic": false,
|
|
2530
|
+
"isPublic": true
|
|
2533
2531
|
},
|
|
2534
|
-
"
|
|
2535
|
-
"
|
|
2536
|
-
"
|
|
2537
|
-
"default": 0,
|
|
2538
|
-
"description": "How many times the ad has been tapped. The app counts this as it serves ads and refreshes it a little later.",
|
|
2539
|
-
"_meta": {
|
|
2540
|
-
"description": "How many times the ad has been tapped. The app counts this as it serves ads and refreshes it a little later."
|
|
2541
|
-
}
|
|
2542
|
-
}
|
|
2543
|
-
},
|
|
2544
|
-
"methods": {
|
|
2545
|
-
"isActive": {
|
|
2546
|
-
"name": "isActive",
|
|
2547
|
-
"async": false,
|
|
2532
|
+
"findActive": {
|
|
2533
|
+
"name": "findActive",
|
|
2534
|
+
"async": true,
|
|
2548
2535
|
"parameters": [],
|
|
2549
|
-
"returnType": "
|
|
2536
|
+
"returnType": "Promise<AdVariation[]>",
|
|
2550
2537
|
"isStatic": false,
|
|
2551
2538
|
"isPublic": true
|
|
2552
2539
|
},
|
|
2553
|
-
"
|
|
2554
|
-
"name": "
|
|
2555
|
-
"async":
|
|
2540
|
+
"findDrafts": {
|
|
2541
|
+
"name": "findDrafts",
|
|
2542
|
+
"async": true,
|
|
2556
2543
|
"parameters": [],
|
|
2557
|
-
"returnType": "
|
|
2544
|
+
"returnType": "Promise<AdVariation[]>",
|
|
2558
2545
|
"isStatic": false,
|
|
2559
2546
|
"isPublic": true
|
|
2560
2547
|
},
|
|
2561
|
-
"
|
|
2562
|
-
"name": "
|
|
2563
|
-
"async":
|
|
2548
|
+
"findPaused": {
|
|
2549
|
+
"name": "findPaused",
|
|
2550
|
+
"async": true,
|
|
2564
2551
|
"parameters": [],
|
|
2565
|
-
"returnType": "
|
|
2552
|
+
"returnType": "Promise<AdVariation[]>",
|
|
2566
2553
|
"isStatic": false,
|
|
2567
2554
|
"isPublic": true
|
|
2568
2555
|
},
|
|
2569
|
-
"
|
|
2570
|
-
"name": "
|
|
2571
|
-
"async":
|
|
2572
|
-
"parameters": [
|
|
2573
|
-
|
|
2556
|
+
"findTopPerformers": {
|
|
2557
|
+
"name": "findTopPerformers",
|
|
2558
|
+
"async": true,
|
|
2559
|
+
"parameters": [
|
|
2560
|
+
{
|
|
2561
|
+
"name": "limit",
|
|
2562
|
+
"type": "number",
|
|
2563
|
+
"optional": true
|
|
2564
|
+
}
|
|
2565
|
+
],
|
|
2566
|
+
"returnType": "Promise<AdVariation[]>",
|
|
2574
2567
|
"isStatic": false,
|
|
2575
2568
|
"isPublic": true
|
|
2576
2569
|
},
|
|
2577
|
-
"
|
|
2578
|
-
"name": "
|
|
2579
|
-
"async":
|
|
2580
|
-
"parameters": [
|
|
2581
|
-
|
|
2570
|
+
"findByTenant": {
|
|
2571
|
+
"name": "findByTenant",
|
|
2572
|
+
"async": true,
|
|
2573
|
+
"parameters": [
|
|
2574
|
+
{
|
|
2575
|
+
"name": "tenantId",
|
|
2576
|
+
"type": "string",
|
|
2577
|
+
"optional": false
|
|
2578
|
+
}
|
|
2579
|
+
],
|
|
2580
|
+
"returnType": "Promise<AdVariation[]>",
|
|
2582
2581
|
"isStatic": false,
|
|
2583
2582
|
"isPublic": true
|
|
2584
2583
|
},
|
|
2585
|
-
"
|
|
2586
|
-
"name": "
|
|
2587
|
-
"async":
|
|
2584
|
+
"findGlobal": {
|
|
2585
|
+
"name": "findGlobal",
|
|
2586
|
+
"async": true,
|
|
2588
2587
|
"parameters": [],
|
|
2589
|
-
"returnType": "
|
|
2588
|
+
"returnType": "Promise<AdVariation[]>",
|
|
2589
|
+
"isStatic": false,
|
|
2590
|
+
"isPublic": true
|
|
2591
|
+
},
|
|
2592
|
+
"findWithGlobals": {
|
|
2593
|
+
"name": "findWithGlobals",
|
|
2594
|
+
"async": true,
|
|
2595
|
+
"parameters": [
|
|
2596
|
+
{
|
|
2597
|
+
"name": "tenantId",
|
|
2598
|
+
"type": "string",
|
|
2599
|
+
"optional": false
|
|
2600
|
+
}
|
|
2601
|
+
],
|
|
2602
|
+
"returnType": "Promise<AdVariation[]>",
|
|
2590
2603
|
"isStatic": false,
|
|
2591
2604
|
"isPublic": true
|
|
2592
2605
|
}
|
|
2593
2606
|
},
|
|
2594
2607
|
"decoratorConfig": {
|
|
2595
|
-
"tableStrategy": "sti",
|
|
2596
2608
|
"api": {
|
|
2597
2609
|
"include": [
|
|
2598
2610
|
"list",
|
|
@@ -2607,24 +2619,12 @@
|
|
|
2607
2619
|
"get",
|
|
2608
2620
|
"create"
|
|
2609
2621
|
]
|
|
2610
|
-
}
|
|
2611
|
-
"cli": {
|
|
2612
|
-
"skipApiCheck": true
|
|
2613
|
-
},
|
|
2614
|
-
"tenantScoped": {
|
|
2615
|
-
"mode": "optional"
|
|
2616
|
-
},
|
|
2617
|
-
"conflictColumns": [
|
|
2618
|
-
"tenant_id",
|
|
2619
|
-
"slug",
|
|
2620
|
-
"context",
|
|
2621
|
-
"_meta_type"
|
|
2622
|
-
]
|
|
2622
|
+
}
|
|
2623
2623
|
},
|
|
2624
|
-
"extends": "
|
|
2625
|
-
"
|
|
2626
|
-
"
|
|
2627
|
-
"
|
|
2624
|
+
"extends": "SmrtCollection",
|
|
2625
|
+
"extendsTypeArg": "AdVariation",
|
|
2626
|
+
"exportName": "AdVariationCollection",
|
|
2627
|
+
"collectionExportName": "AdVariationCollectionCollection",
|
|
2628
2628
|
"schema": {
|
|
2629
2629
|
"tableName": "ad_variations",
|
|
2630
2630
|
"ddl": "CREATE TABLE IF NOT EXISTS \"ad_variations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"group_id\" UUID,\n \"format_id\" UUID,\n \"asset_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"click_url\" TEXT DEFAULT '',\n \"alt_text\" TEXT DEFAULT '',\n \"weight\" INTEGER DEFAULT 1,\n \"status\" TEXT,\n \"impressions\" INTEGER DEFAULT 0,\n \"clicks\" INTEGER DEFAULT 0\n);",
|