@happyvertical/smrt-images 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 (75) hide show
  1. package/AGENTS.md +48 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +7 -0
  4. package/README.md +92 -0
  5. package/dist/__smrt-register__.d.ts +2 -0
  6. package/dist/__smrt-register__.d.ts.map +1 -0
  7. package/dist/categorizer.d.ts +26 -0
  8. package/dist/categorizer.d.ts.map +1 -0
  9. package/dist/deriver.d.ts +33 -0
  10. package/dist/deriver.d.ts.map +1 -0
  11. package/dist/editor.d.ts +72 -0
  12. package/dist/editor.d.ts.map +1 -0
  13. package/dist/image.d.ts +53 -0
  14. package/dist/image.d.ts.map +1 -0
  15. package/dist/images.d.ts +80 -0
  16. package/dist/images.d.ts.map +1 -0
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +839 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/manifest.json +1179 -0
  22. package/dist/media-bundle-persistence.d.ts +15 -0
  23. package/dist/media-bundle-persistence.d.ts.map +1 -0
  24. package/dist/metadata.d.ts +19 -0
  25. package/dist/metadata.d.ts.map +1 -0
  26. package/dist/playground.d.ts +2 -0
  27. package/dist/playground.d.ts.map +1 -0
  28. package/dist/playground.js +140 -0
  29. package/dist/playground.js.map +1 -0
  30. package/dist/prompts.d.ts +8 -0
  31. package/dist/prompts.d.ts.map +1 -0
  32. package/dist/search.d.ts +42 -0
  33. package/dist/search.d.ts.map +1 -0
  34. package/dist/smrt-knowledge.json +561 -0
  35. package/dist/svelte/components/AssetsGallery.svelte +436 -0
  36. package/dist/svelte/components/AssetsGallery.svelte.d.ts +11 -0
  37. package/dist/svelte/components/AssetsGallery.svelte.d.ts.map +1 -0
  38. package/dist/svelte/components/ImageEditor.svelte +485 -0
  39. package/dist/svelte/components/ImageEditor.svelte.d.ts +12 -0
  40. package/dist/svelte/components/ImageEditor.svelte.d.ts.map +1 -0
  41. package/dist/svelte/components/ImageUploader.svelte +922 -0
  42. package/dist/svelte/components/ImageUploader.svelte.d.ts +15 -0
  43. package/dist/svelte/components/ImageUploader.svelte.d.ts.map +1 -0
  44. package/dist/svelte/i18n.d.ts +42 -0
  45. package/dist/svelte/i18n.d.ts.map +1 -0
  46. package/dist/svelte/i18n.js +46 -0
  47. package/dist/svelte/image-clients.d.ts +45 -0
  48. package/dist/svelte/image-clients.d.ts.map +1 -0
  49. package/dist/svelte/image-clients.js +1 -0
  50. package/dist/svelte/index.d.ts +14 -0
  51. package/dist/svelte/index.d.ts.map +1 -0
  52. package/dist/svelte/index.js +21 -0
  53. package/dist/svelte/playground.d.ts +74 -0
  54. package/dist/svelte/playground.d.ts.map +1 -0
  55. package/dist/svelte/playground.js +105 -0
  56. package/dist/svelte/routes/ImageStudioRoute.svelte +194 -0
  57. package/dist/svelte/routes/ImageStudioRoute.svelte.d.ts +7 -0
  58. package/dist/svelte/routes/ImageStudioRoute.svelte.d.ts.map +1 -0
  59. package/dist/svelte/routes/index.d.ts +2 -0
  60. package/dist/svelte/routes/index.d.ts.map +1 -0
  61. package/dist/svelte/routes/index.js +1 -0
  62. package/dist/svelte/routes/shared.d.ts +25 -0
  63. package/dist/svelte/routes/shared.d.ts.map +1 -0
  64. package/dist/svelte/routes/shared.js +31 -0
  65. package/dist/types.d.ts +51 -0
  66. package/dist/types.d.ts.map +1 -0
  67. package/dist/types.js +2 -0
  68. package/dist/types.js.map +1 -0
  69. package/dist/ui.d.ts +10 -0
  70. package/dist/ui.d.ts.map +1 -0
  71. package/dist/ui.js +42 -0
  72. package/dist/ui.js.map +1 -0
  73. package/dist/upstream.d.ts +65 -0
  74. package/dist/upstream.d.ts.map +1 -0
  75. package/package.json +95 -0
@@ -0,0 +1,1179 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 1782177100500,
4
+ "packageName": "@happyvertical/smrt-images",
5
+ "packageVersion": "0.30.0",
6
+ "objects": {
7
+ "@happyvertical/smrt-images:Image": {
8
+ "name": "image",
9
+ "className": "Image",
10
+ "qualifiedName": "@happyvertical/smrt-images:Image",
11
+ "collection": "assets",
12
+ "filePath": "/home/runner/_work/smrt/smrt/packages/images/src/image.ts",
13
+ "packageName": "@happyvertical/smrt-images",
14
+ "fields": {
15
+ "created_at": {
16
+ "type": "datetime",
17
+ "required": false
18
+ },
19
+ "updated_at": {
20
+ "type": "datetime",
21
+ "required": false
22
+ },
23
+ "tenantId": {
24
+ "type": "text",
25
+ "required": false,
26
+ "_meta": {
27
+ "sqlType": "UUID",
28
+ "nullable": true,
29
+ "__tenancy": {
30
+ "isTenantIdField": true,
31
+ "autoFilter": true,
32
+ "required": false,
33
+ "autoPopulate": true,
34
+ "nullable": true,
35
+ "mode": "optional",
36
+ "field": "tenantId",
37
+ "allowSuperAdminBypass": false
38
+ }
39
+ }
40
+ },
41
+ "name": {
42
+ "type": "text",
43
+ "required": false
44
+ },
45
+ "sourceUri": {
46
+ "type": "text",
47
+ "required": false
48
+ },
49
+ "mimeType": {
50
+ "type": "text",
51
+ "required": false
52
+ },
53
+ "description": {
54
+ "type": "text",
55
+ "required": false
56
+ },
57
+ "metadata": {
58
+ "type": "text",
59
+ "required": false
60
+ },
61
+ "version": {
62
+ "type": "integer",
63
+ "required": true,
64
+ "default": 1
65
+ },
66
+ "primaryVersionId": {
67
+ "type": "foreignKey",
68
+ "required": false,
69
+ "related": "Asset"
70
+ },
71
+ "typeSlug": {
72
+ "type": "text",
73
+ "required": false
74
+ },
75
+ "statusSlug": {
76
+ "type": "text",
77
+ "required": false
78
+ },
79
+ "ownerProfileId": {
80
+ "type": "crossPackageRef",
81
+ "required": false,
82
+ "related": "@happyvertical/smrt-profiles:Profile"
83
+ },
84
+ "sourceAssetId": {
85
+ "type": "foreignKey",
86
+ "required": false,
87
+ "related": "Asset"
88
+ },
89
+ "folderId": {
90
+ "type": "foreignKey",
91
+ "required": false,
92
+ "related": "Folder"
93
+ },
94
+ "sourceType": {
95
+ "type": "text",
96
+ "required": false
97
+ },
98
+ "externalId": {
99
+ "type": "text",
100
+ "required": false
101
+ },
102
+ "externalRefs": {
103
+ "type": "text",
104
+ "required": false
105
+ },
106
+ "createdAt": {
107
+ "type": "text",
108
+ "required": false
109
+ },
110
+ "updatedAt": {
111
+ "type": "text",
112
+ "required": false
113
+ },
114
+ "width": {
115
+ "type": "integer",
116
+ "required": false,
117
+ "default": 0
118
+ },
119
+ "height": {
120
+ "type": "integer",
121
+ "required": false,
122
+ "default": 0
123
+ },
124
+ "alt": {
125
+ "type": "text",
126
+ "required": false,
127
+ "default": ""
128
+ }
129
+ },
130
+ "methods": {
131
+ "getAiUsageSnapshot": {
132
+ "name": "getAiUsageSnapshot",
133
+ "async": false,
134
+ "parameters": [],
135
+ "returnType": "AiUsageSnapshot | undefined",
136
+ "isStatic": false,
137
+ "isPublic": true
138
+ },
139
+ "resetAiUsage": {
140
+ "name": "resetAiUsage",
141
+ "async": false,
142
+ "parameters": [],
143
+ "returnType": "void",
144
+ "isStatic": false,
145
+ "isPublic": true
146
+ },
147
+ "listAiUsage": {
148
+ "name": "listAiUsage",
149
+ "async": true,
150
+ "parameters": [
151
+ {
152
+ "name": "options",
153
+ "type": "AiUsageListOptions",
154
+ "optional": true
155
+ }
156
+ ],
157
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
158
+ "isStatic": false,
159
+ "isPublic": true
160
+ },
161
+ "summarizeAiUsage": {
162
+ "name": "summarizeAiUsage",
163
+ "async": true,
164
+ "parameters": [
165
+ {
166
+ "name": "options",
167
+ "type": "AiUsageSummaryOptions",
168
+ "optional": true
169
+ }
170
+ ],
171
+ "returnType": "Promise<Record<string, AiUsageStats>>",
172
+ "isStatic": false,
173
+ "isPublic": true
174
+ },
175
+ "destroy": {
176
+ "name": "destroy",
177
+ "async": false,
178
+ "parameters": [],
179
+ "returnType": "void",
180
+ "isStatic": false,
181
+ "isPublic": true
182
+ },
183
+ "markAsPersisted": {
184
+ "name": "markAsPersisted",
185
+ "async": false,
186
+ "parameters": [],
187
+ "returnType": "void",
188
+ "isStatic": false,
189
+ "isPublic": true
190
+ },
191
+ "initialize": {
192
+ "name": "initialize",
193
+ "async": true,
194
+ "parameters": [],
195
+ "returnType": "Promise",
196
+ "isStatic": false,
197
+ "isPublic": true
198
+ },
199
+ "loadDataFromDb": {
200
+ "name": "loadDataFromDb",
201
+ "async": true,
202
+ "parameters": [
203
+ {
204
+ "name": "data",
205
+ "type": "any",
206
+ "optional": false
207
+ }
208
+ ],
209
+ "returnType": "any",
210
+ "isStatic": false,
211
+ "isPublic": true
212
+ },
213
+ "getFields": {
214
+ "name": "getFields",
215
+ "async": true,
216
+ "parameters": [],
217
+ "returnType": "any",
218
+ "isStatic": false,
219
+ "isPublic": true
220
+ },
221
+ "toJSON": {
222
+ "name": "toJSON",
223
+ "async": false,
224
+ "parameters": [],
225
+ "returnType": "any",
226
+ "isStatic": false,
227
+ "isPublic": true
228
+ },
229
+ "toPlainObject": {
230
+ "name": "toPlainObject",
231
+ "async": false,
232
+ "parameters": [],
233
+ "returnType": "Record<string>",
234
+ "isStatic": false,
235
+ "isPublic": true
236
+ },
237
+ "toPublicJSON": {
238
+ "name": "toPublicJSON",
239
+ "async": false,
240
+ "parameters": [],
241
+ "returnType": "Record<string>",
242
+ "isStatic": false,
243
+ "isPublic": true
244
+ },
245
+ "getId": {
246
+ "name": "getId",
247
+ "async": true,
248
+ "parameters": [],
249
+ "returnType": "any",
250
+ "isStatic": false,
251
+ "isPublic": true
252
+ },
253
+ "getSlug": {
254
+ "name": "getSlug",
255
+ "async": true,
256
+ "parameters": [],
257
+ "returnType": "any",
258
+ "isStatic": false,
259
+ "isPublic": true
260
+ },
261
+ "getSavedId": {
262
+ "name": "getSavedId",
263
+ "async": true,
264
+ "parameters": [],
265
+ "returnType": "any",
266
+ "isStatic": false,
267
+ "isPublic": true
268
+ },
269
+ "isSaved": {
270
+ "name": "isSaved",
271
+ "async": true,
272
+ "parameters": [],
273
+ "returnType": "any",
274
+ "isStatic": false,
275
+ "isPublic": true
276
+ },
277
+ "save": {
278
+ "name": "save",
279
+ "async": true,
280
+ "parameters": [],
281
+ "returnType": "any",
282
+ "isStatic": false,
283
+ "isPublic": true
284
+ },
285
+ "classifyConstraintError": {
286
+ "name": "classifyConstraintError",
287
+ "async": false,
288
+ "parameters": [
289
+ {
290
+ "name": "message",
291
+ "type": "string",
292
+ "optional": false
293
+ }
294
+ ],
295
+ "returnType": "'unique' | 'not_null' | null",
296
+ "isStatic": true,
297
+ "isPublic": true
298
+ },
299
+ "loadFromId": {
300
+ "name": "loadFromId",
301
+ "async": true,
302
+ "parameters": [],
303
+ "returnType": "any",
304
+ "isStatic": false,
305
+ "isPublic": true
306
+ },
307
+ "loadFromSlug": {
308
+ "name": "loadFromSlug",
309
+ "async": true,
310
+ "parameters": [],
311
+ "returnType": "any",
312
+ "isStatic": false,
313
+ "isPublic": true
314
+ },
315
+ "is": {
316
+ "name": "is",
317
+ "async": true,
318
+ "parameters": [
319
+ {
320
+ "name": "criteria",
321
+ "type": "string",
322
+ "optional": false
323
+ },
324
+ {
325
+ "name": "options",
326
+ "type": "any",
327
+ "optional": true
328
+ }
329
+ ],
330
+ "returnType": "any",
331
+ "isStatic": false,
332
+ "isPublic": true
333
+ },
334
+ "do": {
335
+ "name": "do",
336
+ "async": true,
337
+ "parameters": [
338
+ {
339
+ "name": "instructions",
340
+ "type": "string",
341
+ "optional": false
342
+ },
343
+ {
344
+ "name": "options",
345
+ "type": "any",
346
+ "optional": true
347
+ }
348
+ ],
349
+ "returnType": "any",
350
+ "isStatic": false,
351
+ "isPublic": true
352
+ },
353
+ "describe": {
354
+ "name": "describe",
355
+ "async": true,
356
+ "parameters": [
357
+ {
358
+ "name": "options",
359
+ "type": "any",
360
+ "optional": true
361
+ }
362
+ ],
363
+ "returnType": "any",
364
+ "isStatic": false,
365
+ "isPublic": true
366
+ },
367
+ "delete": {
368
+ "name": "delete",
369
+ "async": true,
370
+ "parameters": [],
371
+ "returnType": "Promise<void>",
372
+ "isStatic": false,
373
+ "isPublic": true
374
+ },
375
+ "isRelatedLoaded": {
376
+ "name": "isRelatedLoaded",
377
+ "async": false,
378
+ "parameters": [
379
+ {
380
+ "name": "fieldName",
381
+ "type": "string",
382
+ "optional": false
383
+ }
384
+ ],
385
+ "returnType": "boolean",
386
+ "isStatic": false,
387
+ "isPublic": true
388
+ },
389
+ "loadRelated": {
390
+ "name": "loadRelated",
391
+ "async": true,
392
+ "parameters": [
393
+ {
394
+ "name": "fieldName",
395
+ "type": "string",
396
+ "optional": false
397
+ },
398
+ {
399
+ "name": "opts",
400
+ "type": "LoadRelatedOptions",
401
+ "optional": true
402
+ }
403
+ ],
404
+ "returnType": "Promise<any>",
405
+ "isStatic": false,
406
+ "isPublic": true
407
+ },
408
+ "loadRelatedMany": {
409
+ "name": "loadRelatedMany",
410
+ "async": true,
411
+ "parameters": [
412
+ {
413
+ "name": "fieldName",
414
+ "type": "string",
415
+ "optional": false
416
+ },
417
+ {
418
+ "name": "opts",
419
+ "type": "LoadRelatedOptions",
420
+ "optional": true
421
+ }
422
+ ],
423
+ "returnType": "Promise<any[]>",
424
+ "isStatic": false,
425
+ "isPublic": true
426
+ },
427
+ "getRelated": {
428
+ "name": "getRelated",
429
+ "async": true,
430
+ "parameters": [
431
+ {
432
+ "name": "fieldName",
433
+ "type": "string",
434
+ "optional": false
435
+ },
436
+ {
437
+ "name": "opts",
438
+ "type": "LoadRelatedOptions",
439
+ "optional": true
440
+ }
441
+ ],
442
+ "returnType": "Promise<any>",
443
+ "isStatic": false,
444
+ "isPublic": true
445
+ },
446
+ "getAvailableTools": {
447
+ "name": "getAvailableTools",
448
+ "async": false,
449
+ "parameters": [],
450
+ "returnType": "AITool[]",
451
+ "isStatic": false,
452
+ "isPublic": true
453
+ },
454
+ "executeToolCall": {
455
+ "name": "executeToolCall",
456
+ "async": true,
457
+ "parameters": [
458
+ {
459
+ "name": "toolCall",
460
+ "type": "ToolCall",
461
+ "optional": false
462
+ }
463
+ ],
464
+ "returnType": "Promise<ToolCallResult>",
465
+ "isStatic": false,
466
+ "isPublic": true
467
+ },
468
+ "remember": {
469
+ "name": "remember",
470
+ "async": true,
471
+ "parameters": [
472
+ {
473
+ "name": "options",
474
+ "type": "object",
475
+ "optional": false
476
+ }
477
+ ],
478
+ "returnType": "Promise<void>",
479
+ "isStatic": false,
480
+ "isPublic": true
481
+ },
482
+ "recall": {
483
+ "name": "recall",
484
+ "async": true,
485
+ "parameters": [
486
+ {
487
+ "name": "options",
488
+ "type": "object",
489
+ "optional": false
490
+ }
491
+ ],
492
+ "returnType": "Promise<any | null>",
493
+ "isStatic": false,
494
+ "isPublic": true
495
+ },
496
+ "recallAll": {
497
+ "name": "recallAll",
498
+ "async": true,
499
+ "parameters": [
500
+ {
501
+ "name": "options",
502
+ "type": "object",
503
+ "optional": true
504
+ }
505
+ ],
506
+ "returnType": "Promise<Map<string, any>>",
507
+ "isStatic": false,
508
+ "isPublic": true
509
+ },
510
+ "forget": {
511
+ "name": "forget",
512
+ "async": true,
513
+ "parameters": [
514
+ {
515
+ "name": "options",
516
+ "type": "object",
517
+ "optional": false
518
+ }
519
+ ],
520
+ "returnType": "Promise<void>",
521
+ "isStatic": false,
522
+ "isPublic": true
523
+ },
524
+ "forgetScope": {
525
+ "name": "forgetScope",
526
+ "async": true,
527
+ "parameters": [
528
+ {
529
+ "name": "options",
530
+ "type": "object",
531
+ "optional": false
532
+ }
533
+ ],
534
+ "returnType": "Promise<number>",
535
+ "isStatic": false,
536
+ "isPublic": true
537
+ },
538
+ "generateEmbeddings": {
539
+ "name": "generateEmbeddings",
540
+ "async": true,
541
+ "parameters": [
542
+ {
543
+ "name": "options",
544
+ "type": "GenerateEmbeddingsOptions",
545
+ "optional": true
546
+ }
547
+ ],
548
+ "returnType": "Promise<void>",
549
+ "isStatic": false,
550
+ "isPublic": true
551
+ },
552
+ "getEmbedding": {
553
+ "name": "getEmbedding",
554
+ "async": true,
555
+ "parameters": [
556
+ {
557
+ "name": "fieldName",
558
+ "type": "string",
559
+ "optional": false
560
+ },
561
+ {
562
+ "name": "model",
563
+ "type": "string",
564
+ "optional": true
565
+ }
566
+ ],
567
+ "returnType": "Promise<number[] | null>",
568
+ "isStatic": false,
569
+ "isPublic": true
570
+ },
571
+ "hasStaleEmbeddings": {
572
+ "name": "hasStaleEmbeddings",
573
+ "async": true,
574
+ "parameters": [],
575
+ "returnType": "Promise<boolean>",
576
+ "isStatic": false,
577
+ "isPublic": true
578
+ },
579
+ "clearEmbeddings": {
580
+ "name": "clearEmbeddings",
581
+ "async": true,
582
+ "parameters": [],
583
+ "returnType": "Promise<void>",
584
+ "isStatic": false,
585
+ "isPublic": true
586
+ },
587
+ "getMetadata": {
588
+ "name": "getMetadata",
589
+ "async": false,
590
+ "parameters": [],
591
+ "returnType": "Record<string>",
592
+ "isStatic": false,
593
+ "isPublic": true
594
+ },
595
+ "setMetadata": {
596
+ "name": "setMetadata",
597
+ "async": false,
598
+ "parameters": [
599
+ {
600
+ "name": "metadata",
601
+ "type": "Record<string>",
602
+ "optional": false
603
+ }
604
+ ],
605
+ "returnType": "void",
606
+ "isStatic": false,
607
+ "isPublic": true
608
+ },
609
+ "mergeMetadata": {
610
+ "name": "mergeMetadata",
611
+ "async": false,
612
+ "parameters": [
613
+ {
614
+ "name": "metadata",
615
+ "type": "Record<string>",
616
+ "optional": false
617
+ }
618
+ ],
619
+ "returnType": "void",
620
+ "isStatic": false,
621
+ "isPublic": true
622
+ },
623
+ "getExternalRefs": {
624
+ "name": "getExternalRefs",
625
+ "async": false,
626
+ "parameters": [],
627
+ "returnType": "Record<string, AssetExternalReference>",
628
+ "isStatic": false,
629
+ "isPublic": true
630
+ },
631
+ "getExternalRef": {
632
+ "name": "getExternalRef",
633
+ "async": false,
634
+ "parameters": [
635
+ {
636
+ "name": "provider",
637
+ "type": "string",
638
+ "optional": false
639
+ }
640
+ ],
641
+ "returnType": "AssetExternalReference | null",
642
+ "isStatic": false,
643
+ "isPublic": true
644
+ },
645
+ "setExternalRef": {
646
+ "name": "setExternalRef",
647
+ "async": false,
648
+ "parameters": [
649
+ {
650
+ "name": "provider",
651
+ "type": "string",
652
+ "optional": false
653
+ },
654
+ {
655
+ "name": "reference",
656
+ "type": "any",
657
+ "optional": false
658
+ }
659
+ ],
660
+ "returnType": "void",
661
+ "isStatic": false,
662
+ "isPublic": true
663
+ },
664
+ "getTags": {
665
+ "name": "getTags",
666
+ "async": true,
667
+ "parameters": [],
668
+ "returnType": "Promise<Tag[]>",
669
+ "isStatic": false,
670
+ "isPublic": true
671
+ },
672
+ "hasTag": {
673
+ "name": "hasTag",
674
+ "async": true,
675
+ "parameters": [
676
+ {
677
+ "name": "tagSlug",
678
+ "type": "string",
679
+ "optional": false
680
+ }
681
+ ],
682
+ "returnType": "Promise<boolean>",
683
+ "isStatic": false,
684
+ "isPublic": true
685
+ },
686
+ "getSource": {
687
+ "name": "getSource",
688
+ "async": true,
689
+ "parameters": [],
690
+ "returnType": "Promise<Asset | null>",
691
+ "isStatic": false,
692
+ "isPublic": true
693
+ },
694
+ "getDerivatives": {
695
+ "name": "getDerivatives",
696
+ "async": true,
697
+ "parameters": [],
698
+ "returnType": "Promise<Asset[]>",
699
+ "isStatic": false,
700
+ "isPublic": true
701
+ },
702
+ "getType": {
703
+ "name": "getType",
704
+ "async": true,
705
+ "parameters": [],
706
+ "returnType": "Promise<AssetType | null>",
707
+ "isStatic": false,
708
+ "isPublic": true
709
+ },
710
+ "getStatus": {
711
+ "name": "getStatus",
712
+ "async": true,
713
+ "parameters": [],
714
+ "returnType": "Promise<AssetStatus | null>",
715
+ "isStatic": false,
716
+ "isPublic": true
717
+ },
718
+ "getAssociations": {
719
+ "name": "getAssociations",
720
+ "async": true,
721
+ "parameters": [],
722
+ "returnType": "Promise<AssetAssociation[]>",
723
+ "isStatic": false,
724
+ "isPublic": true
725
+ },
726
+ "associateWith": {
727
+ "name": "associateWith",
728
+ "async": true,
729
+ "parameters": [
730
+ {
731
+ "name": "metaType",
732
+ "type": "string",
733
+ "optional": false
734
+ },
735
+ {
736
+ "name": "metaId",
737
+ "type": "string",
738
+ "optional": false
739
+ },
740
+ {
741
+ "name": "role",
742
+ "type": "any",
743
+ "optional": true,
744
+ "default": "default"
745
+ }
746
+ ],
747
+ "returnType": "Promise<AssetAssociation>",
748
+ "isStatic": false,
749
+ "isPublic": true
750
+ },
751
+ "getBySlug": {
752
+ "name": "getBySlug",
753
+ "async": true,
754
+ "parameters": [
755
+ {
756
+ "name": "_slug",
757
+ "type": "string",
758
+ "optional": false
759
+ }
760
+ ],
761
+ "returnType": "Promise<Asset | null>",
762
+ "isStatic": true,
763
+ "isPublic": true
764
+ },
765
+ "isValidImageFormat": {
766
+ "name": "isValidImageFormat",
767
+ "async": false,
768
+ "parameters": [],
769
+ "returnType": "boolean",
770
+ "isStatic": false,
771
+ "isPublic": true
772
+ },
773
+ "isHighResolution": {
774
+ "name": "isHighResolution",
775
+ "async": false,
776
+ "parameters": [],
777
+ "returnType": "boolean",
778
+ "isStatic": false,
779
+ "isPublic": true
780
+ },
781
+ "generateAltText": {
782
+ "name": "generateAltText",
783
+ "async": true,
784
+ "parameters": [],
785
+ "returnType": "Promise<string>",
786
+ "isStatic": false,
787
+ "isPublic": true
788
+ }
789
+ },
790
+ "decoratorConfig": {
791
+ "api": {
792
+ "include": [
793
+ "list",
794
+ "get",
795
+ "create",
796
+ "update",
797
+ "delete"
798
+ ]
799
+ },
800
+ "mcp": {
801
+ "include": [
802
+ "list",
803
+ "get",
804
+ "create",
805
+ "update",
806
+ "generateAltText"
807
+ ]
808
+ },
809
+ "cli": true,
810
+ "tableName": "assets",
811
+ "tableStrategy": "sti"
812
+ },
813
+ "extends": "Asset",
814
+ "exportName": "Image",
815
+ "collectionExportName": "ImageCollection",
816
+ "validationRules": [
817
+ {
818
+ "field": "version",
819
+ "rule": "required",
820
+ "fieldType": "integer"
821
+ }
822
+ ],
823
+ "schema": {
824
+ "tableName": "assets",
825
+ "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 \"width\" INTEGER DEFAULT 0,\n \"height\" INTEGER DEFAULT 0,\n \"alt\" TEXT DEFAULT ''\n);",
826
+ "columns": {
827
+ "id": {
828
+ "type": "UUID",
829
+ "primaryKey": true,
830
+ "referenceKind": "id",
831
+ "notNull": true
832
+ },
833
+ "slug": {
834
+ "type": "TEXT",
835
+ "notNull": true
836
+ },
837
+ "context": {
838
+ "type": "TEXT",
839
+ "notNull": true,
840
+ "default": ""
841
+ },
842
+ "_meta_type": {
843
+ "type": "TEXT",
844
+ "notNull": true
845
+ },
846
+ "_meta_data": {
847
+ "type": "JSON",
848
+ "notNull": false
849
+ },
850
+ "created_at": {
851
+ "type": "TIMESTAMP",
852
+ "notNull": true,
853
+ "default": "current_timestamp"
854
+ },
855
+ "updated_at": {
856
+ "type": "TIMESTAMP",
857
+ "notNull": true,
858
+ "default": "current_timestamp"
859
+ },
860
+ "tenant_id": {
861
+ "type": "UUID",
862
+ "referenceKind": "tenantId",
863
+ "notNull": false
864
+ },
865
+ "name": {
866
+ "type": "TEXT",
867
+ "notNull": false
868
+ },
869
+ "source_uri": {
870
+ "type": "TEXT",
871
+ "notNull": false
872
+ },
873
+ "mime_type": {
874
+ "type": "TEXT",
875
+ "notNull": false
876
+ },
877
+ "description": {
878
+ "type": "TEXT",
879
+ "notNull": false
880
+ },
881
+ "metadata": {
882
+ "type": "TEXT",
883
+ "notNull": false
884
+ },
885
+ "version": {
886
+ "type": "INTEGER",
887
+ "notNull": false,
888
+ "default": 1
889
+ },
890
+ "primary_version_id": {
891
+ "type": "UUID",
892
+ "referenceKind": "foreignKey",
893
+ "notNull": false
894
+ },
895
+ "type_slug": {
896
+ "type": "TEXT",
897
+ "notNull": false
898
+ },
899
+ "status_slug": {
900
+ "type": "TEXT",
901
+ "notNull": false
902
+ },
903
+ "owner_profile_id": {
904
+ "type": "UUID",
905
+ "referenceKind": "crossPackageRef",
906
+ "notNull": false
907
+ },
908
+ "source_asset_id": {
909
+ "type": "UUID",
910
+ "referenceKind": "foreignKey",
911
+ "notNull": false
912
+ },
913
+ "folder_id": {
914
+ "type": "UUID",
915
+ "referenceKind": "foreignKey",
916
+ "notNull": false
917
+ },
918
+ "source_type": {
919
+ "type": "TEXT",
920
+ "notNull": false
921
+ },
922
+ "external_id": {
923
+ "type": "TEXT",
924
+ "notNull": false
925
+ },
926
+ "external_refs": {
927
+ "type": "TEXT",
928
+ "notNull": false
929
+ },
930
+ "width": {
931
+ "type": "INTEGER",
932
+ "notNull": false,
933
+ "default": 0
934
+ },
935
+ "height": {
936
+ "type": "INTEGER",
937
+ "notNull": false,
938
+ "default": 0
939
+ },
940
+ "alt": {
941
+ "type": "TEXT",
942
+ "notNull": false,
943
+ "default": ""
944
+ }
945
+ },
946
+ "indexes": [
947
+ {
948
+ "name": "assets_id_idx",
949
+ "columns": [
950
+ "id"
951
+ ]
952
+ },
953
+ {
954
+ "name": "assets_slug_context_meta_type_idx",
955
+ "columns": [
956
+ "slug",
957
+ "context",
958
+ "_meta_type"
959
+ ],
960
+ "unique": true
961
+ },
962
+ {
963
+ "name": "assets_meta_type_idx",
964
+ "columns": [
965
+ "_meta_type"
966
+ ]
967
+ }
968
+ ],
969
+ "version": "09d1bef9"
970
+ }
971
+ },
972
+ "@happyvertical/smrt-images:ImageCollection": {
973
+ "name": "imagecollection",
974
+ "className": "ImageCollection",
975
+ "qualifiedName": "@happyvertical/smrt-images:ImageCollection",
976
+ "collection": "assets",
977
+ "filePath": "/home/runner/_work/smrt/smrt/packages/images/src/images.ts",
978
+ "packageName": "@happyvertical/smrt-images",
979
+ "fields": {},
980
+ "methods": {
981
+ "findByTenant": {
982
+ "name": "findByTenant",
983
+ "async": true,
984
+ "parameters": [
985
+ {
986
+ "name": "tenantId",
987
+ "type": "string",
988
+ "optional": false
989
+ }
990
+ ],
991
+ "returnType": "Promise<Image[]>",
992
+ "isStatic": false,
993
+ "isPublic": true
994
+ },
995
+ "findGlobal": {
996
+ "name": "findGlobal",
997
+ "async": true,
998
+ "parameters": [],
999
+ "returnType": "Promise<Image[]>",
1000
+ "isStatic": false,
1001
+ "isPublic": true
1002
+ },
1003
+ "findWithGlobals": {
1004
+ "name": "findWithGlobals",
1005
+ "async": true,
1006
+ "parameters": [
1007
+ {
1008
+ "name": "tenantId",
1009
+ "type": "string",
1010
+ "optional": false
1011
+ }
1012
+ ],
1013
+ "returnType": "Promise<Image[]>",
1014
+ "isStatic": false,
1015
+ "isPublic": true
1016
+ },
1017
+ "getByMinDimensions": {
1018
+ "name": "getByMinDimensions",
1019
+ "async": true,
1020
+ "parameters": [
1021
+ {
1022
+ "name": "minWidth",
1023
+ "type": "number",
1024
+ "optional": false
1025
+ },
1026
+ {
1027
+ "name": "minHeight",
1028
+ "type": "number",
1029
+ "optional": false
1030
+ }
1031
+ ],
1032
+ "returnType": "Promise<Image[]>",
1033
+ "isStatic": false,
1034
+ "isPublic": true
1035
+ },
1036
+ "getByMaxDimensions": {
1037
+ "name": "getByMaxDimensions",
1038
+ "async": true,
1039
+ "parameters": [
1040
+ {
1041
+ "name": "maxWidth",
1042
+ "type": "number",
1043
+ "optional": false
1044
+ },
1045
+ {
1046
+ "name": "maxHeight",
1047
+ "type": "number",
1048
+ "optional": false
1049
+ }
1050
+ ],
1051
+ "returnType": "Promise<Image[]>",
1052
+ "isStatic": false,
1053
+ "isPublic": true
1054
+ },
1055
+ "getLandscape": {
1056
+ "name": "getLandscape",
1057
+ "async": true,
1058
+ "parameters": [],
1059
+ "returnType": "Promise<Image[]>",
1060
+ "isStatic": false,
1061
+ "isPublic": true
1062
+ },
1063
+ "getPortrait": {
1064
+ "name": "getPortrait",
1065
+ "async": true,
1066
+ "parameters": [],
1067
+ "returnType": "Promise<Image[]>",
1068
+ "isStatic": false,
1069
+ "isPublic": true
1070
+ },
1071
+ "getSquare": {
1072
+ "name": "getSquare",
1073
+ "async": true,
1074
+ "parameters": [],
1075
+ "returnType": "Promise<Image[]>",
1076
+ "isStatic": false,
1077
+ "isPublic": true
1078
+ },
1079
+ "getMissingAltText": {
1080
+ "name": "getMissingAltText",
1081
+ "async": true,
1082
+ "parameters": [],
1083
+ "returnType": "Promise<Image[]>",
1084
+ "isStatic": false,
1085
+ "isPublic": true
1086
+ },
1087
+ "getHighResolution": {
1088
+ "name": "getHighResolution",
1089
+ "async": true,
1090
+ "parameters": [],
1091
+ "returnType": "Promise<Image[]>",
1092
+ "isStatic": false,
1093
+ "isPublic": true
1094
+ },
1095
+ "getByAspectRatio": {
1096
+ "name": "getByAspectRatio",
1097
+ "async": true,
1098
+ "parameters": [
1099
+ {
1100
+ "name": "minRatio",
1101
+ "type": "number",
1102
+ "optional": false
1103
+ },
1104
+ {
1105
+ "name": "maxRatio",
1106
+ "type": "number",
1107
+ "optional": false
1108
+ }
1109
+ ],
1110
+ "returnType": "Promise<Image[]>",
1111
+ "isStatic": false,
1112
+ "isPublic": true
1113
+ }
1114
+ },
1115
+ "decoratorConfig": {
1116
+ "tableName": "assets"
1117
+ },
1118
+ "extends": "SmrtCollection",
1119
+ "extendsTypeArg": "Image",
1120
+ "exportName": "ImageCollection",
1121
+ "collectionExportName": "ImageCollectionCollection",
1122
+ "schema": {
1123
+ "tableName": "assets",
1124
+ "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 \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
1125
+ "columns": {
1126
+ "id": {
1127
+ "type": "UUID",
1128
+ "primaryKey": true,
1129
+ "referenceKind": "id",
1130
+ "notNull": true
1131
+ },
1132
+ "slug": {
1133
+ "type": "TEXT",
1134
+ "notNull": true
1135
+ },
1136
+ "context": {
1137
+ "type": "TEXT",
1138
+ "notNull": true,
1139
+ "default": ""
1140
+ },
1141
+ "created_at": {
1142
+ "type": "TIMESTAMP",
1143
+ "notNull": true,
1144
+ "default": "current_timestamp"
1145
+ },
1146
+ "updated_at": {
1147
+ "type": "TIMESTAMP",
1148
+ "notNull": true,
1149
+ "default": "current_timestamp"
1150
+ }
1151
+ },
1152
+ "indexes": [
1153
+ {
1154
+ "name": "assets_id_idx",
1155
+ "columns": [
1156
+ "id"
1157
+ ]
1158
+ },
1159
+ {
1160
+ "name": "assets_slug_context_idx",
1161
+ "columns": [
1162
+ "slug",
1163
+ "context"
1164
+ ],
1165
+ "unique": true
1166
+ }
1167
+ ],
1168
+ "version": "90ab8d34"
1169
+ }
1170
+ }
1171
+ },
1172
+ "moduleType": "smrt",
1173
+ "smrtDependencies": [
1174
+ "@happyvertical/smrt-assets",
1175
+ "@happyvertical/smrt-core",
1176
+ "@happyvertical/smrt-prompts",
1177
+ "@happyvertical/smrt-tenancy"
1178
+ ]
1179
+ }