@happyvertical/smrt-analytics 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/AGENTS.md +68 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +7 -0
  4. package/README.md +131 -0
  5. package/dist/__smrt-register__.d.ts +2 -0
  6. package/dist/__smrt-register__.d.ts.map +1 -0
  7. package/dist/collections/AnalyticsDataStreamCollection.d.ts +69 -0
  8. package/dist/collections/AnalyticsDataStreamCollection.d.ts.map +1 -0
  9. package/dist/collections/AnalyticsEventCollection.d.ts +131 -0
  10. package/dist/collections/AnalyticsEventCollection.d.ts.map +1 -0
  11. package/dist/collections/AnalyticsPropertyCollection.d.ts +66 -0
  12. package/dist/collections/AnalyticsPropertyCollection.d.ts.map +1 -0
  13. package/dist/collections/AnalyticsReportCollection.d.ts +69 -0
  14. package/dist/collections/AnalyticsReportCollection.d.ts.map +1 -0
  15. package/dist/collections/index.d.ts +8 -0
  16. package/dist/collections/index.d.ts.map +1 -0
  17. package/dist/index.d.ts +6 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +1623 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/manifest.json +4161 -0
  22. package/dist/models/AnalyticsDataStream.d.ts +94 -0
  23. package/dist/models/AnalyticsDataStream.d.ts.map +1 -0
  24. package/dist/models/AnalyticsEvent.d.ts +142 -0
  25. package/dist/models/AnalyticsEvent.d.ts.map +1 -0
  26. package/dist/models/AnalyticsProperty.d.ts +142 -0
  27. package/dist/models/AnalyticsProperty.d.ts.map +1 -0
  28. package/dist/models/AnalyticsReport.d.ts +206 -0
  29. package/dist/models/AnalyticsReport.d.ts.map +1 -0
  30. package/dist/models/index.d.ts +8 -0
  31. package/dist/models/index.d.ts.map +1 -0
  32. package/dist/playground.d.ts +2 -0
  33. package/dist/playground.d.ts.map +1 -0
  34. package/dist/playground.js +99 -0
  35. package/dist/playground.js.map +1 -0
  36. package/dist/prompts.d.ts +57 -0
  37. package/dist/prompts.d.ts.map +1 -0
  38. package/dist/smrt-knowledge.json +1570 -0
  39. package/dist/svelte/AnalyticsSummary.svelte +63 -0
  40. package/dist/svelte/AnalyticsSummary.svelte.d.ts +8 -0
  41. package/dist/svelte/AnalyticsSummary.svelte.d.ts.map +1 -0
  42. package/dist/svelte/EventsTable.svelte +161 -0
  43. package/dist/svelte/EventsTable.svelte.d.ts +16 -0
  44. package/dist/svelte/EventsTable.svelte.d.ts.map +1 -0
  45. package/dist/svelte/PropertyInfo.svelte +139 -0
  46. package/dist/svelte/PropertyInfo.svelte.d.ts +12 -0
  47. package/dist/svelte/PropertyInfo.svelte.d.ts.map +1 -0
  48. package/dist/svelte/PropertyStatusBadge.svelte +65 -0
  49. package/dist/svelte/PropertyStatusBadge.svelte.d.ts +7 -0
  50. package/dist/svelte/PropertyStatusBadge.svelte.d.ts.map +1 -0
  51. package/dist/svelte/StatCard.svelte +63 -0
  52. package/dist/svelte/StatCard.svelte.d.ts +11 -0
  53. package/dist/svelte/StatCard.svelte.d.ts.map +1 -0
  54. package/dist/svelte/TrendBadge.svelte +49 -0
  55. package/dist/svelte/TrendBadge.svelte.d.ts +8 -0
  56. package/dist/svelte/TrendBadge.svelte.d.ts.map +1 -0
  57. package/dist/svelte/i18n.d.ts +10 -0
  58. package/dist/svelte/i18n.d.ts.map +1 -0
  59. package/dist/svelte/i18n.js +10 -0
  60. package/dist/svelte/index.d.ts +29 -0
  61. package/dist/svelte/index.d.ts.map +1 -0
  62. package/dist/svelte/index.js +39 -0
  63. package/dist/svelte/playground.d.ts +88 -0
  64. package/dist/svelte/playground.d.ts.map +1 -0
  65. package/dist/svelte/playground.js +95 -0
  66. package/dist/types/index.d.ts +267 -0
  67. package/dist/types/index.d.ts.map +1 -0
  68. package/dist/ui.d.ts +10 -0
  69. package/dist/ui.d.ts.map +1 -0
  70. package/dist/ui.js +79 -0
  71. package/dist/ui.js.map +1 -0
  72. package/package.json +95 -0
@@ -0,0 +1,4161 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 1782177088869,
4
+ "packageName": "@happyvertical/smrt-analytics",
5
+ "packageVersion": "0.30.0",
6
+ "objects": {
7
+ "@happyvertical/smrt-analytics:AnalyticsDataStreamCollection": {
8
+ "name": "analyticsdatastreamcollection",
9
+ "className": "AnalyticsDataStreamCollection",
10
+ "qualifiedName": "@happyvertical/smrt-analytics:AnalyticsDataStreamCollection",
11
+ "collection": "analyticsdatastreams",
12
+ "filePath": "/home/runner/_work/smrt/smrt/packages/analytics/src/collections/AnalyticsDataStreamCollection.ts",
13
+ "packageName": "@happyvertical/smrt-analytics",
14
+ "fields": {},
15
+ "methods": {
16
+ "findByProperty": {
17
+ "name": "findByProperty",
18
+ "async": true,
19
+ "parameters": [
20
+ {
21
+ "name": "propertyId",
22
+ "type": "string",
23
+ "optional": false
24
+ }
25
+ ],
26
+ "returnType": "Promise<AnalyticsDataStream[]>",
27
+ "isStatic": false,
28
+ "isPublic": true
29
+ },
30
+ "findByExternalId": {
31
+ "name": "findByExternalId",
32
+ "async": true,
33
+ "parameters": [
34
+ {
35
+ "name": "externalId",
36
+ "type": "string",
37
+ "optional": false
38
+ }
39
+ ],
40
+ "returnType": "Promise<AnalyticsDataStream | null>",
41
+ "isStatic": false,
42
+ "isPublic": true
43
+ },
44
+ "findByMeasurementId": {
45
+ "name": "findByMeasurementId",
46
+ "async": true,
47
+ "parameters": [
48
+ {
49
+ "name": "measurementId",
50
+ "type": "string",
51
+ "optional": false
52
+ }
53
+ ],
54
+ "returnType": "Promise<AnalyticsDataStream | null>",
55
+ "isStatic": false,
56
+ "isPublic": true
57
+ },
58
+ "findByType": {
59
+ "name": "findByType",
60
+ "async": true,
61
+ "parameters": [
62
+ {
63
+ "name": "streamType",
64
+ "type": "DataStreamType",
65
+ "optional": false
66
+ }
67
+ ],
68
+ "returnType": "Promise<AnalyticsDataStream[]>",
69
+ "isStatic": false,
70
+ "isPublic": true
71
+ },
72
+ "findWebStreams": {
73
+ "name": "findWebStreams",
74
+ "async": true,
75
+ "parameters": [],
76
+ "returnType": "Promise<AnalyticsDataStream[]>",
77
+ "isStatic": false,
78
+ "isPublic": true
79
+ },
80
+ "findIOSStreams": {
81
+ "name": "findIOSStreams",
82
+ "async": true,
83
+ "parameters": [],
84
+ "returnType": "Promise<AnalyticsDataStream[]>",
85
+ "isStatic": false,
86
+ "isPublic": true
87
+ },
88
+ "findAndroidStreams": {
89
+ "name": "findAndroidStreams",
90
+ "async": true,
91
+ "parameters": [],
92
+ "returnType": "Promise<AnalyticsDataStream[]>",
93
+ "isStatic": false,
94
+ "isPublic": true
95
+ },
96
+ "findMobileStreams": {
97
+ "name": "findMobileStreams",
98
+ "async": true,
99
+ "parameters": [],
100
+ "returnType": "Promise<AnalyticsDataStream[]>",
101
+ "isStatic": false,
102
+ "isPublic": true
103
+ },
104
+ "findByStatus": {
105
+ "name": "findByStatus",
106
+ "async": true,
107
+ "parameters": [
108
+ {
109
+ "name": "status",
110
+ "type": "DataStreamStatus",
111
+ "optional": false
112
+ }
113
+ ],
114
+ "returnType": "Promise<AnalyticsDataStream[]>",
115
+ "isStatic": false,
116
+ "isPublic": true
117
+ },
118
+ "findActive": {
119
+ "name": "findActive",
120
+ "async": true,
121
+ "parameters": [],
122
+ "returnType": "Promise<AnalyticsDataStream[]>",
123
+ "isStatic": false,
124
+ "isPublic": true
125
+ },
126
+ "findActiveByProperty": {
127
+ "name": "findActiveByProperty",
128
+ "async": true,
129
+ "parameters": [
130
+ {
131
+ "name": "propertyId",
132
+ "type": "string",
133
+ "optional": false
134
+ }
135
+ ],
136
+ "returnType": "Promise<AnalyticsDataStream[]>",
137
+ "isStatic": false,
138
+ "isPublic": true
139
+ }
140
+ },
141
+ "decoratorConfig": {},
142
+ "extends": "SmrtCollection",
143
+ "extendsTypeArg": "AnalyticsDataStream",
144
+ "exportName": "AnalyticsDataStreamCollection",
145
+ "collectionExportName": "AnalyticsDataStreamCollectionCollection",
146
+ "schema": {
147
+ "tableName": "analytics_data_stream_collections",
148
+ "ddl": "CREATE TABLE IF NOT EXISTS \"analytics_data_stream_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
149
+ "columns": {
150
+ "id": {
151
+ "type": "UUID",
152
+ "primaryKey": true,
153
+ "referenceKind": "id",
154
+ "notNull": true
155
+ },
156
+ "slug": {
157
+ "type": "TEXT",
158
+ "notNull": true
159
+ },
160
+ "context": {
161
+ "type": "TEXT",
162
+ "notNull": true,
163
+ "default": ""
164
+ },
165
+ "created_at": {
166
+ "type": "TIMESTAMP",
167
+ "notNull": true,
168
+ "default": "current_timestamp"
169
+ },
170
+ "updated_at": {
171
+ "type": "TIMESTAMP",
172
+ "notNull": true,
173
+ "default": "current_timestamp"
174
+ }
175
+ },
176
+ "indexes": [
177
+ {
178
+ "name": "analytics_data_stream_collections_id_idx",
179
+ "columns": [
180
+ "id"
181
+ ]
182
+ },
183
+ {
184
+ "name": "analytics_data_stream_collections_slug_context_idx",
185
+ "columns": [
186
+ "slug",
187
+ "context"
188
+ ],
189
+ "unique": true
190
+ }
191
+ ],
192
+ "version": "12ef5a9a"
193
+ }
194
+ },
195
+ "@happyvertical/smrt-analytics:AnalyticsEventCollection": {
196
+ "name": "analyticseventcollection",
197
+ "className": "AnalyticsEventCollection",
198
+ "qualifiedName": "@happyvertical/smrt-analytics:AnalyticsEventCollection",
199
+ "collection": "analyticsevents",
200
+ "filePath": "/home/runner/_work/smrt/smrt/packages/analytics/src/collections/AnalyticsEventCollection.ts",
201
+ "packageName": "@happyvertical/smrt-analytics",
202
+ "fields": {},
203
+ "methods": {
204
+ "findByProperty": {
205
+ "name": "findByProperty",
206
+ "async": true,
207
+ "parameters": [
208
+ {
209
+ "name": "propertyId",
210
+ "type": "string",
211
+ "optional": false
212
+ }
213
+ ],
214
+ "returnType": "Promise<AnalyticsEvent[]>",
215
+ "isStatic": false,
216
+ "isPublic": true
217
+ },
218
+ "findByEventName": {
219
+ "name": "findByEventName",
220
+ "async": true,
221
+ "parameters": [
222
+ {
223
+ "name": "eventName",
224
+ "type": "string",
225
+ "optional": false
226
+ }
227
+ ],
228
+ "returnType": "Promise<AnalyticsEvent[]>",
229
+ "isStatic": false,
230
+ "isPublic": true
231
+ },
232
+ "findByClientId": {
233
+ "name": "findByClientId",
234
+ "async": true,
235
+ "parameters": [
236
+ {
237
+ "name": "clientId",
238
+ "type": "string",
239
+ "optional": false
240
+ }
241
+ ],
242
+ "returnType": "Promise<AnalyticsEvent[]>",
243
+ "isStatic": false,
244
+ "isPublic": true
245
+ },
246
+ "findByUserId": {
247
+ "name": "findByUserId",
248
+ "async": true,
249
+ "parameters": [
250
+ {
251
+ "name": "userId",
252
+ "type": "string",
253
+ "optional": false
254
+ }
255
+ ],
256
+ "returnType": "Promise<AnalyticsEvent[]>",
257
+ "isStatic": false,
258
+ "isPublic": true
259
+ },
260
+ "findByStatus": {
261
+ "name": "findByStatus",
262
+ "async": true,
263
+ "parameters": [
264
+ {
265
+ "name": "status",
266
+ "type": "TrackingEventStatus",
267
+ "optional": false
268
+ }
269
+ ],
270
+ "returnType": "Promise<AnalyticsEvent[]>",
271
+ "isStatic": false,
272
+ "isPublic": true
273
+ },
274
+ "findPending": {
275
+ "name": "findPending",
276
+ "async": true,
277
+ "parameters": [],
278
+ "returnType": "Promise<AnalyticsEvent[]>",
279
+ "isStatic": false,
280
+ "isPublic": true
281
+ },
282
+ "findSent": {
283
+ "name": "findSent",
284
+ "async": true,
285
+ "parameters": [],
286
+ "returnType": "Promise<AnalyticsEvent[]>",
287
+ "isStatic": false,
288
+ "isPublic": true
289
+ },
290
+ "findFailed": {
291
+ "name": "findFailed",
292
+ "async": true,
293
+ "parameters": [],
294
+ "returnType": "Promise<AnalyticsEvent[]>",
295
+ "isStatic": false,
296
+ "isPublic": true
297
+ },
298
+ "findForRetry": {
299
+ "name": "findForRetry",
300
+ "async": true,
301
+ "parameters": [
302
+ {
303
+ "name": "maxRetries",
304
+ "type": "number",
305
+ "optional": true
306
+ }
307
+ ],
308
+ "returnType": "Promise<AnalyticsEvent[]>",
309
+ "isStatic": false,
310
+ "isPublic": true
311
+ },
312
+ "findPendingByProperty": {
313
+ "name": "findPendingByProperty",
314
+ "async": true,
315
+ "parameters": [
316
+ {
317
+ "name": "propertyId",
318
+ "type": "string",
319
+ "optional": false
320
+ }
321
+ ],
322
+ "returnType": "Promise<AnalyticsEvent[]>",
323
+ "isStatic": false,
324
+ "isPublic": true
325
+ },
326
+ "findByDateRange": {
327
+ "name": "findByDateRange",
328
+ "async": true,
329
+ "parameters": [
330
+ {
331
+ "name": "startDate",
332
+ "type": "Date",
333
+ "optional": false
334
+ },
335
+ {
336
+ "name": "endDate",
337
+ "type": "Date",
338
+ "optional": false
339
+ }
340
+ ],
341
+ "returnType": "Promise<AnalyticsEvent[]>",
342
+ "isStatic": false,
343
+ "isPublic": true
344
+ },
345
+ "findConversions": {
346
+ "name": "findConversions",
347
+ "async": true,
348
+ "parameters": [
349
+ {
350
+ "name": "propertyId",
351
+ "type": "string",
352
+ "optional": true
353
+ }
354
+ ],
355
+ "returnType": "Promise<AnalyticsEvent[]>",
356
+ "isStatic": false,
357
+ "isPublic": true
358
+ },
359
+ "findPageviews": {
360
+ "name": "findPageviews",
361
+ "async": true,
362
+ "parameters": [
363
+ {
364
+ "name": "propertyId",
365
+ "type": "string",
366
+ "optional": true
367
+ }
368
+ ],
369
+ "returnType": "Promise<AnalyticsEvent[]>",
370
+ "isStatic": false,
371
+ "isPublic": true
372
+ },
373
+ "countByEventName": {
374
+ "name": "countByEventName",
375
+ "async": true,
376
+ "parameters": [
377
+ {
378
+ "name": "propertyId",
379
+ "type": "string",
380
+ "optional": false
381
+ }
382
+ ],
383
+ "returnType": "Promise<Map<string, number>>",
384
+ "isStatic": false,
385
+ "isPublic": true
386
+ },
387
+ "getPropertyStats": {
388
+ "name": "getPropertyStats",
389
+ "async": true,
390
+ "parameters": [
391
+ {
392
+ "name": "propertyId",
393
+ "type": "string",
394
+ "optional": false
395
+ }
396
+ ],
397
+ "returnType": "Promise<object>",
398
+ "isStatic": false,
399
+ "isPublic": true
400
+ },
401
+ "getPropertyStatsWithTrend": {
402
+ "name": "getPropertyStatsWithTrend",
403
+ "async": true,
404
+ "parameters": [
405
+ {
406
+ "name": "propertyId",
407
+ "type": "string",
408
+ "optional": false
409
+ },
410
+ {
411
+ "name": "now",
412
+ "type": "Date",
413
+ "optional": true
414
+ }
415
+ ],
416
+ "returnType": "Promise<PropertyStatsWithTrend>",
417
+ "isStatic": false,
418
+ "isPublic": true
419
+ },
420
+ "getBatchPropertyStats": {
421
+ "name": "getBatchPropertyStats",
422
+ "async": true,
423
+ "parameters": [
424
+ {
425
+ "name": "propertyIds",
426
+ "type": "string[]",
427
+ "optional": false
428
+ },
429
+ {
430
+ "name": "now",
431
+ "type": "Date",
432
+ "optional": true
433
+ }
434
+ ],
435
+ "returnType": "Promise<Map<string, PropertyStatsWithTrend>>",
436
+ "isStatic": false,
437
+ "isPublic": true
438
+ }
439
+ },
440
+ "decoratorConfig": {},
441
+ "extends": "SmrtCollection",
442
+ "extendsTypeArg": "AnalyticsEvent",
443
+ "exportName": "AnalyticsEventCollection",
444
+ "collectionExportName": "AnalyticsEventCollectionCollection",
445
+ "schema": {
446
+ "tableName": "analytics_event_collections",
447
+ "ddl": "CREATE TABLE IF NOT EXISTS \"analytics_event_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
448
+ "columns": {
449
+ "id": {
450
+ "type": "UUID",
451
+ "primaryKey": true,
452
+ "referenceKind": "id",
453
+ "notNull": true
454
+ },
455
+ "slug": {
456
+ "type": "TEXT",
457
+ "notNull": true
458
+ },
459
+ "context": {
460
+ "type": "TEXT",
461
+ "notNull": true,
462
+ "default": ""
463
+ },
464
+ "created_at": {
465
+ "type": "TIMESTAMP",
466
+ "notNull": true,
467
+ "default": "current_timestamp"
468
+ },
469
+ "updated_at": {
470
+ "type": "TIMESTAMP",
471
+ "notNull": true,
472
+ "default": "current_timestamp"
473
+ }
474
+ },
475
+ "indexes": [
476
+ {
477
+ "name": "analytics_event_collections_id_idx",
478
+ "columns": [
479
+ "id"
480
+ ]
481
+ },
482
+ {
483
+ "name": "analytics_event_collections_slug_context_idx",
484
+ "columns": [
485
+ "slug",
486
+ "context"
487
+ ],
488
+ "unique": true
489
+ }
490
+ ],
491
+ "version": "13d03b2a"
492
+ }
493
+ },
494
+ "@happyvertical/smrt-analytics:AnalyticsPropertyCollection": {
495
+ "name": "analyticspropertycollection",
496
+ "className": "AnalyticsPropertyCollection",
497
+ "qualifiedName": "@happyvertical/smrt-analytics:AnalyticsPropertyCollection",
498
+ "collection": "analyticsproperties",
499
+ "filePath": "/home/runner/_work/smrt/smrt/packages/analytics/src/collections/AnalyticsPropertyCollection.ts",
500
+ "packageName": "@happyvertical/smrt-analytics",
501
+ "fields": {},
502
+ "methods": {
503
+ "findByExternalId": {
504
+ "name": "findByExternalId",
505
+ "async": true,
506
+ "parameters": [
507
+ {
508
+ "name": "externalId",
509
+ "type": "string",
510
+ "optional": false
511
+ }
512
+ ],
513
+ "returnType": "Promise<AnalyticsProperty | null>",
514
+ "isStatic": false,
515
+ "isPublic": true
516
+ },
517
+ "findByMeasurementId": {
518
+ "name": "findByMeasurementId",
519
+ "async": true,
520
+ "parameters": [
521
+ {
522
+ "name": "measurementId",
523
+ "type": "string",
524
+ "optional": false
525
+ }
526
+ ],
527
+ "returnType": "Promise<AnalyticsProperty | null>",
528
+ "isStatic": false,
529
+ "isPublic": true
530
+ },
531
+ "findBySiteDomain": {
532
+ "name": "findBySiteDomain",
533
+ "async": true,
534
+ "parameters": [
535
+ {
536
+ "name": "siteDomain",
537
+ "type": "string",
538
+ "optional": false
539
+ },
540
+ {
541
+ "name": "provider",
542
+ "type": "AnalyticsProvider",
543
+ "optional": true
544
+ }
545
+ ],
546
+ "returnType": "Promise<AnalyticsProperty | null>",
547
+ "isStatic": false,
548
+ "isPublic": true
549
+ },
550
+ "findByProvider": {
551
+ "name": "findByProvider",
552
+ "async": true,
553
+ "parameters": [
554
+ {
555
+ "name": "provider",
556
+ "type": "AnalyticsProvider",
557
+ "optional": false
558
+ }
559
+ ],
560
+ "returnType": "Promise<AnalyticsProperty[]>",
561
+ "isStatic": false,
562
+ "isPublic": true
563
+ },
564
+ "findGA4Properties": {
565
+ "name": "findGA4Properties",
566
+ "async": true,
567
+ "parameters": [],
568
+ "returnType": "Promise<AnalyticsProperty[]>",
569
+ "isStatic": false,
570
+ "isPublic": true
571
+ },
572
+ "findPlausibleSites": {
573
+ "name": "findPlausibleSites",
574
+ "async": true,
575
+ "parameters": [],
576
+ "returnType": "Promise<AnalyticsProperty[]>",
577
+ "isStatic": false,
578
+ "isPublic": true
579
+ },
580
+ "findMatomoSites": {
581
+ "name": "findMatomoSites",
582
+ "async": true,
583
+ "parameters": [],
584
+ "returnType": "Promise<AnalyticsProperty[]>",
585
+ "isStatic": false,
586
+ "isPublic": true
587
+ },
588
+ "findByStatus": {
589
+ "name": "findByStatus",
590
+ "async": true,
591
+ "parameters": [
592
+ {
593
+ "name": "status",
594
+ "type": "AnalyticsPropertyStatus",
595
+ "optional": false
596
+ }
597
+ ],
598
+ "returnType": "Promise<AnalyticsProperty[]>",
599
+ "isStatic": false,
600
+ "isPublic": true
601
+ },
602
+ "findActive": {
603
+ "name": "findActive",
604
+ "async": true,
605
+ "parameters": [],
606
+ "returnType": "Promise<AnalyticsProperty[]>",
607
+ "isStatic": false,
608
+ "isPublic": true
609
+ },
610
+ "findNeedingSync": {
611
+ "name": "findNeedingSync",
612
+ "async": true,
613
+ "parameters": [
614
+ {
615
+ "name": "hoursAgo",
616
+ "type": "number",
617
+ "optional": true
618
+ }
619
+ ],
620
+ "returnType": "Promise<AnalyticsProperty[]>",
621
+ "isStatic": false,
622
+ "isPublic": true
623
+ }
624
+ },
625
+ "decoratorConfig": {},
626
+ "extends": "SmrtCollection",
627
+ "extendsTypeArg": "AnalyticsProperty",
628
+ "exportName": "AnalyticsPropertyCollection",
629
+ "collectionExportName": "AnalyticsPropertyCollectionCollection",
630
+ "schema": {
631
+ "tableName": "analytics_property_collections",
632
+ "ddl": "CREATE TABLE IF NOT EXISTS \"analytics_property_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
633
+ "columns": {
634
+ "id": {
635
+ "type": "UUID",
636
+ "primaryKey": true,
637
+ "referenceKind": "id",
638
+ "notNull": true
639
+ },
640
+ "slug": {
641
+ "type": "TEXT",
642
+ "notNull": true
643
+ },
644
+ "context": {
645
+ "type": "TEXT",
646
+ "notNull": true,
647
+ "default": ""
648
+ },
649
+ "created_at": {
650
+ "type": "TIMESTAMP",
651
+ "notNull": true,
652
+ "default": "current_timestamp"
653
+ },
654
+ "updated_at": {
655
+ "type": "TIMESTAMP",
656
+ "notNull": true,
657
+ "default": "current_timestamp"
658
+ }
659
+ },
660
+ "indexes": [
661
+ {
662
+ "name": "analytics_property_collections_id_idx",
663
+ "columns": [
664
+ "id"
665
+ ]
666
+ },
667
+ {
668
+ "name": "analytics_property_collections_slug_context_idx",
669
+ "columns": [
670
+ "slug",
671
+ "context"
672
+ ],
673
+ "unique": true
674
+ }
675
+ ],
676
+ "version": "a1c264b1"
677
+ }
678
+ },
679
+ "@happyvertical/smrt-analytics:AnalyticsReportCollection": {
680
+ "name": "analyticsreportcollection",
681
+ "className": "AnalyticsReportCollection",
682
+ "qualifiedName": "@happyvertical/smrt-analytics:AnalyticsReportCollection",
683
+ "collection": "analyticsreports",
684
+ "filePath": "/home/runner/_work/smrt/smrt/packages/analytics/src/collections/AnalyticsReportCollection.ts",
685
+ "packageName": "@happyvertical/smrt-analytics",
686
+ "fields": {},
687
+ "methods": {
688
+ "findByProperty": {
689
+ "name": "findByProperty",
690
+ "async": true,
691
+ "parameters": [
692
+ {
693
+ "name": "propertyId",
694
+ "type": "string",
695
+ "optional": false
696
+ }
697
+ ],
698
+ "returnType": "Promise<AnalyticsReport[]>",
699
+ "isStatic": false,
700
+ "isPublic": true
701
+ },
702
+ "findByStatus": {
703
+ "name": "findByStatus",
704
+ "async": true,
705
+ "parameters": [
706
+ {
707
+ "name": "status",
708
+ "type": "ReportStatus",
709
+ "optional": false
710
+ }
711
+ ],
712
+ "returnType": "Promise<AnalyticsReport[]>",
713
+ "isStatic": false,
714
+ "isPublic": true
715
+ },
716
+ "findDrafts": {
717
+ "name": "findDrafts",
718
+ "async": true,
719
+ "parameters": [],
720
+ "returnType": "Promise<AnalyticsReport[]>",
721
+ "isStatic": false,
722
+ "isPublic": true
723
+ },
724
+ "findScheduled": {
725
+ "name": "findScheduled",
726
+ "async": true,
727
+ "parameters": [],
728
+ "returnType": "Promise<AnalyticsReport[]>",
729
+ "isStatic": false,
730
+ "isPublic": true
731
+ },
732
+ "findCompleted": {
733
+ "name": "findCompleted",
734
+ "async": true,
735
+ "parameters": [],
736
+ "returnType": "Promise<AnalyticsReport[]>",
737
+ "isStatic": false,
738
+ "isPublic": true
739
+ },
740
+ "findFailed": {
741
+ "name": "findFailed",
742
+ "async": true,
743
+ "parameters": [],
744
+ "returnType": "Promise<AnalyticsReport[]>",
745
+ "isStatic": false,
746
+ "isPublic": true
747
+ },
748
+ "findByFrequency": {
749
+ "name": "findByFrequency",
750
+ "async": true,
751
+ "parameters": [
752
+ {
753
+ "name": "frequency",
754
+ "type": "ReportFrequency",
755
+ "optional": false
756
+ }
757
+ ],
758
+ "returnType": "Promise<AnalyticsReport[]>",
759
+ "isStatic": false,
760
+ "isPublic": true
761
+ },
762
+ "findRecurring": {
763
+ "name": "findRecurring",
764
+ "async": true,
765
+ "parameters": [],
766
+ "returnType": "Promise<AnalyticsReport[]>",
767
+ "isStatic": false,
768
+ "isPublic": true
769
+ },
770
+ "findDue": {
771
+ "name": "findDue",
772
+ "async": true,
773
+ "parameters": [],
774
+ "returnType": "Promise<AnalyticsReport[]>",
775
+ "isStatic": false,
776
+ "isPublic": true
777
+ },
778
+ "findByPropertyAndStatus": {
779
+ "name": "findByPropertyAndStatus",
780
+ "async": true,
781
+ "parameters": [
782
+ {
783
+ "name": "propertyId",
784
+ "type": "string",
785
+ "optional": false
786
+ },
787
+ {
788
+ "name": "status",
789
+ "type": "ReportStatus",
790
+ "optional": false
791
+ }
792
+ ],
793
+ "returnType": "Promise<AnalyticsReport[]>",
794
+ "isStatic": false,
795
+ "isPublic": true
796
+ },
797
+ "findRecentlyRun": {
798
+ "name": "findRecentlyRun",
799
+ "async": true,
800
+ "parameters": [
801
+ {
802
+ "name": "hoursAgo",
803
+ "type": "number",
804
+ "optional": true
805
+ }
806
+ ],
807
+ "returnType": "Promise<AnalyticsReport[]>",
808
+ "isStatic": false,
809
+ "isPublic": true
810
+ }
811
+ },
812
+ "decoratorConfig": {},
813
+ "extends": "SmrtCollection",
814
+ "extendsTypeArg": "AnalyticsReport",
815
+ "exportName": "AnalyticsReportCollection",
816
+ "collectionExportName": "AnalyticsReportCollectionCollection",
817
+ "schema": {
818
+ "tableName": "analytics_report_collections",
819
+ "ddl": "CREATE TABLE IF NOT EXISTS \"analytics_report_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
820
+ "columns": {
821
+ "id": {
822
+ "type": "UUID",
823
+ "primaryKey": true,
824
+ "referenceKind": "id",
825
+ "notNull": true
826
+ },
827
+ "slug": {
828
+ "type": "TEXT",
829
+ "notNull": true
830
+ },
831
+ "context": {
832
+ "type": "TEXT",
833
+ "notNull": true,
834
+ "default": ""
835
+ },
836
+ "created_at": {
837
+ "type": "TIMESTAMP",
838
+ "notNull": true,
839
+ "default": "current_timestamp"
840
+ },
841
+ "updated_at": {
842
+ "type": "TIMESTAMP",
843
+ "notNull": true,
844
+ "default": "current_timestamp"
845
+ }
846
+ },
847
+ "indexes": [
848
+ {
849
+ "name": "analytics_report_collections_id_idx",
850
+ "columns": [
851
+ "id"
852
+ ]
853
+ },
854
+ {
855
+ "name": "analytics_report_collections_slug_context_idx",
856
+ "columns": [
857
+ "slug",
858
+ "context"
859
+ ],
860
+ "unique": true
861
+ }
862
+ ],
863
+ "version": "74445ee1"
864
+ }
865
+ },
866
+ "@happyvertical/smrt-analytics:AnalyticsDataStream": {
867
+ "name": "analyticsdatastream",
868
+ "className": "AnalyticsDataStream",
869
+ "qualifiedName": "@happyvertical/smrt-analytics:AnalyticsDataStream",
870
+ "collection": "analyticsdatastreams",
871
+ "filePath": "/home/runner/_work/smrt/smrt/packages/analytics/src/models/AnalyticsDataStream.ts",
872
+ "packageName": "@happyvertical/smrt-analytics",
873
+ "fields": {
874
+ "created_at": {
875
+ "type": "datetime",
876
+ "required": false
877
+ },
878
+ "updated_at": {
879
+ "type": "datetime",
880
+ "required": false
881
+ },
882
+ "tenantId": {
883
+ "type": "text",
884
+ "required": false,
885
+ "_meta": {
886
+ "sqlType": "UUID",
887
+ "nullable": true,
888
+ "__tenancy": {
889
+ "isTenantIdField": true,
890
+ "autoFilter": true,
891
+ "required": false,
892
+ "autoPopulate": true,
893
+ "nullable": true,
894
+ "mode": "optional",
895
+ "field": "tenantId",
896
+ "allowSuperAdminBypass": false
897
+ }
898
+ }
899
+ },
900
+ "propertyId": {
901
+ "type": "foreignKey",
902
+ "required": false,
903
+ "related": "AnalyticsProperty"
904
+ },
905
+ "displayName": {
906
+ "type": "text",
907
+ "required": false,
908
+ "default": ""
909
+ },
910
+ "streamType": {
911
+ "type": "text",
912
+ "required": false
913
+ },
914
+ "externalId": {
915
+ "type": "text",
916
+ "required": false,
917
+ "default": ""
918
+ },
919
+ "measurementId": {
920
+ "type": "text",
921
+ "required": false,
922
+ "default": ""
923
+ },
924
+ "firebaseAppId": {
925
+ "type": "text",
926
+ "required": false,
927
+ "default": ""
928
+ },
929
+ "defaultUri": {
930
+ "type": "text",
931
+ "required": false,
932
+ "default": ""
933
+ },
934
+ "bundleId": {
935
+ "type": "text",
936
+ "required": false,
937
+ "default": ""
938
+ },
939
+ "packageName": {
940
+ "type": "text",
941
+ "required": false,
942
+ "default": ""
943
+ },
944
+ "status": {
945
+ "type": "text",
946
+ "required": false
947
+ },
948
+ "enhancedMeasurement": {
949
+ "type": "boolean",
950
+ "required": false,
951
+ "default": true
952
+ }
953
+ },
954
+ "methods": {
955
+ "getAiUsageSnapshot": {
956
+ "name": "getAiUsageSnapshot",
957
+ "async": false,
958
+ "parameters": [],
959
+ "returnType": "AiUsageSnapshot | undefined",
960
+ "isStatic": false,
961
+ "isPublic": true
962
+ },
963
+ "resetAiUsage": {
964
+ "name": "resetAiUsage",
965
+ "async": false,
966
+ "parameters": [],
967
+ "returnType": "void",
968
+ "isStatic": false,
969
+ "isPublic": true
970
+ },
971
+ "listAiUsage": {
972
+ "name": "listAiUsage",
973
+ "async": true,
974
+ "parameters": [
975
+ {
976
+ "name": "options",
977
+ "type": "AiUsageListOptions",
978
+ "optional": true
979
+ }
980
+ ],
981
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
982
+ "isStatic": false,
983
+ "isPublic": true
984
+ },
985
+ "summarizeAiUsage": {
986
+ "name": "summarizeAiUsage",
987
+ "async": true,
988
+ "parameters": [
989
+ {
990
+ "name": "options",
991
+ "type": "AiUsageSummaryOptions",
992
+ "optional": true
993
+ }
994
+ ],
995
+ "returnType": "Promise<Record<string, AiUsageStats>>",
996
+ "isStatic": false,
997
+ "isPublic": true
998
+ },
999
+ "destroy": {
1000
+ "name": "destroy",
1001
+ "async": false,
1002
+ "parameters": [],
1003
+ "returnType": "void",
1004
+ "isStatic": false,
1005
+ "isPublic": true
1006
+ },
1007
+ "markAsPersisted": {
1008
+ "name": "markAsPersisted",
1009
+ "async": false,
1010
+ "parameters": [],
1011
+ "returnType": "void",
1012
+ "isStatic": false,
1013
+ "isPublic": true
1014
+ },
1015
+ "initialize": {
1016
+ "name": "initialize",
1017
+ "async": true,
1018
+ "parameters": [],
1019
+ "returnType": "Promise",
1020
+ "isStatic": false,
1021
+ "isPublic": true
1022
+ },
1023
+ "loadDataFromDb": {
1024
+ "name": "loadDataFromDb",
1025
+ "async": true,
1026
+ "parameters": [
1027
+ {
1028
+ "name": "data",
1029
+ "type": "any",
1030
+ "optional": false
1031
+ }
1032
+ ],
1033
+ "returnType": "any",
1034
+ "isStatic": false,
1035
+ "isPublic": true
1036
+ },
1037
+ "getFields": {
1038
+ "name": "getFields",
1039
+ "async": true,
1040
+ "parameters": [],
1041
+ "returnType": "any",
1042
+ "isStatic": false,
1043
+ "isPublic": true
1044
+ },
1045
+ "toJSON": {
1046
+ "name": "toJSON",
1047
+ "async": false,
1048
+ "parameters": [],
1049
+ "returnType": "any",
1050
+ "isStatic": false,
1051
+ "isPublic": true
1052
+ },
1053
+ "toPlainObject": {
1054
+ "name": "toPlainObject",
1055
+ "async": false,
1056
+ "parameters": [],
1057
+ "returnType": "Record<string>",
1058
+ "isStatic": false,
1059
+ "isPublic": true
1060
+ },
1061
+ "toPublicJSON": {
1062
+ "name": "toPublicJSON",
1063
+ "async": false,
1064
+ "parameters": [],
1065
+ "returnType": "Record<string>",
1066
+ "isStatic": false,
1067
+ "isPublic": true
1068
+ },
1069
+ "getId": {
1070
+ "name": "getId",
1071
+ "async": true,
1072
+ "parameters": [],
1073
+ "returnType": "any",
1074
+ "isStatic": false,
1075
+ "isPublic": true
1076
+ },
1077
+ "getSlug": {
1078
+ "name": "getSlug",
1079
+ "async": true,
1080
+ "parameters": [],
1081
+ "returnType": "any",
1082
+ "isStatic": false,
1083
+ "isPublic": true
1084
+ },
1085
+ "getSavedId": {
1086
+ "name": "getSavedId",
1087
+ "async": true,
1088
+ "parameters": [],
1089
+ "returnType": "any",
1090
+ "isStatic": false,
1091
+ "isPublic": true
1092
+ },
1093
+ "isSaved": {
1094
+ "name": "isSaved",
1095
+ "async": true,
1096
+ "parameters": [],
1097
+ "returnType": "any",
1098
+ "isStatic": false,
1099
+ "isPublic": true
1100
+ },
1101
+ "save": {
1102
+ "name": "save",
1103
+ "async": true,
1104
+ "parameters": [],
1105
+ "returnType": "any",
1106
+ "isStatic": false,
1107
+ "isPublic": true
1108
+ },
1109
+ "classifyConstraintError": {
1110
+ "name": "classifyConstraintError",
1111
+ "async": false,
1112
+ "parameters": [
1113
+ {
1114
+ "name": "message",
1115
+ "type": "string",
1116
+ "optional": false
1117
+ }
1118
+ ],
1119
+ "returnType": "'unique' | 'not_null' | null",
1120
+ "isStatic": true,
1121
+ "isPublic": true
1122
+ },
1123
+ "loadFromId": {
1124
+ "name": "loadFromId",
1125
+ "async": true,
1126
+ "parameters": [],
1127
+ "returnType": "any",
1128
+ "isStatic": false,
1129
+ "isPublic": true
1130
+ },
1131
+ "loadFromSlug": {
1132
+ "name": "loadFromSlug",
1133
+ "async": true,
1134
+ "parameters": [],
1135
+ "returnType": "any",
1136
+ "isStatic": false,
1137
+ "isPublic": true
1138
+ },
1139
+ "is": {
1140
+ "name": "is",
1141
+ "async": true,
1142
+ "parameters": [
1143
+ {
1144
+ "name": "criteria",
1145
+ "type": "string",
1146
+ "optional": false
1147
+ },
1148
+ {
1149
+ "name": "options",
1150
+ "type": "any",
1151
+ "optional": true
1152
+ }
1153
+ ],
1154
+ "returnType": "any",
1155
+ "isStatic": false,
1156
+ "isPublic": true
1157
+ },
1158
+ "do": {
1159
+ "name": "do",
1160
+ "async": true,
1161
+ "parameters": [
1162
+ {
1163
+ "name": "instructions",
1164
+ "type": "string",
1165
+ "optional": false
1166
+ },
1167
+ {
1168
+ "name": "options",
1169
+ "type": "any",
1170
+ "optional": true
1171
+ }
1172
+ ],
1173
+ "returnType": "any",
1174
+ "isStatic": false,
1175
+ "isPublic": true
1176
+ },
1177
+ "describe": {
1178
+ "name": "describe",
1179
+ "async": true,
1180
+ "parameters": [
1181
+ {
1182
+ "name": "options",
1183
+ "type": "any",
1184
+ "optional": true
1185
+ }
1186
+ ],
1187
+ "returnType": "any",
1188
+ "isStatic": false,
1189
+ "isPublic": true
1190
+ },
1191
+ "delete": {
1192
+ "name": "delete",
1193
+ "async": true,
1194
+ "parameters": [],
1195
+ "returnType": "Promise<void>",
1196
+ "isStatic": false,
1197
+ "isPublic": true
1198
+ },
1199
+ "isRelatedLoaded": {
1200
+ "name": "isRelatedLoaded",
1201
+ "async": false,
1202
+ "parameters": [
1203
+ {
1204
+ "name": "fieldName",
1205
+ "type": "string",
1206
+ "optional": false
1207
+ }
1208
+ ],
1209
+ "returnType": "boolean",
1210
+ "isStatic": false,
1211
+ "isPublic": true
1212
+ },
1213
+ "loadRelated": {
1214
+ "name": "loadRelated",
1215
+ "async": true,
1216
+ "parameters": [
1217
+ {
1218
+ "name": "fieldName",
1219
+ "type": "string",
1220
+ "optional": false
1221
+ },
1222
+ {
1223
+ "name": "opts",
1224
+ "type": "LoadRelatedOptions",
1225
+ "optional": true
1226
+ }
1227
+ ],
1228
+ "returnType": "Promise<any>",
1229
+ "isStatic": false,
1230
+ "isPublic": true
1231
+ },
1232
+ "loadRelatedMany": {
1233
+ "name": "loadRelatedMany",
1234
+ "async": true,
1235
+ "parameters": [
1236
+ {
1237
+ "name": "fieldName",
1238
+ "type": "string",
1239
+ "optional": false
1240
+ },
1241
+ {
1242
+ "name": "opts",
1243
+ "type": "LoadRelatedOptions",
1244
+ "optional": true
1245
+ }
1246
+ ],
1247
+ "returnType": "Promise<any[]>",
1248
+ "isStatic": false,
1249
+ "isPublic": true
1250
+ },
1251
+ "getRelated": {
1252
+ "name": "getRelated",
1253
+ "async": true,
1254
+ "parameters": [
1255
+ {
1256
+ "name": "fieldName",
1257
+ "type": "string",
1258
+ "optional": false
1259
+ },
1260
+ {
1261
+ "name": "opts",
1262
+ "type": "LoadRelatedOptions",
1263
+ "optional": true
1264
+ }
1265
+ ],
1266
+ "returnType": "Promise<any>",
1267
+ "isStatic": false,
1268
+ "isPublic": true
1269
+ },
1270
+ "getAvailableTools": {
1271
+ "name": "getAvailableTools",
1272
+ "async": false,
1273
+ "parameters": [],
1274
+ "returnType": "AITool[]",
1275
+ "isStatic": false,
1276
+ "isPublic": true
1277
+ },
1278
+ "executeToolCall": {
1279
+ "name": "executeToolCall",
1280
+ "async": true,
1281
+ "parameters": [
1282
+ {
1283
+ "name": "toolCall",
1284
+ "type": "ToolCall",
1285
+ "optional": false
1286
+ }
1287
+ ],
1288
+ "returnType": "Promise<ToolCallResult>",
1289
+ "isStatic": false,
1290
+ "isPublic": true
1291
+ },
1292
+ "remember": {
1293
+ "name": "remember",
1294
+ "async": true,
1295
+ "parameters": [
1296
+ {
1297
+ "name": "options",
1298
+ "type": "object",
1299
+ "optional": false
1300
+ }
1301
+ ],
1302
+ "returnType": "Promise<void>",
1303
+ "isStatic": false,
1304
+ "isPublic": true
1305
+ },
1306
+ "recall": {
1307
+ "name": "recall",
1308
+ "async": true,
1309
+ "parameters": [
1310
+ {
1311
+ "name": "options",
1312
+ "type": "object",
1313
+ "optional": false
1314
+ }
1315
+ ],
1316
+ "returnType": "Promise<any | null>",
1317
+ "isStatic": false,
1318
+ "isPublic": true
1319
+ },
1320
+ "recallAll": {
1321
+ "name": "recallAll",
1322
+ "async": true,
1323
+ "parameters": [
1324
+ {
1325
+ "name": "options",
1326
+ "type": "object",
1327
+ "optional": true
1328
+ }
1329
+ ],
1330
+ "returnType": "Promise<Map<string, any>>",
1331
+ "isStatic": false,
1332
+ "isPublic": true
1333
+ },
1334
+ "forget": {
1335
+ "name": "forget",
1336
+ "async": true,
1337
+ "parameters": [
1338
+ {
1339
+ "name": "options",
1340
+ "type": "object",
1341
+ "optional": false
1342
+ }
1343
+ ],
1344
+ "returnType": "Promise<void>",
1345
+ "isStatic": false,
1346
+ "isPublic": true
1347
+ },
1348
+ "forgetScope": {
1349
+ "name": "forgetScope",
1350
+ "async": true,
1351
+ "parameters": [
1352
+ {
1353
+ "name": "options",
1354
+ "type": "object",
1355
+ "optional": false
1356
+ }
1357
+ ],
1358
+ "returnType": "Promise<number>",
1359
+ "isStatic": false,
1360
+ "isPublic": true
1361
+ },
1362
+ "generateEmbeddings": {
1363
+ "name": "generateEmbeddings",
1364
+ "async": true,
1365
+ "parameters": [
1366
+ {
1367
+ "name": "options",
1368
+ "type": "GenerateEmbeddingsOptions",
1369
+ "optional": true
1370
+ }
1371
+ ],
1372
+ "returnType": "Promise<void>",
1373
+ "isStatic": false,
1374
+ "isPublic": true
1375
+ },
1376
+ "getEmbedding": {
1377
+ "name": "getEmbedding",
1378
+ "async": true,
1379
+ "parameters": [
1380
+ {
1381
+ "name": "fieldName",
1382
+ "type": "string",
1383
+ "optional": false
1384
+ },
1385
+ {
1386
+ "name": "model",
1387
+ "type": "string",
1388
+ "optional": true
1389
+ }
1390
+ ],
1391
+ "returnType": "Promise<number[] | null>",
1392
+ "isStatic": false,
1393
+ "isPublic": true
1394
+ },
1395
+ "hasStaleEmbeddings": {
1396
+ "name": "hasStaleEmbeddings",
1397
+ "async": true,
1398
+ "parameters": [],
1399
+ "returnType": "Promise<boolean>",
1400
+ "isStatic": false,
1401
+ "isPublic": true
1402
+ },
1403
+ "clearEmbeddings": {
1404
+ "name": "clearEmbeddings",
1405
+ "async": true,
1406
+ "parameters": [],
1407
+ "returnType": "Promise<void>",
1408
+ "isStatic": false,
1409
+ "isPublic": true
1410
+ },
1411
+ "isWeb": {
1412
+ "name": "isWeb",
1413
+ "async": false,
1414
+ "parameters": [],
1415
+ "returnType": "boolean",
1416
+ "isStatic": false,
1417
+ "isPublic": true
1418
+ },
1419
+ "isIOS": {
1420
+ "name": "isIOS",
1421
+ "async": false,
1422
+ "parameters": [],
1423
+ "returnType": "boolean",
1424
+ "isStatic": false,
1425
+ "isPublic": true
1426
+ },
1427
+ "isAndroid": {
1428
+ "name": "isAndroid",
1429
+ "async": false,
1430
+ "parameters": [],
1431
+ "returnType": "boolean",
1432
+ "isStatic": false,
1433
+ "isPublic": true
1434
+ },
1435
+ "isMobileApp": {
1436
+ "name": "isMobileApp",
1437
+ "async": false,
1438
+ "parameters": [],
1439
+ "returnType": "boolean",
1440
+ "isStatic": false,
1441
+ "isPublic": true
1442
+ },
1443
+ "getPlatformId": {
1444
+ "name": "getPlatformId",
1445
+ "async": false,
1446
+ "parameters": [],
1447
+ "returnType": "string",
1448
+ "isStatic": false,
1449
+ "isPublic": true
1450
+ }
1451
+ },
1452
+ "decoratorConfig": {
1453
+ "tableStrategy": "sti",
1454
+ "api": {
1455
+ "include": [
1456
+ "list",
1457
+ "get",
1458
+ "create",
1459
+ "update"
1460
+ ]
1461
+ },
1462
+ "mcp": {
1463
+ "include": [
1464
+ "list",
1465
+ "get"
1466
+ ]
1467
+ },
1468
+ "cli": true,
1469
+ "tenantScoped": {
1470
+ "mode": "optional"
1471
+ }
1472
+ },
1473
+ "extends": "SmrtObject",
1474
+ "exportName": "AnalyticsDataStream",
1475
+ "collectionExportName": "AnalyticsDataStreamCollection",
1476
+ "schema": {
1477
+ "tableName": "analytics_data_streams",
1478
+ "ddl": "CREATE TABLE IF NOT EXISTS \"analytics_data_streams\" (\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 \"property_id\" UUID,\n \"display_name\" TEXT DEFAULT '',\n \"stream_type\" TEXT,\n \"external_id\" TEXT DEFAULT '',\n \"measurement_id\" TEXT DEFAULT '',\n \"firebase_app_id\" TEXT DEFAULT '',\n \"default_uri\" TEXT DEFAULT '',\n \"bundle_id\" TEXT DEFAULT '',\n \"package_name\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"enhanced_measurement\" BOOLEAN DEFAULT TRUE\n);",
1479
+ "columns": {
1480
+ "id": {
1481
+ "type": "UUID",
1482
+ "primaryKey": true,
1483
+ "referenceKind": "id",
1484
+ "notNull": true
1485
+ },
1486
+ "slug": {
1487
+ "type": "TEXT",
1488
+ "notNull": true
1489
+ },
1490
+ "context": {
1491
+ "type": "TEXT",
1492
+ "notNull": true,
1493
+ "default": ""
1494
+ },
1495
+ "_meta_type": {
1496
+ "type": "TEXT",
1497
+ "notNull": true
1498
+ },
1499
+ "_meta_data": {
1500
+ "type": "JSON",
1501
+ "notNull": false
1502
+ },
1503
+ "created_at": {
1504
+ "type": "TIMESTAMP",
1505
+ "notNull": true,
1506
+ "default": "current_timestamp"
1507
+ },
1508
+ "updated_at": {
1509
+ "type": "TIMESTAMP",
1510
+ "notNull": true,
1511
+ "default": "current_timestamp"
1512
+ },
1513
+ "tenant_id": {
1514
+ "type": "UUID",
1515
+ "referenceKind": "tenantId",
1516
+ "notNull": false
1517
+ },
1518
+ "property_id": {
1519
+ "type": "UUID",
1520
+ "referenceKind": "foreignKey",
1521
+ "notNull": false
1522
+ },
1523
+ "display_name": {
1524
+ "type": "TEXT",
1525
+ "notNull": false,
1526
+ "default": ""
1527
+ },
1528
+ "stream_type": {
1529
+ "type": "TEXT",
1530
+ "notNull": false
1531
+ },
1532
+ "external_id": {
1533
+ "type": "TEXT",
1534
+ "notNull": false,
1535
+ "default": ""
1536
+ },
1537
+ "measurement_id": {
1538
+ "type": "TEXT",
1539
+ "notNull": false,
1540
+ "default": ""
1541
+ },
1542
+ "firebase_app_id": {
1543
+ "type": "TEXT",
1544
+ "notNull": false,
1545
+ "default": ""
1546
+ },
1547
+ "default_uri": {
1548
+ "type": "TEXT",
1549
+ "notNull": false,
1550
+ "default": ""
1551
+ },
1552
+ "bundle_id": {
1553
+ "type": "TEXT",
1554
+ "notNull": false,
1555
+ "default": ""
1556
+ },
1557
+ "package_name": {
1558
+ "type": "TEXT",
1559
+ "notNull": false,
1560
+ "default": ""
1561
+ },
1562
+ "status": {
1563
+ "type": "TEXT",
1564
+ "notNull": false
1565
+ },
1566
+ "enhanced_measurement": {
1567
+ "type": "BOOLEAN",
1568
+ "notNull": false,
1569
+ "default": true
1570
+ }
1571
+ },
1572
+ "indexes": [
1573
+ {
1574
+ "name": "analytics_data_streams_id_idx",
1575
+ "columns": [
1576
+ "id"
1577
+ ]
1578
+ },
1579
+ {
1580
+ "name": "analytics_data_streams_slug_context_meta_type_idx",
1581
+ "columns": [
1582
+ "slug",
1583
+ "context",
1584
+ "_meta_type"
1585
+ ],
1586
+ "unique": true
1587
+ },
1588
+ {
1589
+ "name": "analytics_data_streams_meta_type_idx",
1590
+ "columns": [
1591
+ "_meta_type"
1592
+ ]
1593
+ }
1594
+ ],
1595
+ "version": "e1ae416d"
1596
+ }
1597
+ },
1598
+ "@happyvertical/smrt-analytics:AnalyticsEvent": {
1599
+ "name": "analyticsevent",
1600
+ "className": "AnalyticsEvent",
1601
+ "qualifiedName": "@happyvertical/smrt-analytics:AnalyticsEvent",
1602
+ "collection": "analyticsevents",
1603
+ "filePath": "/home/runner/_work/smrt/smrt/packages/analytics/src/models/AnalyticsEvent.ts",
1604
+ "packageName": "@happyvertical/smrt-analytics",
1605
+ "fields": {
1606
+ "created_at": {
1607
+ "type": "datetime",
1608
+ "required": false
1609
+ },
1610
+ "updated_at": {
1611
+ "type": "datetime",
1612
+ "required": false
1613
+ },
1614
+ "tenantId": {
1615
+ "type": "text",
1616
+ "required": false,
1617
+ "_meta": {
1618
+ "sqlType": "UUID",
1619
+ "nullable": true,
1620
+ "__tenancy": {
1621
+ "isTenantIdField": true,
1622
+ "autoFilter": true,
1623
+ "required": false,
1624
+ "autoPopulate": true,
1625
+ "nullable": true,
1626
+ "mode": "optional",
1627
+ "field": "tenantId",
1628
+ "allowSuperAdminBypass": false
1629
+ }
1630
+ }
1631
+ },
1632
+ "propertyId": {
1633
+ "type": "foreignKey",
1634
+ "required": false,
1635
+ "related": "AnalyticsProperty"
1636
+ },
1637
+ "eventName": {
1638
+ "type": "text",
1639
+ "required": false,
1640
+ "default": ""
1641
+ },
1642
+ "clientId": {
1643
+ "type": "text",
1644
+ "required": false,
1645
+ "default": ""
1646
+ },
1647
+ "userId": {
1648
+ "type": "text",
1649
+ "required": false,
1650
+ "default": ""
1651
+ },
1652
+ "params": {
1653
+ "type": "text",
1654
+ "required": false,
1655
+ "default": "{}"
1656
+ },
1657
+ "eventTimestamp": {
1658
+ "type": "datetime",
1659
+ "required": false
1660
+ },
1661
+ "status": {
1662
+ "type": "text",
1663
+ "required": false
1664
+ },
1665
+ "sentAt": {
1666
+ "type": "datetime",
1667
+ "required": false
1668
+ },
1669
+ "errorMessage": {
1670
+ "type": "text",
1671
+ "required": false,
1672
+ "default": ""
1673
+ },
1674
+ "retryCount": {
1675
+ "type": "integer",
1676
+ "required": false,
1677
+ "default": 0
1678
+ },
1679
+ "nonPersonalizedAds": {
1680
+ "type": "boolean",
1681
+ "required": false,
1682
+ "default": false
1683
+ },
1684
+ "sessionId": {
1685
+ "type": "text",
1686
+ "required": false,
1687
+ "default": ""
1688
+ },
1689
+ "pagePath": {
1690
+ "type": "text",
1691
+ "required": false,
1692
+ "default": ""
1693
+ },
1694
+ "pageTitle": {
1695
+ "type": "text",
1696
+ "required": false,
1697
+ "default": ""
1698
+ },
1699
+ "userAgent": {
1700
+ "type": "text",
1701
+ "required": false,
1702
+ "default": ""
1703
+ },
1704
+ "ipAddress": {
1705
+ "type": "text",
1706
+ "required": false,
1707
+ "default": ""
1708
+ }
1709
+ },
1710
+ "methods": {
1711
+ "getAiUsageSnapshot": {
1712
+ "name": "getAiUsageSnapshot",
1713
+ "async": false,
1714
+ "parameters": [],
1715
+ "returnType": "AiUsageSnapshot | undefined",
1716
+ "isStatic": false,
1717
+ "isPublic": true
1718
+ },
1719
+ "resetAiUsage": {
1720
+ "name": "resetAiUsage",
1721
+ "async": false,
1722
+ "parameters": [],
1723
+ "returnType": "void",
1724
+ "isStatic": false,
1725
+ "isPublic": true
1726
+ },
1727
+ "listAiUsage": {
1728
+ "name": "listAiUsage",
1729
+ "async": true,
1730
+ "parameters": [
1731
+ {
1732
+ "name": "options",
1733
+ "type": "AiUsageListOptions",
1734
+ "optional": true
1735
+ }
1736
+ ],
1737
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
1738
+ "isStatic": false,
1739
+ "isPublic": true
1740
+ },
1741
+ "summarizeAiUsage": {
1742
+ "name": "summarizeAiUsage",
1743
+ "async": true,
1744
+ "parameters": [
1745
+ {
1746
+ "name": "options",
1747
+ "type": "AiUsageSummaryOptions",
1748
+ "optional": true
1749
+ }
1750
+ ],
1751
+ "returnType": "Promise<Record<string, AiUsageStats>>",
1752
+ "isStatic": false,
1753
+ "isPublic": true
1754
+ },
1755
+ "destroy": {
1756
+ "name": "destroy",
1757
+ "async": false,
1758
+ "parameters": [],
1759
+ "returnType": "void",
1760
+ "isStatic": false,
1761
+ "isPublic": true
1762
+ },
1763
+ "markAsPersisted": {
1764
+ "name": "markAsPersisted",
1765
+ "async": false,
1766
+ "parameters": [],
1767
+ "returnType": "void",
1768
+ "isStatic": false,
1769
+ "isPublic": true
1770
+ },
1771
+ "initialize": {
1772
+ "name": "initialize",
1773
+ "async": true,
1774
+ "parameters": [],
1775
+ "returnType": "Promise",
1776
+ "isStatic": false,
1777
+ "isPublic": true
1778
+ },
1779
+ "loadDataFromDb": {
1780
+ "name": "loadDataFromDb",
1781
+ "async": true,
1782
+ "parameters": [
1783
+ {
1784
+ "name": "data",
1785
+ "type": "any",
1786
+ "optional": false
1787
+ }
1788
+ ],
1789
+ "returnType": "any",
1790
+ "isStatic": false,
1791
+ "isPublic": true
1792
+ },
1793
+ "getFields": {
1794
+ "name": "getFields",
1795
+ "async": true,
1796
+ "parameters": [],
1797
+ "returnType": "any",
1798
+ "isStatic": false,
1799
+ "isPublic": true
1800
+ },
1801
+ "toJSON": {
1802
+ "name": "toJSON",
1803
+ "async": false,
1804
+ "parameters": [],
1805
+ "returnType": "any",
1806
+ "isStatic": false,
1807
+ "isPublic": true
1808
+ },
1809
+ "toPlainObject": {
1810
+ "name": "toPlainObject",
1811
+ "async": false,
1812
+ "parameters": [],
1813
+ "returnType": "Record<string>",
1814
+ "isStatic": false,
1815
+ "isPublic": true
1816
+ },
1817
+ "toPublicJSON": {
1818
+ "name": "toPublicJSON",
1819
+ "async": false,
1820
+ "parameters": [],
1821
+ "returnType": "Record<string>",
1822
+ "isStatic": false,
1823
+ "isPublic": true
1824
+ },
1825
+ "getId": {
1826
+ "name": "getId",
1827
+ "async": true,
1828
+ "parameters": [],
1829
+ "returnType": "any",
1830
+ "isStatic": false,
1831
+ "isPublic": true
1832
+ },
1833
+ "getSlug": {
1834
+ "name": "getSlug",
1835
+ "async": true,
1836
+ "parameters": [],
1837
+ "returnType": "any",
1838
+ "isStatic": false,
1839
+ "isPublic": true
1840
+ },
1841
+ "getSavedId": {
1842
+ "name": "getSavedId",
1843
+ "async": true,
1844
+ "parameters": [],
1845
+ "returnType": "any",
1846
+ "isStatic": false,
1847
+ "isPublic": true
1848
+ },
1849
+ "isSaved": {
1850
+ "name": "isSaved",
1851
+ "async": true,
1852
+ "parameters": [],
1853
+ "returnType": "any",
1854
+ "isStatic": false,
1855
+ "isPublic": true
1856
+ },
1857
+ "save": {
1858
+ "name": "save",
1859
+ "async": true,
1860
+ "parameters": [],
1861
+ "returnType": "any",
1862
+ "isStatic": false,
1863
+ "isPublic": true
1864
+ },
1865
+ "classifyConstraintError": {
1866
+ "name": "classifyConstraintError",
1867
+ "async": false,
1868
+ "parameters": [
1869
+ {
1870
+ "name": "message",
1871
+ "type": "string",
1872
+ "optional": false
1873
+ }
1874
+ ],
1875
+ "returnType": "'unique' | 'not_null' | null",
1876
+ "isStatic": true,
1877
+ "isPublic": true
1878
+ },
1879
+ "loadFromId": {
1880
+ "name": "loadFromId",
1881
+ "async": true,
1882
+ "parameters": [],
1883
+ "returnType": "any",
1884
+ "isStatic": false,
1885
+ "isPublic": true
1886
+ },
1887
+ "loadFromSlug": {
1888
+ "name": "loadFromSlug",
1889
+ "async": true,
1890
+ "parameters": [],
1891
+ "returnType": "any",
1892
+ "isStatic": false,
1893
+ "isPublic": true
1894
+ },
1895
+ "is": {
1896
+ "name": "is",
1897
+ "async": true,
1898
+ "parameters": [
1899
+ {
1900
+ "name": "criteria",
1901
+ "type": "string",
1902
+ "optional": false
1903
+ },
1904
+ {
1905
+ "name": "options",
1906
+ "type": "any",
1907
+ "optional": true
1908
+ }
1909
+ ],
1910
+ "returnType": "any",
1911
+ "isStatic": false,
1912
+ "isPublic": true
1913
+ },
1914
+ "do": {
1915
+ "name": "do",
1916
+ "async": true,
1917
+ "parameters": [
1918
+ {
1919
+ "name": "instructions",
1920
+ "type": "string",
1921
+ "optional": false
1922
+ },
1923
+ {
1924
+ "name": "options",
1925
+ "type": "any",
1926
+ "optional": true
1927
+ }
1928
+ ],
1929
+ "returnType": "any",
1930
+ "isStatic": false,
1931
+ "isPublic": true
1932
+ },
1933
+ "describe": {
1934
+ "name": "describe",
1935
+ "async": true,
1936
+ "parameters": [
1937
+ {
1938
+ "name": "options",
1939
+ "type": "any",
1940
+ "optional": true
1941
+ }
1942
+ ],
1943
+ "returnType": "any",
1944
+ "isStatic": false,
1945
+ "isPublic": true
1946
+ },
1947
+ "delete": {
1948
+ "name": "delete",
1949
+ "async": true,
1950
+ "parameters": [],
1951
+ "returnType": "Promise<void>",
1952
+ "isStatic": false,
1953
+ "isPublic": true
1954
+ },
1955
+ "isRelatedLoaded": {
1956
+ "name": "isRelatedLoaded",
1957
+ "async": false,
1958
+ "parameters": [
1959
+ {
1960
+ "name": "fieldName",
1961
+ "type": "string",
1962
+ "optional": false
1963
+ }
1964
+ ],
1965
+ "returnType": "boolean",
1966
+ "isStatic": false,
1967
+ "isPublic": true
1968
+ },
1969
+ "loadRelated": {
1970
+ "name": "loadRelated",
1971
+ "async": true,
1972
+ "parameters": [
1973
+ {
1974
+ "name": "fieldName",
1975
+ "type": "string",
1976
+ "optional": false
1977
+ },
1978
+ {
1979
+ "name": "opts",
1980
+ "type": "LoadRelatedOptions",
1981
+ "optional": true
1982
+ }
1983
+ ],
1984
+ "returnType": "Promise<any>",
1985
+ "isStatic": false,
1986
+ "isPublic": true
1987
+ },
1988
+ "loadRelatedMany": {
1989
+ "name": "loadRelatedMany",
1990
+ "async": true,
1991
+ "parameters": [
1992
+ {
1993
+ "name": "fieldName",
1994
+ "type": "string",
1995
+ "optional": false
1996
+ },
1997
+ {
1998
+ "name": "opts",
1999
+ "type": "LoadRelatedOptions",
2000
+ "optional": true
2001
+ }
2002
+ ],
2003
+ "returnType": "Promise<any[]>",
2004
+ "isStatic": false,
2005
+ "isPublic": true
2006
+ },
2007
+ "getRelated": {
2008
+ "name": "getRelated",
2009
+ "async": true,
2010
+ "parameters": [
2011
+ {
2012
+ "name": "fieldName",
2013
+ "type": "string",
2014
+ "optional": false
2015
+ },
2016
+ {
2017
+ "name": "opts",
2018
+ "type": "LoadRelatedOptions",
2019
+ "optional": true
2020
+ }
2021
+ ],
2022
+ "returnType": "Promise<any>",
2023
+ "isStatic": false,
2024
+ "isPublic": true
2025
+ },
2026
+ "getAvailableTools": {
2027
+ "name": "getAvailableTools",
2028
+ "async": false,
2029
+ "parameters": [],
2030
+ "returnType": "AITool[]",
2031
+ "isStatic": false,
2032
+ "isPublic": true
2033
+ },
2034
+ "executeToolCall": {
2035
+ "name": "executeToolCall",
2036
+ "async": true,
2037
+ "parameters": [
2038
+ {
2039
+ "name": "toolCall",
2040
+ "type": "ToolCall",
2041
+ "optional": false
2042
+ }
2043
+ ],
2044
+ "returnType": "Promise<ToolCallResult>",
2045
+ "isStatic": false,
2046
+ "isPublic": true
2047
+ },
2048
+ "remember": {
2049
+ "name": "remember",
2050
+ "async": true,
2051
+ "parameters": [
2052
+ {
2053
+ "name": "options",
2054
+ "type": "object",
2055
+ "optional": false
2056
+ }
2057
+ ],
2058
+ "returnType": "Promise<void>",
2059
+ "isStatic": false,
2060
+ "isPublic": true
2061
+ },
2062
+ "recall": {
2063
+ "name": "recall",
2064
+ "async": true,
2065
+ "parameters": [
2066
+ {
2067
+ "name": "options",
2068
+ "type": "object",
2069
+ "optional": false
2070
+ }
2071
+ ],
2072
+ "returnType": "Promise<any | null>",
2073
+ "isStatic": false,
2074
+ "isPublic": true
2075
+ },
2076
+ "recallAll": {
2077
+ "name": "recallAll",
2078
+ "async": true,
2079
+ "parameters": [
2080
+ {
2081
+ "name": "options",
2082
+ "type": "object",
2083
+ "optional": true
2084
+ }
2085
+ ],
2086
+ "returnType": "Promise<Map<string, any>>",
2087
+ "isStatic": false,
2088
+ "isPublic": true
2089
+ },
2090
+ "forget": {
2091
+ "name": "forget",
2092
+ "async": true,
2093
+ "parameters": [
2094
+ {
2095
+ "name": "options",
2096
+ "type": "object",
2097
+ "optional": false
2098
+ }
2099
+ ],
2100
+ "returnType": "Promise<void>",
2101
+ "isStatic": false,
2102
+ "isPublic": true
2103
+ },
2104
+ "forgetScope": {
2105
+ "name": "forgetScope",
2106
+ "async": true,
2107
+ "parameters": [
2108
+ {
2109
+ "name": "options",
2110
+ "type": "object",
2111
+ "optional": false
2112
+ }
2113
+ ],
2114
+ "returnType": "Promise<number>",
2115
+ "isStatic": false,
2116
+ "isPublic": true
2117
+ },
2118
+ "generateEmbeddings": {
2119
+ "name": "generateEmbeddings",
2120
+ "async": true,
2121
+ "parameters": [
2122
+ {
2123
+ "name": "options",
2124
+ "type": "GenerateEmbeddingsOptions",
2125
+ "optional": true
2126
+ }
2127
+ ],
2128
+ "returnType": "Promise<void>",
2129
+ "isStatic": false,
2130
+ "isPublic": true
2131
+ },
2132
+ "getEmbedding": {
2133
+ "name": "getEmbedding",
2134
+ "async": true,
2135
+ "parameters": [
2136
+ {
2137
+ "name": "fieldName",
2138
+ "type": "string",
2139
+ "optional": false
2140
+ },
2141
+ {
2142
+ "name": "model",
2143
+ "type": "string",
2144
+ "optional": true
2145
+ }
2146
+ ],
2147
+ "returnType": "Promise<number[] | null>",
2148
+ "isStatic": false,
2149
+ "isPublic": true
2150
+ },
2151
+ "hasStaleEmbeddings": {
2152
+ "name": "hasStaleEmbeddings",
2153
+ "async": true,
2154
+ "parameters": [],
2155
+ "returnType": "Promise<boolean>",
2156
+ "isStatic": false,
2157
+ "isPublic": true
2158
+ },
2159
+ "clearEmbeddings": {
2160
+ "name": "clearEmbeddings",
2161
+ "async": true,
2162
+ "parameters": [],
2163
+ "returnType": "Promise<void>",
2164
+ "isStatic": false,
2165
+ "isPublic": true
2166
+ },
2167
+ "getParams": {
2168
+ "name": "getParams",
2169
+ "async": false,
2170
+ "parameters": [],
2171
+ "returnType": "Record<string, string | number | boolean>",
2172
+ "isStatic": false,
2173
+ "isPublic": true
2174
+ },
2175
+ "setParams": {
2176
+ "name": "setParams",
2177
+ "async": false,
2178
+ "parameters": [
2179
+ {
2180
+ "name": "params",
2181
+ "type": "Record<string, string | number | boolean>",
2182
+ "optional": false
2183
+ }
2184
+ ],
2185
+ "returnType": "void",
2186
+ "isStatic": false,
2187
+ "isPublic": true
2188
+ },
2189
+ "addParam": {
2190
+ "name": "addParam",
2191
+ "async": false,
2192
+ "parameters": [
2193
+ {
2194
+ "name": "key",
2195
+ "type": "string",
2196
+ "optional": false
2197
+ },
2198
+ {
2199
+ "name": "value",
2200
+ "type": "string | number | boolean",
2201
+ "optional": false
2202
+ }
2203
+ ],
2204
+ "returnType": "void",
2205
+ "isStatic": false,
2206
+ "isPublic": true
2207
+ },
2208
+ "isPageview": {
2209
+ "name": "isPageview",
2210
+ "async": false,
2211
+ "parameters": [],
2212
+ "returnType": "boolean",
2213
+ "isStatic": false,
2214
+ "isPublic": true
2215
+ },
2216
+ "isConversion": {
2217
+ "name": "isConversion",
2218
+ "async": false,
2219
+ "parameters": [],
2220
+ "returnType": "boolean",
2221
+ "isStatic": false,
2222
+ "isPublic": true
2223
+ },
2224
+ "markSent": {
2225
+ "name": "markSent",
2226
+ "async": false,
2227
+ "parameters": [],
2228
+ "returnType": "void",
2229
+ "isStatic": false,
2230
+ "isPublic": true
2231
+ },
2232
+ "markFailed": {
2233
+ "name": "markFailed",
2234
+ "async": false,
2235
+ "parameters": [
2236
+ {
2237
+ "name": "error",
2238
+ "type": "string",
2239
+ "optional": false
2240
+ }
2241
+ ],
2242
+ "returnType": "void",
2243
+ "isStatic": false,
2244
+ "isPublic": true
2245
+ },
2246
+ "resetForRetry": {
2247
+ "name": "resetForRetry",
2248
+ "async": false,
2249
+ "parameters": [],
2250
+ "returnType": "void",
2251
+ "isStatic": false,
2252
+ "isPublic": true
2253
+ },
2254
+ "shouldRetry": {
2255
+ "name": "shouldRetry",
2256
+ "async": false,
2257
+ "parameters": [
2258
+ {
2259
+ "name": "maxRetries",
2260
+ "type": "number",
2261
+ "optional": true
2262
+ }
2263
+ ],
2264
+ "returnType": "boolean",
2265
+ "isStatic": false,
2266
+ "isPublic": true
2267
+ },
2268
+ "toTrackEvent": {
2269
+ "name": "toTrackEvent",
2270
+ "async": false,
2271
+ "parameters": [],
2272
+ "returnType": "object",
2273
+ "isStatic": false,
2274
+ "isPublic": true
2275
+ }
2276
+ },
2277
+ "decoratorConfig": {
2278
+ "tableStrategy": "sti",
2279
+ "api": {
2280
+ "include": [
2281
+ "list",
2282
+ "get",
2283
+ "create"
2284
+ ]
2285
+ },
2286
+ "mcp": {
2287
+ "include": [
2288
+ "list",
2289
+ "get",
2290
+ "track"
2291
+ ]
2292
+ },
2293
+ "cli": true,
2294
+ "tenantScoped": {
2295
+ "mode": "optional"
2296
+ }
2297
+ },
2298
+ "extends": "SmrtObject",
2299
+ "exportName": "AnalyticsEvent",
2300
+ "collectionExportName": "AnalyticsEventCollection",
2301
+ "schema": {
2302
+ "tableName": "analytics_events",
2303
+ "ddl": "CREATE TABLE IF NOT EXISTS \"analytics_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 \"property_id\" UUID,\n \"event_name\" TEXT DEFAULT '',\n \"client_id\" TEXT DEFAULT '',\n \"user_id\" TEXT DEFAULT '',\n \"params\" TEXT DEFAULT '{}',\n \"event_timestamp\" TIMESTAMP,\n \"status\" TEXT,\n \"sent_at\" TIMESTAMP,\n \"error_message\" TEXT DEFAULT '',\n \"retry_count\" INTEGER DEFAULT 0,\n \"non_personalized_ads\" BOOLEAN DEFAULT FALSE,\n \"session_id\" TEXT DEFAULT '',\n \"page_path\" TEXT DEFAULT '',\n \"page_title\" TEXT DEFAULT '',\n \"user_agent\" TEXT DEFAULT '',\n \"ip_address\" TEXT DEFAULT ''\n);",
2304
+ "columns": {
2305
+ "id": {
2306
+ "type": "UUID",
2307
+ "primaryKey": true,
2308
+ "referenceKind": "id",
2309
+ "notNull": true
2310
+ },
2311
+ "slug": {
2312
+ "type": "TEXT",
2313
+ "notNull": true
2314
+ },
2315
+ "context": {
2316
+ "type": "TEXT",
2317
+ "notNull": true,
2318
+ "default": ""
2319
+ },
2320
+ "_meta_type": {
2321
+ "type": "TEXT",
2322
+ "notNull": true
2323
+ },
2324
+ "_meta_data": {
2325
+ "type": "JSON",
2326
+ "notNull": false
2327
+ },
2328
+ "created_at": {
2329
+ "type": "TIMESTAMP",
2330
+ "notNull": true,
2331
+ "default": "current_timestamp"
2332
+ },
2333
+ "updated_at": {
2334
+ "type": "TIMESTAMP",
2335
+ "notNull": true,
2336
+ "default": "current_timestamp"
2337
+ },
2338
+ "tenant_id": {
2339
+ "type": "UUID",
2340
+ "referenceKind": "tenantId",
2341
+ "notNull": false
2342
+ },
2343
+ "property_id": {
2344
+ "type": "UUID",
2345
+ "referenceKind": "foreignKey",
2346
+ "notNull": false
2347
+ },
2348
+ "event_name": {
2349
+ "type": "TEXT",
2350
+ "notNull": false,
2351
+ "default": ""
2352
+ },
2353
+ "client_id": {
2354
+ "type": "TEXT",
2355
+ "notNull": false,
2356
+ "default": ""
2357
+ },
2358
+ "user_id": {
2359
+ "type": "TEXT",
2360
+ "notNull": false,
2361
+ "default": ""
2362
+ },
2363
+ "params": {
2364
+ "type": "TEXT",
2365
+ "notNull": false,
2366
+ "default": "{}"
2367
+ },
2368
+ "event_timestamp": {
2369
+ "type": "TIMESTAMP",
2370
+ "notNull": false
2371
+ },
2372
+ "status": {
2373
+ "type": "TEXT",
2374
+ "notNull": false
2375
+ },
2376
+ "sent_at": {
2377
+ "type": "TIMESTAMP",
2378
+ "notNull": false
2379
+ },
2380
+ "error_message": {
2381
+ "type": "TEXT",
2382
+ "notNull": false,
2383
+ "default": ""
2384
+ },
2385
+ "retry_count": {
2386
+ "type": "INTEGER",
2387
+ "notNull": false,
2388
+ "default": 0
2389
+ },
2390
+ "non_personalized_ads": {
2391
+ "type": "BOOLEAN",
2392
+ "notNull": false,
2393
+ "default": false
2394
+ },
2395
+ "session_id": {
2396
+ "type": "TEXT",
2397
+ "notNull": false,
2398
+ "default": ""
2399
+ },
2400
+ "page_path": {
2401
+ "type": "TEXT",
2402
+ "notNull": false,
2403
+ "default": ""
2404
+ },
2405
+ "page_title": {
2406
+ "type": "TEXT",
2407
+ "notNull": false,
2408
+ "default": ""
2409
+ },
2410
+ "user_agent": {
2411
+ "type": "TEXT",
2412
+ "notNull": false,
2413
+ "default": ""
2414
+ },
2415
+ "ip_address": {
2416
+ "type": "TEXT",
2417
+ "notNull": false,
2418
+ "default": ""
2419
+ }
2420
+ },
2421
+ "indexes": [
2422
+ {
2423
+ "name": "analytics_events_id_idx",
2424
+ "columns": [
2425
+ "id"
2426
+ ]
2427
+ },
2428
+ {
2429
+ "name": "analytics_events_slug_context_meta_type_idx",
2430
+ "columns": [
2431
+ "slug",
2432
+ "context",
2433
+ "_meta_type"
2434
+ ],
2435
+ "unique": true
2436
+ },
2437
+ {
2438
+ "name": "analytics_events_meta_type_idx",
2439
+ "columns": [
2440
+ "_meta_type"
2441
+ ]
2442
+ }
2443
+ ],
2444
+ "version": "8c2447ff"
2445
+ }
2446
+ },
2447
+ "@happyvertical/smrt-analytics:AnalyticsProperty": {
2448
+ "name": "analyticsproperty",
2449
+ "className": "AnalyticsProperty",
2450
+ "qualifiedName": "@happyvertical/smrt-analytics:AnalyticsProperty",
2451
+ "collection": "analyticsproperties",
2452
+ "filePath": "/home/runner/_work/smrt/smrt/packages/analytics/src/models/AnalyticsProperty.ts",
2453
+ "packageName": "@happyvertical/smrt-analytics",
2454
+ "fields": {
2455
+ "created_at": {
2456
+ "type": "datetime",
2457
+ "required": false
2458
+ },
2459
+ "updated_at": {
2460
+ "type": "datetime",
2461
+ "required": false
2462
+ },
2463
+ "tenantId": {
2464
+ "type": "text",
2465
+ "required": false,
2466
+ "_meta": {
2467
+ "sqlType": "UUID",
2468
+ "nullable": true,
2469
+ "__tenancy": {
2470
+ "isTenantIdField": true,
2471
+ "autoFilter": true,
2472
+ "required": false,
2473
+ "autoPopulate": true,
2474
+ "nullable": true,
2475
+ "mode": "optional",
2476
+ "field": "tenantId",
2477
+ "allowSuperAdminBypass": false
2478
+ }
2479
+ }
2480
+ },
2481
+ "name": {
2482
+ "type": "text",
2483
+ "required": false,
2484
+ "default": ""
2485
+ },
2486
+ "displayName": {
2487
+ "type": "text",
2488
+ "required": false,
2489
+ "default": ""
2490
+ },
2491
+ "provider": {
2492
+ "type": "text",
2493
+ "required": false
2494
+ },
2495
+ "externalId": {
2496
+ "type": "text",
2497
+ "required": false,
2498
+ "default": ""
2499
+ },
2500
+ "measurementId": {
2501
+ "type": "text",
2502
+ "required": false,
2503
+ "default": ""
2504
+ },
2505
+ "apiSecret": {
2506
+ "type": "text",
2507
+ "required": false,
2508
+ "default": "",
2509
+ "_meta": {
2510
+ "sensitive": true
2511
+ },
2512
+ "sensitive": true
2513
+ },
2514
+ "siteDomain": {
2515
+ "type": "text",
2516
+ "required": false,
2517
+ "default": ""
2518
+ },
2519
+ "timeZone": {
2520
+ "type": "text",
2521
+ "required": false,
2522
+ "default": "America/Los_Angeles"
2523
+ },
2524
+ "currencyCode": {
2525
+ "type": "text",
2526
+ "required": false,
2527
+ "default": "USD"
2528
+ },
2529
+ "industryCategory": {
2530
+ "type": "text",
2531
+ "required": false,
2532
+ "default": ""
2533
+ },
2534
+ "serviceLevel": {
2535
+ "type": "text",
2536
+ "required": false,
2537
+ "default": "STANDARD"
2538
+ },
2539
+ "status": {
2540
+ "type": "text",
2541
+ "required": false
2542
+ },
2543
+ "lastSyncAt": {
2544
+ "type": "datetime",
2545
+ "required": false
2546
+ },
2547
+ "providerMetadata": {
2548
+ "type": "text",
2549
+ "required": false,
2550
+ "default": "{}",
2551
+ "_meta": {
2552
+ "sensitive": true
2553
+ },
2554
+ "sensitive": true
2555
+ }
2556
+ },
2557
+ "methods": {
2558
+ "getAiUsageSnapshot": {
2559
+ "name": "getAiUsageSnapshot",
2560
+ "async": false,
2561
+ "parameters": [],
2562
+ "returnType": "AiUsageSnapshot | undefined",
2563
+ "isStatic": false,
2564
+ "isPublic": true
2565
+ },
2566
+ "resetAiUsage": {
2567
+ "name": "resetAiUsage",
2568
+ "async": false,
2569
+ "parameters": [],
2570
+ "returnType": "void",
2571
+ "isStatic": false,
2572
+ "isPublic": true
2573
+ },
2574
+ "listAiUsage": {
2575
+ "name": "listAiUsage",
2576
+ "async": true,
2577
+ "parameters": [
2578
+ {
2579
+ "name": "options",
2580
+ "type": "AiUsageListOptions",
2581
+ "optional": true
2582
+ }
2583
+ ],
2584
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
2585
+ "isStatic": false,
2586
+ "isPublic": true
2587
+ },
2588
+ "summarizeAiUsage": {
2589
+ "name": "summarizeAiUsage",
2590
+ "async": true,
2591
+ "parameters": [
2592
+ {
2593
+ "name": "options",
2594
+ "type": "AiUsageSummaryOptions",
2595
+ "optional": true
2596
+ }
2597
+ ],
2598
+ "returnType": "Promise<Record<string, AiUsageStats>>",
2599
+ "isStatic": false,
2600
+ "isPublic": true
2601
+ },
2602
+ "destroy": {
2603
+ "name": "destroy",
2604
+ "async": false,
2605
+ "parameters": [],
2606
+ "returnType": "void",
2607
+ "isStatic": false,
2608
+ "isPublic": true
2609
+ },
2610
+ "markAsPersisted": {
2611
+ "name": "markAsPersisted",
2612
+ "async": false,
2613
+ "parameters": [],
2614
+ "returnType": "void",
2615
+ "isStatic": false,
2616
+ "isPublic": true
2617
+ },
2618
+ "initialize": {
2619
+ "name": "initialize",
2620
+ "async": true,
2621
+ "parameters": [],
2622
+ "returnType": "Promise",
2623
+ "isStatic": false,
2624
+ "isPublic": true
2625
+ },
2626
+ "loadDataFromDb": {
2627
+ "name": "loadDataFromDb",
2628
+ "async": true,
2629
+ "parameters": [
2630
+ {
2631
+ "name": "data",
2632
+ "type": "any",
2633
+ "optional": false
2634
+ }
2635
+ ],
2636
+ "returnType": "any",
2637
+ "isStatic": false,
2638
+ "isPublic": true
2639
+ },
2640
+ "getFields": {
2641
+ "name": "getFields",
2642
+ "async": true,
2643
+ "parameters": [],
2644
+ "returnType": "any",
2645
+ "isStatic": false,
2646
+ "isPublic": true
2647
+ },
2648
+ "toJSON": {
2649
+ "name": "toJSON",
2650
+ "async": false,
2651
+ "parameters": [],
2652
+ "returnType": "any",
2653
+ "isStatic": false,
2654
+ "isPublic": true
2655
+ },
2656
+ "toPlainObject": {
2657
+ "name": "toPlainObject",
2658
+ "async": false,
2659
+ "parameters": [],
2660
+ "returnType": "Record<string>",
2661
+ "isStatic": false,
2662
+ "isPublic": true
2663
+ },
2664
+ "toPublicJSON": {
2665
+ "name": "toPublicJSON",
2666
+ "async": false,
2667
+ "parameters": [],
2668
+ "returnType": "Record<string>",
2669
+ "isStatic": false,
2670
+ "isPublic": true
2671
+ },
2672
+ "getId": {
2673
+ "name": "getId",
2674
+ "async": true,
2675
+ "parameters": [],
2676
+ "returnType": "any",
2677
+ "isStatic": false,
2678
+ "isPublic": true
2679
+ },
2680
+ "getSlug": {
2681
+ "name": "getSlug",
2682
+ "async": true,
2683
+ "parameters": [],
2684
+ "returnType": "any",
2685
+ "isStatic": false,
2686
+ "isPublic": true
2687
+ },
2688
+ "getSavedId": {
2689
+ "name": "getSavedId",
2690
+ "async": true,
2691
+ "parameters": [],
2692
+ "returnType": "any",
2693
+ "isStatic": false,
2694
+ "isPublic": true
2695
+ },
2696
+ "isSaved": {
2697
+ "name": "isSaved",
2698
+ "async": true,
2699
+ "parameters": [],
2700
+ "returnType": "any",
2701
+ "isStatic": false,
2702
+ "isPublic": true
2703
+ },
2704
+ "save": {
2705
+ "name": "save",
2706
+ "async": true,
2707
+ "parameters": [],
2708
+ "returnType": "any",
2709
+ "isStatic": false,
2710
+ "isPublic": true
2711
+ },
2712
+ "classifyConstraintError": {
2713
+ "name": "classifyConstraintError",
2714
+ "async": false,
2715
+ "parameters": [
2716
+ {
2717
+ "name": "message",
2718
+ "type": "string",
2719
+ "optional": false
2720
+ }
2721
+ ],
2722
+ "returnType": "'unique' | 'not_null' | null",
2723
+ "isStatic": true,
2724
+ "isPublic": true
2725
+ },
2726
+ "loadFromId": {
2727
+ "name": "loadFromId",
2728
+ "async": true,
2729
+ "parameters": [],
2730
+ "returnType": "any",
2731
+ "isStatic": false,
2732
+ "isPublic": true
2733
+ },
2734
+ "loadFromSlug": {
2735
+ "name": "loadFromSlug",
2736
+ "async": true,
2737
+ "parameters": [],
2738
+ "returnType": "any",
2739
+ "isStatic": false,
2740
+ "isPublic": true
2741
+ },
2742
+ "is": {
2743
+ "name": "is",
2744
+ "async": true,
2745
+ "parameters": [
2746
+ {
2747
+ "name": "criteria",
2748
+ "type": "string",
2749
+ "optional": false
2750
+ },
2751
+ {
2752
+ "name": "options",
2753
+ "type": "any",
2754
+ "optional": true
2755
+ }
2756
+ ],
2757
+ "returnType": "any",
2758
+ "isStatic": false,
2759
+ "isPublic": true
2760
+ },
2761
+ "do": {
2762
+ "name": "do",
2763
+ "async": true,
2764
+ "parameters": [
2765
+ {
2766
+ "name": "instructions",
2767
+ "type": "string",
2768
+ "optional": false
2769
+ },
2770
+ {
2771
+ "name": "options",
2772
+ "type": "any",
2773
+ "optional": true
2774
+ }
2775
+ ],
2776
+ "returnType": "any",
2777
+ "isStatic": false,
2778
+ "isPublic": true
2779
+ },
2780
+ "describe": {
2781
+ "name": "describe",
2782
+ "async": true,
2783
+ "parameters": [
2784
+ {
2785
+ "name": "options",
2786
+ "type": "any",
2787
+ "optional": true
2788
+ }
2789
+ ],
2790
+ "returnType": "any",
2791
+ "isStatic": false,
2792
+ "isPublic": true
2793
+ },
2794
+ "delete": {
2795
+ "name": "delete",
2796
+ "async": true,
2797
+ "parameters": [],
2798
+ "returnType": "Promise<void>",
2799
+ "isStatic": false,
2800
+ "isPublic": true
2801
+ },
2802
+ "isRelatedLoaded": {
2803
+ "name": "isRelatedLoaded",
2804
+ "async": false,
2805
+ "parameters": [
2806
+ {
2807
+ "name": "fieldName",
2808
+ "type": "string",
2809
+ "optional": false
2810
+ }
2811
+ ],
2812
+ "returnType": "boolean",
2813
+ "isStatic": false,
2814
+ "isPublic": true
2815
+ },
2816
+ "loadRelated": {
2817
+ "name": "loadRelated",
2818
+ "async": true,
2819
+ "parameters": [
2820
+ {
2821
+ "name": "fieldName",
2822
+ "type": "string",
2823
+ "optional": false
2824
+ },
2825
+ {
2826
+ "name": "opts",
2827
+ "type": "LoadRelatedOptions",
2828
+ "optional": true
2829
+ }
2830
+ ],
2831
+ "returnType": "Promise<any>",
2832
+ "isStatic": false,
2833
+ "isPublic": true
2834
+ },
2835
+ "loadRelatedMany": {
2836
+ "name": "loadRelatedMany",
2837
+ "async": true,
2838
+ "parameters": [
2839
+ {
2840
+ "name": "fieldName",
2841
+ "type": "string",
2842
+ "optional": false
2843
+ },
2844
+ {
2845
+ "name": "opts",
2846
+ "type": "LoadRelatedOptions",
2847
+ "optional": true
2848
+ }
2849
+ ],
2850
+ "returnType": "Promise<any[]>",
2851
+ "isStatic": false,
2852
+ "isPublic": true
2853
+ },
2854
+ "getRelated": {
2855
+ "name": "getRelated",
2856
+ "async": true,
2857
+ "parameters": [
2858
+ {
2859
+ "name": "fieldName",
2860
+ "type": "string",
2861
+ "optional": false
2862
+ },
2863
+ {
2864
+ "name": "opts",
2865
+ "type": "LoadRelatedOptions",
2866
+ "optional": true
2867
+ }
2868
+ ],
2869
+ "returnType": "Promise<any>",
2870
+ "isStatic": false,
2871
+ "isPublic": true
2872
+ },
2873
+ "getAvailableTools": {
2874
+ "name": "getAvailableTools",
2875
+ "async": false,
2876
+ "parameters": [],
2877
+ "returnType": "AITool[]",
2878
+ "isStatic": false,
2879
+ "isPublic": true
2880
+ },
2881
+ "executeToolCall": {
2882
+ "name": "executeToolCall",
2883
+ "async": true,
2884
+ "parameters": [
2885
+ {
2886
+ "name": "toolCall",
2887
+ "type": "ToolCall",
2888
+ "optional": false
2889
+ }
2890
+ ],
2891
+ "returnType": "Promise<ToolCallResult>",
2892
+ "isStatic": false,
2893
+ "isPublic": true
2894
+ },
2895
+ "remember": {
2896
+ "name": "remember",
2897
+ "async": true,
2898
+ "parameters": [
2899
+ {
2900
+ "name": "options",
2901
+ "type": "object",
2902
+ "optional": false
2903
+ }
2904
+ ],
2905
+ "returnType": "Promise<void>",
2906
+ "isStatic": false,
2907
+ "isPublic": true
2908
+ },
2909
+ "recall": {
2910
+ "name": "recall",
2911
+ "async": true,
2912
+ "parameters": [
2913
+ {
2914
+ "name": "options",
2915
+ "type": "object",
2916
+ "optional": false
2917
+ }
2918
+ ],
2919
+ "returnType": "Promise<any | null>",
2920
+ "isStatic": false,
2921
+ "isPublic": true
2922
+ },
2923
+ "recallAll": {
2924
+ "name": "recallAll",
2925
+ "async": true,
2926
+ "parameters": [
2927
+ {
2928
+ "name": "options",
2929
+ "type": "object",
2930
+ "optional": true
2931
+ }
2932
+ ],
2933
+ "returnType": "Promise<Map<string, any>>",
2934
+ "isStatic": false,
2935
+ "isPublic": true
2936
+ },
2937
+ "forget": {
2938
+ "name": "forget",
2939
+ "async": true,
2940
+ "parameters": [
2941
+ {
2942
+ "name": "options",
2943
+ "type": "object",
2944
+ "optional": false
2945
+ }
2946
+ ],
2947
+ "returnType": "Promise<void>",
2948
+ "isStatic": false,
2949
+ "isPublic": true
2950
+ },
2951
+ "forgetScope": {
2952
+ "name": "forgetScope",
2953
+ "async": true,
2954
+ "parameters": [
2955
+ {
2956
+ "name": "options",
2957
+ "type": "object",
2958
+ "optional": false
2959
+ }
2960
+ ],
2961
+ "returnType": "Promise<number>",
2962
+ "isStatic": false,
2963
+ "isPublic": true
2964
+ },
2965
+ "generateEmbeddings": {
2966
+ "name": "generateEmbeddings",
2967
+ "async": true,
2968
+ "parameters": [
2969
+ {
2970
+ "name": "options",
2971
+ "type": "GenerateEmbeddingsOptions",
2972
+ "optional": true
2973
+ }
2974
+ ],
2975
+ "returnType": "Promise<void>",
2976
+ "isStatic": false,
2977
+ "isPublic": true
2978
+ },
2979
+ "getEmbedding": {
2980
+ "name": "getEmbedding",
2981
+ "async": true,
2982
+ "parameters": [
2983
+ {
2984
+ "name": "fieldName",
2985
+ "type": "string",
2986
+ "optional": false
2987
+ },
2988
+ {
2989
+ "name": "model",
2990
+ "type": "string",
2991
+ "optional": true
2992
+ }
2993
+ ],
2994
+ "returnType": "Promise<number[] | null>",
2995
+ "isStatic": false,
2996
+ "isPublic": true
2997
+ },
2998
+ "hasStaleEmbeddings": {
2999
+ "name": "hasStaleEmbeddings",
3000
+ "async": true,
3001
+ "parameters": [],
3002
+ "returnType": "Promise<boolean>",
3003
+ "isStatic": false,
3004
+ "isPublic": true
3005
+ },
3006
+ "clearEmbeddings": {
3007
+ "name": "clearEmbeddings",
3008
+ "async": true,
3009
+ "parameters": [],
3010
+ "returnType": "Promise<void>",
3011
+ "isStatic": false,
3012
+ "isPublic": true
3013
+ },
3014
+ "isGA4": {
3015
+ "name": "isGA4",
3016
+ "async": false,
3017
+ "parameters": [],
3018
+ "returnType": "boolean",
3019
+ "isStatic": false,
3020
+ "isPublic": true
3021
+ },
3022
+ "isPlausible": {
3023
+ "name": "isPlausible",
3024
+ "async": false,
3025
+ "parameters": [],
3026
+ "returnType": "boolean",
3027
+ "isStatic": false,
3028
+ "isPublic": true
3029
+ },
3030
+ "isMatomo": {
3031
+ "name": "isMatomo",
3032
+ "async": false,
3033
+ "parameters": [],
3034
+ "returnType": "boolean",
3035
+ "isStatic": false,
3036
+ "isPublic": true
3037
+ },
3038
+ "getProviderMetadata": {
3039
+ "name": "getProviderMetadata",
3040
+ "async": false,
3041
+ "parameters": [],
3042
+ "returnType": "Record<string>",
3043
+ "isStatic": false,
3044
+ "isPublic": true
3045
+ },
3046
+ "setProviderMetadata": {
3047
+ "name": "setProviderMetadata",
3048
+ "async": false,
3049
+ "parameters": [
3050
+ {
3051
+ "name": "metadata",
3052
+ "type": "Record<string>",
3053
+ "optional": false
3054
+ }
3055
+ ],
3056
+ "returnType": "void",
3057
+ "isStatic": false,
3058
+ "isPublic": true
3059
+ },
3060
+ "markSynced": {
3061
+ "name": "markSynced",
3062
+ "async": false,
3063
+ "parameters": [],
3064
+ "returnType": "void",
3065
+ "isStatic": false,
3066
+ "isPublic": true
3067
+ },
3068
+ "analyzePerformance": {
3069
+ "name": "analyzePerformance",
3070
+ "async": true,
3071
+ "parameters": [
3072
+ {
3073
+ "name": "options",
3074
+ "type": "object",
3075
+ "optional": true
3076
+ }
3077
+ ],
3078
+ "returnType": "Promise<object>",
3079
+ "isStatic": false,
3080
+ "isPublic": true
3081
+ },
3082
+ "isPerformingWell": {
3083
+ "name": "isPerformingWell",
3084
+ "async": true,
3085
+ "parameters": [],
3086
+ "returnType": "Promise<boolean>",
3087
+ "isStatic": false,
3088
+ "isPublic": true
3089
+ }
3090
+ },
3091
+ "decoratorConfig": {
3092
+ "tableStrategy": "sti",
3093
+ "api": {
3094
+ "include": [
3095
+ "list",
3096
+ "get",
3097
+ "create",
3098
+ "update"
3099
+ ]
3100
+ },
3101
+ "mcp": {
3102
+ "include": [
3103
+ "list",
3104
+ "get",
3105
+ "sync",
3106
+ "runReport"
3107
+ ]
3108
+ },
3109
+ "cli": true,
3110
+ "tenantScoped": {
3111
+ "mode": "optional"
3112
+ }
3113
+ },
3114
+ "extends": "SmrtObject",
3115
+ "exportName": "AnalyticsProperty",
3116
+ "collectionExportName": "AnalyticsPropertyCollection",
3117
+ "schema": {
3118
+ "tableName": "analytics_properties",
3119
+ "ddl": "CREATE TABLE IF NOT EXISTS \"analytics_properties\" (\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 \"name\" TEXT DEFAULT '',\n \"display_name\" TEXT DEFAULT '',\n \"provider\" TEXT,\n \"external_id\" TEXT DEFAULT '',\n \"measurement_id\" TEXT DEFAULT '',\n \"api_secret\" TEXT DEFAULT '',\n \"site_domain\" TEXT DEFAULT '',\n \"time_zone\" TEXT DEFAULT 'America/Los_Angeles',\n \"currency_code\" TEXT DEFAULT 'USD',\n \"industry_category\" TEXT DEFAULT '',\n \"service_level\" TEXT DEFAULT 'STANDARD',\n \"status\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"provider_metadata\" TEXT DEFAULT '{}'\n);",
3120
+ "columns": {
3121
+ "id": {
3122
+ "type": "UUID",
3123
+ "primaryKey": true,
3124
+ "referenceKind": "id",
3125
+ "notNull": true
3126
+ },
3127
+ "slug": {
3128
+ "type": "TEXT",
3129
+ "notNull": true
3130
+ },
3131
+ "context": {
3132
+ "type": "TEXT",
3133
+ "notNull": true,
3134
+ "default": ""
3135
+ },
3136
+ "_meta_type": {
3137
+ "type": "TEXT",
3138
+ "notNull": true
3139
+ },
3140
+ "_meta_data": {
3141
+ "type": "JSON",
3142
+ "notNull": false
3143
+ },
3144
+ "created_at": {
3145
+ "type": "TIMESTAMP",
3146
+ "notNull": true,
3147
+ "default": "current_timestamp"
3148
+ },
3149
+ "updated_at": {
3150
+ "type": "TIMESTAMP",
3151
+ "notNull": true,
3152
+ "default": "current_timestamp"
3153
+ },
3154
+ "tenant_id": {
3155
+ "type": "UUID",
3156
+ "referenceKind": "tenantId",
3157
+ "notNull": false
3158
+ },
3159
+ "name": {
3160
+ "type": "TEXT",
3161
+ "notNull": false,
3162
+ "default": ""
3163
+ },
3164
+ "display_name": {
3165
+ "type": "TEXT",
3166
+ "notNull": false,
3167
+ "default": ""
3168
+ },
3169
+ "provider": {
3170
+ "type": "TEXT",
3171
+ "notNull": false
3172
+ },
3173
+ "external_id": {
3174
+ "type": "TEXT",
3175
+ "notNull": false,
3176
+ "default": ""
3177
+ },
3178
+ "measurement_id": {
3179
+ "type": "TEXT",
3180
+ "notNull": false,
3181
+ "default": ""
3182
+ },
3183
+ "api_secret": {
3184
+ "type": "TEXT",
3185
+ "notNull": false,
3186
+ "default": ""
3187
+ },
3188
+ "site_domain": {
3189
+ "type": "TEXT",
3190
+ "notNull": false,
3191
+ "default": ""
3192
+ },
3193
+ "time_zone": {
3194
+ "type": "TEXT",
3195
+ "notNull": false,
3196
+ "default": "America/Los_Angeles"
3197
+ },
3198
+ "currency_code": {
3199
+ "type": "TEXT",
3200
+ "notNull": false,
3201
+ "default": "USD"
3202
+ },
3203
+ "industry_category": {
3204
+ "type": "TEXT",
3205
+ "notNull": false,
3206
+ "default": ""
3207
+ },
3208
+ "service_level": {
3209
+ "type": "TEXT",
3210
+ "notNull": false,
3211
+ "default": "STANDARD"
3212
+ },
3213
+ "status": {
3214
+ "type": "TEXT",
3215
+ "notNull": false
3216
+ },
3217
+ "last_sync_at": {
3218
+ "type": "TIMESTAMP",
3219
+ "notNull": false
3220
+ },
3221
+ "provider_metadata": {
3222
+ "type": "TEXT",
3223
+ "notNull": false,
3224
+ "default": "{}"
3225
+ }
3226
+ },
3227
+ "indexes": [
3228
+ {
3229
+ "name": "analytics_properties_id_idx",
3230
+ "columns": [
3231
+ "id"
3232
+ ]
3233
+ },
3234
+ {
3235
+ "name": "analytics_properties_slug_context_meta_type_idx",
3236
+ "columns": [
3237
+ "slug",
3238
+ "context",
3239
+ "_meta_type"
3240
+ ],
3241
+ "unique": true
3242
+ },
3243
+ {
3244
+ "name": "analytics_properties_meta_type_idx",
3245
+ "columns": [
3246
+ "_meta_type"
3247
+ ]
3248
+ }
3249
+ ],
3250
+ "version": "f38a20b9"
3251
+ }
3252
+ },
3253
+ "@happyvertical/smrt-analytics:AnalyticsReport": {
3254
+ "name": "analyticsreport",
3255
+ "className": "AnalyticsReport",
3256
+ "qualifiedName": "@happyvertical/smrt-analytics:AnalyticsReport",
3257
+ "collection": "analyticsreports",
3258
+ "filePath": "/home/runner/_work/smrt/smrt/packages/analytics/src/models/AnalyticsReport.ts",
3259
+ "packageName": "@happyvertical/smrt-analytics",
3260
+ "fields": {
3261
+ "created_at": {
3262
+ "type": "datetime",
3263
+ "required": false
3264
+ },
3265
+ "updated_at": {
3266
+ "type": "datetime",
3267
+ "required": false
3268
+ },
3269
+ "tenantId": {
3270
+ "type": "text",
3271
+ "required": false,
3272
+ "_meta": {
3273
+ "sqlType": "UUID",
3274
+ "nullable": true,
3275
+ "__tenancy": {
3276
+ "isTenantIdField": true,
3277
+ "autoFilter": true,
3278
+ "required": false,
3279
+ "autoPopulate": true,
3280
+ "nullable": true,
3281
+ "mode": "optional",
3282
+ "field": "tenantId",
3283
+ "allowSuperAdminBypass": false
3284
+ }
3285
+ }
3286
+ },
3287
+ "propertyId": {
3288
+ "type": "foreignKey",
3289
+ "required": false,
3290
+ "related": "AnalyticsProperty"
3291
+ },
3292
+ "name": {
3293
+ "type": "text",
3294
+ "required": false,
3295
+ "default": ""
3296
+ },
3297
+ "description": {
3298
+ "type": "text",
3299
+ "required": false,
3300
+ "default": ""
3301
+ },
3302
+ "dimensions": {
3303
+ "type": "text",
3304
+ "required": false,
3305
+ "default": "[]"
3306
+ },
3307
+ "metrics": {
3308
+ "type": "text",
3309
+ "required": false,
3310
+ "default": "[]"
3311
+ },
3312
+ "dateRangeStart": {
3313
+ "type": "text",
3314
+ "required": false,
3315
+ "default": "7daysAgo"
3316
+ },
3317
+ "dateRangeEnd": {
3318
+ "type": "text",
3319
+ "required": false,
3320
+ "default": "today"
3321
+ },
3322
+ "dimensionFilter": {
3323
+ "type": "text",
3324
+ "required": false,
3325
+ "default": ""
3326
+ },
3327
+ "metricFilter": {
3328
+ "type": "text",
3329
+ "required": false,
3330
+ "default": ""
3331
+ },
3332
+ "orderBy": {
3333
+ "type": "text",
3334
+ "required": false,
3335
+ "default": "[]"
3336
+ },
3337
+ "maxResults": {
3338
+ "type": "integer",
3339
+ "required": false,
3340
+ "default": 0
3341
+ },
3342
+ "status": {
3343
+ "type": "text",
3344
+ "required": false
3345
+ },
3346
+ "frequency": {
3347
+ "type": "text",
3348
+ "required": false
3349
+ },
3350
+ "lastRunAt": {
3351
+ "type": "datetime",
3352
+ "required": false
3353
+ },
3354
+ "nextRunAt": {
3355
+ "type": "datetime",
3356
+ "required": false
3357
+ },
3358
+ "resultData": {
3359
+ "type": "text",
3360
+ "required": false,
3361
+ "default": ""
3362
+ },
3363
+ "rowCount": {
3364
+ "type": "integer",
3365
+ "required": false,
3366
+ "default": 0
3367
+ },
3368
+ "lastError": {
3369
+ "type": "text",
3370
+ "required": false,
3371
+ "default": ""
3372
+ }
3373
+ },
3374
+ "methods": {
3375
+ "getAiUsageSnapshot": {
3376
+ "name": "getAiUsageSnapshot",
3377
+ "async": false,
3378
+ "parameters": [],
3379
+ "returnType": "AiUsageSnapshot | undefined",
3380
+ "isStatic": false,
3381
+ "isPublic": true
3382
+ },
3383
+ "resetAiUsage": {
3384
+ "name": "resetAiUsage",
3385
+ "async": false,
3386
+ "parameters": [],
3387
+ "returnType": "void",
3388
+ "isStatic": false,
3389
+ "isPublic": true
3390
+ },
3391
+ "listAiUsage": {
3392
+ "name": "listAiUsage",
3393
+ "async": true,
3394
+ "parameters": [
3395
+ {
3396
+ "name": "options",
3397
+ "type": "AiUsageListOptions",
3398
+ "optional": true
3399
+ }
3400
+ ],
3401
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
3402
+ "isStatic": false,
3403
+ "isPublic": true
3404
+ },
3405
+ "summarizeAiUsage": {
3406
+ "name": "summarizeAiUsage",
3407
+ "async": true,
3408
+ "parameters": [
3409
+ {
3410
+ "name": "options",
3411
+ "type": "AiUsageSummaryOptions",
3412
+ "optional": true
3413
+ }
3414
+ ],
3415
+ "returnType": "Promise<Record<string, AiUsageStats>>",
3416
+ "isStatic": false,
3417
+ "isPublic": true
3418
+ },
3419
+ "destroy": {
3420
+ "name": "destroy",
3421
+ "async": false,
3422
+ "parameters": [],
3423
+ "returnType": "void",
3424
+ "isStatic": false,
3425
+ "isPublic": true
3426
+ },
3427
+ "markAsPersisted": {
3428
+ "name": "markAsPersisted",
3429
+ "async": false,
3430
+ "parameters": [],
3431
+ "returnType": "void",
3432
+ "isStatic": false,
3433
+ "isPublic": true
3434
+ },
3435
+ "initialize": {
3436
+ "name": "initialize",
3437
+ "async": true,
3438
+ "parameters": [],
3439
+ "returnType": "Promise",
3440
+ "isStatic": false,
3441
+ "isPublic": true
3442
+ },
3443
+ "loadDataFromDb": {
3444
+ "name": "loadDataFromDb",
3445
+ "async": true,
3446
+ "parameters": [
3447
+ {
3448
+ "name": "data",
3449
+ "type": "any",
3450
+ "optional": false
3451
+ }
3452
+ ],
3453
+ "returnType": "any",
3454
+ "isStatic": false,
3455
+ "isPublic": true
3456
+ },
3457
+ "getFields": {
3458
+ "name": "getFields",
3459
+ "async": true,
3460
+ "parameters": [],
3461
+ "returnType": "any",
3462
+ "isStatic": false,
3463
+ "isPublic": true
3464
+ },
3465
+ "toJSON": {
3466
+ "name": "toJSON",
3467
+ "async": false,
3468
+ "parameters": [],
3469
+ "returnType": "any",
3470
+ "isStatic": false,
3471
+ "isPublic": true
3472
+ },
3473
+ "toPlainObject": {
3474
+ "name": "toPlainObject",
3475
+ "async": false,
3476
+ "parameters": [],
3477
+ "returnType": "Record<string>",
3478
+ "isStatic": false,
3479
+ "isPublic": true
3480
+ },
3481
+ "toPublicJSON": {
3482
+ "name": "toPublicJSON",
3483
+ "async": false,
3484
+ "parameters": [],
3485
+ "returnType": "Record<string>",
3486
+ "isStatic": false,
3487
+ "isPublic": true
3488
+ },
3489
+ "getId": {
3490
+ "name": "getId",
3491
+ "async": true,
3492
+ "parameters": [],
3493
+ "returnType": "any",
3494
+ "isStatic": false,
3495
+ "isPublic": true
3496
+ },
3497
+ "getSlug": {
3498
+ "name": "getSlug",
3499
+ "async": true,
3500
+ "parameters": [],
3501
+ "returnType": "any",
3502
+ "isStatic": false,
3503
+ "isPublic": true
3504
+ },
3505
+ "getSavedId": {
3506
+ "name": "getSavedId",
3507
+ "async": true,
3508
+ "parameters": [],
3509
+ "returnType": "any",
3510
+ "isStatic": false,
3511
+ "isPublic": true
3512
+ },
3513
+ "isSaved": {
3514
+ "name": "isSaved",
3515
+ "async": true,
3516
+ "parameters": [],
3517
+ "returnType": "any",
3518
+ "isStatic": false,
3519
+ "isPublic": true
3520
+ },
3521
+ "save": {
3522
+ "name": "save",
3523
+ "async": true,
3524
+ "parameters": [],
3525
+ "returnType": "any",
3526
+ "isStatic": false,
3527
+ "isPublic": true
3528
+ },
3529
+ "classifyConstraintError": {
3530
+ "name": "classifyConstraintError",
3531
+ "async": false,
3532
+ "parameters": [
3533
+ {
3534
+ "name": "message",
3535
+ "type": "string",
3536
+ "optional": false
3537
+ }
3538
+ ],
3539
+ "returnType": "'unique' | 'not_null' | null",
3540
+ "isStatic": true,
3541
+ "isPublic": true
3542
+ },
3543
+ "loadFromId": {
3544
+ "name": "loadFromId",
3545
+ "async": true,
3546
+ "parameters": [],
3547
+ "returnType": "any",
3548
+ "isStatic": false,
3549
+ "isPublic": true
3550
+ },
3551
+ "loadFromSlug": {
3552
+ "name": "loadFromSlug",
3553
+ "async": true,
3554
+ "parameters": [],
3555
+ "returnType": "any",
3556
+ "isStatic": false,
3557
+ "isPublic": true
3558
+ },
3559
+ "is": {
3560
+ "name": "is",
3561
+ "async": true,
3562
+ "parameters": [
3563
+ {
3564
+ "name": "criteria",
3565
+ "type": "string",
3566
+ "optional": false
3567
+ },
3568
+ {
3569
+ "name": "options",
3570
+ "type": "any",
3571
+ "optional": true
3572
+ }
3573
+ ],
3574
+ "returnType": "any",
3575
+ "isStatic": false,
3576
+ "isPublic": true
3577
+ },
3578
+ "do": {
3579
+ "name": "do",
3580
+ "async": true,
3581
+ "parameters": [
3582
+ {
3583
+ "name": "instructions",
3584
+ "type": "string",
3585
+ "optional": false
3586
+ },
3587
+ {
3588
+ "name": "options",
3589
+ "type": "any",
3590
+ "optional": true
3591
+ }
3592
+ ],
3593
+ "returnType": "any",
3594
+ "isStatic": false,
3595
+ "isPublic": true
3596
+ },
3597
+ "describe": {
3598
+ "name": "describe",
3599
+ "async": true,
3600
+ "parameters": [
3601
+ {
3602
+ "name": "options",
3603
+ "type": "any",
3604
+ "optional": true
3605
+ }
3606
+ ],
3607
+ "returnType": "any",
3608
+ "isStatic": false,
3609
+ "isPublic": true
3610
+ },
3611
+ "delete": {
3612
+ "name": "delete",
3613
+ "async": true,
3614
+ "parameters": [],
3615
+ "returnType": "Promise<void>",
3616
+ "isStatic": false,
3617
+ "isPublic": true
3618
+ },
3619
+ "isRelatedLoaded": {
3620
+ "name": "isRelatedLoaded",
3621
+ "async": false,
3622
+ "parameters": [
3623
+ {
3624
+ "name": "fieldName",
3625
+ "type": "string",
3626
+ "optional": false
3627
+ }
3628
+ ],
3629
+ "returnType": "boolean",
3630
+ "isStatic": false,
3631
+ "isPublic": true
3632
+ },
3633
+ "loadRelated": {
3634
+ "name": "loadRelated",
3635
+ "async": true,
3636
+ "parameters": [
3637
+ {
3638
+ "name": "fieldName",
3639
+ "type": "string",
3640
+ "optional": false
3641
+ },
3642
+ {
3643
+ "name": "opts",
3644
+ "type": "LoadRelatedOptions",
3645
+ "optional": true
3646
+ }
3647
+ ],
3648
+ "returnType": "Promise<any>",
3649
+ "isStatic": false,
3650
+ "isPublic": true
3651
+ },
3652
+ "loadRelatedMany": {
3653
+ "name": "loadRelatedMany",
3654
+ "async": true,
3655
+ "parameters": [
3656
+ {
3657
+ "name": "fieldName",
3658
+ "type": "string",
3659
+ "optional": false
3660
+ },
3661
+ {
3662
+ "name": "opts",
3663
+ "type": "LoadRelatedOptions",
3664
+ "optional": true
3665
+ }
3666
+ ],
3667
+ "returnType": "Promise<any[]>",
3668
+ "isStatic": false,
3669
+ "isPublic": true
3670
+ },
3671
+ "getRelated": {
3672
+ "name": "getRelated",
3673
+ "async": true,
3674
+ "parameters": [
3675
+ {
3676
+ "name": "fieldName",
3677
+ "type": "string",
3678
+ "optional": false
3679
+ },
3680
+ {
3681
+ "name": "opts",
3682
+ "type": "LoadRelatedOptions",
3683
+ "optional": true
3684
+ }
3685
+ ],
3686
+ "returnType": "Promise<any>",
3687
+ "isStatic": false,
3688
+ "isPublic": true
3689
+ },
3690
+ "getAvailableTools": {
3691
+ "name": "getAvailableTools",
3692
+ "async": false,
3693
+ "parameters": [],
3694
+ "returnType": "AITool[]",
3695
+ "isStatic": false,
3696
+ "isPublic": true
3697
+ },
3698
+ "executeToolCall": {
3699
+ "name": "executeToolCall",
3700
+ "async": true,
3701
+ "parameters": [
3702
+ {
3703
+ "name": "toolCall",
3704
+ "type": "ToolCall",
3705
+ "optional": false
3706
+ }
3707
+ ],
3708
+ "returnType": "Promise<ToolCallResult>",
3709
+ "isStatic": false,
3710
+ "isPublic": true
3711
+ },
3712
+ "remember": {
3713
+ "name": "remember",
3714
+ "async": true,
3715
+ "parameters": [
3716
+ {
3717
+ "name": "options",
3718
+ "type": "object",
3719
+ "optional": false
3720
+ }
3721
+ ],
3722
+ "returnType": "Promise<void>",
3723
+ "isStatic": false,
3724
+ "isPublic": true
3725
+ },
3726
+ "recall": {
3727
+ "name": "recall",
3728
+ "async": true,
3729
+ "parameters": [
3730
+ {
3731
+ "name": "options",
3732
+ "type": "object",
3733
+ "optional": false
3734
+ }
3735
+ ],
3736
+ "returnType": "Promise<any | null>",
3737
+ "isStatic": false,
3738
+ "isPublic": true
3739
+ },
3740
+ "recallAll": {
3741
+ "name": "recallAll",
3742
+ "async": true,
3743
+ "parameters": [
3744
+ {
3745
+ "name": "options",
3746
+ "type": "object",
3747
+ "optional": true
3748
+ }
3749
+ ],
3750
+ "returnType": "Promise<Map<string, any>>",
3751
+ "isStatic": false,
3752
+ "isPublic": true
3753
+ },
3754
+ "forget": {
3755
+ "name": "forget",
3756
+ "async": true,
3757
+ "parameters": [
3758
+ {
3759
+ "name": "options",
3760
+ "type": "object",
3761
+ "optional": false
3762
+ }
3763
+ ],
3764
+ "returnType": "Promise<void>",
3765
+ "isStatic": false,
3766
+ "isPublic": true
3767
+ },
3768
+ "forgetScope": {
3769
+ "name": "forgetScope",
3770
+ "async": true,
3771
+ "parameters": [
3772
+ {
3773
+ "name": "options",
3774
+ "type": "object",
3775
+ "optional": false
3776
+ }
3777
+ ],
3778
+ "returnType": "Promise<number>",
3779
+ "isStatic": false,
3780
+ "isPublic": true
3781
+ },
3782
+ "generateEmbeddings": {
3783
+ "name": "generateEmbeddings",
3784
+ "async": true,
3785
+ "parameters": [
3786
+ {
3787
+ "name": "options",
3788
+ "type": "GenerateEmbeddingsOptions",
3789
+ "optional": true
3790
+ }
3791
+ ],
3792
+ "returnType": "Promise<void>",
3793
+ "isStatic": false,
3794
+ "isPublic": true
3795
+ },
3796
+ "getEmbedding": {
3797
+ "name": "getEmbedding",
3798
+ "async": true,
3799
+ "parameters": [
3800
+ {
3801
+ "name": "fieldName",
3802
+ "type": "string",
3803
+ "optional": false
3804
+ },
3805
+ {
3806
+ "name": "model",
3807
+ "type": "string",
3808
+ "optional": true
3809
+ }
3810
+ ],
3811
+ "returnType": "Promise<number[] | null>",
3812
+ "isStatic": false,
3813
+ "isPublic": true
3814
+ },
3815
+ "hasStaleEmbeddings": {
3816
+ "name": "hasStaleEmbeddings",
3817
+ "async": true,
3818
+ "parameters": [],
3819
+ "returnType": "Promise<boolean>",
3820
+ "isStatic": false,
3821
+ "isPublic": true
3822
+ },
3823
+ "clearEmbeddings": {
3824
+ "name": "clearEmbeddings",
3825
+ "async": true,
3826
+ "parameters": [],
3827
+ "returnType": "Promise<void>",
3828
+ "isStatic": false,
3829
+ "isPublic": true
3830
+ },
3831
+ "getDimensions": {
3832
+ "name": "getDimensions",
3833
+ "async": false,
3834
+ "parameters": [],
3835
+ "returnType": "Array<object>",
3836
+ "isStatic": false,
3837
+ "isPublic": true
3838
+ },
3839
+ "setDimensions": {
3840
+ "name": "setDimensions",
3841
+ "async": false,
3842
+ "parameters": [
3843
+ {
3844
+ "name": "dimensions",
3845
+ "type": "Array<object>",
3846
+ "optional": false
3847
+ }
3848
+ ],
3849
+ "returnType": "void",
3850
+ "isStatic": false,
3851
+ "isPublic": true
3852
+ },
3853
+ "getMetrics": {
3854
+ "name": "getMetrics",
3855
+ "async": false,
3856
+ "parameters": [],
3857
+ "returnType": "Array<object>",
3858
+ "isStatic": false,
3859
+ "isPublic": true
3860
+ },
3861
+ "setMetrics": {
3862
+ "name": "setMetrics",
3863
+ "async": false,
3864
+ "parameters": [
3865
+ {
3866
+ "name": "metrics",
3867
+ "type": "Array<object>",
3868
+ "optional": false
3869
+ }
3870
+ ],
3871
+ "returnType": "void",
3872
+ "isStatic": false,
3873
+ "isPublic": true
3874
+ },
3875
+ "getResultData": {
3876
+ "name": "getResultData",
3877
+ "async": false,
3878
+ "parameters": [],
3879
+ "returnType": "Record<string> | null",
3880
+ "isStatic": false,
3881
+ "isPublic": true
3882
+ },
3883
+ "setResultData": {
3884
+ "name": "setResultData",
3885
+ "async": false,
3886
+ "parameters": [
3887
+ {
3888
+ "name": "data",
3889
+ "type": "Record<string>",
3890
+ "optional": false
3891
+ }
3892
+ ],
3893
+ "returnType": "void",
3894
+ "isStatic": false,
3895
+ "isPublic": true
3896
+ },
3897
+ "markRunning": {
3898
+ "name": "markRunning",
3899
+ "async": false,
3900
+ "parameters": [],
3901
+ "returnType": "void",
3902
+ "isStatic": false,
3903
+ "isPublic": true
3904
+ },
3905
+ "markCompleted": {
3906
+ "name": "markCompleted",
3907
+ "async": false,
3908
+ "parameters": [
3909
+ {
3910
+ "name": "rowCount",
3911
+ "type": "number",
3912
+ "optional": false
3913
+ }
3914
+ ],
3915
+ "returnType": "void",
3916
+ "isStatic": false,
3917
+ "isPublic": true
3918
+ },
3919
+ "markFailed": {
3920
+ "name": "markFailed",
3921
+ "async": false,
3922
+ "parameters": [
3923
+ {
3924
+ "name": "error",
3925
+ "type": "string",
3926
+ "optional": false
3927
+ }
3928
+ ],
3929
+ "returnType": "void",
3930
+ "isStatic": false,
3931
+ "isPublic": true
3932
+ },
3933
+ "calculateNextRun": {
3934
+ "name": "calculateNextRun",
3935
+ "async": false,
3936
+ "parameters": [],
3937
+ "returnType": "void",
3938
+ "isStatic": false,
3939
+ "isPublic": true
3940
+ },
3941
+ "isDue": {
3942
+ "name": "isDue",
3943
+ "async": false,
3944
+ "parameters": [],
3945
+ "returnType": "boolean",
3946
+ "isStatic": false,
3947
+ "isPublic": true
3948
+ },
3949
+ "analyzeResults": {
3950
+ "name": "analyzeResults",
3951
+ "async": true,
3952
+ "parameters": [
3953
+ {
3954
+ "name": "_options",
3955
+ "type": "any",
3956
+ "optional": true
3957
+ }
3958
+ ],
3959
+ "returnType": "Promise<object>",
3960
+ "isStatic": false,
3961
+ "isPublic": true
3962
+ },
3963
+ "hasPositiveTrends": {
3964
+ "name": "hasPositiveTrends",
3965
+ "async": true,
3966
+ "parameters": [],
3967
+ "returnType": "Promise<boolean>",
3968
+ "isStatic": false,
3969
+ "isPublic": true
3970
+ }
3971
+ },
3972
+ "decoratorConfig": {
3973
+ "tableStrategy": "sti",
3974
+ "api": {
3975
+ "include": [
3976
+ "list",
3977
+ "get",
3978
+ "create",
3979
+ "update",
3980
+ "run"
3981
+ ]
3982
+ },
3983
+ "mcp": {
3984
+ "include": [
3985
+ "list",
3986
+ "get",
3987
+ "run",
3988
+ "analyze"
3989
+ ]
3990
+ },
3991
+ "cli": true,
3992
+ "tenantScoped": {
3993
+ "mode": "optional"
3994
+ }
3995
+ },
3996
+ "extends": "SmrtObject",
3997
+ "exportName": "AnalyticsReport",
3998
+ "collectionExportName": "AnalyticsReportCollection",
3999
+ "schema": {
4000
+ "tableName": "analytics_reports",
4001
+ "ddl": "CREATE TABLE IF NOT EXISTS \"analytics_reports\" (\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 \"property_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"dimensions\" TEXT DEFAULT '[]',\n \"metrics\" TEXT DEFAULT '[]',\n \"date_range_start\" TEXT DEFAULT '7daysAgo',\n \"date_range_end\" TEXT DEFAULT 'today',\n \"dimension_filter\" TEXT DEFAULT '',\n \"metric_filter\" TEXT DEFAULT '',\n \"order_by\" TEXT DEFAULT '[]',\n \"max_results\" INTEGER DEFAULT 0,\n \"status\" TEXT,\n \"frequency\" TEXT,\n \"last_run_at\" TIMESTAMP,\n \"next_run_at\" TIMESTAMP,\n \"result_data\" TEXT DEFAULT '',\n \"row_count\" INTEGER DEFAULT 0,\n \"last_error\" TEXT DEFAULT ''\n);",
4002
+ "columns": {
4003
+ "id": {
4004
+ "type": "UUID",
4005
+ "primaryKey": true,
4006
+ "referenceKind": "id",
4007
+ "notNull": true
4008
+ },
4009
+ "slug": {
4010
+ "type": "TEXT",
4011
+ "notNull": true
4012
+ },
4013
+ "context": {
4014
+ "type": "TEXT",
4015
+ "notNull": true,
4016
+ "default": ""
4017
+ },
4018
+ "_meta_type": {
4019
+ "type": "TEXT",
4020
+ "notNull": true
4021
+ },
4022
+ "_meta_data": {
4023
+ "type": "JSON",
4024
+ "notNull": false
4025
+ },
4026
+ "created_at": {
4027
+ "type": "TIMESTAMP",
4028
+ "notNull": true,
4029
+ "default": "current_timestamp"
4030
+ },
4031
+ "updated_at": {
4032
+ "type": "TIMESTAMP",
4033
+ "notNull": true,
4034
+ "default": "current_timestamp"
4035
+ },
4036
+ "tenant_id": {
4037
+ "type": "UUID",
4038
+ "referenceKind": "tenantId",
4039
+ "notNull": false
4040
+ },
4041
+ "property_id": {
4042
+ "type": "UUID",
4043
+ "referenceKind": "foreignKey",
4044
+ "notNull": false
4045
+ },
4046
+ "name": {
4047
+ "type": "TEXT",
4048
+ "notNull": false,
4049
+ "default": ""
4050
+ },
4051
+ "description": {
4052
+ "type": "TEXT",
4053
+ "notNull": false,
4054
+ "default": ""
4055
+ },
4056
+ "dimensions": {
4057
+ "type": "TEXT",
4058
+ "notNull": false,
4059
+ "default": "[]"
4060
+ },
4061
+ "metrics": {
4062
+ "type": "TEXT",
4063
+ "notNull": false,
4064
+ "default": "[]"
4065
+ },
4066
+ "date_range_start": {
4067
+ "type": "TEXT",
4068
+ "notNull": false,
4069
+ "default": "7daysAgo"
4070
+ },
4071
+ "date_range_end": {
4072
+ "type": "TEXT",
4073
+ "notNull": false,
4074
+ "default": "today"
4075
+ },
4076
+ "dimension_filter": {
4077
+ "type": "TEXT",
4078
+ "notNull": false,
4079
+ "default": ""
4080
+ },
4081
+ "metric_filter": {
4082
+ "type": "TEXT",
4083
+ "notNull": false,
4084
+ "default": ""
4085
+ },
4086
+ "order_by": {
4087
+ "type": "TEXT",
4088
+ "notNull": false,
4089
+ "default": "[]"
4090
+ },
4091
+ "max_results": {
4092
+ "type": "INTEGER",
4093
+ "notNull": false,
4094
+ "default": 0
4095
+ },
4096
+ "status": {
4097
+ "type": "TEXT",
4098
+ "notNull": false
4099
+ },
4100
+ "frequency": {
4101
+ "type": "TEXT",
4102
+ "notNull": false
4103
+ },
4104
+ "last_run_at": {
4105
+ "type": "TIMESTAMP",
4106
+ "notNull": false
4107
+ },
4108
+ "next_run_at": {
4109
+ "type": "TIMESTAMP",
4110
+ "notNull": false
4111
+ },
4112
+ "result_data": {
4113
+ "type": "TEXT",
4114
+ "notNull": false,
4115
+ "default": ""
4116
+ },
4117
+ "row_count": {
4118
+ "type": "INTEGER",
4119
+ "notNull": false,
4120
+ "default": 0
4121
+ },
4122
+ "last_error": {
4123
+ "type": "TEXT",
4124
+ "notNull": false,
4125
+ "default": ""
4126
+ }
4127
+ },
4128
+ "indexes": [
4129
+ {
4130
+ "name": "analytics_reports_id_idx",
4131
+ "columns": [
4132
+ "id"
4133
+ ]
4134
+ },
4135
+ {
4136
+ "name": "analytics_reports_slug_context_meta_type_idx",
4137
+ "columns": [
4138
+ "slug",
4139
+ "context",
4140
+ "_meta_type"
4141
+ ],
4142
+ "unique": true
4143
+ },
4144
+ {
4145
+ "name": "analytics_reports_meta_type_idx",
4146
+ "columns": [
4147
+ "_meta_type"
4148
+ ]
4149
+ }
4150
+ ],
4151
+ "version": "cecde8c6"
4152
+ }
4153
+ }
4154
+ },
4155
+ "moduleType": "smrt",
4156
+ "smrtDependencies": [
4157
+ "@happyvertical/smrt-core",
4158
+ "@happyvertical/smrt-prompts",
4159
+ "@happyvertical/smrt-tenancy"
4160
+ ]
4161
+ }