@happyvertical/smrt-assets 0.44.1 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-assets",
5
- "packageVersion": "0.44.1",
5
+ "packageVersion": "0.45.0",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-assets:AssetAssociation": {
8
8
  "name": "assetassociation",
@@ -452,576 +452,492 @@
452
452
  }
453
453
  },
454
454
  "methods": {
455
- "withDatabase": {
456
- "name": "withDatabase",
457
- "async": true,
458
- "parameters": [
459
- {
460
- "name": "db",
461
- "type": "DatabaseInterface",
462
- "optional": false
463
- },
464
- {
465
- "name": "operation",
466
- "type": "Function",
467
- "optional": false
468
- }
469
- ],
470
- "returnType": "Promise<T>",
471
- "isStatic": false,
472
- "isPublic": true
473
- },
474
- "getAiUsageSnapshot": {
475
- "name": "getAiUsageSnapshot",
455
+ "getValidation": {
456
+ "name": "getValidation",
476
457
  "async": false,
477
458
  "parameters": [],
478
- "returnType": "AiUsageSnapshot | undefined",
459
+ "returnType": "Record<string>",
479
460
  "isStatic": false,
480
461
  "isPublic": true
481
462
  },
482
- "resetAiUsage": {
483
- "name": "resetAiUsage",
463
+ "setValidation": {
464
+ "name": "setValidation",
484
465
  "async": false,
485
- "parameters": [],
486
- "returnType": "void",
487
- "isStatic": false,
488
- "isPublic": true
489
- },
490
- "listAiUsage": {
491
- "name": "listAiUsage",
492
- "async": true,
493
- "parameters": [
494
- {
495
- "name": "options",
496
- "type": "AiUsageListOptions",
497
- "optional": true
498
- }
499
- ],
500
- "returnType": "Promise<SmrtAiUsageRecord[]>",
501
- "isStatic": false,
502
- "isPublic": true
503
- },
504
- "summarizeAiUsage": {
505
- "name": "summarizeAiUsage",
506
- "async": true,
507
466
  "parameters": [
508
467
  {
509
- "name": "options",
510
- "type": "AiUsageSummaryOptions",
511
- "optional": true
468
+ "name": "rules",
469
+ "type": "Record<string>",
470
+ "optional": false
512
471
  }
513
472
  ],
514
- "returnType": "Promise<Record<string, AiUsageStats>>",
515
- "isStatic": false,
516
- "isPublic": true
517
- },
518
- "destroy": {
519
- "name": "destroy",
520
- "async": false,
521
- "parameters": [],
522
- "returnType": "void",
523
- "isStatic": false,
524
- "isPublic": true
525
- },
526
- "markAsPersisted": {
527
- "name": "markAsPersisted",
528
- "async": false,
529
- "parameters": [],
530
- "returnType": "void",
531
- "isStatic": false,
532
- "isPublic": true
533
- },
534
- "requireInsertOnSave": {
535
- "name": "requireInsertOnSave",
536
- "async": false,
537
- "parameters": [],
538
473
  "returnType": "void",
539
474
  "isStatic": false,
540
475
  "isPublic": true
541
476
  },
542
- "withTransaction": {
543
- "name": "withTransaction",
477
+ "getBySlug": {
478
+ "name": "getBySlug",
544
479
  "async": true,
545
480
  "parameters": [
546
481
  {
547
- "name": "operation",
548
- "type": "Function",
482
+ "name": "_slug",
483
+ "type": "string",
549
484
  "optional": false
550
485
  }
551
486
  ],
552
- "returnType": "Promise<T>",
553
- "isStatic": false,
487
+ "returnType": "Promise<AssetMetafield | null>",
488
+ "isStatic": true,
554
489
  "isPublic": true
490
+ }
491
+ },
492
+ "decoratorConfig": {
493
+ "tableStrategy": "sti",
494
+ "api": {
495
+ "include": [
496
+ "list",
497
+ "get",
498
+ "create",
499
+ "update",
500
+ "delete"
501
+ ]
555
502
  },
556
- "initialize": {
557
- "name": "initialize",
558
- "async": true,
559
- "parameters": [],
560
- "returnType": "Promise",
561
- "isStatic": false,
562
- "isPublic": true
503
+ "mcp": {
504
+ "include": [
505
+ "list",
506
+ "get",
507
+ "create"
508
+ ]
509
+ },
510
+ "cli": true
511
+ },
512
+ "extends": "SmrtObject",
513
+ "exportName": "AssetMetafield",
514
+ "collectionExportName": "AssetMetafieldCollection",
515
+ "schema": {
516
+ "tableName": "asset_metafields",
517
+ "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);",
518
+ "columns": {
519
+ "id": {
520
+ "type": "UUID",
521
+ "primaryKey": true,
522
+ "referenceKind": "id",
523
+ "notNull": true
524
+ },
525
+ "slug": {
526
+ "type": "TEXT",
527
+ "notNull": true
528
+ },
529
+ "context": {
530
+ "type": "TEXT",
531
+ "notNull": true,
532
+ "default": ""
533
+ },
534
+ "_meta_type": {
535
+ "type": "TEXT",
536
+ "notNull": true
537
+ },
538
+ "_meta_data": {
539
+ "type": "JSON",
540
+ "notNull": false
541
+ },
542
+ "created_at": {
543
+ "type": "TIMESTAMP",
544
+ "notNull": true,
545
+ "default": "current_timestamp"
546
+ },
547
+ "updated_at": {
548
+ "type": "TIMESTAMP",
549
+ "notNull": true,
550
+ "default": "current_timestamp"
551
+ },
552
+ "name": {
553
+ "type": "TEXT",
554
+ "notNull": false
555
+ },
556
+ "validation": {
557
+ "type": "TEXT",
558
+ "notNull": false
559
+ }
563
560
  },
564
- "loadDataFromDb": {
565
- "name": "loadDataFromDb",
561
+ "indexes": [
562
+ {
563
+ "name": "asset_metafields_slug_context_meta_type_idx",
564
+ "columns": [
565
+ "slug",
566
+ "context",
567
+ "_meta_type"
568
+ ],
569
+ "unique": true
570
+ },
571
+ {
572
+ "name": "asset_metafields_meta_type_idx",
573
+ "columns": [
574
+ "_meta_type"
575
+ ]
576
+ },
577
+ {
578
+ "name": "asset_metafields_created_at_idx",
579
+ "columns": [
580
+ "created_at"
581
+ ]
582
+ }
583
+ ],
584
+ "version": "7393718c"
585
+ }
586
+ },
587
+ "@happyvertical/smrt-assets:AssetMetafieldCollection": {
588
+ "name": "assetmetafieldcollection",
589
+ "className": "AssetMetafieldCollection",
590
+ "qualifiedName": "@happyvertical/smrt-assets:AssetMetafieldCollection",
591
+ "collection": "assetmetafields",
592
+ "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset-metafields.ts",
593
+ "packageName": "@happyvertical/smrt-assets",
594
+ "fields": {},
595
+ "methods": {
596
+ "getOrCreate": {
597
+ "name": "getOrCreate",
566
598
  "async": true,
567
599
  "parameters": [
568
600
  {
569
- "name": "data",
570
- "type": "Record<string>",
601
+ "name": "slug",
602
+ "type": "string",
571
603
  "optional": false
572
- }
573
- ],
574
- "returnType": "any",
575
- "isStatic": false,
576
- "isPublic": true
577
- },
578
- "getFields": {
579
- "name": "getFields",
580
- "async": true,
581
- "parameters": [],
582
- "returnType": "Promise<any>",
583
- "isStatic": false,
584
- "isPublic": true
585
- },
586
- "toJSON": {
587
- "name": "toJSON",
588
- "async": false,
589
- "parameters": [],
590
- "returnType": "any",
591
- "isStatic": false,
592
- "isPublic": true
593
- },
594
- "toPlainObject": {
595
- "name": "toPlainObject",
596
- "async": false,
597
- "parameters": [],
598
- "returnType": "Record<string>",
599
- "isStatic": false,
600
- "isPublic": true
601
- },
602
- "toPublicJSON": {
603
- "name": "toPublicJSON",
604
- "async": false,
605
- "parameters": [
604
+ },
606
605
  {
607
- "name": "options",
608
- "type": "PublicJsonOptions",
606
+ "name": "name",
607
+ "type": "string",
609
608
  "optional": true
610
- }
611
- ],
612
- "returnType": "Record<string>",
613
- "isStatic": false,
614
- "isPublic": true
615
- },
616
- "getId": {
617
- "name": "getId",
618
- "async": true,
619
- "parameters": [],
620
- "returnType": "any",
621
- "isStatic": false,
622
- "isPublic": true
623
- },
624
- "getSlug": {
625
- "name": "getSlug",
626
- "async": true,
627
- "parameters": [],
628
- "returnType": "any",
629
- "isStatic": false,
630
- "isPublic": true
631
- },
632
- "getSavedId": {
633
- "name": "getSavedId",
634
- "async": true,
635
- "parameters": [],
636
- "returnType": "any",
637
- "isStatic": false,
638
- "isPublic": true
639
- },
640
- "isSaved": {
641
- "name": "isSaved",
642
- "async": true,
643
- "parameters": [],
644
- "returnType": "any",
645
- "isStatic": false,
646
- "isPublic": true
647
- },
648
- "save": {
649
- "name": "save",
650
- "async": true,
651
- "parameters": [
609
+ },
652
610
  {
653
- "name": "options",
654
- "type": "SmrtSaveOptions",
611
+ "name": "validation",
612
+ "type": "string | Record<string>",
655
613
  "optional": true
656
614
  }
657
615
  ],
658
- "returnType": "any",
659
- "isStatic": false,
660
- "isPublic": true
661
- },
662
- "claimRevision": {
663
- "name": "claimRevision",
664
- "async": true,
665
- "parameters": [
666
- {
667
- "name": "expectedUpdatedAt",
668
- "type": "Date | string",
669
- "optional": false
670
- }
671
- ],
672
- "returnType": "Promise",
616
+ "returnType": "Promise<AssetMetafield>",
673
617
  "isStatic": false,
674
618
  "isPublic": true
675
619
  },
676
- "classifyConstraintError": {
677
- "name": "classifyConstraintError",
678
- "async": false,
679
- "parameters": [
680
- {
681
- "name": "message",
682
- "type": "string",
683
- "optional": false
684
- }
685
- ],
686
- "returnType": "'unique' | 'not_null' | null",
687
- "isStatic": true,
688
- "isPublic": true
689
- },
690
- "loadFromId": {
691
- "name": "loadFromId",
620
+ "initializeCommonMetafields": {
621
+ "name": "initializeCommonMetafields",
692
622
  "async": true,
693
623
  "parameters": [],
694
- "returnType": "any",
695
- "isStatic": false,
696
- "isPublic": true
697
- },
698
- "loadFromSlug": {
699
- "name": "loadFromSlug",
700
- "async": true,
701
- "parameters": [],
702
- "returnType": "any",
624
+ "returnType": "Promise<void>",
703
625
  "isStatic": false,
704
626
  "isPublic": true
627
+ }
628
+ },
629
+ "decoratorConfig": {},
630
+ "extends": "SmrtCollection",
631
+ "extendsTypeArg": "AssetMetafield",
632
+ "exportName": "AssetMetafieldCollection",
633
+ "collectionExportName": "AssetMetafieldCollectionCollection",
634
+ "schema": {
635
+ "tableName": "asset_metafield_collections",
636
+ "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);",
637
+ "columns": {
638
+ "id": {
639
+ "type": "UUID",
640
+ "primaryKey": true,
641
+ "referenceKind": "id",
642
+ "notNull": true
643
+ },
644
+ "slug": {
645
+ "type": "TEXT",
646
+ "notNull": true
647
+ },
648
+ "context": {
649
+ "type": "TEXT",
650
+ "notNull": true,
651
+ "default": ""
652
+ },
653
+ "created_at": {
654
+ "type": "TIMESTAMP",
655
+ "notNull": true,
656
+ "default": "current_timestamp"
657
+ },
658
+ "updated_at": {
659
+ "type": "TIMESTAMP",
660
+ "notNull": true,
661
+ "default": "current_timestamp"
662
+ }
663
+ },
664
+ "indexes": [
665
+ {
666
+ "name": "asset_metafield_collections_slug_context_idx",
667
+ "columns": [
668
+ "slug",
669
+ "context"
670
+ ],
671
+ "unique": true
672
+ },
673
+ {
674
+ "name": "asset_metafield_collections_created_at_idx",
675
+ "columns": [
676
+ "created_at"
677
+ ]
678
+ }
679
+ ],
680
+ "version": "912b98aa"
681
+ }
682
+ },
683
+ "@happyvertical/smrt-assets:AssetStatus": {
684
+ "name": "assetstatus",
685
+ "className": "AssetStatus",
686
+ "qualifiedName": "@happyvertical/smrt-assets:AssetStatus",
687
+ "collection": "assetstatuses",
688
+ "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset-status.ts",
689
+ "packageName": "@happyvertical/smrt-assets",
690
+ "fields": {
691
+ "created_at": {
692
+ "type": "datetime",
693
+ "required": false
694
+ },
695
+ "updated_at": {
696
+ "type": "datetime",
697
+ "required": false
698
+ },
699
+ "name": {
700
+ "type": "text",
701
+ "required": false
705
702
  },
706
- "is": {
707
- "name": "is",
703
+ "description": {
704
+ "type": "text",
705
+ "required": false
706
+ }
707
+ },
708
+ "methods": {
709
+ "getBySlug": {
710
+ "name": "getBySlug",
708
711
  "async": true,
709
712
  "parameters": [
710
713
  {
711
- "name": "criteria",
714
+ "name": "_slug",
712
715
  "type": "string",
713
716
  "optional": false
714
- },
715
- {
716
- "name": "options",
717
- "type": "AiOperationOptions",
718
- "optional": true
719
717
  }
720
718
  ],
721
- "returnType": "any",
722
- "isStatic": false,
719
+ "returnType": "Promise<AssetStatus | null>",
720
+ "isStatic": true,
723
721
  "isPublic": true
722
+ }
723
+ },
724
+ "decoratorConfig": {
725
+ "tableStrategy": "sti",
726
+ "api": {
727
+ "include": [
728
+ "list",
729
+ "get",
730
+ "create",
731
+ "update",
732
+ "delete"
733
+ ]
734
+ },
735
+ "mcp": {
736
+ "include": [
737
+ "list",
738
+ "get",
739
+ "create"
740
+ ]
741
+ },
742
+ "cli": true
743
+ },
744
+ "extends": "SmrtObject",
745
+ "exportName": "AssetStatus",
746
+ "collectionExportName": "AssetStatusCollection",
747
+ "schema": {
748
+ "tableName": "asset_statuses",
749
+ "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);",
750
+ "columns": {
751
+ "id": {
752
+ "type": "UUID",
753
+ "primaryKey": true,
754
+ "referenceKind": "id",
755
+ "notNull": true
756
+ },
757
+ "slug": {
758
+ "type": "TEXT",
759
+ "notNull": true
760
+ },
761
+ "context": {
762
+ "type": "TEXT",
763
+ "notNull": true,
764
+ "default": ""
765
+ },
766
+ "_meta_type": {
767
+ "type": "TEXT",
768
+ "notNull": true
769
+ },
770
+ "_meta_data": {
771
+ "type": "JSON",
772
+ "notNull": false
773
+ },
774
+ "created_at": {
775
+ "type": "TIMESTAMP",
776
+ "notNull": true,
777
+ "default": "current_timestamp"
778
+ },
779
+ "updated_at": {
780
+ "type": "TIMESTAMP",
781
+ "notNull": true,
782
+ "default": "current_timestamp"
783
+ },
784
+ "name": {
785
+ "type": "TEXT",
786
+ "notNull": false
787
+ },
788
+ "description": {
789
+ "type": "TEXT",
790
+ "notNull": false
791
+ }
724
792
  },
725
- "do": {
726
- "name": "do",
793
+ "indexes": [
794
+ {
795
+ "name": "asset_statuses_slug_context_meta_type_idx",
796
+ "columns": [
797
+ "slug",
798
+ "context",
799
+ "_meta_type"
800
+ ],
801
+ "unique": true
802
+ },
803
+ {
804
+ "name": "asset_statuses_meta_type_idx",
805
+ "columns": [
806
+ "_meta_type"
807
+ ]
808
+ },
809
+ {
810
+ "name": "asset_statuses_created_at_idx",
811
+ "columns": [
812
+ "created_at"
813
+ ]
814
+ }
815
+ ],
816
+ "version": "8251a52f"
817
+ }
818
+ },
819
+ "@happyvertical/smrt-assets:AssetStatusCollection": {
820
+ "name": "assetstatuscollection",
821
+ "className": "AssetStatusCollection",
822
+ "qualifiedName": "@happyvertical/smrt-assets:AssetStatusCollection",
823
+ "collection": "assetstatuses",
824
+ "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset-statuses.ts",
825
+ "packageName": "@happyvertical/smrt-assets",
826
+ "fields": {},
827
+ "methods": {
828
+ "getOrCreate": {
829
+ "name": "getOrCreate",
727
830
  "async": true,
728
831
  "parameters": [
729
832
  {
730
- "name": "instructions",
833
+ "name": "slug",
731
834
  "type": "string",
732
835
  "optional": false
733
836
  },
734
837
  {
735
- "name": "options",
736
- "type": "AiOperationOptions",
838
+ "name": "name",
839
+ "type": "string",
737
840
  "optional": true
738
- }
739
- ],
740
- "returnType": "any",
741
- "isStatic": false,
742
- "isPublic": true
743
- },
744
- "describe": {
745
- "name": "describe",
746
- "async": true,
747
- "parameters": [
841
+ },
748
842
  {
749
- "name": "options",
750
- "type": "AiOperationOptions",
843
+ "name": "description",
844
+ "type": "string",
751
845
  "optional": true
752
846
  }
753
847
  ],
754
- "returnType": "any",
848
+ "returnType": "Promise<AssetStatus>",
755
849
  "isStatic": false,
756
850
  "isPublic": true
757
851
  },
758
- "delete": {
759
- "name": "delete",
852
+ "initializeCommonStatuses": {
853
+ "name": "initializeCommonStatuses",
760
854
  "async": true,
761
- "parameters": [
762
- {
763
- "name": "options",
764
- "type": "SmrtDeleteOptions",
765
- "optional": true
766
- }
767
- ],
855
+ "parameters": [],
768
856
  "returnType": "Promise<void>",
769
857
  "isStatic": false,
770
858
  "isPublic": true
859
+ }
860
+ },
861
+ "decoratorConfig": {},
862
+ "extends": "SmrtCollection",
863
+ "extendsTypeArg": "AssetStatus",
864
+ "exportName": "AssetStatusCollection",
865
+ "collectionExportName": "AssetStatusCollectionCollection",
866
+ "schema": {
867
+ "tableName": "asset_status_collections",
868
+ "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);",
869
+ "columns": {
870
+ "id": {
871
+ "type": "UUID",
872
+ "primaryKey": true,
873
+ "referenceKind": "id",
874
+ "notNull": true
875
+ },
876
+ "slug": {
877
+ "type": "TEXT",
878
+ "notNull": true
879
+ },
880
+ "context": {
881
+ "type": "TEXT",
882
+ "notNull": true,
883
+ "default": ""
884
+ },
885
+ "created_at": {
886
+ "type": "TIMESTAMP",
887
+ "notNull": true,
888
+ "default": "current_timestamp"
889
+ },
890
+ "updated_at": {
891
+ "type": "TIMESTAMP",
892
+ "notNull": true,
893
+ "default": "current_timestamp"
894
+ }
771
895
  },
772
- "isRelatedLoaded": {
773
- "name": "isRelatedLoaded",
774
- "async": false,
775
- "parameters": [
776
- {
777
- "name": "fieldName",
778
- "type": "string",
779
- "optional": false
780
- }
781
- ],
782
- "returnType": "boolean",
783
- "isStatic": false,
784
- "isPublic": true
785
- },
786
- "_setLoadedRelationship": {
787
- "name": "_setLoadedRelationship",
788
- "async": false,
789
- "parameters": [
790
- {
791
- "name": "fieldName",
792
- "type": "string",
793
- "optional": false
794
- },
795
- {
796
- "name": "value",
797
- "type": "any",
798
- "optional": false
799
- }
800
- ],
801
- "returnType": "void",
802
- "isStatic": false,
803
- "isPublic": true
804
- },
805
- "loadRelated": {
806
- "name": "loadRelated",
807
- "async": true,
808
- "parameters": [
809
- {
810
- "name": "fieldName",
811
- "type": "string",
812
- "optional": false
813
- },
814
- {
815
- "name": "opts",
816
- "type": "LoadRelatedOptions",
817
- "optional": true
818
- }
819
- ],
820
- "returnType": "Promise<any>",
821
- "isStatic": false,
822
- "isPublic": true
823
- },
824
- "loadRelatedMany": {
825
- "name": "loadRelatedMany",
826
- "async": true,
827
- "parameters": [
828
- {
829
- "name": "fieldName",
830
- "type": "string",
831
- "optional": false
832
- },
833
- {
834
- "name": "opts",
835
- "type": "LoadRelatedOptions",
836
- "optional": true
837
- }
838
- ],
839
- "returnType": "Promise<any[]>",
840
- "isStatic": false,
841
- "isPublic": true
842
- },
843
- "getRelated": {
844
- "name": "getRelated",
845
- "async": true,
846
- "parameters": [
847
- {
848
- "name": "fieldName",
849
- "type": "string",
850
- "optional": false
851
- },
852
- {
853
- "name": "opts",
854
- "type": "LoadRelatedOptions",
855
- "optional": true
856
- }
857
- ],
858
- "returnType": "Promise<any>",
859
- "isStatic": false,
860
- "isPublic": true
861
- },
862
- "getAvailableTools": {
863
- "name": "getAvailableTools",
864
- "async": false,
865
- "parameters": [],
866
- "returnType": "AITool[]",
867
- "isStatic": false,
868
- "isPublic": true
869
- },
870
- "executeToolCall": {
871
- "name": "executeToolCall",
872
- "async": true,
873
- "parameters": [
874
- {
875
- "name": "toolCall",
876
- "type": "ToolCall",
877
- "optional": false
878
- }
879
- ],
880
- "returnType": "Promise<ToolCallResult>",
881
- "isStatic": false,
882
- "isPublic": true
883
- },
884
- "remember": {
885
- "name": "remember",
886
- "async": true,
887
- "parameters": [
888
- {
889
- "name": "options",
890
- "type": "object",
891
- "optional": false
892
- }
893
- ],
894
- "returnType": "Promise<void>",
895
- "isStatic": false,
896
- "isPublic": true
897
- },
898
- "recall": {
899
- "name": "recall",
900
- "async": true,
901
- "parameters": [
902
- {
903
- "name": "options",
904
- "type": "object",
905
- "optional": false
906
- }
907
- ],
908
- "returnType": "Promise",
909
- "isStatic": false,
910
- "isPublic": true
911
- },
912
- "recallAll": {
913
- "name": "recallAll",
914
- "async": true,
915
- "parameters": [
916
- {
917
- "name": "options",
918
- "type": "object",
919
- "optional": true
920
- }
921
- ],
922
- "returnType": "Promise<Map<string>>",
923
- "isStatic": false,
924
- "isPublic": true
925
- },
926
- "forget": {
927
- "name": "forget",
928
- "async": true,
929
- "parameters": [
930
- {
931
- "name": "options",
932
- "type": "object",
933
- "optional": false
934
- }
935
- ],
936
- "returnType": "Promise<void>",
937
- "isStatic": false,
938
- "isPublic": true
939
- },
940
- "forgetScope": {
941
- "name": "forgetScope",
942
- "async": true,
943
- "parameters": [
944
- {
945
- "name": "options",
946
- "type": "object",
947
- "optional": false
948
- }
949
- ],
950
- "returnType": "Promise<number>",
951
- "isStatic": false,
952
- "isPublic": true
953
- },
954
- "generateEmbeddings": {
955
- "name": "generateEmbeddings",
956
- "async": true,
957
- "parameters": [
958
- {
959
- "name": "options",
960
- "type": "GenerateEmbeddingsOptions",
961
- "optional": true
962
- }
963
- ],
964
- "returnType": "Promise<void>",
965
- "isStatic": false,
966
- "isPublic": true
967
- },
968
- "getEmbedding": {
969
- "name": "getEmbedding",
970
- "async": true,
971
- "parameters": [
972
- {
973
- "name": "fieldName",
974
- "type": "string",
975
- "optional": false
976
- },
977
- {
978
- "name": "model",
979
- "type": "string",
980
- "optional": true
981
- }
982
- ],
983
- "returnType": "Promise<number[] | null>",
984
- "isStatic": false,
985
- "isPublic": true
986
- },
987
- "hasStaleEmbeddings": {
988
- "name": "hasStaleEmbeddings",
989
- "async": true,
990
- "parameters": [],
991
- "returnType": "Promise<boolean>",
992
- "isStatic": false,
993
- "isPublic": true
994
- },
995
- "clearEmbeddings": {
996
- "name": "clearEmbeddings",
997
- "async": true,
998
- "parameters": [],
999
- "returnType": "Promise<void>",
1000
- "isStatic": false,
1001
- "isPublic": true
896
+ "indexes": [
897
+ {
898
+ "name": "asset_status_collections_slug_context_idx",
899
+ "columns": [
900
+ "slug",
901
+ "context"
902
+ ],
903
+ "unique": true
904
+ },
905
+ {
906
+ "name": "asset_status_collections_created_at_idx",
907
+ "columns": [
908
+ "created_at"
909
+ ]
910
+ }
911
+ ],
912
+ "version": "1b138d50"
913
+ }
914
+ },
915
+ "@happyvertical/smrt-assets:AssetType": {
916
+ "name": "assettype",
917
+ "className": "AssetType",
918
+ "qualifiedName": "@happyvertical/smrt-assets:AssetType",
919
+ "collection": "assettypes",
920
+ "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset-type.ts",
921
+ "packageName": "@happyvertical/smrt-assets",
922
+ "fields": {
923
+ "created_at": {
924
+ "type": "datetime",
925
+ "required": false
1002
926
  },
1003
- "getValidation": {
1004
- "name": "getValidation",
1005
- "async": false,
1006
- "parameters": [],
1007
- "returnType": "Record<string>",
1008
- "isStatic": false,
1009
- "isPublic": true
927
+ "updated_at": {
928
+ "type": "datetime",
929
+ "required": false
1010
930
  },
1011
- "setValidation": {
1012
- "name": "setValidation",
1013
- "async": false,
1014
- "parameters": [
1015
- {
1016
- "name": "rules",
1017
- "type": "Record<string>",
1018
- "optional": false
1019
- }
1020
- ],
1021
- "returnType": "void",
1022
- "isStatic": false,
1023
- "isPublic": true
931
+ "name": {
932
+ "type": "text",
933
+ "required": false
1024
934
  },
935
+ "description": {
936
+ "type": "text",
937
+ "required": false
938
+ }
939
+ },
940
+ "methods": {
1025
941
  "getBySlug": {
1026
942
  "name": "getBySlug",
1027
943
  "async": true,
@@ -1032,7 +948,7 @@
1032
948
  "optional": false
1033
949
  }
1034
950
  ],
1035
- "returnType": "Promise<AssetMetafield | null>",
951
+ "returnType": "Promise<AssetType | null>",
1036
952
  "isStatic": true,
1037
953
  "isPublic": true
1038
954
  }
@@ -1058,11 +974,11 @@
1058
974
  "cli": true
1059
975
  },
1060
976
  "extends": "SmrtObject",
1061
- "exportName": "AssetMetafield",
1062
- "collectionExportName": "AssetMetafieldCollection",
977
+ "exportName": "AssetType",
978
+ "collectionExportName": "AssetTypeCollection",
1063
979
  "schema": {
1064
- "tableName": "asset_metafields",
1065
- "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);",
980
+ "tableName": "asset_types",
981
+ "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);",
1066
982
  "columns": {
1067
983
  "id": {
1068
984
  "type": "UUID",
@@ -1101,14 +1017,14 @@
1101
1017
  "type": "TEXT",
1102
1018
  "notNull": false
1103
1019
  },
1104
- "validation": {
1020
+ "description": {
1105
1021
  "type": "TEXT",
1106
1022
  "notNull": false
1107
1023
  }
1108
1024
  },
1109
1025
  "indexes": [
1110
1026
  {
1111
- "name": "asset_metafields_slug_context_meta_type_idx",
1027
+ "name": "asset_types_slug_context_meta_type_idx",
1112
1028
  "columns": [
1113
1029
  "slug",
1114
1030
  "context",
@@ -1117,28 +1033,28 @@
1117
1033
  "unique": true
1118
1034
  },
1119
1035
  {
1120
- "name": "asset_metafields_meta_type_idx",
1036
+ "name": "asset_types_meta_type_idx",
1121
1037
  "columns": [
1122
1038
  "_meta_type"
1123
1039
  ]
1124
1040
  },
1125
1041
  {
1126
- "name": "asset_metafields_created_at_idx",
1042
+ "name": "asset_types_created_at_idx",
1127
1043
  "columns": [
1128
1044
  "created_at"
1129
1045
  ]
1130
1046
  }
1131
1047
  ],
1132
- "version": "7393718c"
1048
+ "version": "a9c93be2"
1133
1049
  }
1134
1050
  },
1135
- "@happyvertical/smrt-assets:AssetMetafieldCollection": {
1136
- "name": "assetmetafieldcollection",
1137
- "className": "AssetMetafieldCollection",
1138
- "qualifiedName": "@happyvertical/smrt-assets:AssetMetafieldCollection",
1139
- "collection": "assetmetafields",
1140
- "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset-metafields.ts",
1141
- "packageName": "@happyvertical/smrt-assets",
1051
+ "@happyvertical/smrt-assets:AssetTypeCollection": {
1052
+ "name": "assettypecollection",
1053
+ "className": "AssetTypeCollection",
1054
+ "qualifiedName": "@happyvertical/smrt-assets:AssetTypeCollection",
1055
+ "collection": "assettypes",
1056
+ "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset-types.ts",
1057
+ "packageName": "@happyvertical/smrt-assets",
1142
1058
  "fields": {},
1143
1059
  "methods": {
1144
1060
  "getOrCreate": {
@@ -1156,17 +1072,17 @@
1156
1072
  "optional": true
1157
1073
  },
1158
1074
  {
1159
- "name": "validation",
1160
- "type": "string | Record<string>",
1075
+ "name": "description",
1076
+ "type": "string",
1161
1077
  "optional": true
1162
1078
  }
1163
1079
  ],
1164
- "returnType": "Promise<AssetMetafield>",
1080
+ "returnType": "Promise<AssetType>",
1165
1081
  "isStatic": false,
1166
1082
  "isPublic": true
1167
1083
  },
1168
- "initializeCommonMetafields": {
1169
- "name": "initializeCommonMetafields",
1084
+ "initializeCommonTypes": {
1085
+ "name": "initializeCommonTypes",
1170
1086
  "async": true,
1171
1087
  "parameters": [],
1172
1088
  "returnType": "Promise<void>",
@@ -1176,12 +1092,12 @@
1176
1092
  },
1177
1093
  "decoratorConfig": {},
1178
1094
  "extends": "SmrtCollection",
1179
- "extendsTypeArg": "AssetMetafield",
1180
- "exportName": "AssetMetafieldCollection",
1181
- "collectionExportName": "AssetMetafieldCollectionCollection",
1095
+ "extendsTypeArg": "AssetType",
1096
+ "exportName": "AssetTypeCollection",
1097
+ "collectionExportName": "AssetTypeCollectionCollection",
1182
1098
  "schema": {
1183
- "tableName": "asset_metafield_collections",
1184
- "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);",
1099
+ "tableName": "asset_type_collections",
1100
+ "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);",
1185
1101
  "columns": {
1186
1102
  "id": {
1187
1103
  "type": "UUID",
@@ -1211,7 +1127,7 @@
1211
1127
  },
1212
1128
  "indexes": [
1213
1129
  {
1214
- "name": "asset_metafield_collections_slug_context_idx",
1130
+ "name": "asset_type_collections_slug_context_idx",
1215
1131
  "columns": [
1216
1132
  "slug",
1217
1133
  "context"
@@ -1219,21 +1135,21 @@
1219
1135
  "unique": true
1220
1136
  },
1221
1137
  {
1222
- "name": "asset_metafield_collections_created_at_idx",
1138
+ "name": "asset_type_collections_created_at_idx",
1223
1139
  "columns": [
1224
1140
  "created_at"
1225
1141
  ]
1226
1142
  }
1227
1143
  ],
1228
- "version": "912b98aa"
1144
+ "version": "40007bcf"
1229
1145
  }
1230
1146
  },
1231
- "@happyvertical/smrt-assets:AssetStatus": {
1232
- "name": "assetstatus",
1233
- "className": "AssetStatus",
1234
- "qualifiedName": "@happyvertical/smrt-assets:AssetStatus",
1235
- "collection": "assetstatuses",
1236
- "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset-status.ts",
1147
+ "@happyvertical/smrt-assets:Asset": {
1148
+ "name": "asset",
1149
+ "className": "Asset",
1150
+ "qualifiedName": "@happyvertical/smrt-assets:Asset",
1151
+ "collection": "assets",
1152
+ "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset.ts",
1237
1153
  "packageName": "@happyvertical/smrt-assets",
1238
1154
  "fields": {
1239
1155
  "created_at": {
@@ -1244,2207 +1160,99 @@
1244
1160
  "type": "datetime",
1245
1161
  "required": false
1246
1162
  },
1163
+ "tenantId": {
1164
+ "type": "text",
1165
+ "required": false,
1166
+ "_meta": {
1167
+ "sqlType": "UUID",
1168
+ "nullable": true,
1169
+ "__tenancy": {
1170
+ "isTenantIdField": true,
1171
+ "autoFilter": true,
1172
+ "required": false,
1173
+ "autoPopulate": true,
1174
+ "nullable": true,
1175
+ "mode": "optional",
1176
+ "field": "tenantId",
1177
+ "allowSuperAdminBypass": false
1178
+ }
1179
+ }
1180
+ },
1247
1181
  "name": {
1248
1182
  "type": "text",
1249
1183
  "required": false
1250
1184
  },
1251
- "description": {
1185
+ "sourceUri": {
1252
1186
  "type": "text",
1253
1187
  "required": false
1254
- }
1255
- },
1256
- "methods": {
1257
- "withDatabase": {
1258
- "name": "withDatabase",
1259
- "async": true,
1260
- "parameters": [
1261
- {
1262
- "name": "db",
1263
- "type": "DatabaseInterface",
1264
- "optional": false
1265
- },
1266
- {
1267
- "name": "operation",
1268
- "type": "Function",
1269
- "optional": false
1270
- }
1271
- ],
1272
- "returnType": "Promise<T>",
1273
- "isStatic": false,
1274
- "isPublic": true
1275
- },
1276
- "getAiUsageSnapshot": {
1277
- "name": "getAiUsageSnapshot",
1278
- "async": false,
1279
- "parameters": [],
1280
- "returnType": "AiUsageSnapshot | undefined",
1281
- "isStatic": false,
1282
- "isPublic": true
1283
- },
1284
- "resetAiUsage": {
1285
- "name": "resetAiUsage",
1286
- "async": false,
1287
- "parameters": [],
1288
- "returnType": "void",
1289
- "isStatic": false,
1290
- "isPublic": true
1291
- },
1292
- "listAiUsage": {
1293
- "name": "listAiUsage",
1294
- "async": true,
1295
- "parameters": [
1296
- {
1297
- "name": "options",
1298
- "type": "AiUsageListOptions",
1299
- "optional": true
1300
- }
1301
- ],
1302
- "returnType": "Promise<SmrtAiUsageRecord[]>",
1303
- "isStatic": false,
1304
- "isPublic": true
1305
- },
1306
- "summarizeAiUsage": {
1307
- "name": "summarizeAiUsage",
1308
- "async": true,
1309
- "parameters": [
1310
- {
1311
- "name": "options",
1312
- "type": "AiUsageSummaryOptions",
1313
- "optional": true
1314
- }
1315
- ],
1316
- "returnType": "Promise<Record<string, AiUsageStats>>",
1317
- "isStatic": false,
1318
- "isPublic": true
1319
- },
1320
- "destroy": {
1321
- "name": "destroy",
1322
- "async": false,
1323
- "parameters": [],
1324
- "returnType": "void",
1325
- "isStatic": false,
1326
- "isPublic": true
1327
- },
1328
- "markAsPersisted": {
1329
- "name": "markAsPersisted",
1330
- "async": false,
1331
- "parameters": [],
1332
- "returnType": "void",
1333
- "isStatic": false,
1334
- "isPublic": true
1335
1188
  },
1336
- "requireInsertOnSave": {
1337
- "name": "requireInsertOnSave",
1338
- "async": false,
1339
- "parameters": [],
1340
- "returnType": "void",
1341
- "isStatic": false,
1342
- "isPublic": true
1189
+ "mimeType": {
1190
+ "type": "text",
1191
+ "required": false
1343
1192
  },
1344
- "withTransaction": {
1345
- "name": "withTransaction",
1346
- "async": true,
1347
- "parameters": [
1348
- {
1349
- "name": "operation",
1350
- "type": "Function",
1351
- "optional": false
1352
- }
1353
- ],
1354
- "returnType": "Promise<T>",
1355
- "isStatic": false,
1356
- "isPublic": true
1193
+ "description": {
1194
+ "type": "text",
1195
+ "required": false
1357
1196
  },
1358
- "initialize": {
1359
- "name": "initialize",
1360
- "async": true,
1361
- "parameters": [],
1362
- "returnType": "Promise",
1363
- "isStatic": false,
1364
- "isPublic": true
1197
+ "metadata": {
1198
+ "type": "text",
1199
+ "required": false
1365
1200
  },
1366
- "loadDataFromDb": {
1367
- "name": "loadDataFromDb",
1368
- "async": true,
1369
- "parameters": [
1370
- {
1371
- "name": "data",
1372
- "type": "Record<string>",
1373
- "optional": false
1374
- }
1375
- ],
1376
- "returnType": "any",
1377
- "isStatic": false,
1378
- "isPublic": true
1201
+ "version": {
1202
+ "type": "integer",
1203
+ "required": true,
1204
+ "default": 1
1379
1205
  },
1380
- "getFields": {
1381
- "name": "getFields",
1382
- "async": true,
1383
- "parameters": [],
1384
- "returnType": "Promise<any>",
1385
- "isStatic": false,
1386
- "isPublic": true
1206
+ "primaryVersionId": {
1207
+ "type": "foreignKey",
1208
+ "required": false,
1209
+ "related": "Asset"
1387
1210
  },
1388
- "toJSON": {
1389
- "name": "toJSON",
1390
- "async": false,
1391
- "parameters": [],
1392
- "returnType": "any",
1393
- "isStatic": false,
1394
- "isPublic": true
1211
+ "typeSlug": {
1212
+ "type": "text",
1213
+ "required": false
1395
1214
  },
1396
- "toPlainObject": {
1397
- "name": "toPlainObject",
1398
- "async": false,
1399
- "parameters": [],
1400
- "returnType": "Record<string>",
1401
- "isStatic": false,
1402
- "isPublic": true
1215
+ "statusSlug": {
1216
+ "type": "text",
1217
+ "required": false
1403
1218
  },
1404
- "toPublicJSON": {
1405
- "name": "toPublicJSON",
1406
- "async": false,
1407
- "parameters": [
1408
- {
1409
- "name": "options",
1410
- "type": "PublicJsonOptions",
1411
- "optional": true
1412
- }
1413
- ],
1414
- "returnType": "Record<string>",
1415
- "isStatic": false,
1416
- "isPublic": true
1219
+ "ownerProfileId": {
1220
+ "type": "crossPackageRef",
1221
+ "required": false,
1222
+ "related": "@happyvertical/smrt-profiles:Profile"
1417
1223
  },
1418
- "getId": {
1419
- "name": "getId",
1420
- "async": true,
1421
- "parameters": [],
1422
- "returnType": "any",
1423
- "isStatic": false,
1424
- "isPublic": true
1224
+ "sourceAssetId": {
1225
+ "type": "foreignKey",
1226
+ "required": false,
1227
+ "related": "Asset"
1425
1228
  },
1426
- "getSlug": {
1427
- "name": "getSlug",
1428
- "async": true,
1429
- "parameters": [],
1430
- "returnType": "any",
1431
- "isStatic": false,
1432
- "isPublic": true
1229
+ "folderId": {
1230
+ "type": "foreignKey",
1231
+ "required": false,
1232
+ "related": "Folder"
1433
1233
  },
1434
- "getSavedId": {
1435
- "name": "getSavedId",
1436
- "async": true,
1437
- "parameters": [],
1438
- "returnType": "any",
1439
- "isStatic": false,
1440
- "isPublic": true
1234
+ "sourceType": {
1235
+ "type": "text",
1236
+ "required": false
1441
1237
  },
1442
- "isSaved": {
1443
- "name": "isSaved",
1444
- "async": true,
1445
- "parameters": [],
1446
- "returnType": "any",
1447
- "isStatic": false,
1448
- "isPublic": true
1238
+ "externalId": {
1239
+ "type": "text",
1240
+ "required": false
1449
1241
  },
1450
- "save": {
1451
- "name": "save",
1452
- "async": true,
1453
- "parameters": [
1454
- {
1455
- "name": "options",
1456
- "type": "SmrtSaveOptions",
1457
- "optional": true
1458
- }
1459
- ],
1460
- "returnType": "any",
1461
- "isStatic": false,
1462
- "isPublic": true
1242
+ "externalRefs": {
1243
+ "type": "text",
1244
+ "required": false
1463
1245
  },
1464
- "claimRevision": {
1465
- "name": "claimRevision",
1466
- "async": true,
1467
- "parameters": [
1468
- {
1469
- "name": "expectedUpdatedAt",
1470
- "type": "Date | string",
1471
- "optional": false
1472
- }
1473
- ],
1474
- "returnType": "Promise",
1475
- "isStatic": false,
1476
- "isPublic": true
1246
+ "createdAt": {
1247
+ "type": "text",
1248
+ "required": false
1477
1249
  },
1478
- "classifyConstraintError": {
1479
- "name": "classifyConstraintError",
1480
- "async": false,
1481
- "parameters": [
1482
- {
1483
- "name": "message",
1484
- "type": "string",
1485
- "optional": false
1486
- }
1487
- ],
1488
- "returnType": "'unique' | 'not_null' | null",
1489
- "isStatic": true,
1490
- "isPublic": true
1491
- },
1492
- "loadFromId": {
1493
- "name": "loadFromId",
1494
- "async": true,
1495
- "parameters": [],
1496
- "returnType": "any",
1497
- "isStatic": false,
1498
- "isPublic": true
1499
- },
1500
- "loadFromSlug": {
1501
- "name": "loadFromSlug",
1502
- "async": true,
1503
- "parameters": [],
1504
- "returnType": "any",
1505
- "isStatic": false,
1506
- "isPublic": true
1507
- },
1508
- "is": {
1509
- "name": "is",
1510
- "async": true,
1511
- "parameters": [
1512
- {
1513
- "name": "criteria",
1514
- "type": "string",
1515
- "optional": false
1516
- },
1517
- {
1518
- "name": "options",
1519
- "type": "AiOperationOptions",
1520
- "optional": true
1521
- }
1522
- ],
1523
- "returnType": "any",
1524
- "isStatic": false,
1525
- "isPublic": true
1526
- },
1527
- "do": {
1528
- "name": "do",
1529
- "async": true,
1530
- "parameters": [
1531
- {
1532
- "name": "instructions",
1533
- "type": "string",
1534
- "optional": false
1535
- },
1536
- {
1537
- "name": "options",
1538
- "type": "AiOperationOptions",
1539
- "optional": true
1540
- }
1541
- ],
1542
- "returnType": "any",
1543
- "isStatic": false,
1544
- "isPublic": true
1545
- },
1546
- "describe": {
1547
- "name": "describe",
1548
- "async": true,
1549
- "parameters": [
1550
- {
1551
- "name": "options",
1552
- "type": "AiOperationOptions",
1553
- "optional": true
1554
- }
1555
- ],
1556
- "returnType": "any",
1557
- "isStatic": false,
1558
- "isPublic": true
1559
- },
1560
- "delete": {
1561
- "name": "delete",
1562
- "async": true,
1563
- "parameters": [
1564
- {
1565
- "name": "options",
1566
- "type": "SmrtDeleteOptions",
1567
- "optional": true
1568
- }
1569
- ],
1570
- "returnType": "Promise<void>",
1571
- "isStatic": false,
1572
- "isPublic": true
1573
- },
1574
- "isRelatedLoaded": {
1575
- "name": "isRelatedLoaded",
1576
- "async": false,
1577
- "parameters": [
1578
- {
1579
- "name": "fieldName",
1580
- "type": "string",
1581
- "optional": false
1582
- }
1583
- ],
1584
- "returnType": "boolean",
1585
- "isStatic": false,
1586
- "isPublic": true
1587
- },
1588
- "_setLoadedRelationship": {
1589
- "name": "_setLoadedRelationship",
1590
- "async": false,
1591
- "parameters": [
1592
- {
1593
- "name": "fieldName",
1594
- "type": "string",
1595
- "optional": false
1596
- },
1597
- {
1598
- "name": "value",
1599
- "type": "any",
1600
- "optional": false
1601
- }
1602
- ],
1603
- "returnType": "void",
1604
- "isStatic": false,
1605
- "isPublic": true
1606
- },
1607
- "loadRelated": {
1608
- "name": "loadRelated",
1609
- "async": true,
1610
- "parameters": [
1611
- {
1612
- "name": "fieldName",
1613
- "type": "string",
1614
- "optional": false
1615
- },
1616
- {
1617
- "name": "opts",
1618
- "type": "LoadRelatedOptions",
1619
- "optional": true
1620
- }
1621
- ],
1622
- "returnType": "Promise<any>",
1623
- "isStatic": false,
1624
- "isPublic": true
1625
- },
1626
- "loadRelatedMany": {
1627
- "name": "loadRelatedMany",
1628
- "async": true,
1629
- "parameters": [
1630
- {
1631
- "name": "fieldName",
1632
- "type": "string",
1633
- "optional": false
1634
- },
1635
- {
1636
- "name": "opts",
1637
- "type": "LoadRelatedOptions",
1638
- "optional": true
1639
- }
1640
- ],
1641
- "returnType": "Promise<any[]>",
1642
- "isStatic": false,
1643
- "isPublic": true
1644
- },
1645
- "getRelated": {
1646
- "name": "getRelated",
1647
- "async": true,
1648
- "parameters": [
1649
- {
1650
- "name": "fieldName",
1651
- "type": "string",
1652
- "optional": false
1653
- },
1654
- {
1655
- "name": "opts",
1656
- "type": "LoadRelatedOptions",
1657
- "optional": true
1658
- }
1659
- ],
1660
- "returnType": "Promise<any>",
1661
- "isStatic": false,
1662
- "isPublic": true
1663
- },
1664
- "getAvailableTools": {
1665
- "name": "getAvailableTools",
1666
- "async": false,
1667
- "parameters": [],
1668
- "returnType": "AITool[]",
1669
- "isStatic": false,
1670
- "isPublic": true
1671
- },
1672
- "executeToolCall": {
1673
- "name": "executeToolCall",
1674
- "async": true,
1675
- "parameters": [
1676
- {
1677
- "name": "toolCall",
1678
- "type": "ToolCall",
1679
- "optional": false
1680
- }
1681
- ],
1682
- "returnType": "Promise<ToolCallResult>",
1683
- "isStatic": false,
1684
- "isPublic": true
1685
- },
1686
- "remember": {
1687
- "name": "remember",
1688
- "async": true,
1689
- "parameters": [
1690
- {
1691
- "name": "options",
1692
- "type": "object",
1693
- "optional": false
1694
- }
1695
- ],
1696
- "returnType": "Promise<void>",
1697
- "isStatic": false,
1698
- "isPublic": true
1699
- },
1700
- "recall": {
1701
- "name": "recall",
1702
- "async": true,
1703
- "parameters": [
1704
- {
1705
- "name": "options",
1706
- "type": "object",
1707
- "optional": false
1708
- }
1709
- ],
1710
- "returnType": "Promise",
1711
- "isStatic": false,
1712
- "isPublic": true
1713
- },
1714
- "recallAll": {
1715
- "name": "recallAll",
1716
- "async": true,
1717
- "parameters": [
1718
- {
1719
- "name": "options",
1720
- "type": "object",
1721
- "optional": true
1722
- }
1723
- ],
1724
- "returnType": "Promise<Map<string>>",
1725
- "isStatic": false,
1726
- "isPublic": true
1727
- },
1728
- "forget": {
1729
- "name": "forget",
1730
- "async": true,
1731
- "parameters": [
1732
- {
1733
- "name": "options",
1734
- "type": "object",
1735
- "optional": false
1736
- }
1737
- ],
1738
- "returnType": "Promise<void>",
1739
- "isStatic": false,
1740
- "isPublic": true
1741
- },
1742
- "forgetScope": {
1743
- "name": "forgetScope",
1744
- "async": true,
1745
- "parameters": [
1746
- {
1747
- "name": "options",
1748
- "type": "object",
1749
- "optional": false
1750
- }
1751
- ],
1752
- "returnType": "Promise<number>",
1753
- "isStatic": false,
1754
- "isPublic": true
1755
- },
1756
- "generateEmbeddings": {
1757
- "name": "generateEmbeddings",
1758
- "async": true,
1759
- "parameters": [
1760
- {
1761
- "name": "options",
1762
- "type": "GenerateEmbeddingsOptions",
1763
- "optional": true
1764
- }
1765
- ],
1766
- "returnType": "Promise<void>",
1767
- "isStatic": false,
1768
- "isPublic": true
1769
- },
1770
- "getEmbedding": {
1771
- "name": "getEmbedding",
1772
- "async": true,
1773
- "parameters": [
1774
- {
1775
- "name": "fieldName",
1776
- "type": "string",
1777
- "optional": false
1778
- },
1779
- {
1780
- "name": "model",
1781
- "type": "string",
1782
- "optional": true
1783
- }
1784
- ],
1785
- "returnType": "Promise<number[] | null>",
1786
- "isStatic": false,
1787
- "isPublic": true
1788
- },
1789
- "hasStaleEmbeddings": {
1790
- "name": "hasStaleEmbeddings",
1791
- "async": true,
1792
- "parameters": [],
1793
- "returnType": "Promise<boolean>",
1794
- "isStatic": false,
1795
- "isPublic": true
1796
- },
1797
- "clearEmbeddings": {
1798
- "name": "clearEmbeddings",
1799
- "async": true,
1800
- "parameters": [],
1801
- "returnType": "Promise<void>",
1802
- "isStatic": false,
1803
- "isPublic": true
1804
- },
1805
- "getBySlug": {
1806
- "name": "getBySlug",
1807
- "async": true,
1808
- "parameters": [
1809
- {
1810
- "name": "_slug",
1811
- "type": "string",
1812
- "optional": false
1813
- }
1814
- ],
1815
- "returnType": "Promise<AssetStatus | null>",
1816
- "isStatic": true,
1817
- "isPublic": true
1818
- }
1819
- },
1820
- "decoratorConfig": {
1821
- "tableStrategy": "sti",
1822
- "api": {
1823
- "include": [
1824
- "list",
1825
- "get",
1826
- "create",
1827
- "update",
1828
- "delete"
1829
- ]
1830
- },
1831
- "mcp": {
1832
- "include": [
1833
- "list",
1834
- "get",
1835
- "create"
1836
- ]
1837
- },
1838
- "cli": true
1839
- },
1840
- "extends": "SmrtObject",
1841
- "exportName": "AssetStatus",
1842
- "collectionExportName": "AssetStatusCollection",
1843
- "schema": {
1844
- "tableName": "asset_statuses",
1845
- "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);",
1846
- "columns": {
1847
- "id": {
1848
- "type": "UUID",
1849
- "primaryKey": true,
1850
- "referenceKind": "id",
1851
- "notNull": true
1852
- },
1853
- "slug": {
1854
- "type": "TEXT",
1855
- "notNull": true
1856
- },
1857
- "context": {
1858
- "type": "TEXT",
1859
- "notNull": true,
1860
- "default": ""
1861
- },
1862
- "_meta_type": {
1863
- "type": "TEXT",
1864
- "notNull": true
1865
- },
1866
- "_meta_data": {
1867
- "type": "JSON",
1868
- "notNull": false
1869
- },
1870
- "created_at": {
1871
- "type": "TIMESTAMP",
1872
- "notNull": true,
1873
- "default": "current_timestamp"
1874
- },
1875
- "updated_at": {
1876
- "type": "TIMESTAMP",
1877
- "notNull": true,
1878
- "default": "current_timestamp"
1879
- },
1880
- "name": {
1881
- "type": "TEXT",
1882
- "notNull": false
1883
- },
1884
- "description": {
1885
- "type": "TEXT",
1886
- "notNull": false
1887
- }
1888
- },
1889
- "indexes": [
1890
- {
1891
- "name": "asset_statuses_slug_context_meta_type_idx",
1892
- "columns": [
1893
- "slug",
1894
- "context",
1895
- "_meta_type"
1896
- ],
1897
- "unique": true
1898
- },
1899
- {
1900
- "name": "asset_statuses_meta_type_idx",
1901
- "columns": [
1902
- "_meta_type"
1903
- ]
1904
- },
1905
- {
1906
- "name": "asset_statuses_created_at_idx",
1907
- "columns": [
1908
- "created_at"
1909
- ]
1910
- }
1911
- ],
1912
- "version": "8251a52f"
1913
- }
1914
- },
1915
- "@happyvertical/smrt-assets:AssetStatusCollection": {
1916
- "name": "assetstatuscollection",
1917
- "className": "AssetStatusCollection",
1918
- "qualifiedName": "@happyvertical/smrt-assets:AssetStatusCollection",
1919
- "collection": "assetstatuses",
1920
- "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset-statuses.ts",
1921
- "packageName": "@happyvertical/smrt-assets",
1922
- "fields": {},
1923
- "methods": {
1924
- "getOrCreate": {
1925
- "name": "getOrCreate",
1926
- "async": true,
1927
- "parameters": [
1928
- {
1929
- "name": "slug",
1930
- "type": "string",
1931
- "optional": false
1932
- },
1933
- {
1934
- "name": "name",
1935
- "type": "string",
1936
- "optional": true
1937
- },
1938
- {
1939
- "name": "description",
1940
- "type": "string",
1941
- "optional": true
1942
- }
1943
- ],
1944
- "returnType": "Promise<AssetStatus>",
1945
- "isStatic": false,
1946
- "isPublic": true
1947
- },
1948
- "initializeCommonStatuses": {
1949
- "name": "initializeCommonStatuses",
1950
- "async": true,
1951
- "parameters": [],
1952
- "returnType": "Promise<void>",
1953
- "isStatic": false,
1954
- "isPublic": true
1955
- }
1956
- },
1957
- "decoratorConfig": {},
1958
- "extends": "SmrtCollection",
1959
- "extendsTypeArg": "AssetStatus",
1960
- "exportName": "AssetStatusCollection",
1961
- "collectionExportName": "AssetStatusCollectionCollection",
1962
- "schema": {
1963
- "tableName": "asset_status_collections",
1964
- "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);",
1965
- "columns": {
1966
- "id": {
1967
- "type": "UUID",
1968
- "primaryKey": true,
1969
- "referenceKind": "id",
1970
- "notNull": true
1971
- },
1972
- "slug": {
1973
- "type": "TEXT",
1974
- "notNull": true
1975
- },
1976
- "context": {
1977
- "type": "TEXT",
1978
- "notNull": true,
1979
- "default": ""
1980
- },
1981
- "created_at": {
1982
- "type": "TIMESTAMP",
1983
- "notNull": true,
1984
- "default": "current_timestamp"
1985
- },
1986
- "updated_at": {
1987
- "type": "TIMESTAMP",
1988
- "notNull": true,
1989
- "default": "current_timestamp"
1990
- }
1991
- },
1992
- "indexes": [
1993
- {
1994
- "name": "asset_status_collections_slug_context_idx",
1995
- "columns": [
1996
- "slug",
1997
- "context"
1998
- ],
1999
- "unique": true
2000
- },
2001
- {
2002
- "name": "asset_status_collections_created_at_idx",
2003
- "columns": [
2004
- "created_at"
2005
- ]
2006
- }
2007
- ],
2008
- "version": "1b138d50"
2009
- }
2010
- },
2011
- "@happyvertical/smrt-assets:AssetType": {
2012
- "name": "assettype",
2013
- "className": "AssetType",
2014
- "qualifiedName": "@happyvertical/smrt-assets:AssetType",
2015
- "collection": "assettypes",
2016
- "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset-type.ts",
2017
- "packageName": "@happyvertical/smrt-assets",
2018
- "fields": {
2019
- "created_at": {
2020
- "type": "datetime",
2021
- "required": false
2022
- },
2023
- "updated_at": {
2024
- "type": "datetime",
2025
- "required": false
2026
- },
2027
- "name": {
2028
- "type": "text",
2029
- "required": false
2030
- },
2031
- "description": {
2032
- "type": "text",
2033
- "required": false
1250
+ "updatedAt": {
1251
+ "type": "text",
1252
+ "required": false
2034
1253
  }
2035
1254
  },
2036
1255
  "methods": {
2037
- "withDatabase": {
2038
- "name": "withDatabase",
2039
- "async": true,
2040
- "parameters": [
2041
- {
2042
- "name": "db",
2043
- "type": "DatabaseInterface",
2044
- "optional": false
2045
- },
2046
- {
2047
- "name": "operation",
2048
- "type": "Function",
2049
- "optional": false
2050
- }
2051
- ],
2052
- "returnType": "Promise<T>",
2053
- "isStatic": false,
2054
- "isPublic": true
2055
- },
2056
- "getAiUsageSnapshot": {
2057
- "name": "getAiUsageSnapshot",
2058
- "async": false,
2059
- "parameters": [],
2060
- "returnType": "AiUsageSnapshot | undefined",
2061
- "isStatic": false,
2062
- "isPublic": true
2063
- },
2064
- "resetAiUsage": {
2065
- "name": "resetAiUsage",
2066
- "async": false,
2067
- "parameters": [],
2068
- "returnType": "void",
2069
- "isStatic": false,
2070
- "isPublic": true
2071
- },
2072
- "listAiUsage": {
2073
- "name": "listAiUsage",
2074
- "async": true,
2075
- "parameters": [
2076
- {
2077
- "name": "options",
2078
- "type": "AiUsageListOptions",
2079
- "optional": true
2080
- }
2081
- ],
2082
- "returnType": "Promise<SmrtAiUsageRecord[]>",
2083
- "isStatic": false,
2084
- "isPublic": true
2085
- },
2086
- "summarizeAiUsage": {
2087
- "name": "summarizeAiUsage",
2088
- "async": true,
2089
- "parameters": [
2090
- {
2091
- "name": "options",
2092
- "type": "AiUsageSummaryOptions",
2093
- "optional": true
2094
- }
2095
- ],
2096
- "returnType": "Promise<Record<string, AiUsageStats>>",
2097
- "isStatic": false,
2098
- "isPublic": true
2099
- },
2100
- "destroy": {
2101
- "name": "destroy",
2102
- "async": false,
2103
- "parameters": [],
2104
- "returnType": "void",
2105
- "isStatic": false,
2106
- "isPublic": true
2107
- },
2108
- "markAsPersisted": {
2109
- "name": "markAsPersisted",
2110
- "async": false,
2111
- "parameters": [],
2112
- "returnType": "void",
2113
- "isStatic": false,
2114
- "isPublic": true
2115
- },
2116
- "requireInsertOnSave": {
2117
- "name": "requireInsertOnSave",
2118
- "async": false,
2119
- "parameters": [],
2120
- "returnType": "void",
2121
- "isStatic": false,
2122
- "isPublic": true
2123
- },
2124
- "withTransaction": {
2125
- "name": "withTransaction",
2126
- "async": true,
2127
- "parameters": [
2128
- {
2129
- "name": "operation",
2130
- "type": "Function",
2131
- "optional": false
2132
- }
2133
- ],
2134
- "returnType": "Promise<T>",
2135
- "isStatic": false,
2136
- "isPublic": true
2137
- },
2138
- "initialize": {
2139
- "name": "initialize",
2140
- "async": true,
2141
- "parameters": [],
2142
- "returnType": "Promise",
2143
- "isStatic": false,
2144
- "isPublic": true
2145
- },
2146
- "loadDataFromDb": {
2147
- "name": "loadDataFromDb",
2148
- "async": true,
2149
- "parameters": [
2150
- {
2151
- "name": "data",
2152
- "type": "Record<string>",
2153
- "optional": false
2154
- }
2155
- ],
2156
- "returnType": "any",
2157
- "isStatic": false,
2158
- "isPublic": true
2159
- },
2160
- "getFields": {
2161
- "name": "getFields",
2162
- "async": true,
2163
- "parameters": [],
2164
- "returnType": "Promise<any>",
2165
- "isStatic": false,
2166
- "isPublic": true
2167
- },
2168
- "toJSON": {
2169
- "name": "toJSON",
2170
- "async": false,
2171
- "parameters": [],
2172
- "returnType": "any",
2173
- "isStatic": false,
2174
- "isPublic": true
2175
- },
2176
- "toPlainObject": {
2177
- "name": "toPlainObject",
2178
- "async": false,
2179
- "parameters": [],
2180
- "returnType": "Record<string>",
2181
- "isStatic": false,
2182
- "isPublic": true
2183
- },
2184
- "toPublicJSON": {
2185
- "name": "toPublicJSON",
2186
- "async": false,
2187
- "parameters": [
2188
- {
2189
- "name": "options",
2190
- "type": "PublicJsonOptions",
2191
- "optional": true
2192
- }
2193
- ],
2194
- "returnType": "Record<string>",
2195
- "isStatic": false,
2196
- "isPublic": true
2197
- },
2198
- "getId": {
2199
- "name": "getId",
2200
- "async": true,
2201
- "parameters": [],
2202
- "returnType": "any",
2203
- "isStatic": false,
2204
- "isPublic": true
2205
- },
2206
- "getSlug": {
2207
- "name": "getSlug",
2208
- "async": true,
2209
- "parameters": [],
2210
- "returnType": "any",
2211
- "isStatic": false,
2212
- "isPublic": true
2213
- },
2214
- "getSavedId": {
2215
- "name": "getSavedId",
2216
- "async": true,
2217
- "parameters": [],
2218
- "returnType": "any",
2219
- "isStatic": false,
2220
- "isPublic": true
2221
- },
2222
- "isSaved": {
2223
- "name": "isSaved",
2224
- "async": true,
2225
- "parameters": [],
2226
- "returnType": "any",
2227
- "isStatic": false,
2228
- "isPublic": true
2229
- },
2230
- "save": {
2231
- "name": "save",
2232
- "async": true,
2233
- "parameters": [
2234
- {
2235
- "name": "options",
2236
- "type": "SmrtSaveOptions",
2237
- "optional": true
2238
- }
2239
- ],
2240
- "returnType": "any",
2241
- "isStatic": false,
2242
- "isPublic": true
2243
- },
2244
- "claimRevision": {
2245
- "name": "claimRevision",
2246
- "async": true,
2247
- "parameters": [
2248
- {
2249
- "name": "expectedUpdatedAt",
2250
- "type": "Date | string",
2251
- "optional": false
2252
- }
2253
- ],
2254
- "returnType": "Promise",
2255
- "isStatic": false,
2256
- "isPublic": true
2257
- },
2258
- "classifyConstraintError": {
2259
- "name": "classifyConstraintError",
2260
- "async": false,
2261
- "parameters": [
2262
- {
2263
- "name": "message",
2264
- "type": "string",
2265
- "optional": false
2266
- }
2267
- ],
2268
- "returnType": "'unique' | 'not_null' | null",
2269
- "isStatic": true,
2270
- "isPublic": true
2271
- },
2272
- "loadFromId": {
2273
- "name": "loadFromId",
2274
- "async": true,
2275
- "parameters": [],
2276
- "returnType": "any",
2277
- "isStatic": false,
2278
- "isPublic": true
2279
- },
2280
- "loadFromSlug": {
2281
- "name": "loadFromSlug",
2282
- "async": true,
2283
- "parameters": [],
2284
- "returnType": "any",
2285
- "isStatic": false,
2286
- "isPublic": true
2287
- },
2288
- "is": {
2289
- "name": "is",
2290
- "async": true,
2291
- "parameters": [
2292
- {
2293
- "name": "criteria",
2294
- "type": "string",
2295
- "optional": false
2296
- },
2297
- {
2298
- "name": "options",
2299
- "type": "AiOperationOptions",
2300
- "optional": true
2301
- }
2302
- ],
2303
- "returnType": "any",
2304
- "isStatic": false,
2305
- "isPublic": true
2306
- },
2307
- "do": {
2308
- "name": "do",
2309
- "async": true,
2310
- "parameters": [
2311
- {
2312
- "name": "instructions",
2313
- "type": "string",
2314
- "optional": false
2315
- },
2316
- {
2317
- "name": "options",
2318
- "type": "AiOperationOptions",
2319
- "optional": true
2320
- }
2321
- ],
2322
- "returnType": "any",
2323
- "isStatic": false,
2324
- "isPublic": true
2325
- },
2326
- "describe": {
2327
- "name": "describe",
2328
- "async": true,
2329
- "parameters": [
2330
- {
2331
- "name": "options",
2332
- "type": "AiOperationOptions",
2333
- "optional": true
2334
- }
2335
- ],
2336
- "returnType": "any",
2337
- "isStatic": false,
2338
- "isPublic": true
2339
- },
2340
- "delete": {
2341
- "name": "delete",
2342
- "async": true,
2343
- "parameters": [
2344
- {
2345
- "name": "options",
2346
- "type": "SmrtDeleteOptions",
2347
- "optional": true
2348
- }
2349
- ],
2350
- "returnType": "Promise<void>",
2351
- "isStatic": false,
2352
- "isPublic": true
2353
- },
2354
- "isRelatedLoaded": {
2355
- "name": "isRelatedLoaded",
2356
- "async": false,
2357
- "parameters": [
2358
- {
2359
- "name": "fieldName",
2360
- "type": "string",
2361
- "optional": false
2362
- }
2363
- ],
2364
- "returnType": "boolean",
2365
- "isStatic": false,
2366
- "isPublic": true
2367
- },
2368
- "_setLoadedRelationship": {
2369
- "name": "_setLoadedRelationship",
2370
- "async": false,
2371
- "parameters": [
2372
- {
2373
- "name": "fieldName",
2374
- "type": "string",
2375
- "optional": false
2376
- },
2377
- {
2378
- "name": "value",
2379
- "type": "any",
2380
- "optional": false
2381
- }
2382
- ],
2383
- "returnType": "void",
2384
- "isStatic": false,
2385
- "isPublic": true
2386
- },
2387
- "loadRelated": {
2388
- "name": "loadRelated",
2389
- "async": true,
2390
- "parameters": [
2391
- {
2392
- "name": "fieldName",
2393
- "type": "string",
2394
- "optional": false
2395
- },
2396
- {
2397
- "name": "opts",
2398
- "type": "LoadRelatedOptions",
2399
- "optional": true
2400
- }
2401
- ],
2402
- "returnType": "Promise<any>",
2403
- "isStatic": false,
2404
- "isPublic": true
2405
- },
2406
- "loadRelatedMany": {
2407
- "name": "loadRelatedMany",
2408
- "async": true,
2409
- "parameters": [
2410
- {
2411
- "name": "fieldName",
2412
- "type": "string",
2413
- "optional": false
2414
- },
2415
- {
2416
- "name": "opts",
2417
- "type": "LoadRelatedOptions",
2418
- "optional": true
2419
- }
2420
- ],
2421
- "returnType": "Promise<any[]>",
2422
- "isStatic": false,
2423
- "isPublic": true
2424
- },
2425
- "getRelated": {
2426
- "name": "getRelated",
2427
- "async": true,
2428
- "parameters": [
2429
- {
2430
- "name": "fieldName",
2431
- "type": "string",
2432
- "optional": false
2433
- },
2434
- {
2435
- "name": "opts",
2436
- "type": "LoadRelatedOptions",
2437
- "optional": true
2438
- }
2439
- ],
2440
- "returnType": "Promise<any>",
2441
- "isStatic": false,
2442
- "isPublic": true
2443
- },
2444
- "getAvailableTools": {
2445
- "name": "getAvailableTools",
2446
- "async": false,
2447
- "parameters": [],
2448
- "returnType": "AITool[]",
2449
- "isStatic": false,
2450
- "isPublic": true
2451
- },
2452
- "executeToolCall": {
2453
- "name": "executeToolCall",
2454
- "async": true,
2455
- "parameters": [
2456
- {
2457
- "name": "toolCall",
2458
- "type": "ToolCall",
2459
- "optional": false
2460
- }
2461
- ],
2462
- "returnType": "Promise<ToolCallResult>",
2463
- "isStatic": false,
2464
- "isPublic": true
2465
- },
2466
- "remember": {
2467
- "name": "remember",
2468
- "async": true,
2469
- "parameters": [
2470
- {
2471
- "name": "options",
2472
- "type": "object",
2473
- "optional": false
2474
- }
2475
- ],
2476
- "returnType": "Promise<void>",
2477
- "isStatic": false,
2478
- "isPublic": true
2479
- },
2480
- "recall": {
2481
- "name": "recall",
2482
- "async": true,
2483
- "parameters": [
2484
- {
2485
- "name": "options",
2486
- "type": "object",
2487
- "optional": false
2488
- }
2489
- ],
2490
- "returnType": "Promise",
2491
- "isStatic": false,
2492
- "isPublic": true
2493
- },
2494
- "recallAll": {
2495
- "name": "recallAll",
2496
- "async": true,
2497
- "parameters": [
2498
- {
2499
- "name": "options",
2500
- "type": "object",
2501
- "optional": true
2502
- }
2503
- ],
2504
- "returnType": "Promise<Map<string>>",
2505
- "isStatic": false,
2506
- "isPublic": true
2507
- },
2508
- "forget": {
2509
- "name": "forget",
2510
- "async": true,
2511
- "parameters": [
2512
- {
2513
- "name": "options",
2514
- "type": "object",
2515
- "optional": false
2516
- }
2517
- ],
2518
- "returnType": "Promise<void>",
2519
- "isStatic": false,
2520
- "isPublic": true
2521
- },
2522
- "forgetScope": {
2523
- "name": "forgetScope",
2524
- "async": true,
2525
- "parameters": [
2526
- {
2527
- "name": "options",
2528
- "type": "object",
2529
- "optional": false
2530
- }
2531
- ],
2532
- "returnType": "Promise<number>",
2533
- "isStatic": false,
2534
- "isPublic": true
2535
- },
2536
- "generateEmbeddings": {
2537
- "name": "generateEmbeddings",
2538
- "async": true,
2539
- "parameters": [
2540
- {
2541
- "name": "options",
2542
- "type": "GenerateEmbeddingsOptions",
2543
- "optional": true
2544
- }
2545
- ],
2546
- "returnType": "Promise<void>",
2547
- "isStatic": false,
2548
- "isPublic": true
2549
- },
2550
- "getEmbedding": {
2551
- "name": "getEmbedding",
2552
- "async": true,
2553
- "parameters": [
2554
- {
2555
- "name": "fieldName",
2556
- "type": "string",
2557
- "optional": false
2558
- },
2559
- {
2560
- "name": "model",
2561
- "type": "string",
2562
- "optional": true
2563
- }
2564
- ],
2565
- "returnType": "Promise<number[] | null>",
2566
- "isStatic": false,
2567
- "isPublic": true
2568
- },
2569
- "hasStaleEmbeddings": {
2570
- "name": "hasStaleEmbeddings",
2571
- "async": true,
2572
- "parameters": [],
2573
- "returnType": "Promise<boolean>",
2574
- "isStatic": false,
2575
- "isPublic": true
2576
- },
2577
- "clearEmbeddings": {
2578
- "name": "clearEmbeddings",
2579
- "async": true,
2580
- "parameters": [],
2581
- "returnType": "Promise<void>",
2582
- "isStatic": false,
2583
- "isPublic": true
2584
- },
2585
- "getBySlug": {
2586
- "name": "getBySlug",
2587
- "async": true,
2588
- "parameters": [
2589
- {
2590
- "name": "_slug",
2591
- "type": "string",
2592
- "optional": false
2593
- }
2594
- ],
2595
- "returnType": "Promise<AssetType | null>",
2596
- "isStatic": true,
2597
- "isPublic": true
2598
- }
2599
- },
2600
- "decoratorConfig": {
2601
- "tableStrategy": "sti",
2602
- "api": {
2603
- "include": [
2604
- "list",
2605
- "get",
2606
- "create",
2607
- "update",
2608
- "delete"
2609
- ]
2610
- },
2611
- "mcp": {
2612
- "include": [
2613
- "list",
2614
- "get",
2615
- "create"
2616
- ]
2617
- },
2618
- "cli": true
2619
- },
2620
- "extends": "SmrtObject",
2621
- "exportName": "AssetType",
2622
- "collectionExportName": "AssetTypeCollection",
2623
- "schema": {
2624
- "tableName": "asset_types",
2625
- "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);",
2626
- "columns": {
2627
- "id": {
2628
- "type": "UUID",
2629
- "primaryKey": true,
2630
- "referenceKind": "id",
2631
- "notNull": true
2632
- },
2633
- "slug": {
2634
- "type": "TEXT",
2635
- "notNull": true
2636
- },
2637
- "context": {
2638
- "type": "TEXT",
2639
- "notNull": true,
2640
- "default": ""
2641
- },
2642
- "_meta_type": {
2643
- "type": "TEXT",
2644
- "notNull": true
2645
- },
2646
- "_meta_data": {
2647
- "type": "JSON",
2648
- "notNull": false
2649
- },
2650
- "created_at": {
2651
- "type": "TIMESTAMP",
2652
- "notNull": true,
2653
- "default": "current_timestamp"
2654
- },
2655
- "updated_at": {
2656
- "type": "TIMESTAMP",
2657
- "notNull": true,
2658
- "default": "current_timestamp"
2659
- },
2660
- "name": {
2661
- "type": "TEXT",
2662
- "notNull": false
2663
- },
2664
- "description": {
2665
- "type": "TEXT",
2666
- "notNull": false
2667
- }
2668
- },
2669
- "indexes": [
2670
- {
2671
- "name": "asset_types_slug_context_meta_type_idx",
2672
- "columns": [
2673
- "slug",
2674
- "context",
2675
- "_meta_type"
2676
- ],
2677
- "unique": true
2678
- },
2679
- {
2680
- "name": "asset_types_meta_type_idx",
2681
- "columns": [
2682
- "_meta_type"
2683
- ]
2684
- },
2685
- {
2686
- "name": "asset_types_created_at_idx",
2687
- "columns": [
2688
- "created_at"
2689
- ]
2690
- }
2691
- ],
2692
- "version": "a9c93be2"
2693
- }
2694
- },
2695
- "@happyvertical/smrt-assets:AssetTypeCollection": {
2696
- "name": "assettypecollection",
2697
- "className": "AssetTypeCollection",
2698
- "qualifiedName": "@happyvertical/smrt-assets:AssetTypeCollection",
2699
- "collection": "assettypes",
2700
- "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset-types.ts",
2701
- "packageName": "@happyvertical/smrt-assets",
2702
- "fields": {},
2703
- "methods": {
2704
- "getOrCreate": {
2705
- "name": "getOrCreate",
2706
- "async": true,
2707
- "parameters": [
2708
- {
2709
- "name": "slug",
2710
- "type": "string",
2711
- "optional": false
2712
- },
2713
- {
2714
- "name": "name",
2715
- "type": "string",
2716
- "optional": true
2717
- },
2718
- {
2719
- "name": "description",
2720
- "type": "string",
2721
- "optional": true
2722
- }
2723
- ],
2724
- "returnType": "Promise<AssetType>",
2725
- "isStatic": false,
2726
- "isPublic": true
2727
- },
2728
- "initializeCommonTypes": {
2729
- "name": "initializeCommonTypes",
2730
- "async": true,
2731
- "parameters": [],
2732
- "returnType": "Promise<void>",
2733
- "isStatic": false,
2734
- "isPublic": true
2735
- }
2736
- },
2737
- "decoratorConfig": {},
2738
- "extends": "SmrtCollection",
2739
- "extendsTypeArg": "AssetType",
2740
- "exportName": "AssetTypeCollection",
2741
- "collectionExportName": "AssetTypeCollectionCollection",
2742
- "schema": {
2743
- "tableName": "asset_type_collections",
2744
- "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);",
2745
- "columns": {
2746
- "id": {
2747
- "type": "UUID",
2748
- "primaryKey": true,
2749
- "referenceKind": "id",
2750
- "notNull": true
2751
- },
2752
- "slug": {
2753
- "type": "TEXT",
2754
- "notNull": true
2755
- },
2756
- "context": {
2757
- "type": "TEXT",
2758
- "notNull": true,
2759
- "default": ""
2760
- },
2761
- "created_at": {
2762
- "type": "TIMESTAMP",
2763
- "notNull": true,
2764
- "default": "current_timestamp"
2765
- },
2766
- "updated_at": {
2767
- "type": "TIMESTAMP",
2768
- "notNull": true,
2769
- "default": "current_timestamp"
2770
- }
2771
- },
2772
- "indexes": [
2773
- {
2774
- "name": "asset_type_collections_slug_context_idx",
2775
- "columns": [
2776
- "slug",
2777
- "context"
2778
- ],
2779
- "unique": true
2780
- },
2781
- {
2782
- "name": "asset_type_collections_created_at_idx",
2783
- "columns": [
2784
- "created_at"
2785
- ]
2786
- }
2787
- ],
2788
- "version": "40007bcf"
2789
- }
2790
- },
2791
- "@happyvertical/smrt-assets:Asset": {
2792
- "name": "asset",
2793
- "className": "Asset",
2794
- "qualifiedName": "@happyvertical/smrt-assets:Asset",
2795
- "collection": "assets",
2796
- "filePath": "/home/runner/work/smrt/smrt/packages/assets/src/asset.ts",
2797
- "packageName": "@happyvertical/smrt-assets",
2798
- "fields": {
2799
- "created_at": {
2800
- "type": "datetime",
2801
- "required": false
2802
- },
2803
- "updated_at": {
2804
- "type": "datetime",
2805
- "required": false
2806
- },
2807
- "tenantId": {
2808
- "type": "text",
2809
- "required": false,
2810
- "_meta": {
2811
- "sqlType": "UUID",
2812
- "nullable": true,
2813
- "__tenancy": {
2814
- "isTenantIdField": true,
2815
- "autoFilter": true,
2816
- "required": false,
2817
- "autoPopulate": true,
2818
- "nullable": true,
2819
- "mode": "optional",
2820
- "field": "tenantId",
2821
- "allowSuperAdminBypass": false
2822
- }
2823
- }
2824
- },
2825
- "name": {
2826
- "type": "text",
2827
- "required": false
2828
- },
2829
- "sourceUri": {
2830
- "type": "text",
2831
- "required": false
2832
- },
2833
- "mimeType": {
2834
- "type": "text",
2835
- "required": false
2836
- },
2837
- "description": {
2838
- "type": "text",
2839
- "required": false
2840
- },
2841
- "metadata": {
2842
- "type": "text",
2843
- "required": false
2844
- },
2845
- "version": {
2846
- "type": "integer",
2847
- "required": true,
2848
- "default": 1
2849
- },
2850
- "primaryVersionId": {
2851
- "type": "foreignKey",
2852
- "required": false,
2853
- "related": "Asset"
2854
- },
2855
- "typeSlug": {
2856
- "type": "text",
2857
- "required": false
2858
- },
2859
- "statusSlug": {
2860
- "type": "text",
2861
- "required": false
2862
- },
2863
- "ownerProfileId": {
2864
- "type": "crossPackageRef",
2865
- "required": false,
2866
- "related": "@happyvertical/smrt-profiles:Profile"
2867
- },
2868
- "sourceAssetId": {
2869
- "type": "foreignKey",
2870
- "required": false,
2871
- "related": "Asset"
2872
- },
2873
- "folderId": {
2874
- "type": "foreignKey",
2875
- "required": false,
2876
- "related": "Folder"
2877
- },
2878
- "sourceType": {
2879
- "type": "text",
2880
- "required": false
2881
- },
2882
- "externalId": {
2883
- "type": "text",
2884
- "required": false
2885
- },
2886
- "externalRefs": {
2887
- "type": "text",
2888
- "required": false
2889
- },
2890
- "createdAt": {
2891
- "type": "text",
2892
- "required": false
2893
- },
2894
- "updatedAt": {
2895
- "type": "text",
2896
- "required": false
2897
- }
2898
- },
2899
- "methods": {
2900
- "withDatabase": {
2901
- "name": "withDatabase",
2902
- "async": true,
2903
- "parameters": [
2904
- {
2905
- "name": "db",
2906
- "type": "DatabaseInterface",
2907
- "optional": false
2908
- },
2909
- {
2910
- "name": "operation",
2911
- "type": "Function",
2912
- "optional": false
2913
- }
2914
- ],
2915
- "returnType": "Promise<T>",
2916
- "isStatic": false,
2917
- "isPublic": true
2918
- },
2919
- "getAiUsageSnapshot": {
2920
- "name": "getAiUsageSnapshot",
2921
- "async": false,
2922
- "parameters": [],
2923
- "returnType": "AiUsageSnapshot | undefined",
2924
- "isStatic": false,
2925
- "isPublic": true
2926
- },
2927
- "resetAiUsage": {
2928
- "name": "resetAiUsage",
2929
- "async": false,
2930
- "parameters": [],
2931
- "returnType": "void",
2932
- "isStatic": false,
2933
- "isPublic": true
2934
- },
2935
- "listAiUsage": {
2936
- "name": "listAiUsage",
2937
- "async": true,
2938
- "parameters": [
2939
- {
2940
- "name": "options",
2941
- "type": "AiUsageListOptions",
2942
- "optional": true
2943
- }
2944
- ],
2945
- "returnType": "Promise<SmrtAiUsageRecord[]>",
2946
- "isStatic": false,
2947
- "isPublic": true
2948
- },
2949
- "summarizeAiUsage": {
2950
- "name": "summarizeAiUsage",
2951
- "async": true,
2952
- "parameters": [
2953
- {
2954
- "name": "options",
2955
- "type": "AiUsageSummaryOptions",
2956
- "optional": true
2957
- }
2958
- ],
2959
- "returnType": "Promise<Record<string, AiUsageStats>>",
2960
- "isStatic": false,
2961
- "isPublic": true
2962
- },
2963
- "destroy": {
2964
- "name": "destroy",
2965
- "async": false,
2966
- "parameters": [],
2967
- "returnType": "void",
2968
- "isStatic": false,
2969
- "isPublic": true
2970
- },
2971
- "markAsPersisted": {
2972
- "name": "markAsPersisted",
2973
- "async": false,
2974
- "parameters": [],
2975
- "returnType": "void",
2976
- "isStatic": false,
2977
- "isPublic": true
2978
- },
2979
- "requireInsertOnSave": {
2980
- "name": "requireInsertOnSave",
2981
- "async": false,
2982
- "parameters": [],
2983
- "returnType": "void",
2984
- "isStatic": false,
2985
- "isPublic": true
2986
- },
2987
- "withTransaction": {
2988
- "name": "withTransaction",
2989
- "async": true,
2990
- "parameters": [
2991
- {
2992
- "name": "operation",
2993
- "type": "Function",
2994
- "optional": false
2995
- }
2996
- ],
2997
- "returnType": "Promise<T>",
2998
- "isStatic": false,
2999
- "isPublic": true
3000
- },
3001
- "initialize": {
3002
- "name": "initialize",
3003
- "async": true,
3004
- "parameters": [],
3005
- "returnType": "Promise",
3006
- "isStatic": false,
3007
- "isPublic": true
3008
- },
3009
- "loadDataFromDb": {
3010
- "name": "loadDataFromDb",
3011
- "async": true,
3012
- "parameters": [
3013
- {
3014
- "name": "data",
3015
- "type": "Record<string>",
3016
- "optional": false
3017
- }
3018
- ],
3019
- "returnType": "any",
3020
- "isStatic": false,
3021
- "isPublic": true
3022
- },
3023
- "getFields": {
3024
- "name": "getFields",
3025
- "async": true,
3026
- "parameters": [],
3027
- "returnType": "Promise<any>",
3028
- "isStatic": false,
3029
- "isPublic": true
3030
- },
3031
- "toJSON": {
3032
- "name": "toJSON",
3033
- "async": false,
3034
- "parameters": [],
3035
- "returnType": "any",
3036
- "isStatic": false,
3037
- "isPublic": true
3038
- },
3039
- "toPlainObject": {
3040
- "name": "toPlainObject",
3041
- "async": false,
3042
- "parameters": [],
3043
- "returnType": "Record<string>",
3044
- "isStatic": false,
3045
- "isPublic": true
3046
- },
3047
- "toPublicJSON": {
3048
- "name": "toPublicJSON",
3049
- "async": false,
3050
- "parameters": [
3051
- {
3052
- "name": "options",
3053
- "type": "PublicJsonOptions",
3054
- "optional": true
3055
- }
3056
- ],
3057
- "returnType": "Record<string>",
3058
- "isStatic": false,
3059
- "isPublic": true
3060
- },
3061
- "getId": {
3062
- "name": "getId",
3063
- "async": true,
3064
- "parameters": [],
3065
- "returnType": "any",
3066
- "isStatic": false,
3067
- "isPublic": true
3068
- },
3069
- "getSlug": {
3070
- "name": "getSlug",
3071
- "async": true,
3072
- "parameters": [],
3073
- "returnType": "any",
3074
- "isStatic": false,
3075
- "isPublic": true
3076
- },
3077
- "getSavedId": {
3078
- "name": "getSavedId",
3079
- "async": true,
3080
- "parameters": [],
3081
- "returnType": "any",
3082
- "isStatic": false,
3083
- "isPublic": true
3084
- },
3085
- "isSaved": {
3086
- "name": "isSaved",
3087
- "async": true,
3088
- "parameters": [],
3089
- "returnType": "any",
3090
- "isStatic": false,
3091
- "isPublic": true
3092
- },
3093
- "save": {
3094
- "name": "save",
3095
- "async": true,
3096
- "parameters": [
3097
- {
3098
- "name": "options",
3099
- "type": "SmrtSaveOptions",
3100
- "optional": true
3101
- }
3102
- ],
3103
- "returnType": "any",
3104
- "isStatic": false,
3105
- "isPublic": true
3106
- },
3107
- "claimRevision": {
3108
- "name": "claimRevision",
3109
- "async": true,
3110
- "parameters": [
3111
- {
3112
- "name": "expectedUpdatedAt",
3113
- "type": "Date | string",
3114
- "optional": false
3115
- }
3116
- ],
3117
- "returnType": "Promise",
3118
- "isStatic": false,
3119
- "isPublic": true
3120
- },
3121
- "classifyConstraintError": {
3122
- "name": "classifyConstraintError",
3123
- "async": false,
3124
- "parameters": [
3125
- {
3126
- "name": "message",
3127
- "type": "string",
3128
- "optional": false
3129
- }
3130
- ],
3131
- "returnType": "'unique' | 'not_null' | null",
3132
- "isStatic": true,
3133
- "isPublic": true
3134
- },
3135
- "loadFromId": {
3136
- "name": "loadFromId",
3137
- "async": true,
3138
- "parameters": [],
3139
- "returnType": "any",
3140
- "isStatic": false,
3141
- "isPublic": true
3142
- },
3143
- "loadFromSlug": {
3144
- "name": "loadFromSlug",
3145
- "async": true,
3146
- "parameters": [],
3147
- "returnType": "any",
3148
- "isStatic": false,
3149
- "isPublic": true
3150
- },
3151
- "is": {
3152
- "name": "is",
3153
- "async": true,
3154
- "parameters": [
3155
- {
3156
- "name": "criteria",
3157
- "type": "string",
3158
- "optional": false
3159
- },
3160
- {
3161
- "name": "options",
3162
- "type": "AiOperationOptions",
3163
- "optional": true
3164
- }
3165
- ],
3166
- "returnType": "any",
3167
- "isStatic": false,
3168
- "isPublic": true
3169
- },
3170
- "do": {
3171
- "name": "do",
3172
- "async": true,
3173
- "parameters": [
3174
- {
3175
- "name": "instructions",
3176
- "type": "string",
3177
- "optional": false
3178
- },
3179
- {
3180
- "name": "options",
3181
- "type": "AiOperationOptions",
3182
- "optional": true
3183
- }
3184
- ],
3185
- "returnType": "any",
3186
- "isStatic": false,
3187
- "isPublic": true
3188
- },
3189
- "describe": {
3190
- "name": "describe",
3191
- "async": true,
3192
- "parameters": [
3193
- {
3194
- "name": "options",
3195
- "type": "AiOperationOptions",
3196
- "optional": true
3197
- }
3198
- ],
3199
- "returnType": "any",
3200
- "isStatic": false,
3201
- "isPublic": true
3202
- },
3203
- "delete": {
3204
- "name": "delete",
3205
- "async": true,
3206
- "parameters": [
3207
- {
3208
- "name": "options",
3209
- "type": "SmrtDeleteOptions",
3210
- "optional": true
3211
- }
3212
- ],
3213
- "returnType": "Promise<void>",
3214
- "isStatic": false,
3215
- "isPublic": true
3216
- },
3217
- "isRelatedLoaded": {
3218
- "name": "isRelatedLoaded",
3219
- "async": false,
3220
- "parameters": [
3221
- {
3222
- "name": "fieldName",
3223
- "type": "string",
3224
- "optional": false
3225
- }
3226
- ],
3227
- "returnType": "boolean",
3228
- "isStatic": false,
3229
- "isPublic": true
3230
- },
3231
- "_setLoadedRelationship": {
3232
- "name": "_setLoadedRelationship",
3233
- "async": false,
3234
- "parameters": [
3235
- {
3236
- "name": "fieldName",
3237
- "type": "string",
3238
- "optional": false
3239
- },
3240
- {
3241
- "name": "value",
3242
- "type": "any",
3243
- "optional": false
3244
- }
3245
- ],
3246
- "returnType": "void",
3247
- "isStatic": false,
3248
- "isPublic": true
3249
- },
3250
- "loadRelated": {
3251
- "name": "loadRelated",
3252
- "async": true,
3253
- "parameters": [
3254
- {
3255
- "name": "fieldName",
3256
- "type": "string",
3257
- "optional": false
3258
- },
3259
- {
3260
- "name": "opts",
3261
- "type": "LoadRelatedOptions",
3262
- "optional": true
3263
- }
3264
- ],
3265
- "returnType": "Promise<any>",
3266
- "isStatic": false,
3267
- "isPublic": true
3268
- },
3269
- "loadRelatedMany": {
3270
- "name": "loadRelatedMany",
3271
- "async": true,
3272
- "parameters": [
3273
- {
3274
- "name": "fieldName",
3275
- "type": "string",
3276
- "optional": false
3277
- },
3278
- {
3279
- "name": "opts",
3280
- "type": "LoadRelatedOptions",
3281
- "optional": true
3282
- }
3283
- ],
3284
- "returnType": "Promise<any[]>",
3285
- "isStatic": false,
3286
- "isPublic": true
3287
- },
3288
- "getRelated": {
3289
- "name": "getRelated",
3290
- "async": true,
3291
- "parameters": [
3292
- {
3293
- "name": "fieldName",
3294
- "type": "string",
3295
- "optional": false
3296
- },
3297
- {
3298
- "name": "opts",
3299
- "type": "LoadRelatedOptions",
3300
- "optional": true
3301
- }
3302
- ],
3303
- "returnType": "Promise<any>",
3304
- "isStatic": false,
3305
- "isPublic": true
3306
- },
3307
- "getAvailableTools": {
3308
- "name": "getAvailableTools",
3309
- "async": false,
3310
- "parameters": [],
3311
- "returnType": "AITool[]",
3312
- "isStatic": false,
3313
- "isPublic": true
3314
- },
3315
- "executeToolCall": {
3316
- "name": "executeToolCall",
3317
- "async": true,
3318
- "parameters": [
3319
- {
3320
- "name": "toolCall",
3321
- "type": "ToolCall",
3322
- "optional": false
3323
- }
3324
- ],
3325
- "returnType": "Promise<ToolCallResult>",
3326
- "isStatic": false,
3327
- "isPublic": true
3328
- },
3329
- "remember": {
3330
- "name": "remember",
3331
- "async": true,
3332
- "parameters": [
3333
- {
3334
- "name": "options",
3335
- "type": "object",
3336
- "optional": false
3337
- }
3338
- ],
3339
- "returnType": "Promise<void>",
3340
- "isStatic": false,
3341
- "isPublic": true
3342
- },
3343
- "recall": {
3344
- "name": "recall",
3345
- "async": true,
3346
- "parameters": [
3347
- {
3348
- "name": "options",
3349
- "type": "object",
3350
- "optional": false
3351
- }
3352
- ],
3353
- "returnType": "Promise",
3354
- "isStatic": false,
3355
- "isPublic": true
3356
- },
3357
- "recallAll": {
3358
- "name": "recallAll",
3359
- "async": true,
3360
- "parameters": [
3361
- {
3362
- "name": "options",
3363
- "type": "object",
3364
- "optional": true
3365
- }
3366
- ],
3367
- "returnType": "Promise<Map<string>>",
3368
- "isStatic": false,
3369
- "isPublic": true
3370
- },
3371
- "forget": {
3372
- "name": "forget",
3373
- "async": true,
3374
- "parameters": [
3375
- {
3376
- "name": "options",
3377
- "type": "object",
3378
- "optional": false
3379
- }
3380
- ],
3381
- "returnType": "Promise<void>",
3382
- "isStatic": false,
3383
- "isPublic": true
3384
- },
3385
- "forgetScope": {
3386
- "name": "forgetScope",
3387
- "async": true,
3388
- "parameters": [
3389
- {
3390
- "name": "options",
3391
- "type": "object",
3392
- "optional": false
3393
- }
3394
- ],
3395
- "returnType": "Promise<number>",
3396
- "isStatic": false,
3397
- "isPublic": true
3398
- },
3399
- "generateEmbeddings": {
3400
- "name": "generateEmbeddings",
3401
- "async": true,
3402
- "parameters": [
3403
- {
3404
- "name": "options",
3405
- "type": "GenerateEmbeddingsOptions",
3406
- "optional": true
3407
- }
3408
- ],
3409
- "returnType": "Promise<void>",
3410
- "isStatic": false,
3411
- "isPublic": true
3412
- },
3413
- "getEmbedding": {
3414
- "name": "getEmbedding",
3415
- "async": true,
3416
- "parameters": [
3417
- {
3418
- "name": "fieldName",
3419
- "type": "string",
3420
- "optional": false
3421
- },
3422
- {
3423
- "name": "model",
3424
- "type": "string",
3425
- "optional": true
3426
- }
3427
- ],
3428
- "returnType": "Promise<number[] | null>",
3429
- "isStatic": false,
3430
- "isPublic": true
3431
- },
3432
- "hasStaleEmbeddings": {
3433
- "name": "hasStaleEmbeddings",
3434
- "async": true,
3435
- "parameters": [],
3436
- "returnType": "Promise<boolean>",
3437
- "isStatic": false,
3438
- "isPublic": true
3439
- },
3440
- "clearEmbeddings": {
3441
- "name": "clearEmbeddings",
3442
- "async": true,
3443
- "parameters": [],
3444
- "returnType": "Promise<void>",
3445
- "isStatic": false,
3446
- "isPublic": true
3447
- },
3448
1256
  "getMetadata": {
3449
1257
  "name": "getMetadata",
3450
1258
  "async": false,