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