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