@happyvertical/smrt-tags 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.
@@ -0,0 +1,1976 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 1782177077435,
4
+ "packageName": "@happyvertical/smrt-tags",
5
+ "packageVersion": "0.30.0",
6
+ "objects": {
7
+ "@happyvertical/smrt-tags:TagAlias": {
8
+ "name": "tagalias",
9
+ "className": "TagAlias",
10
+ "qualifiedName": "@happyvertical/smrt-tags:TagAlias",
11
+ "collection": "tagaliases",
12
+ "filePath": "/home/runner/_work/smrt/smrt/packages/tags/src/tag-alias.ts",
13
+ "packageName": "@happyvertical/smrt-tags",
14
+ "fields": {
15
+ "created_at": {
16
+ "type": "datetime",
17
+ "required": false
18
+ },
19
+ "updated_at": {
20
+ "type": "datetime",
21
+ "required": false
22
+ },
23
+ "tagSlug": {
24
+ "type": "text",
25
+ "required": false,
26
+ "default": ""
27
+ },
28
+ "alias": {
29
+ "type": "text",
30
+ "required": true,
31
+ "default": "",
32
+ "_meta": {
33
+ "required": true
34
+ }
35
+ },
36
+ "language": {
37
+ "type": "text",
38
+ "required": false,
39
+ "default": ""
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
+ "createdAt": {
60
+ "type": "datetime",
61
+ "required": false
62
+ }
63
+ },
64
+ "methods": {
65
+ "getAiUsageSnapshot": {
66
+ "name": "getAiUsageSnapshot",
67
+ "async": false,
68
+ "parameters": [],
69
+ "returnType": "AiUsageSnapshot | undefined",
70
+ "isStatic": false,
71
+ "isPublic": true
72
+ },
73
+ "resetAiUsage": {
74
+ "name": "resetAiUsage",
75
+ "async": false,
76
+ "parameters": [],
77
+ "returnType": "void",
78
+ "isStatic": false,
79
+ "isPublic": true
80
+ },
81
+ "listAiUsage": {
82
+ "name": "listAiUsage",
83
+ "async": true,
84
+ "parameters": [
85
+ {
86
+ "name": "options",
87
+ "type": "AiUsageListOptions",
88
+ "optional": true
89
+ }
90
+ ],
91
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
92
+ "isStatic": false,
93
+ "isPublic": true
94
+ },
95
+ "summarizeAiUsage": {
96
+ "name": "summarizeAiUsage",
97
+ "async": true,
98
+ "parameters": [
99
+ {
100
+ "name": "options",
101
+ "type": "AiUsageSummaryOptions",
102
+ "optional": true
103
+ }
104
+ ],
105
+ "returnType": "Promise<Record<string, AiUsageStats>>",
106
+ "isStatic": false,
107
+ "isPublic": true
108
+ },
109
+ "destroy": {
110
+ "name": "destroy",
111
+ "async": false,
112
+ "parameters": [],
113
+ "returnType": "void",
114
+ "isStatic": false,
115
+ "isPublic": true
116
+ },
117
+ "markAsPersisted": {
118
+ "name": "markAsPersisted",
119
+ "async": false,
120
+ "parameters": [],
121
+ "returnType": "void",
122
+ "isStatic": false,
123
+ "isPublic": true
124
+ },
125
+ "initialize": {
126
+ "name": "initialize",
127
+ "async": true,
128
+ "parameters": [],
129
+ "returnType": "Promise",
130
+ "isStatic": false,
131
+ "isPublic": true
132
+ },
133
+ "loadDataFromDb": {
134
+ "name": "loadDataFromDb",
135
+ "async": true,
136
+ "parameters": [
137
+ {
138
+ "name": "data",
139
+ "type": "any",
140
+ "optional": false
141
+ }
142
+ ],
143
+ "returnType": "any",
144
+ "isStatic": false,
145
+ "isPublic": true
146
+ },
147
+ "getFields": {
148
+ "name": "getFields",
149
+ "async": true,
150
+ "parameters": [],
151
+ "returnType": "any",
152
+ "isStatic": false,
153
+ "isPublic": true
154
+ },
155
+ "toJSON": {
156
+ "name": "toJSON",
157
+ "async": false,
158
+ "parameters": [],
159
+ "returnType": "any",
160
+ "isStatic": false,
161
+ "isPublic": true
162
+ },
163
+ "toPlainObject": {
164
+ "name": "toPlainObject",
165
+ "async": false,
166
+ "parameters": [],
167
+ "returnType": "Record<string>",
168
+ "isStatic": false,
169
+ "isPublic": true
170
+ },
171
+ "toPublicJSON": {
172
+ "name": "toPublicJSON",
173
+ "async": false,
174
+ "parameters": [],
175
+ "returnType": "Record<string>",
176
+ "isStatic": false,
177
+ "isPublic": true
178
+ },
179
+ "getId": {
180
+ "name": "getId",
181
+ "async": true,
182
+ "parameters": [],
183
+ "returnType": "any",
184
+ "isStatic": false,
185
+ "isPublic": true
186
+ },
187
+ "getSlug": {
188
+ "name": "getSlug",
189
+ "async": true,
190
+ "parameters": [],
191
+ "returnType": "any",
192
+ "isStatic": false,
193
+ "isPublic": true
194
+ },
195
+ "getSavedId": {
196
+ "name": "getSavedId",
197
+ "async": true,
198
+ "parameters": [],
199
+ "returnType": "any",
200
+ "isStatic": false,
201
+ "isPublic": true
202
+ },
203
+ "isSaved": {
204
+ "name": "isSaved",
205
+ "async": true,
206
+ "parameters": [],
207
+ "returnType": "any",
208
+ "isStatic": false,
209
+ "isPublic": true
210
+ },
211
+ "save": {
212
+ "name": "save",
213
+ "async": true,
214
+ "parameters": [],
215
+ "returnType": "any",
216
+ "isStatic": false,
217
+ "isPublic": true
218
+ },
219
+ "classifyConstraintError": {
220
+ "name": "classifyConstraintError",
221
+ "async": false,
222
+ "parameters": [
223
+ {
224
+ "name": "message",
225
+ "type": "string",
226
+ "optional": false
227
+ }
228
+ ],
229
+ "returnType": "'unique' | 'not_null' | null",
230
+ "isStatic": true,
231
+ "isPublic": true
232
+ },
233
+ "loadFromId": {
234
+ "name": "loadFromId",
235
+ "async": true,
236
+ "parameters": [],
237
+ "returnType": "any",
238
+ "isStatic": false,
239
+ "isPublic": true
240
+ },
241
+ "loadFromSlug": {
242
+ "name": "loadFromSlug",
243
+ "async": true,
244
+ "parameters": [],
245
+ "returnType": "any",
246
+ "isStatic": false,
247
+ "isPublic": true
248
+ },
249
+ "is": {
250
+ "name": "is",
251
+ "async": true,
252
+ "parameters": [
253
+ {
254
+ "name": "criteria",
255
+ "type": "string",
256
+ "optional": false
257
+ },
258
+ {
259
+ "name": "options",
260
+ "type": "any",
261
+ "optional": true
262
+ }
263
+ ],
264
+ "returnType": "any",
265
+ "isStatic": false,
266
+ "isPublic": true
267
+ },
268
+ "do": {
269
+ "name": "do",
270
+ "async": true,
271
+ "parameters": [
272
+ {
273
+ "name": "instructions",
274
+ "type": "string",
275
+ "optional": false
276
+ },
277
+ {
278
+ "name": "options",
279
+ "type": "any",
280
+ "optional": true
281
+ }
282
+ ],
283
+ "returnType": "any",
284
+ "isStatic": false,
285
+ "isPublic": true
286
+ },
287
+ "describe": {
288
+ "name": "describe",
289
+ "async": true,
290
+ "parameters": [
291
+ {
292
+ "name": "options",
293
+ "type": "any",
294
+ "optional": true
295
+ }
296
+ ],
297
+ "returnType": "any",
298
+ "isStatic": false,
299
+ "isPublic": true
300
+ },
301
+ "delete": {
302
+ "name": "delete",
303
+ "async": true,
304
+ "parameters": [],
305
+ "returnType": "Promise<void>",
306
+ "isStatic": false,
307
+ "isPublic": true
308
+ },
309
+ "isRelatedLoaded": {
310
+ "name": "isRelatedLoaded",
311
+ "async": false,
312
+ "parameters": [
313
+ {
314
+ "name": "fieldName",
315
+ "type": "string",
316
+ "optional": false
317
+ }
318
+ ],
319
+ "returnType": "boolean",
320
+ "isStatic": false,
321
+ "isPublic": true
322
+ },
323
+ "loadRelated": {
324
+ "name": "loadRelated",
325
+ "async": true,
326
+ "parameters": [
327
+ {
328
+ "name": "fieldName",
329
+ "type": "string",
330
+ "optional": false
331
+ },
332
+ {
333
+ "name": "opts",
334
+ "type": "LoadRelatedOptions",
335
+ "optional": true
336
+ }
337
+ ],
338
+ "returnType": "Promise<any>",
339
+ "isStatic": false,
340
+ "isPublic": true
341
+ },
342
+ "loadRelatedMany": {
343
+ "name": "loadRelatedMany",
344
+ "async": true,
345
+ "parameters": [
346
+ {
347
+ "name": "fieldName",
348
+ "type": "string",
349
+ "optional": false
350
+ },
351
+ {
352
+ "name": "opts",
353
+ "type": "LoadRelatedOptions",
354
+ "optional": true
355
+ }
356
+ ],
357
+ "returnType": "Promise<any[]>",
358
+ "isStatic": false,
359
+ "isPublic": true
360
+ },
361
+ "getRelated": {
362
+ "name": "getRelated",
363
+ "async": true,
364
+ "parameters": [
365
+ {
366
+ "name": "fieldName",
367
+ "type": "string",
368
+ "optional": false
369
+ },
370
+ {
371
+ "name": "opts",
372
+ "type": "LoadRelatedOptions",
373
+ "optional": true
374
+ }
375
+ ],
376
+ "returnType": "Promise<any>",
377
+ "isStatic": false,
378
+ "isPublic": true
379
+ },
380
+ "getAvailableTools": {
381
+ "name": "getAvailableTools",
382
+ "async": false,
383
+ "parameters": [],
384
+ "returnType": "AITool[]",
385
+ "isStatic": false,
386
+ "isPublic": true
387
+ },
388
+ "executeToolCall": {
389
+ "name": "executeToolCall",
390
+ "async": true,
391
+ "parameters": [
392
+ {
393
+ "name": "toolCall",
394
+ "type": "ToolCall",
395
+ "optional": false
396
+ }
397
+ ],
398
+ "returnType": "Promise<ToolCallResult>",
399
+ "isStatic": false,
400
+ "isPublic": true
401
+ },
402
+ "remember": {
403
+ "name": "remember",
404
+ "async": true,
405
+ "parameters": [
406
+ {
407
+ "name": "options",
408
+ "type": "object",
409
+ "optional": false
410
+ }
411
+ ],
412
+ "returnType": "Promise<void>",
413
+ "isStatic": false,
414
+ "isPublic": true
415
+ },
416
+ "recall": {
417
+ "name": "recall",
418
+ "async": true,
419
+ "parameters": [
420
+ {
421
+ "name": "options",
422
+ "type": "object",
423
+ "optional": false
424
+ }
425
+ ],
426
+ "returnType": "Promise<any | null>",
427
+ "isStatic": false,
428
+ "isPublic": true
429
+ },
430
+ "recallAll": {
431
+ "name": "recallAll",
432
+ "async": true,
433
+ "parameters": [
434
+ {
435
+ "name": "options",
436
+ "type": "object",
437
+ "optional": true
438
+ }
439
+ ],
440
+ "returnType": "Promise<Map<string, any>>",
441
+ "isStatic": false,
442
+ "isPublic": true
443
+ },
444
+ "forget": {
445
+ "name": "forget",
446
+ "async": true,
447
+ "parameters": [
448
+ {
449
+ "name": "options",
450
+ "type": "object",
451
+ "optional": false
452
+ }
453
+ ],
454
+ "returnType": "Promise<void>",
455
+ "isStatic": false,
456
+ "isPublic": true
457
+ },
458
+ "forgetScope": {
459
+ "name": "forgetScope",
460
+ "async": true,
461
+ "parameters": [
462
+ {
463
+ "name": "options",
464
+ "type": "object",
465
+ "optional": false
466
+ }
467
+ ],
468
+ "returnType": "Promise<number>",
469
+ "isStatic": false,
470
+ "isPublic": true
471
+ },
472
+ "generateEmbeddings": {
473
+ "name": "generateEmbeddings",
474
+ "async": true,
475
+ "parameters": [
476
+ {
477
+ "name": "options",
478
+ "type": "GenerateEmbeddingsOptions",
479
+ "optional": true
480
+ }
481
+ ],
482
+ "returnType": "Promise<void>",
483
+ "isStatic": false,
484
+ "isPublic": true
485
+ },
486
+ "getEmbedding": {
487
+ "name": "getEmbedding",
488
+ "async": true,
489
+ "parameters": [
490
+ {
491
+ "name": "fieldName",
492
+ "type": "string",
493
+ "optional": false
494
+ },
495
+ {
496
+ "name": "model",
497
+ "type": "string",
498
+ "optional": true
499
+ }
500
+ ],
501
+ "returnType": "Promise<number[] | null>",
502
+ "isStatic": false,
503
+ "isPublic": true
504
+ },
505
+ "hasStaleEmbeddings": {
506
+ "name": "hasStaleEmbeddings",
507
+ "async": true,
508
+ "parameters": [],
509
+ "returnType": "Promise<boolean>",
510
+ "isStatic": false,
511
+ "isPublic": true
512
+ },
513
+ "clearEmbeddings": {
514
+ "name": "clearEmbeddings",
515
+ "async": true,
516
+ "parameters": [],
517
+ "returnType": "Promise<void>",
518
+ "isStatic": false,
519
+ "isPublic": true
520
+ },
521
+ "getTag": {
522
+ "name": "getTag",
523
+ "async": true,
524
+ "parameters": [],
525
+ "returnType": "Promise<Tag | null>",
526
+ "isStatic": false,
527
+ "isPublic": true
528
+ },
529
+ "searchByAlias": {
530
+ "name": "searchByAlias",
531
+ "async": true,
532
+ "parameters": [
533
+ {
534
+ "name": "_alias",
535
+ "type": "string",
536
+ "optional": false
537
+ },
538
+ {
539
+ "name": "_language",
540
+ "type": "string",
541
+ "optional": true
542
+ }
543
+ ],
544
+ "returnType": "Promise<Tag[]>",
545
+ "isStatic": true,
546
+ "isPublic": true
547
+ },
548
+ "getAliasesForTag": {
549
+ "name": "getAliasesForTag",
550
+ "async": true,
551
+ "parameters": [
552
+ {
553
+ "name": "_tagSlug",
554
+ "type": "string",
555
+ "optional": false
556
+ }
557
+ ],
558
+ "returnType": "Promise<TagAlias[]>",
559
+ "isStatic": true,
560
+ "isPublic": true
561
+ }
562
+ },
563
+ "decoratorConfig": {
564
+ "tableStrategy": "sti",
565
+ "api": {
566
+ "include": [
567
+ "list",
568
+ "get",
569
+ "create",
570
+ "update",
571
+ "delete"
572
+ ]
573
+ },
574
+ "mcp": {
575
+ "include": [
576
+ "list",
577
+ "get",
578
+ "create"
579
+ ]
580
+ },
581
+ "cli": true,
582
+ "tenantScoped": {
583
+ "mode": "optional"
584
+ }
585
+ },
586
+ "extends": "SmrtObject",
587
+ "exportName": "TagAlias",
588
+ "collectionExportName": "TagAliasCollection",
589
+ "validationRules": [
590
+ {
591
+ "field": "alias",
592
+ "rule": "required",
593
+ "fieldType": "text"
594
+ }
595
+ ],
596
+ "schema": {
597
+ "tableName": "tag_aliases",
598
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tag_aliases\" (\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 \"tag_slug\" TEXT DEFAULT '',\n \"alias\" TEXT DEFAULT '',\n \"language\" TEXT DEFAULT '',\n \"tenant_id\" UUID\n);",
599
+ "columns": {
600
+ "id": {
601
+ "type": "UUID",
602
+ "primaryKey": true,
603
+ "referenceKind": "id",
604
+ "notNull": true
605
+ },
606
+ "slug": {
607
+ "type": "TEXT",
608
+ "notNull": true
609
+ },
610
+ "context": {
611
+ "type": "TEXT",
612
+ "notNull": true,
613
+ "default": ""
614
+ },
615
+ "_meta_type": {
616
+ "type": "TEXT",
617
+ "notNull": true
618
+ },
619
+ "_meta_data": {
620
+ "type": "JSON",
621
+ "notNull": false
622
+ },
623
+ "created_at": {
624
+ "type": "TIMESTAMP",
625
+ "notNull": true,
626
+ "default": "current_timestamp"
627
+ },
628
+ "updated_at": {
629
+ "type": "TIMESTAMP",
630
+ "notNull": true,
631
+ "default": "current_timestamp"
632
+ },
633
+ "tag_slug": {
634
+ "type": "TEXT",
635
+ "notNull": false,
636
+ "default": ""
637
+ },
638
+ "alias": {
639
+ "type": "TEXT",
640
+ "notNull": false,
641
+ "default": ""
642
+ },
643
+ "language": {
644
+ "type": "TEXT",
645
+ "notNull": false,
646
+ "default": ""
647
+ },
648
+ "tenant_id": {
649
+ "type": "UUID",
650
+ "referenceKind": "tenantId",
651
+ "notNull": false
652
+ }
653
+ },
654
+ "indexes": [
655
+ {
656
+ "name": "tag_aliases_id_idx",
657
+ "columns": [
658
+ "id"
659
+ ]
660
+ },
661
+ {
662
+ "name": "tag_aliases_slug_context_meta_type_idx",
663
+ "columns": [
664
+ "slug",
665
+ "context",
666
+ "_meta_type"
667
+ ],
668
+ "unique": true
669
+ },
670
+ {
671
+ "name": "tag_aliases_meta_type_idx",
672
+ "columns": [
673
+ "_meta_type"
674
+ ]
675
+ }
676
+ ],
677
+ "version": "95a4bc18"
678
+ }
679
+ },
680
+ "@happyvertical/smrt-tags:TagAliasCollection": {
681
+ "name": "tagaliascollection",
682
+ "className": "TagAliasCollection",
683
+ "qualifiedName": "@happyvertical/smrt-tags:TagAliasCollection",
684
+ "collection": "tagaliases",
685
+ "filePath": "/home/runner/_work/smrt/smrt/packages/tags/src/tag-aliases.ts",
686
+ "packageName": "@happyvertical/smrt-tags",
687
+ "fields": {},
688
+ "methods": {
689
+ "addAlias": {
690
+ "name": "addAlias",
691
+ "async": true,
692
+ "parameters": [
693
+ {
694
+ "name": "tagSlug",
695
+ "type": "string",
696
+ "optional": false
697
+ },
698
+ {
699
+ "name": "alias",
700
+ "type": "string",
701
+ "optional": false
702
+ },
703
+ {
704
+ "name": "language",
705
+ "type": "string",
706
+ "optional": true
707
+ },
708
+ {
709
+ "name": "context",
710
+ "type": "string",
711
+ "optional": true
712
+ }
713
+ ],
714
+ "returnType": "Promise<TagAlias>",
715
+ "isStatic": false,
716
+ "isPublic": true
717
+ },
718
+ "searchByAlias": {
719
+ "name": "searchByAlias",
720
+ "async": true,
721
+ "parameters": [
722
+ {
723
+ "name": "alias",
724
+ "type": "string",
725
+ "optional": false
726
+ },
727
+ {
728
+ "name": "language",
729
+ "type": "string",
730
+ "optional": true
731
+ }
732
+ ],
733
+ "returnType": "Promise<Tag[]>",
734
+ "isStatic": false,
735
+ "isPublic": true
736
+ },
737
+ "getAliasesForTag": {
738
+ "name": "getAliasesForTag",
739
+ "async": true,
740
+ "parameters": [
741
+ {
742
+ "name": "tagSlug",
743
+ "type": "string",
744
+ "optional": false
745
+ },
746
+ {
747
+ "name": "language",
748
+ "type": "string",
749
+ "optional": true
750
+ }
751
+ ],
752
+ "returnType": "Promise<TagAlias[]>",
753
+ "isStatic": false,
754
+ "isPublic": true
755
+ },
756
+ "removeAlias": {
757
+ "name": "removeAlias",
758
+ "async": true,
759
+ "parameters": [
760
+ {
761
+ "name": "aliasId",
762
+ "type": "string",
763
+ "optional": false
764
+ }
765
+ ],
766
+ "returnType": "Promise<void>",
767
+ "isStatic": false,
768
+ "isPublic": true
769
+ },
770
+ "bulkAddAliases": {
771
+ "name": "bulkAddAliases",
772
+ "async": true,
773
+ "parameters": [
774
+ {
775
+ "name": "tagSlug",
776
+ "type": "string",
777
+ "optional": false
778
+ },
779
+ {
780
+ "name": "aliases",
781
+ "type": "Array<object>",
782
+ "optional": false
783
+ }
784
+ ],
785
+ "returnType": "Promise<TagAlias[]>",
786
+ "isStatic": false,
787
+ "isPublic": true
788
+ },
789
+ "getAliasesByLanguage": {
790
+ "name": "getAliasesByLanguage",
791
+ "async": true,
792
+ "parameters": [
793
+ {
794
+ "name": "tagSlug",
795
+ "type": "string",
796
+ "optional": false
797
+ }
798
+ ],
799
+ "returnType": "Promise<Map<string, string[]>>",
800
+ "isStatic": false,
801
+ "isPublic": true
802
+ },
803
+ "findMatchingAliases": {
804
+ "name": "findMatchingAliases",
805
+ "async": true,
806
+ "parameters": [
807
+ {
808
+ "name": "query",
809
+ "type": "string",
810
+ "optional": false
811
+ },
812
+ {
813
+ "name": "language",
814
+ "type": "string",
815
+ "optional": true
816
+ }
817
+ ],
818
+ "returnType": "Promise<TagAlias[]>",
819
+ "isStatic": false,
820
+ "isPublic": true
821
+ },
822
+ "findByTenant": {
823
+ "name": "findByTenant",
824
+ "async": true,
825
+ "parameters": [
826
+ {
827
+ "name": "tenantId",
828
+ "type": "string",
829
+ "optional": false
830
+ }
831
+ ],
832
+ "returnType": "Promise<TagAlias[]>",
833
+ "isStatic": false,
834
+ "isPublic": true
835
+ },
836
+ "findGlobal": {
837
+ "name": "findGlobal",
838
+ "async": true,
839
+ "parameters": [],
840
+ "returnType": "Promise<TagAlias[]>",
841
+ "isStatic": false,
842
+ "isPublic": true
843
+ },
844
+ "findWithGlobals": {
845
+ "name": "findWithGlobals",
846
+ "async": true,
847
+ "parameters": [
848
+ {
849
+ "name": "tenantId",
850
+ "type": "string",
851
+ "optional": false
852
+ }
853
+ ],
854
+ "returnType": "Promise<TagAlias[]>",
855
+ "isStatic": false,
856
+ "isPublic": true
857
+ }
858
+ },
859
+ "decoratorConfig": {},
860
+ "extends": "SmrtCollection",
861
+ "extendsTypeArg": "TagAlias",
862
+ "exportName": "TagAliasCollection",
863
+ "collectionExportName": "TagAliasCollectionCollection",
864
+ "schema": {
865
+ "tableName": "tag_alias_collections",
866
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tag_alias_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);",
867
+ "columns": {
868
+ "id": {
869
+ "type": "UUID",
870
+ "primaryKey": true,
871
+ "referenceKind": "id",
872
+ "notNull": true
873
+ },
874
+ "slug": {
875
+ "type": "TEXT",
876
+ "notNull": true
877
+ },
878
+ "context": {
879
+ "type": "TEXT",
880
+ "notNull": true,
881
+ "default": ""
882
+ },
883
+ "created_at": {
884
+ "type": "TIMESTAMP",
885
+ "notNull": true,
886
+ "default": "current_timestamp"
887
+ },
888
+ "updated_at": {
889
+ "type": "TIMESTAMP",
890
+ "notNull": true,
891
+ "default": "current_timestamp"
892
+ }
893
+ },
894
+ "indexes": [
895
+ {
896
+ "name": "tag_alias_collections_id_idx",
897
+ "columns": [
898
+ "id"
899
+ ]
900
+ },
901
+ {
902
+ "name": "tag_alias_collections_slug_context_idx",
903
+ "columns": [
904
+ "slug",
905
+ "context"
906
+ ],
907
+ "unique": true
908
+ }
909
+ ],
910
+ "version": "1a92c60d"
911
+ }
912
+ },
913
+ "@happyvertical/smrt-tags:Tag": {
914
+ "name": "tag",
915
+ "className": "Tag",
916
+ "qualifiedName": "@happyvertical/smrt-tags:Tag",
917
+ "collection": "tags",
918
+ "filePath": "/home/runner/_work/smrt/smrt/packages/tags/src/tag.ts",
919
+ "packageName": "@happyvertical/smrt-tags",
920
+ "fields": {
921
+ "created_at": {
922
+ "type": "datetime",
923
+ "required": false
924
+ },
925
+ "updated_at": {
926
+ "type": "datetime",
927
+ "required": false
928
+ },
929
+ "parentId": {
930
+ "type": "foreignKey",
931
+ "required": false,
932
+ "related": "Tag",
933
+ "_meta": {
934
+ "nullable": true
935
+ }
936
+ },
937
+ "name": {
938
+ "type": "text",
939
+ "required": true,
940
+ "default": "",
941
+ "_meta": {
942
+ "required": true
943
+ }
944
+ },
945
+ "level": {
946
+ "type": "integer",
947
+ "required": false,
948
+ "default": 0
949
+ },
950
+ "description": {
951
+ "type": "text",
952
+ "required": false,
953
+ "default": ""
954
+ },
955
+ "metadata": {
956
+ "type": "text",
957
+ "required": false,
958
+ "default": ""
959
+ },
960
+ "tenantId": {
961
+ "type": "text",
962
+ "required": false,
963
+ "_meta": {
964
+ "sqlType": "UUID",
965
+ "nullable": true,
966
+ "__tenancy": {
967
+ "isTenantIdField": true,
968
+ "autoFilter": true,
969
+ "required": false,
970
+ "autoPopulate": true,
971
+ "nullable": true,
972
+ "mode": "optional",
973
+ "field": "tenantId",
974
+ "allowSuperAdminBypass": false
975
+ }
976
+ }
977
+ },
978
+ "createdAt": {
979
+ "type": "datetime",
980
+ "required": false
981
+ },
982
+ "updatedAt": {
983
+ "type": "datetime",
984
+ "required": false
985
+ }
986
+ },
987
+ "methods": {
988
+ "getAiUsageSnapshot": {
989
+ "name": "getAiUsageSnapshot",
990
+ "async": false,
991
+ "parameters": [],
992
+ "returnType": "AiUsageSnapshot | undefined",
993
+ "isStatic": false,
994
+ "isPublic": true
995
+ },
996
+ "resetAiUsage": {
997
+ "name": "resetAiUsage",
998
+ "async": false,
999
+ "parameters": [],
1000
+ "returnType": "void",
1001
+ "isStatic": false,
1002
+ "isPublic": true
1003
+ },
1004
+ "listAiUsage": {
1005
+ "name": "listAiUsage",
1006
+ "async": true,
1007
+ "parameters": [
1008
+ {
1009
+ "name": "options",
1010
+ "type": "AiUsageListOptions",
1011
+ "optional": true
1012
+ }
1013
+ ],
1014
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
1015
+ "isStatic": false,
1016
+ "isPublic": true
1017
+ },
1018
+ "summarizeAiUsage": {
1019
+ "name": "summarizeAiUsage",
1020
+ "async": true,
1021
+ "parameters": [
1022
+ {
1023
+ "name": "options",
1024
+ "type": "AiUsageSummaryOptions",
1025
+ "optional": true
1026
+ }
1027
+ ],
1028
+ "returnType": "Promise<Record<string, AiUsageStats>>",
1029
+ "isStatic": false,
1030
+ "isPublic": true
1031
+ },
1032
+ "destroy": {
1033
+ "name": "destroy",
1034
+ "async": false,
1035
+ "parameters": [],
1036
+ "returnType": "void",
1037
+ "isStatic": false,
1038
+ "isPublic": true
1039
+ },
1040
+ "markAsPersisted": {
1041
+ "name": "markAsPersisted",
1042
+ "async": false,
1043
+ "parameters": [],
1044
+ "returnType": "void",
1045
+ "isStatic": false,
1046
+ "isPublic": true
1047
+ },
1048
+ "initialize": {
1049
+ "name": "initialize",
1050
+ "async": true,
1051
+ "parameters": [],
1052
+ "returnType": "Promise",
1053
+ "isStatic": false,
1054
+ "isPublic": true
1055
+ },
1056
+ "loadDataFromDb": {
1057
+ "name": "loadDataFromDb",
1058
+ "async": true,
1059
+ "parameters": [
1060
+ {
1061
+ "name": "data",
1062
+ "type": "any",
1063
+ "optional": false
1064
+ }
1065
+ ],
1066
+ "returnType": "any",
1067
+ "isStatic": false,
1068
+ "isPublic": true
1069
+ },
1070
+ "getFields": {
1071
+ "name": "getFields",
1072
+ "async": true,
1073
+ "parameters": [],
1074
+ "returnType": "any",
1075
+ "isStatic": false,
1076
+ "isPublic": true
1077
+ },
1078
+ "toJSON": {
1079
+ "name": "toJSON",
1080
+ "async": false,
1081
+ "parameters": [],
1082
+ "returnType": "any",
1083
+ "isStatic": false,
1084
+ "isPublic": true
1085
+ },
1086
+ "toPlainObject": {
1087
+ "name": "toPlainObject",
1088
+ "async": false,
1089
+ "parameters": [],
1090
+ "returnType": "Record<string>",
1091
+ "isStatic": false,
1092
+ "isPublic": true
1093
+ },
1094
+ "toPublicJSON": {
1095
+ "name": "toPublicJSON",
1096
+ "async": false,
1097
+ "parameters": [],
1098
+ "returnType": "Record<string>",
1099
+ "isStatic": false,
1100
+ "isPublic": true
1101
+ },
1102
+ "getId": {
1103
+ "name": "getId",
1104
+ "async": true,
1105
+ "parameters": [],
1106
+ "returnType": "any",
1107
+ "isStatic": false,
1108
+ "isPublic": true
1109
+ },
1110
+ "getSlug": {
1111
+ "name": "getSlug",
1112
+ "async": true,
1113
+ "parameters": [],
1114
+ "returnType": "any",
1115
+ "isStatic": false,
1116
+ "isPublic": true
1117
+ },
1118
+ "getSavedId": {
1119
+ "name": "getSavedId",
1120
+ "async": true,
1121
+ "parameters": [],
1122
+ "returnType": "any",
1123
+ "isStatic": false,
1124
+ "isPublic": true
1125
+ },
1126
+ "isSaved": {
1127
+ "name": "isSaved",
1128
+ "async": true,
1129
+ "parameters": [],
1130
+ "returnType": "any",
1131
+ "isStatic": false,
1132
+ "isPublic": true
1133
+ },
1134
+ "save": {
1135
+ "name": "save",
1136
+ "async": true,
1137
+ "parameters": [],
1138
+ "returnType": "any",
1139
+ "isStatic": false,
1140
+ "isPublic": true
1141
+ },
1142
+ "classifyConstraintError": {
1143
+ "name": "classifyConstraintError",
1144
+ "async": false,
1145
+ "parameters": [
1146
+ {
1147
+ "name": "message",
1148
+ "type": "string",
1149
+ "optional": false
1150
+ }
1151
+ ],
1152
+ "returnType": "'unique' | 'not_null' | null",
1153
+ "isStatic": true,
1154
+ "isPublic": true
1155
+ },
1156
+ "loadFromId": {
1157
+ "name": "loadFromId",
1158
+ "async": true,
1159
+ "parameters": [],
1160
+ "returnType": "any",
1161
+ "isStatic": false,
1162
+ "isPublic": true
1163
+ },
1164
+ "loadFromSlug": {
1165
+ "name": "loadFromSlug",
1166
+ "async": true,
1167
+ "parameters": [],
1168
+ "returnType": "any",
1169
+ "isStatic": false,
1170
+ "isPublic": true
1171
+ },
1172
+ "is": {
1173
+ "name": "is",
1174
+ "async": true,
1175
+ "parameters": [
1176
+ {
1177
+ "name": "criteria",
1178
+ "type": "string",
1179
+ "optional": false
1180
+ },
1181
+ {
1182
+ "name": "options",
1183
+ "type": "any",
1184
+ "optional": true
1185
+ }
1186
+ ],
1187
+ "returnType": "any",
1188
+ "isStatic": false,
1189
+ "isPublic": true
1190
+ },
1191
+ "do": {
1192
+ "name": "do",
1193
+ "async": true,
1194
+ "parameters": [
1195
+ {
1196
+ "name": "instructions",
1197
+ "type": "string",
1198
+ "optional": false
1199
+ },
1200
+ {
1201
+ "name": "options",
1202
+ "type": "any",
1203
+ "optional": true
1204
+ }
1205
+ ],
1206
+ "returnType": "any",
1207
+ "isStatic": false,
1208
+ "isPublic": true
1209
+ },
1210
+ "describe": {
1211
+ "name": "describe",
1212
+ "async": true,
1213
+ "parameters": [
1214
+ {
1215
+ "name": "options",
1216
+ "type": "any",
1217
+ "optional": true
1218
+ }
1219
+ ],
1220
+ "returnType": "any",
1221
+ "isStatic": false,
1222
+ "isPublic": true
1223
+ },
1224
+ "delete": {
1225
+ "name": "delete",
1226
+ "async": true,
1227
+ "parameters": [],
1228
+ "returnType": "Promise<void>",
1229
+ "isStatic": false,
1230
+ "isPublic": true
1231
+ },
1232
+ "isRelatedLoaded": {
1233
+ "name": "isRelatedLoaded",
1234
+ "async": false,
1235
+ "parameters": [
1236
+ {
1237
+ "name": "fieldName",
1238
+ "type": "string",
1239
+ "optional": false
1240
+ }
1241
+ ],
1242
+ "returnType": "boolean",
1243
+ "isStatic": false,
1244
+ "isPublic": true
1245
+ },
1246
+ "loadRelated": {
1247
+ "name": "loadRelated",
1248
+ "async": true,
1249
+ "parameters": [
1250
+ {
1251
+ "name": "fieldName",
1252
+ "type": "string",
1253
+ "optional": false
1254
+ },
1255
+ {
1256
+ "name": "opts",
1257
+ "type": "LoadRelatedOptions",
1258
+ "optional": true
1259
+ }
1260
+ ],
1261
+ "returnType": "Promise<any>",
1262
+ "isStatic": false,
1263
+ "isPublic": true
1264
+ },
1265
+ "loadRelatedMany": {
1266
+ "name": "loadRelatedMany",
1267
+ "async": true,
1268
+ "parameters": [
1269
+ {
1270
+ "name": "fieldName",
1271
+ "type": "string",
1272
+ "optional": false
1273
+ },
1274
+ {
1275
+ "name": "opts",
1276
+ "type": "LoadRelatedOptions",
1277
+ "optional": true
1278
+ }
1279
+ ],
1280
+ "returnType": "Promise<any[]>",
1281
+ "isStatic": false,
1282
+ "isPublic": true
1283
+ },
1284
+ "getRelated": {
1285
+ "name": "getRelated",
1286
+ "async": true,
1287
+ "parameters": [
1288
+ {
1289
+ "name": "fieldName",
1290
+ "type": "string",
1291
+ "optional": false
1292
+ },
1293
+ {
1294
+ "name": "opts",
1295
+ "type": "LoadRelatedOptions",
1296
+ "optional": true
1297
+ }
1298
+ ],
1299
+ "returnType": "Promise<any>",
1300
+ "isStatic": false,
1301
+ "isPublic": true
1302
+ },
1303
+ "getAvailableTools": {
1304
+ "name": "getAvailableTools",
1305
+ "async": false,
1306
+ "parameters": [],
1307
+ "returnType": "AITool[]",
1308
+ "isStatic": false,
1309
+ "isPublic": true
1310
+ },
1311
+ "executeToolCall": {
1312
+ "name": "executeToolCall",
1313
+ "async": true,
1314
+ "parameters": [
1315
+ {
1316
+ "name": "toolCall",
1317
+ "type": "ToolCall",
1318
+ "optional": false
1319
+ }
1320
+ ],
1321
+ "returnType": "Promise<ToolCallResult>",
1322
+ "isStatic": false,
1323
+ "isPublic": true
1324
+ },
1325
+ "remember": {
1326
+ "name": "remember",
1327
+ "async": true,
1328
+ "parameters": [
1329
+ {
1330
+ "name": "options",
1331
+ "type": "object",
1332
+ "optional": false
1333
+ }
1334
+ ],
1335
+ "returnType": "Promise<void>",
1336
+ "isStatic": false,
1337
+ "isPublic": true
1338
+ },
1339
+ "recall": {
1340
+ "name": "recall",
1341
+ "async": true,
1342
+ "parameters": [
1343
+ {
1344
+ "name": "options",
1345
+ "type": "object",
1346
+ "optional": false
1347
+ }
1348
+ ],
1349
+ "returnType": "Promise<any | null>",
1350
+ "isStatic": false,
1351
+ "isPublic": true
1352
+ },
1353
+ "recallAll": {
1354
+ "name": "recallAll",
1355
+ "async": true,
1356
+ "parameters": [
1357
+ {
1358
+ "name": "options",
1359
+ "type": "object",
1360
+ "optional": true
1361
+ }
1362
+ ],
1363
+ "returnType": "Promise<Map<string, any>>",
1364
+ "isStatic": false,
1365
+ "isPublic": true
1366
+ },
1367
+ "forget": {
1368
+ "name": "forget",
1369
+ "async": true,
1370
+ "parameters": [
1371
+ {
1372
+ "name": "options",
1373
+ "type": "object",
1374
+ "optional": false
1375
+ }
1376
+ ],
1377
+ "returnType": "Promise<void>",
1378
+ "isStatic": false,
1379
+ "isPublic": true
1380
+ },
1381
+ "forgetScope": {
1382
+ "name": "forgetScope",
1383
+ "async": true,
1384
+ "parameters": [
1385
+ {
1386
+ "name": "options",
1387
+ "type": "object",
1388
+ "optional": false
1389
+ }
1390
+ ],
1391
+ "returnType": "Promise<number>",
1392
+ "isStatic": false,
1393
+ "isPublic": true
1394
+ },
1395
+ "generateEmbeddings": {
1396
+ "name": "generateEmbeddings",
1397
+ "async": true,
1398
+ "parameters": [
1399
+ {
1400
+ "name": "options",
1401
+ "type": "GenerateEmbeddingsOptions",
1402
+ "optional": true
1403
+ }
1404
+ ],
1405
+ "returnType": "Promise<void>",
1406
+ "isStatic": false,
1407
+ "isPublic": true
1408
+ },
1409
+ "getEmbedding": {
1410
+ "name": "getEmbedding",
1411
+ "async": true,
1412
+ "parameters": [
1413
+ {
1414
+ "name": "fieldName",
1415
+ "type": "string",
1416
+ "optional": false
1417
+ },
1418
+ {
1419
+ "name": "model",
1420
+ "type": "string",
1421
+ "optional": true
1422
+ }
1423
+ ],
1424
+ "returnType": "Promise<number[] | null>",
1425
+ "isStatic": false,
1426
+ "isPublic": true
1427
+ },
1428
+ "hasStaleEmbeddings": {
1429
+ "name": "hasStaleEmbeddings",
1430
+ "async": true,
1431
+ "parameters": [],
1432
+ "returnType": "Promise<boolean>",
1433
+ "isStatic": false,
1434
+ "isPublic": true
1435
+ },
1436
+ "clearEmbeddings": {
1437
+ "name": "clearEmbeddings",
1438
+ "async": true,
1439
+ "parameters": [],
1440
+ "returnType": "Promise<void>",
1441
+ "isStatic": false,
1442
+ "isPublic": true
1443
+ },
1444
+ "getParent": {
1445
+ "name": "getParent",
1446
+ "async": true,
1447
+ "parameters": [],
1448
+ "returnType": "Promise<null>",
1449
+ "isStatic": false,
1450
+ "isPublic": true
1451
+ },
1452
+ "getChildren": {
1453
+ "name": "getChildren",
1454
+ "async": true,
1455
+ "parameters": [],
1456
+ "returnType": "Promise",
1457
+ "isStatic": false,
1458
+ "isPublic": true
1459
+ },
1460
+ "getAncestors": {
1461
+ "name": "getAncestors",
1462
+ "async": true,
1463
+ "parameters": [],
1464
+ "returnType": "Promise",
1465
+ "isStatic": false,
1466
+ "isPublic": true
1467
+ },
1468
+ "getDescendants": {
1469
+ "name": "getDescendants",
1470
+ "async": true,
1471
+ "parameters": [],
1472
+ "returnType": "Promise",
1473
+ "isStatic": false,
1474
+ "isPublic": true
1475
+ },
1476
+ "getHierarchy": {
1477
+ "name": "getHierarchy",
1478
+ "async": true,
1479
+ "parameters": [],
1480
+ "returnType": "Promise<HierarchyView>",
1481
+ "isStatic": false,
1482
+ "isPublic": true
1483
+ },
1484
+ "moveTo": {
1485
+ "name": "moveTo",
1486
+ "async": true,
1487
+ "parameters": [
1488
+ {
1489
+ "name": "newParent",
1490
+ "type": "string | null",
1491
+ "optional": false
1492
+ }
1493
+ ],
1494
+ "returnType": "Promise<void>",
1495
+ "isStatic": false,
1496
+ "isPublic": true
1497
+ },
1498
+ "getMetadata": {
1499
+ "name": "getMetadata",
1500
+ "async": false,
1501
+ "parameters": [],
1502
+ "returnType": "TagMetadata",
1503
+ "isStatic": false,
1504
+ "isPublic": true
1505
+ },
1506
+ "setMetadata": {
1507
+ "name": "setMetadata",
1508
+ "async": false,
1509
+ "parameters": [
1510
+ {
1511
+ "name": "data",
1512
+ "type": "TagMetadata",
1513
+ "optional": false
1514
+ }
1515
+ ],
1516
+ "returnType": "void",
1517
+ "isStatic": false,
1518
+ "isPublic": true
1519
+ },
1520
+ "updateMetadata": {
1521
+ "name": "updateMetadata",
1522
+ "async": false,
1523
+ "parameters": [
1524
+ {
1525
+ "name": "updates",
1526
+ "type": "Partial<TagMetadata>",
1527
+ "optional": false
1528
+ }
1529
+ ],
1530
+ "returnType": "void",
1531
+ "isStatic": false,
1532
+ "isPublic": true
1533
+ },
1534
+ "getBySlug": {
1535
+ "name": "getBySlug",
1536
+ "async": true,
1537
+ "parameters": [
1538
+ {
1539
+ "name": "_slug",
1540
+ "type": "string",
1541
+ "optional": false
1542
+ },
1543
+ {
1544
+ "name": "_context",
1545
+ "type": "string",
1546
+ "optional": true
1547
+ }
1548
+ ],
1549
+ "returnType": "Promise<Tag | null>",
1550
+ "isStatic": true,
1551
+ "isPublic": true
1552
+ },
1553
+ "getRootTags": {
1554
+ "name": "getRootTags",
1555
+ "async": true,
1556
+ "parameters": [
1557
+ {
1558
+ "name": "_context",
1559
+ "type": "string",
1560
+ "optional": true,
1561
+ "default": "global"
1562
+ }
1563
+ ],
1564
+ "returnType": "Promise<Tag[]>",
1565
+ "isStatic": true,
1566
+ "isPublic": true
1567
+ }
1568
+ },
1569
+ "decoratorConfig": {
1570
+ "tableStrategy": "sti",
1571
+ "api": {
1572
+ "include": [
1573
+ "list",
1574
+ "get",
1575
+ "create",
1576
+ "update",
1577
+ "delete"
1578
+ ]
1579
+ },
1580
+ "mcp": {
1581
+ "include": [
1582
+ "list",
1583
+ "get",
1584
+ "create",
1585
+ "update"
1586
+ ]
1587
+ },
1588
+ "cli": true,
1589
+ "tenantScoped": {
1590
+ "mode": "optional"
1591
+ }
1592
+ },
1593
+ "extends": "SmrtHierarchical",
1594
+ "exportName": "Tag",
1595
+ "collectionExportName": "TagCollection",
1596
+ "validationRules": [
1597
+ {
1598
+ "field": "name",
1599
+ "rule": "required",
1600
+ "fieldType": "text"
1601
+ }
1602
+ ],
1603
+ "schema": {
1604
+ "tableName": "tags",
1605
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tags\" (\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 \"parent_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"level\" INTEGER DEFAULT 0,\n \"description\" TEXT DEFAULT '',\n \"metadata\" TEXT DEFAULT '',\n \"tenant_id\" UUID\n);",
1606
+ "columns": {
1607
+ "id": {
1608
+ "type": "UUID",
1609
+ "primaryKey": true,
1610
+ "referenceKind": "id",
1611
+ "notNull": true
1612
+ },
1613
+ "slug": {
1614
+ "type": "TEXT",
1615
+ "notNull": true
1616
+ },
1617
+ "context": {
1618
+ "type": "TEXT",
1619
+ "notNull": true,
1620
+ "default": ""
1621
+ },
1622
+ "_meta_type": {
1623
+ "type": "TEXT",
1624
+ "notNull": true
1625
+ },
1626
+ "_meta_data": {
1627
+ "type": "JSON",
1628
+ "notNull": false
1629
+ },
1630
+ "created_at": {
1631
+ "type": "TIMESTAMP",
1632
+ "notNull": true,
1633
+ "default": "current_timestamp"
1634
+ },
1635
+ "updated_at": {
1636
+ "type": "TIMESTAMP",
1637
+ "notNull": true,
1638
+ "default": "current_timestamp"
1639
+ },
1640
+ "parent_id": {
1641
+ "type": "UUID",
1642
+ "referenceKind": "foreignKey",
1643
+ "notNull": false
1644
+ },
1645
+ "name": {
1646
+ "type": "TEXT",
1647
+ "notNull": false,
1648
+ "default": ""
1649
+ },
1650
+ "level": {
1651
+ "type": "INTEGER",
1652
+ "notNull": false,
1653
+ "default": 0
1654
+ },
1655
+ "description": {
1656
+ "type": "TEXT",
1657
+ "notNull": false,
1658
+ "default": ""
1659
+ },
1660
+ "metadata": {
1661
+ "type": "TEXT",
1662
+ "notNull": false,
1663
+ "default": ""
1664
+ },
1665
+ "tenant_id": {
1666
+ "type": "UUID",
1667
+ "referenceKind": "tenantId",
1668
+ "notNull": false
1669
+ }
1670
+ },
1671
+ "indexes": [
1672
+ {
1673
+ "name": "tags_id_idx",
1674
+ "columns": [
1675
+ "id"
1676
+ ]
1677
+ },
1678
+ {
1679
+ "name": "tags_slug_context_meta_type_idx",
1680
+ "columns": [
1681
+ "slug",
1682
+ "context",
1683
+ "_meta_type"
1684
+ ],
1685
+ "unique": true
1686
+ },
1687
+ {
1688
+ "name": "tags_meta_type_idx",
1689
+ "columns": [
1690
+ "_meta_type"
1691
+ ]
1692
+ }
1693
+ ],
1694
+ "version": "66c31dc7"
1695
+ }
1696
+ },
1697
+ "@happyvertical/smrt-tags:TagCollection": {
1698
+ "name": "tagcollection",
1699
+ "className": "TagCollection",
1700
+ "qualifiedName": "@happyvertical/smrt-tags:TagCollection",
1701
+ "collection": "tags",
1702
+ "filePath": "/home/runner/_work/smrt/smrt/packages/tags/src/tags.ts",
1703
+ "packageName": "@happyvertical/smrt-tags",
1704
+ "fields": {},
1705
+ "methods": {
1706
+ "getOrCreate": {
1707
+ "name": "getOrCreate",
1708
+ "async": true,
1709
+ "parameters": [
1710
+ {
1711
+ "name": "slug",
1712
+ "type": "string",
1713
+ "optional": false
1714
+ },
1715
+ {
1716
+ "name": "context",
1717
+ "type": "string",
1718
+ "optional": true,
1719
+ "default": "global"
1720
+ }
1721
+ ],
1722
+ "returnType": "Promise<Tag>",
1723
+ "isStatic": false,
1724
+ "isPublic": true
1725
+ },
1726
+ "listByContext": {
1727
+ "name": "listByContext",
1728
+ "async": true,
1729
+ "parameters": [
1730
+ {
1731
+ "name": "context",
1732
+ "type": "string",
1733
+ "optional": false
1734
+ },
1735
+ {
1736
+ "name": "parentSlug",
1737
+ "type": "string | null",
1738
+ "optional": true
1739
+ }
1740
+ ],
1741
+ "returnType": "Promise<Tag[]>",
1742
+ "isStatic": false,
1743
+ "isPublic": true
1744
+ },
1745
+ "getRootTags": {
1746
+ "name": "getRootTags",
1747
+ "async": true,
1748
+ "parameters": [
1749
+ {
1750
+ "name": "context",
1751
+ "type": "string",
1752
+ "optional": true,
1753
+ "default": "global"
1754
+ }
1755
+ ],
1756
+ "returnType": "Promise<Tag[]>",
1757
+ "isStatic": false,
1758
+ "isPublic": true
1759
+ },
1760
+ "getChildren": {
1761
+ "name": "getChildren",
1762
+ "async": true,
1763
+ "parameters": [
1764
+ {
1765
+ "name": "parentSlug",
1766
+ "type": "string",
1767
+ "optional": false
1768
+ },
1769
+ {
1770
+ "name": "context",
1771
+ "type": "string",
1772
+ "optional": true
1773
+ }
1774
+ ],
1775
+ "returnType": "Promise<Tag[]>",
1776
+ "isStatic": false,
1777
+ "isPublic": true
1778
+ },
1779
+ "getHierarchy": {
1780
+ "name": "getHierarchy",
1781
+ "async": true,
1782
+ "parameters": [
1783
+ {
1784
+ "name": "slug",
1785
+ "type": "string",
1786
+ "optional": false
1787
+ },
1788
+ {
1789
+ "name": "context",
1790
+ "type": "string",
1791
+ "optional": true
1792
+ }
1793
+ ],
1794
+ "returnType": "Promise<TagHierarchy>",
1795
+ "isStatic": false,
1796
+ "isPublic": true
1797
+ },
1798
+ "moveTag": {
1799
+ "name": "moveTag",
1800
+ "async": true,
1801
+ "parameters": [
1802
+ {
1803
+ "name": "slug",
1804
+ "type": "string",
1805
+ "optional": false
1806
+ },
1807
+ {
1808
+ "name": "newParentSlug",
1809
+ "type": "string | null",
1810
+ "optional": false
1811
+ },
1812
+ {
1813
+ "name": "context",
1814
+ "type": "string",
1815
+ "optional": true
1816
+ }
1817
+ ],
1818
+ "returnType": "Promise<void>",
1819
+ "isStatic": false,
1820
+ "isPublic": true
1821
+ },
1822
+ "mergeTag": {
1823
+ "name": "mergeTag",
1824
+ "async": true,
1825
+ "parameters": [
1826
+ {
1827
+ "name": "fromSlug",
1828
+ "type": "string",
1829
+ "optional": false
1830
+ },
1831
+ {
1832
+ "name": "toSlug",
1833
+ "type": "string",
1834
+ "optional": false
1835
+ },
1836
+ {
1837
+ "name": "context",
1838
+ "type": "string",
1839
+ "optional": true
1840
+ }
1841
+ ],
1842
+ "returnType": "Promise<void>",
1843
+ "isStatic": false,
1844
+ "isPublic": true
1845
+ },
1846
+ "cleanupUnused": {
1847
+ "name": "cleanupUnused",
1848
+ "async": true,
1849
+ "parameters": [
1850
+ {
1851
+ "name": "context",
1852
+ "type": "string",
1853
+ "optional": true
1854
+ }
1855
+ ],
1856
+ "returnType": "Promise<number>",
1857
+ "isStatic": false,
1858
+ "isPublic": true
1859
+ },
1860
+ "calculateLevel": {
1861
+ "name": "calculateLevel",
1862
+ "async": true,
1863
+ "parameters": [
1864
+ {
1865
+ "name": "parentSlug",
1866
+ "type": "string | null",
1867
+ "optional": false
1868
+ },
1869
+ {
1870
+ "name": "context",
1871
+ "type": "string",
1872
+ "optional": true
1873
+ }
1874
+ ],
1875
+ "returnType": "Promise<number>",
1876
+ "isStatic": false,
1877
+ "isPublic": true
1878
+ },
1879
+ "findByTenant": {
1880
+ "name": "findByTenant",
1881
+ "async": true,
1882
+ "parameters": [
1883
+ {
1884
+ "name": "tenantId",
1885
+ "type": "string",
1886
+ "optional": false
1887
+ }
1888
+ ],
1889
+ "returnType": "Promise<Tag[]>",
1890
+ "isStatic": false,
1891
+ "isPublic": true
1892
+ },
1893
+ "findGlobal": {
1894
+ "name": "findGlobal",
1895
+ "async": true,
1896
+ "parameters": [],
1897
+ "returnType": "Promise<Tag[]>",
1898
+ "isStatic": false,
1899
+ "isPublic": true
1900
+ },
1901
+ "findWithGlobals": {
1902
+ "name": "findWithGlobals",
1903
+ "async": true,
1904
+ "parameters": [
1905
+ {
1906
+ "name": "tenantId",
1907
+ "type": "string",
1908
+ "optional": false
1909
+ }
1910
+ ],
1911
+ "returnType": "Promise<Tag[]>",
1912
+ "isStatic": false,
1913
+ "isPublic": true
1914
+ }
1915
+ },
1916
+ "decoratorConfig": {},
1917
+ "extends": "SmrtCollection",
1918
+ "extendsTypeArg": "Tag",
1919
+ "exportName": "TagCollection",
1920
+ "collectionExportName": "TagCollectionCollection",
1921
+ "schema": {
1922
+ "tableName": "tag_collections",
1923
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tag_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);",
1924
+ "columns": {
1925
+ "id": {
1926
+ "type": "UUID",
1927
+ "primaryKey": true,
1928
+ "referenceKind": "id",
1929
+ "notNull": true
1930
+ },
1931
+ "slug": {
1932
+ "type": "TEXT",
1933
+ "notNull": true
1934
+ },
1935
+ "context": {
1936
+ "type": "TEXT",
1937
+ "notNull": true,
1938
+ "default": ""
1939
+ },
1940
+ "created_at": {
1941
+ "type": "TIMESTAMP",
1942
+ "notNull": true,
1943
+ "default": "current_timestamp"
1944
+ },
1945
+ "updated_at": {
1946
+ "type": "TIMESTAMP",
1947
+ "notNull": true,
1948
+ "default": "current_timestamp"
1949
+ }
1950
+ },
1951
+ "indexes": [
1952
+ {
1953
+ "name": "tag_collections_id_idx",
1954
+ "columns": [
1955
+ "id"
1956
+ ]
1957
+ },
1958
+ {
1959
+ "name": "tag_collections_slug_context_idx",
1960
+ "columns": [
1961
+ "slug",
1962
+ "context"
1963
+ ],
1964
+ "unique": true
1965
+ }
1966
+ ],
1967
+ "version": "42236c49"
1968
+ }
1969
+ }
1970
+ },
1971
+ "moduleType": "smrt",
1972
+ "smrtDependencies": [
1973
+ "@happyvertical/smrt-core",
1974
+ "@happyvertical/smrt-tenancy"
1975
+ ]
1976
+ }