@happyvertical/smrt-assets 0.30.0

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