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