@happyvertical/smrt-products 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.
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-products",
6
- "packageVersion": "0.44.1",
6
+ "packageVersion": "0.45.0",
7
7
  "sourceManifestPath": "dist/lib/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "225a38f0a7a9b751b9b9fcbbc6f700b3daeeb8edff73c94d6d61668d450335e1",
11
- "packageJson": "095bd75207cecd0398bb173368e5a2285a38c7e851b38da18746827370687788",
10
+ "manifest": "cfd10645368ef10174c6eb90d1a9e3598183b9d2ce5ff1e114d9adaf27b483fb",
11
+ "packageJson": "b811d228155cadfad2a8419e455e9a46302e38bfe4bf68868fae364f363c5e49",
12
12
  "agents": "4ddde01c48baf13de773cdb57353a148f3fe3b93d21e99d8ac57677cda809e26"
13
13
  },
14
14
  "exports": [
@@ -91,7 +91,28 @@
91
91
  "returns": "Promise<Category[]>"
92
92
  }
93
93
  ],
94
- "surfaces": [],
94
+ "surfaces": [
95
+ {
96
+ "kind": "api",
97
+ "name": "categories.getRootCategories",
98
+ "operation": "getRootCategories",
99
+ "objectName": "@happyvertical/smrt-products:CategoryCollection",
100
+ "path": "/categories/getRootCategories",
101
+ "method": "POST"
102
+ },
103
+ {
104
+ "kind": "cli",
105
+ "name": "categorycollection_getRootCategories",
106
+ "operation": "getRootCategories",
107
+ "objectName": "@happyvertical/smrt-products:CategoryCollection"
108
+ },
109
+ {
110
+ "kind": "mcp",
111
+ "name": "categorycollection_getrootcategories",
112
+ "operation": "getRootCategories",
113
+ "objectName": "@happyvertical/smrt-products:CategoryCollection"
114
+ }
115
+ ],
95
116
  "relationshipFeatures": [
96
117
  "uuidColumns"
97
118
  ],
@@ -108,9 +129,25 @@
108
129
  "fields": [],
109
130
  "relationships": [],
110
131
  "methods": [
111
- "findByKind"
132
+ "addAsset",
133
+ "findByKind",
134
+ "findByManufacturer",
135
+ "findInStock",
136
+ "getAssets",
137
+ "removeAsset"
112
138
  ],
113
139
  "methodSignatures": [
140
+ {
141
+ "name": "addAsset",
142
+ "async": true,
143
+ "params": [
144
+ "productId: string",
145
+ "asset: Asset",
146
+ "relationship?: any",
147
+ "sortOrder?: any"
148
+ ],
149
+ "returns": "Promise<void>"
150
+ },
114
151
  {
115
152
  "name": "findByKind",
116
153
  "async": true,
@@ -118,9 +155,162 @@
118
155
  "materialKind: MaterialKind"
119
156
  ],
120
157
  "returns": "Promise<Material[]>"
158
+ },
159
+ {
160
+ "name": "findByManufacturer",
161
+ "async": true,
162
+ "params": [
163
+ "manufacturer: string"
164
+ ],
165
+ "returns": "Promise<Product[]>"
166
+ },
167
+ {
168
+ "name": "findInStock",
169
+ "async": true,
170
+ "returns": "Promise<Product[]>"
171
+ },
172
+ {
173
+ "name": "getAssets",
174
+ "async": true,
175
+ "params": [
176
+ "productId: string",
177
+ "relationship?: string"
178
+ ],
179
+ "returns": "Promise<Asset[]>"
180
+ },
181
+ {
182
+ "name": "removeAsset",
183
+ "async": true,
184
+ "params": [
185
+ "productId: string",
186
+ "assetId: string",
187
+ "relationship?: string"
188
+ ],
189
+ "returns": "Promise<void>"
190
+ }
191
+ ],
192
+ "surfaces": [
193
+ {
194
+ "kind": "api",
195
+ "name": "products.findByManufacturer",
196
+ "operation": "findByManufacturer",
197
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
198
+ "path": "/products/findByManufacturer",
199
+ "method": "POST"
200
+ },
201
+ {
202
+ "kind": "api",
203
+ "name": "products.findInStock",
204
+ "operation": "findInStock",
205
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
206
+ "path": "/products/findInStock",
207
+ "method": "POST"
208
+ },
209
+ {
210
+ "kind": "api",
211
+ "name": "products.getAssets",
212
+ "operation": "getAssets",
213
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
214
+ "path": "/products/getAssets",
215
+ "method": "POST"
216
+ },
217
+ {
218
+ "kind": "api",
219
+ "name": "products.addAsset",
220
+ "operation": "addAsset",
221
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
222
+ "path": "/products/addAsset",
223
+ "method": "POST"
224
+ },
225
+ {
226
+ "kind": "api",
227
+ "name": "products.removeAsset",
228
+ "operation": "removeAsset",
229
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
230
+ "path": "/products/removeAsset",
231
+ "method": "POST"
232
+ },
233
+ {
234
+ "kind": "api",
235
+ "name": "products.findByKind",
236
+ "operation": "findByKind",
237
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
238
+ "path": "/products/findByKind",
239
+ "method": "POST"
240
+ },
241
+ {
242
+ "kind": "cli",
243
+ "name": "materialcollection_findByManufacturer",
244
+ "operation": "findByManufacturer",
245
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
246
+ },
247
+ {
248
+ "kind": "cli",
249
+ "name": "materialcollection_findInStock",
250
+ "operation": "findInStock",
251
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
252
+ },
253
+ {
254
+ "kind": "cli",
255
+ "name": "materialcollection_getAssets",
256
+ "operation": "getAssets",
257
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
258
+ },
259
+ {
260
+ "kind": "cli",
261
+ "name": "materialcollection_addAsset",
262
+ "operation": "addAsset",
263
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
264
+ },
265
+ {
266
+ "kind": "cli",
267
+ "name": "materialcollection_removeAsset",
268
+ "operation": "removeAsset",
269
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
270
+ },
271
+ {
272
+ "kind": "cli",
273
+ "name": "materialcollection_findByKind",
274
+ "operation": "findByKind",
275
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
276
+ },
277
+ {
278
+ "kind": "mcp",
279
+ "name": "materialcollection_findbymanufacturer",
280
+ "operation": "findByManufacturer",
281
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
282
+ },
283
+ {
284
+ "kind": "mcp",
285
+ "name": "materialcollection_findinstock",
286
+ "operation": "findInStock",
287
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
288
+ },
289
+ {
290
+ "kind": "mcp",
291
+ "name": "materialcollection_getassets",
292
+ "operation": "getAssets",
293
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
294
+ },
295
+ {
296
+ "kind": "mcp",
297
+ "name": "materialcollection_addasset",
298
+ "operation": "addAsset",
299
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
300
+ },
301
+ {
302
+ "kind": "mcp",
303
+ "name": "materialcollection_removeasset",
304
+ "operation": "removeAsset",
305
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
306
+ },
307
+ {
308
+ "kind": "mcp",
309
+ "name": "materialcollection_findbykind",
310
+ "operation": "findByKind",
311
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
121
312
  }
122
313
  ],
123
- "surfaces": [],
124
314
  "relationshipFeatures": [
125
315
  "uuidColumns"
126
316
  ],
@@ -295,7 +485,108 @@
295
485
  "returns": "Promise<void>"
296
486
  }
297
487
  ],
298
- "surfaces": [],
488
+ "surfaces": [
489
+ {
490
+ "kind": "api",
491
+ "name": "products.findByManufacturer",
492
+ "operation": "findByManufacturer",
493
+ "objectName": "@happyvertical/smrt-products:ProductCollection",
494
+ "path": "/products/findByManufacturer",
495
+ "method": "POST"
496
+ },
497
+ {
498
+ "kind": "api",
499
+ "name": "products.findInStock",
500
+ "operation": "findInStock",
501
+ "objectName": "@happyvertical/smrt-products:ProductCollection",
502
+ "path": "/products/findInStock",
503
+ "method": "POST"
504
+ },
505
+ {
506
+ "kind": "api",
507
+ "name": "products.getAssets",
508
+ "operation": "getAssets",
509
+ "objectName": "@happyvertical/smrt-products:ProductCollection",
510
+ "path": "/products/getAssets",
511
+ "method": "POST"
512
+ },
513
+ {
514
+ "kind": "api",
515
+ "name": "products.addAsset",
516
+ "operation": "addAsset",
517
+ "objectName": "@happyvertical/smrt-products:ProductCollection",
518
+ "path": "/products/addAsset",
519
+ "method": "POST"
520
+ },
521
+ {
522
+ "kind": "api",
523
+ "name": "products.removeAsset",
524
+ "operation": "removeAsset",
525
+ "objectName": "@happyvertical/smrt-products:ProductCollection",
526
+ "path": "/products/removeAsset",
527
+ "method": "POST"
528
+ },
529
+ {
530
+ "kind": "cli",
531
+ "name": "productcollection_findByManufacturer",
532
+ "operation": "findByManufacturer",
533
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
534
+ },
535
+ {
536
+ "kind": "cli",
537
+ "name": "productcollection_findInStock",
538
+ "operation": "findInStock",
539
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
540
+ },
541
+ {
542
+ "kind": "cli",
543
+ "name": "productcollection_getAssets",
544
+ "operation": "getAssets",
545
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
546
+ },
547
+ {
548
+ "kind": "cli",
549
+ "name": "productcollection_addAsset",
550
+ "operation": "addAsset",
551
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
552
+ },
553
+ {
554
+ "kind": "cli",
555
+ "name": "productcollection_removeAsset",
556
+ "operation": "removeAsset",
557
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
558
+ },
559
+ {
560
+ "kind": "mcp",
561
+ "name": "productcollection_findbymanufacturer",
562
+ "operation": "findByManufacturer",
563
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
564
+ },
565
+ {
566
+ "kind": "mcp",
567
+ "name": "productcollection_findinstock",
568
+ "operation": "findInStock",
569
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
570
+ },
571
+ {
572
+ "kind": "mcp",
573
+ "name": "productcollection_getassets",
574
+ "operation": "getAssets",
575
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
576
+ },
577
+ {
578
+ "kind": "mcp",
579
+ "name": "productcollection_addasset",
580
+ "operation": "addAsset",
581
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
582
+ },
583
+ {
584
+ "kind": "mcp",
585
+ "name": "productcollection_removeasset",
586
+ "operation": "removeAsset",
587
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
588
+ }
589
+ ],
299
590
  "relationshipFeatures": [
300
591
  "uuidColumns"
301
592
  ],
@@ -334,7 +625,48 @@
334
625
  "returns": "Promise<ProductVariant[]>"
335
626
  }
336
627
  ],
337
- "surfaces": [],
628
+ "surfaces": [
629
+ {
630
+ "kind": "api",
631
+ "name": "productvariants.findForProduct",
632
+ "operation": "findForProduct",
633
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection",
634
+ "path": "/productvariants/findForProduct",
635
+ "method": "POST"
636
+ },
637
+ {
638
+ "kind": "api",
639
+ "name": "productvariants.findAxis",
640
+ "operation": "findAxis",
641
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection",
642
+ "path": "/productvariants/findAxis",
643
+ "method": "POST"
644
+ },
645
+ {
646
+ "kind": "cli",
647
+ "name": "productvariantcollection_findForProduct",
648
+ "operation": "findForProduct",
649
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection"
650
+ },
651
+ {
652
+ "kind": "cli",
653
+ "name": "productvariantcollection_findAxis",
654
+ "operation": "findAxis",
655
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection"
656
+ },
657
+ {
658
+ "kind": "mcp",
659
+ "name": "productvariantcollection_findforproduct",
660
+ "operation": "findForProduct",
661
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection"
662
+ },
663
+ {
664
+ "kind": "mcp",
665
+ "name": "productvariantcollection_findaxis",
666
+ "operation": "findAxis",
667
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection"
668
+ }
669
+ ],
338
670
  "relationshipFeatures": [
339
671
  "uuidColumns"
340
672
  ],
@@ -399,7 +731,108 @@
399
731
  "returns": "Promise<Sku[]>"
400
732
  }
401
733
  ],
402
- "surfaces": [],
734
+ "surfaces": [
735
+ {
736
+ "kind": "api",
737
+ "name": "skus.findByCode",
738
+ "operation": "findByCode",
739
+ "objectName": "@happyvertical/smrt-products:SkuCollection",
740
+ "path": "/skus/findByCode",
741
+ "method": "POST"
742
+ },
743
+ {
744
+ "kind": "api",
745
+ "name": "skus.findByBarcode",
746
+ "operation": "findByBarcode",
747
+ "objectName": "@happyvertical/smrt-products:SkuCollection",
748
+ "path": "/skus/findByBarcode",
749
+ "method": "POST"
750
+ },
751
+ {
752
+ "kind": "api",
753
+ "name": "skus.findByProduct",
754
+ "operation": "findByProduct",
755
+ "objectName": "@happyvertical/smrt-products:SkuCollection",
756
+ "path": "/skus/findByProduct",
757
+ "method": "POST"
758
+ },
759
+ {
760
+ "kind": "api",
761
+ "name": "skus.findByParent",
762
+ "operation": "findByParent",
763
+ "objectName": "@happyvertical/smrt-products:SkuCollection",
764
+ "path": "/skus/findByParent",
765
+ "method": "POST"
766
+ },
767
+ {
768
+ "kind": "api",
769
+ "name": "skus.findActive",
770
+ "operation": "findActive",
771
+ "objectName": "@happyvertical/smrt-products:SkuCollection",
772
+ "path": "/skus/findActive",
773
+ "method": "POST"
774
+ },
775
+ {
776
+ "kind": "cli",
777
+ "name": "skucollection_findByCode",
778
+ "operation": "findByCode",
779
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
780
+ },
781
+ {
782
+ "kind": "cli",
783
+ "name": "skucollection_findByBarcode",
784
+ "operation": "findByBarcode",
785
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
786
+ },
787
+ {
788
+ "kind": "cli",
789
+ "name": "skucollection_findByProduct",
790
+ "operation": "findByProduct",
791
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
792
+ },
793
+ {
794
+ "kind": "cli",
795
+ "name": "skucollection_findByParent",
796
+ "operation": "findByParent",
797
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
798
+ },
799
+ {
800
+ "kind": "cli",
801
+ "name": "skucollection_findActive",
802
+ "operation": "findActive",
803
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
804
+ },
805
+ {
806
+ "kind": "mcp",
807
+ "name": "skucollection_findbycode",
808
+ "operation": "findByCode",
809
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
810
+ },
811
+ {
812
+ "kind": "mcp",
813
+ "name": "skucollection_findbybarcode",
814
+ "operation": "findByBarcode",
815
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
816
+ },
817
+ {
818
+ "kind": "mcp",
819
+ "name": "skucollection_findbyproduct",
820
+ "operation": "findByProduct",
821
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
822
+ },
823
+ {
824
+ "kind": "mcp",
825
+ "name": "skucollection_findbyparent",
826
+ "operation": "findByParent",
827
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
828
+ },
829
+ {
830
+ "kind": "mcp",
831
+ "name": "skucollection_findactive",
832
+ "operation": "findActive",
833
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
834
+ }
835
+ ],
403
836
  "relationshipFeatures": [
404
837
  "uuidColumns"
405
838
  ],
@@ -482,349 +915,7 @@
482
915
  "columnType": "UUID"
483
916
  }
484
917
  ],
485
- "methods": [
486
- "_setLoadedRelationship",
487
- "claimRevision",
488
- "classifyConstraintError",
489
- "clearEmbeddings",
490
- "delete",
491
- "describe",
492
- "destroy",
493
- "do",
494
- "executeToolCall",
495
- "forget",
496
- "forgetScope",
497
- "generateEmbeddings",
498
- "getAiUsageSnapshot",
499
- "getAvailableTools",
500
- "getEmbedding",
501
- "getFields",
502
- "getId",
503
- "getRelated",
504
- "getSavedId",
505
- "getSlug",
506
- "hasStaleEmbeddings",
507
- "initialize",
508
- "is",
509
- "isRelatedLoaded",
510
- "isSaved",
511
- "listAiUsage",
512
- "loadDataFromDb",
513
- "loadFromId",
514
- "loadFromSlug",
515
- "loadRelated",
516
- "loadRelatedMany",
517
- "markAsPersisted",
518
- "recall",
519
- "recallAll",
520
- "remember",
521
- "requireInsertOnSave",
522
- "resetAiUsage",
523
- "save",
524
- "summarizeAiUsage",
525
- "toJSON",
526
- "toPlainObject",
527
- "toPublicJSON",
528
- "withDatabase",
529
- "withTransaction"
530
- ],
531
- "methodSignatures": [
532
- {
533
- "name": "_setLoadedRelationship",
534
- "params": [
535
- "fieldName: string",
536
- "value: any"
537
- ],
538
- "returns": "void"
539
- },
540
- {
541
- "name": "claimRevision",
542
- "async": true,
543
- "params": [
544
- "expectedUpdatedAt: Date | string"
545
- ],
546
- "returns": "Promise"
547
- },
548
- {
549
- "name": "classifyConstraintError",
550
- "static": true,
551
- "params": [
552
- "message: string"
553
- ],
554
- "returns": "'unique' | 'not_null' | null"
555
- },
556
- {
557
- "name": "clearEmbeddings",
558
- "async": true,
559
- "returns": "Promise<void>"
560
- },
561
- {
562
- "name": "delete",
563
- "async": true,
564
- "params": [
565
- "options?: SmrtDeleteOptions"
566
- ],
567
- "returns": "Promise<void>"
568
- },
569
- {
570
- "name": "describe",
571
- "async": true,
572
- "params": [
573
- "options?: AiOperationOptions"
574
- ],
575
- "returns": "any"
576
- },
577
- {
578
- "name": "destroy",
579
- "returns": "void"
580
- },
581
- {
582
- "name": "do",
583
- "async": true,
584
- "params": [
585
- "instructions: string",
586
- "options?: AiOperationOptions"
587
- ],
588
- "returns": "any"
589
- },
590
- {
591
- "name": "executeToolCall",
592
- "async": true,
593
- "params": [
594
- "toolCall: ToolCall"
595
- ],
596
- "returns": "Promise<ToolCallResult>"
597
- },
598
- {
599
- "name": "forget",
600
- "async": true,
601
- "params": [
602
- "options: object"
603
- ],
604
- "returns": "Promise<void>"
605
- },
606
- {
607
- "name": "forgetScope",
608
- "async": true,
609
- "params": [
610
- "options: object"
611
- ],
612
- "returns": "Promise<number>"
613
- },
614
- {
615
- "name": "generateEmbeddings",
616
- "async": true,
617
- "params": [
618
- "options?: GenerateEmbeddingsOptions"
619
- ],
620
- "returns": "Promise<void>"
621
- },
622
- {
623
- "name": "getAiUsageSnapshot",
624
- "returns": "AiUsageSnapshot | undefined"
625
- },
626
- {
627
- "name": "getAvailableTools",
628
- "returns": "AITool[]"
629
- },
630
- {
631
- "name": "getEmbedding",
632
- "async": true,
633
- "params": [
634
- "fieldName: string",
635
- "model?: string"
636
- ],
637
- "returns": "Promise<number[] | null>"
638
- },
639
- {
640
- "name": "getFields",
641
- "async": true,
642
- "returns": "Promise<any>"
643
- },
644
- {
645
- "name": "getId",
646
- "async": true,
647
- "returns": "any"
648
- },
649
- {
650
- "name": "getRelated",
651
- "async": true,
652
- "params": [
653
- "fieldName: string",
654
- "opts?: LoadRelatedOptions"
655
- ],
656
- "returns": "Promise<any>"
657
- },
658
- {
659
- "name": "getSavedId",
660
- "async": true,
661
- "returns": "any"
662
- },
663
- {
664
- "name": "getSlug",
665
- "async": true,
666
- "returns": "any"
667
- },
668
- {
669
- "name": "hasStaleEmbeddings",
670
- "async": true,
671
- "returns": "Promise<boolean>"
672
- },
673
- {
674
- "name": "initialize",
675
- "async": true,
676
- "returns": "Promise"
677
- },
678
- {
679
- "name": "is",
680
- "async": true,
681
- "params": [
682
- "criteria: string",
683
- "options?: AiOperationOptions"
684
- ],
685
- "returns": "any"
686
- },
687
- {
688
- "name": "isRelatedLoaded",
689
- "params": [
690
- "fieldName: string"
691
- ],
692
- "returns": "boolean"
693
- },
694
- {
695
- "name": "isSaved",
696
- "async": true,
697
- "returns": "any"
698
- },
699
- {
700
- "name": "listAiUsage",
701
- "async": true,
702
- "params": [
703
- "options?: AiUsageListOptions"
704
- ],
705
- "returns": "Promise<SmrtAiUsageRecord[]>"
706
- },
707
- {
708
- "name": "loadDataFromDb",
709
- "async": true,
710
- "params": [
711
- "data: Record<string>"
712
- ],
713
- "returns": "any"
714
- },
715
- {
716
- "name": "loadFromId",
717
- "async": true,
718
- "returns": "any"
719
- },
720
- {
721
- "name": "loadFromSlug",
722
- "async": true,
723
- "returns": "any"
724
- },
725
- {
726
- "name": "loadRelated",
727
- "async": true,
728
- "params": [
729
- "fieldName: string",
730
- "opts?: LoadRelatedOptions"
731
- ],
732
- "returns": "Promise<any>"
733
- },
734
- {
735
- "name": "loadRelatedMany",
736
- "async": true,
737
- "params": [
738
- "fieldName: string",
739
- "opts?: LoadRelatedOptions"
740
- ],
741
- "returns": "Promise<any[]>"
742
- },
743
- {
744
- "name": "markAsPersisted",
745
- "returns": "void"
746
- },
747
- {
748
- "name": "recall",
749
- "async": true,
750
- "params": [
751
- "options: object"
752
- ],
753
- "returns": "Promise"
754
- },
755
- {
756
- "name": "recallAll",
757
- "async": true,
758
- "params": [
759
- "options?: object"
760
- ],
761
- "returns": "Promise<Map<string>>"
762
- },
763
- {
764
- "name": "remember",
765
- "async": true,
766
- "params": [
767
- "options: object"
768
- ],
769
- "returns": "Promise<void>"
770
- },
771
- {
772
- "name": "requireInsertOnSave",
773
- "returns": "void"
774
- },
775
- {
776
- "name": "resetAiUsage",
777
- "returns": "void"
778
- },
779
- {
780
- "name": "save",
781
- "async": true,
782
- "params": [
783
- "options?: SmrtSaveOptions"
784
- ],
785
- "returns": "any"
786
- },
787
- {
788
- "name": "summarizeAiUsage",
789
- "async": true,
790
- "params": [
791
- "options?: AiUsageSummaryOptions"
792
- ],
793
- "returns": "Promise<Record<string, AiUsageStats>>"
794
- },
795
- {
796
- "name": "toJSON",
797
- "returns": "any"
798
- },
799
- {
800
- "name": "toPlainObject",
801
- "returns": "Record<string>"
802
- },
803
- {
804
- "name": "toPublicJSON",
805
- "params": [
806
- "options?: PublicJsonOptions"
807
- ],
808
- "returns": "Record<string>"
809
- },
810
- {
811
- "name": "withDatabase",
812
- "async": true,
813
- "params": [
814
- "db: DatabaseInterface",
815
- "operation: Function"
816
- ],
817
- "returns": "Promise<T>"
818
- },
819
- {
820
- "name": "withTransaction",
821
- "async": true,
822
- "params": [
823
- "operation: Function"
824
- ],
825
- "returns": "Promise<T>"
826
- }
827
- ],
918
+ "methods": [],
828
919
  "tenant": {
829
920
  "scoped": true,
830
921
  "mode": "optional",
@@ -1031,65 +1122,13 @@
1031
1122
  ],
1032
1123
  "relationships": [],
1033
1124
  "methods": [
1034
- "_setLoadedRelationship",
1035
1125
  "addAsset",
1036
- "claimRevision",
1037
- "classifyConstraintError",
1038
- "clearEmbeddings",
1039
- "delete",
1040
- "describe",
1041
- "destroy",
1042
- "do",
1043
- "executeToolCall",
1044
- "forget",
1045
- "forgetScope",
1046
- "generateEmbeddings",
1047
- "getAiUsageSnapshot",
1048
1126
  "getAssets",
1049
- "getAvailableTools",
1050
- "getEmbedding",
1051
- "getFields",
1052
- "getId",
1053
- "getRelated",
1054
- "getSavedId",
1055
- "getSlug",
1056
1127
  "getSpecification",
1057
- "hasStaleEmbeddings",
1058
- "initialize",
1059
- "is",
1060
- "isRelatedLoaded",
1061
- "isSaved",
1062
- "listAiUsage",
1063
- "loadDataFromDb",
1064
- "loadFromId",
1065
- "loadFromSlug",
1066
- "loadRelated",
1067
- "loadRelatedMany",
1068
- "markAsPersisted",
1069
- "recall",
1070
- "recallAll",
1071
- "remember",
1072
1128
  "removeAsset",
1073
- "requireInsertOnSave",
1074
- "resetAiUsage",
1075
- "save",
1076
- "summarizeAiUsage",
1077
- "toJSON",
1078
- "toPlainObject",
1079
- "toPublicJSON",
1080
- "updateSpecification",
1081
- "withDatabase",
1082
- "withTransaction"
1129
+ "updateSpecification"
1083
1130
  ],
1084
1131
  "methodSignatures": [
1085
- {
1086
- "name": "_setLoadedRelationship",
1087
- "params": [
1088
- "fieldName: string",
1089
- "value: any"
1090
- ],
1091
- "returns": "void"
1092
- },
1093
1132
  {
1094
1133
  "name": "addAsset",
1095
1134
  "async": true,
@@ -1100,326 +1139,39 @@
1100
1139
  ],
1101
1140
  "returns": "Promise<void>"
1102
1141
  },
1103
- {
1104
- "name": "claimRevision",
1105
- "async": true,
1106
- "params": [
1107
- "expectedUpdatedAt: Date | string"
1108
- ],
1109
- "returns": "Promise"
1110
- },
1111
- {
1112
- "name": "classifyConstraintError",
1113
- "static": true,
1114
- "params": [
1115
- "message: string"
1116
- ],
1117
- "returns": "'unique' | 'not_null' | null"
1118
- },
1119
- {
1120
- "name": "clearEmbeddings",
1121
- "async": true,
1122
- "returns": "Promise<void>"
1123
- },
1124
- {
1125
- "name": "delete",
1126
- "async": true,
1127
- "params": [
1128
- "options?: SmrtDeleteOptions"
1129
- ],
1130
- "returns": "Promise<void>"
1131
- },
1132
- {
1133
- "name": "describe",
1134
- "async": true,
1135
- "params": [
1136
- "options?: AiOperationOptions"
1137
- ],
1138
- "returns": "any"
1139
- },
1140
- {
1141
- "name": "destroy",
1142
- "returns": "void"
1143
- },
1144
- {
1145
- "name": "do",
1146
- "async": true,
1147
- "params": [
1148
- "instructions: string",
1149
- "options?: AiOperationOptions"
1150
- ],
1151
- "returns": "any"
1152
- },
1153
- {
1154
- "name": "executeToolCall",
1155
- "async": true,
1156
- "params": [
1157
- "toolCall: ToolCall"
1158
- ],
1159
- "returns": "Promise<ToolCallResult>"
1160
- },
1161
- {
1162
- "name": "forget",
1163
- "async": true,
1164
- "params": [
1165
- "options: object"
1166
- ],
1167
- "returns": "Promise<void>"
1168
- },
1169
- {
1170
- "name": "forgetScope",
1171
- "async": true,
1172
- "params": [
1173
- "options: object"
1174
- ],
1175
- "returns": "Promise<number>"
1176
- },
1177
- {
1178
- "name": "generateEmbeddings",
1179
- "async": true,
1180
- "params": [
1181
- "options?: GenerateEmbeddingsOptions"
1182
- ],
1183
- "returns": "Promise<void>"
1184
- },
1185
- {
1186
- "name": "getAiUsageSnapshot",
1187
- "returns": "AiUsageSnapshot | undefined"
1188
- },
1189
1142
  {
1190
1143
  "name": "getAssets",
1191
1144
  "async": true,
1192
1145
  "params": [
1193
- "relationship?: string"
1194
- ],
1195
- "returns": "Promise<Asset[]>"
1196
- },
1197
- {
1198
- "name": "getAvailableTools",
1199
- "returns": "AITool[]"
1200
- },
1201
- {
1202
- "name": "getEmbedding",
1203
- "async": true,
1204
- "params": [
1205
- "fieldName: string",
1206
- "model?: string"
1207
- ],
1208
- "returns": "Promise<number[] | null>"
1209
- },
1210
- {
1211
- "name": "getFields",
1212
- "async": true,
1213
- "returns": "Promise<any>"
1214
- },
1215
- {
1216
- "name": "getId",
1217
- "async": true,
1218
- "returns": "any"
1219
- },
1220
- {
1221
- "name": "getRelated",
1222
- "async": true,
1223
- "params": [
1224
- "fieldName: string",
1225
- "opts?: LoadRelatedOptions"
1226
- ],
1227
- "returns": "Promise<any>"
1228
- },
1229
- {
1230
- "name": "getSavedId",
1231
- "async": true,
1232
- "returns": "any"
1233
- },
1234
- {
1235
- "name": "getSlug",
1236
- "async": true,
1237
- "returns": "any"
1238
- },
1239
- {
1240
- "name": "getSpecification",
1241
- "async": true,
1242
- "params": [
1243
- "key: string"
1244
- ],
1245
- "returns": "Promise"
1246
- },
1247
- {
1248
- "name": "hasStaleEmbeddings",
1249
- "async": true,
1250
- "returns": "Promise<boolean>"
1251
- },
1252
- {
1253
- "name": "initialize",
1254
- "async": true,
1255
- "returns": "Promise"
1256
- },
1257
- {
1258
- "name": "is",
1259
- "async": true,
1260
- "params": [
1261
- "criteria: string",
1262
- "options?: AiOperationOptions"
1263
- ],
1264
- "returns": "any"
1265
- },
1266
- {
1267
- "name": "isRelatedLoaded",
1268
- "params": [
1269
- "fieldName: string"
1270
- ],
1271
- "returns": "boolean"
1272
- },
1273
- {
1274
- "name": "isSaved",
1275
- "async": true,
1276
- "returns": "any"
1277
- },
1278
- {
1279
- "name": "listAiUsage",
1280
- "async": true,
1281
- "params": [
1282
- "options?: AiUsageListOptions"
1283
- ],
1284
- "returns": "Promise<SmrtAiUsageRecord[]>"
1285
- },
1286
- {
1287
- "name": "loadDataFromDb",
1288
- "async": true,
1289
- "params": [
1290
- "data: Record<string>"
1291
- ],
1292
- "returns": "any"
1293
- },
1294
- {
1295
- "name": "loadFromId",
1296
- "async": true,
1297
- "returns": "any"
1298
- },
1299
- {
1300
- "name": "loadFromSlug",
1301
- "async": true,
1302
- "returns": "any"
1303
- },
1304
- {
1305
- "name": "loadRelated",
1306
- "async": true,
1307
- "params": [
1308
- "fieldName: string",
1309
- "opts?: LoadRelatedOptions"
1310
- ],
1311
- "returns": "Promise<any>"
1312
- },
1313
- {
1314
- "name": "loadRelatedMany",
1315
- "async": true,
1316
- "params": [
1317
- "fieldName: string",
1318
- "opts?: LoadRelatedOptions"
1319
- ],
1320
- "returns": "Promise<any[]>"
1321
- },
1322
- {
1323
- "name": "markAsPersisted",
1324
- "returns": "void"
1325
- },
1326
- {
1327
- "name": "recall",
1328
- "async": true,
1329
- "params": [
1330
- "options: object"
1331
- ],
1332
- "returns": "Promise"
1333
- },
1334
- {
1335
- "name": "recallAll",
1336
- "async": true,
1337
- "params": [
1338
- "options?: object"
1339
- ],
1340
- "returns": "Promise<Map<string>>"
1341
- },
1342
- {
1343
- "name": "remember",
1344
- "async": true,
1345
- "params": [
1346
- "options: object"
1347
- ],
1348
- "returns": "Promise<void>"
1349
- },
1350
- {
1351
- "name": "removeAsset",
1352
- "async": true,
1353
- "params": [
1354
- "assetId: string",
1355
- "relationship?: string"
1356
- ],
1357
- "returns": "Promise<void>"
1358
- },
1359
- {
1360
- "name": "requireInsertOnSave",
1361
- "returns": "void"
1362
- },
1363
- {
1364
- "name": "resetAiUsage",
1365
- "returns": "void"
1366
- },
1367
- {
1368
- "name": "save",
1369
- "async": true,
1370
- "params": [
1371
- "options?: SmrtSaveOptions"
1372
- ],
1373
- "returns": "any"
1374
- },
1375
- {
1376
- "name": "summarizeAiUsage",
1377
- "async": true,
1378
- "params": [
1379
- "options?: AiUsageSummaryOptions"
1380
- ],
1381
- "returns": "Promise<Record<string, AiUsageStats>>"
1382
- },
1383
- {
1384
- "name": "toJSON",
1385
- "returns": "any"
1386
- },
1387
- {
1388
- "name": "toPlainObject",
1389
- "returns": "Record<string>"
1390
- },
1391
- {
1392
- "name": "toPublicJSON",
1393
- "params": [
1394
- "options?: PublicJsonOptions"
1146
+ "relationship?: string"
1395
1147
  ],
1396
- "returns": "Record<string>"
1148
+ "returns": "Promise<Asset[]>"
1397
1149
  },
1398
1150
  {
1399
- "name": "updateSpecification",
1151
+ "name": "getSpecification",
1400
1152
  "async": true,
1401
1153
  "params": [
1402
- "key: string",
1403
- "value: any"
1154
+ "key: string"
1404
1155
  ],
1405
- "returns": "Promise<void>"
1156
+ "returns": "Promise"
1406
1157
  },
1407
1158
  {
1408
- "name": "withDatabase",
1159
+ "name": "removeAsset",
1409
1160
  "async": true,
1410
1161
  "params": [
1411
- "db: DatabaseInterface",
1412
- "operation: Function"
1162
+ "assetId: string",
1163
+ "relationship?: string"
1413
1164
  ],
1414
- "returns": "Promise<T>"
1165
+ "returns": "Promise<void>"
1415
1166
  },
1416
1167
  {
1417
- "name": "withTransaction",
1168
+ "name": "updateSpecification",
1418
1169
  "async": true,
1419
1170
  "params": [
1420
- "operation: Function"
1171
+ "key: string",
1172
+ "value: any"
1421
1173
  ],
1422
- "returns": "Promise<T>"
1174
+ "returns": "Promise<void>"
1423
1175
  }
1424
1176
  ],
1425
1177
  "tenant": {
@@ -1491,6 +1243,36 @@
1491
1243
  "operation": "delete",
1492
1244
  "objectName": "@happyvertical/smrt-products:Material"
1493
1245
  },
1246
+ {
1247
+ "kind": "cli",
1248
+ "name": "material_getSpecification",
1249
+ "operation": "getSpecification",
1250
+ "objectName": "@happyvertical/smrt-products:Material"
1251
+ },
1252
+ {
1253
+ "kind": "cli",
1254
+ "name": "material_updateSpecification",
1255
+ "operation": "updateSpecification",
1256
+ "objectName": "@happyvertical/smrt-products:Material"
1257
+ },
1258
+ {
1259
+ "kind": "cli",
1260
+ "name": "material_getAssets",
1261
+ "operation": "getAssets",
1262
+ "objectName": "@happyvertical/smrt-products:Material"
1263
+ },
1264
+ {
1265
+ "kind": "cli",
1266
+ "name": "material_addAsset",
1267
+ "operation": "addAsset",
1268
+ "objectName": "@happyvertical/smrt-products:Material"
1269
+ },
1270
+ {
1271
+ "kind": "cli",
1272
+ "name": "material_removeAsset",
1273
+ "operation": "removeAsset",
1274
+ "objectName": "@happyvertical/smrt-products:Material"
1275
+ },
1494
1276
  {
1495
1277
  "kind": "mcp",
1496
1278
  "name": "material_list",
@@ -1603,65 +1385,13 @@
1603
1385
  ],
1604
1386
  "relationships": [],
1605
1387
  "methods": [
1606
- "_setLoadedRelationship",
1607
1388
  "addAsset",
1608
- "claimRevision",
1609
- "classifyConstraintError",
1610
- "clearEmbeddings",
1611
- "delete",
1612
- "describe",
1613
- "destroy",
1614
- "do",
1615
- "executeToolCall",
1616
- "forget",
1617
- "forgetScope",
1618
- "generateEmbeddings",
1619
- "getAiUsageSnapshot",
1620
1389
  "getAssets",
1621
- "getAvailableTools",
1622
- "getEmbedding",
1623
- "getFields",
1624
- "getId",
1625
- "getRelated",
1626
- "getSavedId",
1627
- "getSlug",
1628
1390
  "getSpecification",
1629
- "hasStaleEmbeddings",
1630
- "initialize",
1631
- "is",
1632
- "isRelatedLoaded",
1633
- "isSaved",
1634
- "listAiUsage",
1635
- "loadDataFromDb",
1636
- "loadFromId",
1637
- "loadFromSlug",
1638
- "loadRelated",
1639
- "loadRelatedMany",
1640
- "markAsPersisted",
1641
- "recall",
1642
- "recallAll",
1643
- "remember",
1644
1391
  "removeAsset",
1645
- "requireInsertOnSave",
1646
- "resetAiUsage",
1647
- "save",
1648
- "summarizeAiUsage",
1649
- "toJSON",
1650
- "toPlainObject",
1651
- "toPublicJSON",
1652
- "updateSpecification",
1653
- "withDatabase",
1654
- "withTransaction"
1392
+ "updateSpecification"
1655
1393
  ],
1656
1394
  "methodSignatures": [
1657
- {
1658
- "name": "_setLoadedRelationship",
1659
- "params": [
1660
- "fieldName: string",
1661
- "value: any"
1662
- ],
1663
- "returns": "void"
1664
- },
1665
1395
  {
1666
1396
  "name": "addAsset",
1667
1397
  "async": true,
@@ -1672,92 +1402,6 @@
1672
1402
  ],
1673
1403
  "returns": "Promise<void>"
1674
1404
  },
1675
- {
1676
- "name": "claimRevision",
1677
- "async": true,
1678
- "params": [
1679
- "expectedUpdatedAt: Date | string"
1680
- ],
1681
- "returns": "Promise"
1682
- },
1683
- {
1684
- "name": "classifyConstraintError",
1685
- "static": true,
1686
- "params": [
1687
- "message: string"
1688
- ],
1689
- "returns": "'unique' | 'not_null' | null"
1690
- },
1691
- {
1692
- "name": "clearEmbeddings",
1693
- "async": true,
1694
- "returns": "Promise<void>"
1695
- },
1696
- {
1697
- "name": "delete",
1698
- "async": true,
1699
- "params": [
1700
- "options?: SmrtDeleteOptions"
1701
- ],
1702
- "returns": "Promise<void>"
1703
- },
1704
- {
1705
- "name": "describe",
1706
- "async": true,
1707
- "params": [
1708
- "options?: AiOperationOptions"
1709
- ],
1710
- "returns": "any"
1711
- },
1712
- {
1713
- "name": "destroy",
1714
- "returns": "void"
1715
- },
1716
- {
1717
- "name": "do",
1718
- "async": true,
1719
- "params": [
1720
- "instructions: string",
1721
- "options?: AiOperationOptions"
1722
- ],
1723
- "returns": "any"
1724
- },
1725
- {
1726
- "name": "executeToolCall",
1727
- "async": true,
1728
- "params": [
1729
- "toolCall: ToolCall"
1730
- ],
1731
- "returns": "Promise<ToolCallResult>"
1732
- },
1733
- {
1734
- "name": "forget",
1735
- "async": true,
1736
- "params": [
1737
- "options: object"
1738
- ],
1739
- "returns": "Promise<void>"
1740
- },
1741
- {
1742
- "name": "forgetScope",
1743
- "async": true,
1744
- "params": [
1745
- "options: object"
1746
- ],
1747
- "returns": "Promise<number>"
1748
- },
1749
- {
1750
- "name": "generateEmbeddings",
1751
- "async": true,
1752
- "params": [
1753
- "options?: GenerateEmbeddingsOptions"
1754
- ],
1755
- "returns": "Promise<void>"
1756
- },
1757
- {
1758
- "name": "getAiUsageSnapshot",
1759
- "returns": "AiUsageSnapshot | undefined"
1760
- },
1761
1405
  {
1762
1406
  "name": "getAssets",
1763
1407
  "async": true,
@@ -1766,48 +1410,6 @@
1766
1410
  ],
1767
1411
  "returns": "Promise<Asset[]>"
1768
1412
  },
1769
- {
1770
- "name": "getAvailableTools",
1771
- "returns": "AITool[]"
1772
- },
1773
- {
1774
- "name": "getEmbedding",
1775
- "async": true,
1776
- "params": [
1777
- "fieldName: string",
1778
- "model?: string"
1779
- ],
1780
- "returns": "Promise<number[] | null>"
1781
- },
1782
- {
1783
- "name": "getFields",
1784
- "async": true,
1785
- "returns": "Promise<any>"
1786
- },
1787
- {
1788
- "name": "getId",
1789
- "async": true,
1790
- "returns": "any"
1791
- },
1792
- {
1793
- "name": "getRelated",
1794
- "async": true,
1795
- "params": [
1796
- "fieldName: string",
1797
- "opts?: LoadRelatedOptions"
1798
- ],
1799
- "returns": "Promise<any>"
1800
- },
1801
- {
1802
- "name": "getSavedId",
1803
- "async": true,
1804
- "returns": "any"
1805
- },
1806
- {
1807
- "name": "getSlug",
1808
- "async": true,
1809
- "returns": "any"
1810
- },
1811
1413
  {
1812
1414
  "name": "getSpecification",
1813
1415
  "async": true,
@@ -1816,109 +1418,6 @@
1816
1418
  ],
1817
1419
  "returns": "Promise"
1818
1420
  },
1819
- {
1820
- "name": "hasStaleEmbeddings",
1821
- "async": true,
1822
- "returns": "Promise<boolean>"
1823
- },
1824
- {
1825
- "name": "initialize",
1826
- "async": true,
1827
- "returns": "Promise"
1828
- },
1829
- {
1830
- "name": "is",
1831
- "async": true,
1832
- "params": [
1833
- "criteria: string",
1834
- "options?: AiOperationOptions"
1835
- ],
1836
- "returns": "any"
1837
- },
1838
- {
1839
- "name": "isRelatedLoaded",
1840
- "params": [
1841
- "fieldName: string"
1842
- ],
1843
- "returns": "boolean"
1844
- },
1845
- {
1846
- "name": "isSaved",
1847
- "async": true,
1848
- "returns": "any"
1849
- },
1850
- {
1851
- "name": "listAiUsage",
1852
- "async": true,
1853
- "params": [
1854
- "options?: AiUsageListOptions"
1855
- ],
1856
- "returns": "Promise<SmrtAiUsageRecord[]>"
1857
- },
1858
- {
1859
- "name": "loadDataFromDb",
1860
- "async": true,
1861
- "params": [
1862
- "data: Record<string>"
1863
- ],
1864
- "returns": "any"
1865
- },
1866
- {
1867
- "name": "loadFromId",
1868
- "async": true,
1869
- "returns": "any"
1870
- },
1871
- {
1872
- "name": "loadFromSlug",
1873
- "async": true,
1874
- "returns": "any"
1875
- },
1876
- {
1877
- "name": "loadRelated",
1878
- "async": true,
1879
- "params": [
1880
- "fieldName: string",
1881
- "opts?: LoadRelatedOptions"
1882
- ],
1883
- "returns": "Promise<any>"
1884
- },
1885
- {
1886
- "name": "loadRelatedMany",
1887
- "async": true,
1888
- "params": [
1889
- "fieldName: string",
1890
- "opts?: LoadRelatedOptions"
1891
- ],
1892
- "returns": "Promise<any[]>"
1893
- },
1894
- {
1895
- "name": "markAsPersisted",
1896
- "returns": "void"
1897
- },
1898
- {
1899
- "name": "recall",
1900
- "async": true,
1901
- "params": [
1902
- "options: object"
1903
- ],
1904
- "returns": "Promise"
1905
- },
1906
- {
1907
- "name": "recallAll",
1908
- "async": true,
1909
- "params": [
1910
- "options?: object"
1911
- ],
1912
- "returns": "Promise<Map<string>>"
1913
- },
1914
- {
1915
- "name": "remember",
1916
- "async": true,
1917
- "params": [
1918
- "options: object"
1919
- ],
1920
- "returns": "Promise<void>"
1921
- },
1922
1421
  {
1923
1422
  "name": "removeAsset",
1924
1423
  "async": true,
@@ -1928,45 +1427,6 @@
1928
1427
  ],
1929
1428
  "returns": "Promise<void>"
1930
1429
  },
1931
- {
1932
- "name": "requireInsertOnSave",
1933
- "returns": "void"
1934
- },
1935
- {
1936
- "name": "resetAiUsage",
1937
- "returns": "void"
1938
- },
1939
- {
1940
- "name": "save",
1941
- "async": true,
1942
- "params": [
1943
- "options?: SmrtSaveOptions"
1944
- ],
1945
- "returns": "any"
1946
- },
1947
- {
1948
- "name": "summarizeAiUsage",
1949
- "async": true,
1950
- "params": [
1951
- "options?: AiUsageSummaryOptions"
1952
- ],
1953
- "returns": "Promise<Record<string, AiUsageStats>>"
1954
- },
1955
- {
1956
- "name": "toJSON",
1957
- "returns": "any"
1958
- },
1959
- {
1960
- "name": "toPlainObject",
1961
- "returns": "Record<string>"
1962
- },
1963
- {
1964
- "name": "toPublicJSON",
1965
- "params": [
1966
- "options?: PublicJsonOptions"
1967
- ],
1968
- "returns": "Record<string>"
1969
- },
1970
1430
  {
1971
1431
  "name": "updateSpecification",
1972
1432
  "async": true,
@@ -1975,23 +1435,6 @@
1975
1435
  "value: any"
1976
1436
  ],
1977
1437
  "returns": "Promise<void>"
1978
- },
1979
- {
1980
- "name": "withDatabase",
1981
- "async": true,
1982
- "params": [
1983
- "db: DatabaseInterface",
1984
- "operation: Function"
1985
- ],
1986
- "returns": "Promise<T>"
1987
- },
1988
- {
1989
- "name": "withTransaction",
1990
- "async": true,
1991
- "params": [
1992
- "operation: Function"
1993
- ],
1994
- "returns": "Promise<T>"
1995
1438
  }
1996
1439
  ],
1997
1440
  "tenant": {
@@ -2069,6 +1512,36 @@
2069
1512
  "operation": "delete",
2070
1513
  "objectName": "@happyvertical/smrt-products:Product"
2071
1514
  },
1515
+ {
1516
+ "kind": "cli",
1517
+ "name": "product_getSpecification",
1518
+ "operation": "getSpecification",
1519
+ "objectName": "@happyvertical/smrt-products:Product"
1520
+ },
1521
+ {
1522
+ "kind": "cli",
1523
+ "name": "product_updateSpecification",
1524
+ "operation": "updateSpecification",
1525
+ "objectName": "@happyvertical/smrt-products:Product"
1526
+ },
1527
+ {
1528
+ "kind": "cli",
1529
+ "name": "product_getAssets",
1530
+ "operation": "getAssets",
1531
+ "objectName": "@happyvertical/smrt-products:Product"
1532
+ },
1533
+ {
1534
+ "kind": "cli",
1535
+ "name": "product_addAsset",
1536
+ "operation": "addAsset",
1537
+ "objectName": "@happyvertical/smrt-products:Product"
1538
+ },
1539
+ {
1540
+ "kind": "cli",
1541
+ "name": "product_removeAsset",
1542
+ "operation": "removeAsset",
1543
+ "objectName": "@happyvertical/smrt-products:Product"
1544
+ },
2072
1545
  {
2073
1546
  "kind": "mcp",
2074
1547
  "name": "product_list",
@@ -2304,8 +1777,20 @@
2304
1777
  },
2305
1778
  {
2306
1779
  "kind": "cli",
2307
- "name": "productvariant_delete",
2308
- "operation": "delete",
1780
+ "name": "productvariant_delete",
1781
+ "operation": "delete",
1782
+ "objectName": "@happyvertical/smrt-products:ProductVariant"
1783
+ },
1784
+ {
1785
+ "kind": "cli",
1786
+ "name": "productvariant_getValues",
1787
+ "operation": "getValues",
1788
+ "objectName": "@happyvertical/smrt-products:ProductVariant"
1789
+ },
1790
+ {
1791
+ "kind": "cli",
1792
+ "name": "productvariant_setValues",
1793
+ "operation": "setValues",
2309
1794
  "objectName": "@happyvertical/smrt-products:ProductVariant"
2310
1795
  },
2311
1796
  {
@@ -2487,6 +1972,18 @@
2487
1972
  "operation": "delete",
2488
1973
  "objectName": "@happyvertical/smrt-products:Sku"
2489
1974
  },
1975
+ {
1976
+ "kind": "cli",
1977
+ "name": "sku_getAttributes",
1978
+ "operation": "getAttributes",
1979
+ "objectName": "@happyvertical/smrt-products:Sku"
1980
+ },
1981
+ {
1982
+ "kind": "cli",
1983
+ "name": "sku_setAttributes",
1984
+ "operation": "setAttributes",
1985
+ "objectName": "@happyvertical/smrt-products:Sku"
1986
+ },
2490
1987
  {
2491
1988
  "kind": "mcp",
2492
1989
  "name": "sku_list",
@@ -2508,6 +2005,386 @@
2508
2005
  }
2509
2006
  ],
2510
2007
  "surfaces": [
2008
+ {
2009
+ "kind": "api",
2010
+ "name": "categories.getRootCategories",
2011
+ "operation": "getRootCategories",
2012
+ "objectName": "@happyvertical/smrt-products:CategoryCollection",
2013
+ "path": "/categories/getRootCategories",
2014
+ "method": "POST"
2015
+ },
2016
+ {
2017
+ "kind": "cli",
2018
+ "name": "categorycollection_getRootCategories",
2019
+ "operation": "getRootCategories",
2020
+ "objectName": "@happyvertical/smrt-products:CategoryCollection"
2021
+ },
2022
+ {
2023
+ "kind": "mcp",
2024
+ "name": "categorycollection_getrootcategories",
2025
+ "operation": "getRootCategories",
2026
+ "objectName": "@happyvertical/smrt-products:CategoryCollection"
2027
+ },
2028
+ {
2029
+ "kind": "api",
2030
+ "name": "products.findByManufacturer",
2031
+ "operation": "findByManufacturer",
2032
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
2033
+ "path": "/products/findByManufacturer",
2034
+ "method": "POST"
2035
+ },
2036
+ {
2037
+ "kind": "api",
2038
+ "name": "products.findInStock",
2039
+ "operation": "findInStock",
2040
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
2041
+ "path": "/products/findInStock",
2042
+ "method": "POST"
2043
+ },
2044
+ {
2045
+ "kind": "api",
2046
+ "name": "products.getAssets",
2047
+ "operation": "getAssets",
2048
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
2049
+ "path": "/products/getAssets",
2050
+ "method": "POST"
2051
+ },
2052
+ {
2053
+ "kind": "api",
2054
+ "name": "products.addAsset",
2055
+ "operation": "addAsset",
2056
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
2057
+ "path": "/products/addAsset",
2058
+ "method": "POST"
2059
+ },
2060
+ {
2061
+ "kind": "api",
2062
+ "name": "products.removeAsset",
2063
+ "operation": "removeAsset",
2064
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
2065
+ "path": "/products/removeAsset",
2066
+ "method": "POST"
2067
+ },
2068
+ {
2069
+ "kind": "api",
2070
+ "name": "products.findByKind",
2071
+ "operation": "findByKind",
2072
+ "objectName": "@happyvertical/smrt-products:MaterialCollection",
2073
+ "path": "/products/findByKind",
2074
+ "method": "POST"
2075
+ },
2076
+ {
2077
+ "kind": "cli",
2078
+ "name": "materialcollection_findByManufacturer",
2079
+ "operation": "findByManufacturer",
2080
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2081
+ },
2082
+ {
2083
+ "kind": "cli",
2084
+ "name": "materialcollection_findInStock",
2085
+ "operation": "findInStock",
2086
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2087
+ },
2088
+ {
2089
+ "kind": "cli",
2090
+ "name": "materialcollection_getAssets",
2091
+ "operation": "getAssets",
2092
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2093
+ },
2094
+ {
2095
+ "kind": "cli",
2096
+ "name": "materialcollection_addAsset",
2097
+ "operation": "addAsset",
2098
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2099
+ },
2100
+ {
2101
+ "kind": "cli",
2102
+ "name": "materialcollection_removeAsset",
2103
+ "operation": "removeAsset",
2104
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2105
+ },
2106
+ {
2107
+ "kind": "cli",
2108
+ "name": "materialcollection_findByKind",
2109
+ "operation": "findByKind",
2110
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2111
+ },
2112
+ {
2113
+ "kind": "mcp",
2114
+ "name": "materialcollection_findbymanufacturer",
2115
+ "operation": "findByManufacturer",
2116
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2117
+ },
2118
+ {
2119
+ "kind": "mcp",
2120
+ "name": "materialcollection_findinstock",
2121
+ "operation": "findInStock",
2122
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2123
+ },
2124
+ {
2125
+ "kind": "mcp",
2126
+ "name": "materialcollection_getassets",
2127
+ "operation": "getAssets",
2128
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2129
+ },
2130
+ {
2131
+ "kind": "mcp",
2132
+ "name": "materialcollection_addasset",
2133
+ "operation": "addAsset",
2134
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2135
+ },
2136
+ {
2137
+ "kind": "mcp",
2138
+ "name": "materialcollection_removeasset",
2139
+ "operation": "removeAsset",
2140
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2141
+ },
2142
+ {
2143
+ "kind": "mcp",
2144
+ "name": "materialcollection_findbykind",
2145
+ "operation": "findByKind",
2146
+ "objectName": "@happyvertical/smrt-products:MaterialCollection"
2147
+ },
2148
+ {
2149
+ "kind": "api",
2150
+ "name": "products.findByManufacturer",
2151
+ "operation": "findByManufacturer",
2152
+ "objectName": "@happyvertical/smrt-products:ProductCollection",
2153
+ "path": "/products/findByManufacturer",
2154
+ "method": "POST"
2155
+ },
2156
+ {
2157
+ "kind": "api",
2158
+ "name": "products.findInStock",
2159
+ "operation": "findInStock",
2160
+ "objectName": "@happyvertical/smrt-products:ProductCollection",
2161
+ "path": "/products/findInStock",
2162
+ "method": "POST"
2163
+ },
2164
+ {
2165
+ "kind": "api",
2166
+ "name": "products.getAssets",
2167
+ "operation": "getAssets",
2168
+ "objectName": "@happyvertical/smrt-products:ProductCollection",
2169
+ "path": "/products/getAssets",
2170
+ "method": "POST"
2171
+ },
2172
+ {
2173
+ "kind": "api",
2174
+ "name": "products.addAsset",
2175
+ "operation": "addAsset",
2176
+ "objectName": "@happyvertical/smrt-products:ProductCollection",
2177
+ "path": "/products/addAsset",
2178
+ "method": "POST"
2179
+ },
2180
+ {
2181
+ "kind": "api",
2182
+ "name": "products.removeAsset",
2183
+ "operation": "removeAsset",
2184
+ "objectName": "@happyvertical/smrt-products:ProductCollection",
2185
+ "path": "/products/removeAsset",
2186
+ "method": "POST"
2187
+ },
2188
+ {
2189
+ "kind": "cli",
2190
+ "name": "productcollection_findByManufacturer",
2191
+ "operation": "findByManufacturer",
2192
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
2193
+ },
2194
+ {
2195
+ "kind": "cli",
2196
+ "name": "productcollection_findInStock",
2197
+ "operation": "findInStock",
2198
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
2199
+ },
2200
+ {
2201
+ "kind": "cli",
2202
+ "name": "productcollection_getAssets",
2203
+ "operation": "getAssets",
2204
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
2205
+ },
2206
+ {
2207
+ "kind": "cli",
2208
+ "name": "productcollection_addAsset",
2209
+ "operation": "addAsset",
2210
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
2211
+ },
2212
+ {
2213
+ "kind": "cli",
2214
+ "name": "productcollection_removeAsset",
2215
+ "operation": "removeAsset",
2216
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
2217
+ },
2218
+ {
2219
+ "kind": "mcp",
2220
+ "name": "productcollection_findbymanufacturer",
2221
+ "operation": "findByManufacturer",
2222
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
2223
+ },
2224
+ {
2225
+ "kind": "mcp",
2226
+ "name": "productcollection_findinstock",
2227
+ "operation": "findInStock",
2228
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
2229
+ },
2230
+ {
2231
+ "kind": "mcp",
2232
+ "name": "productcollection_getassets",
2233
+ "operation": "getAssets",
2234
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
2235
+ },
2236
+ {
2237
+ "kind": "mcp",
2238
+ "name": "productcollection_addasset",
2239
+ "operation": "addAsset",
2240
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
2241
+ },
2242
+ {
2243
+ "kind": "mcp",
2244
+ "name": "productcollection_removeasset",
2245
+ "operation": "removeAsset",
2246
+ "objectName": "@happyvertical/smrt-products:ProductCollection"
2247
+ },
2248
+ {
2249
+ "kind": "api",
2250
+ "name": "productvariants.findForProduct",
2251
+ "operation": "findForProduct",
2252
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection",
2253
+ "path": "/productvariants/findForProduct",
2254
+ "method": "POST"
2255
+ },
2256
+ {
2257
+ "kind": "api",
2258
+ "name": "productvariants.findAxis",
2259
+ "operation": "findAxis",
2260
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection",
2261
+ "path": "/productvariants/findAxis",
2262
+ "method": "POST"
2263
+ },
2264
+ {
2265
+ "kind": "cli",
2266
+ "name": "productvariantcollection_findForProduct",
2267
+ "operation": "findForProduct",
2268
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection"
2269
+ },
2270
+ {
2271
+ "kind": "cli",
2272
+ "name": "productvariantcollection_findAxis",
2273
+ "operation": "findAxis",
2274
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection"
2275
+ },
2276
+ {
2277
+ "kind": "mcp",
2278
+ "name": "productvariantcollection_findforproduct",
2279
+ "operation": "findForProduct",
2280
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection"
2281
+ },
2282
+ {
2283
+ "kind": "mcp",
2284
+ "name": "productvariantcollection_findaxis",
2285
+ "operation": "findAxis",
2286
+ "objectName": "@happyvertical/smrt-products:ProductVariantCollection"
2287
+ },
2288
+ {
2289
+ "kind": "api",
2290
+ "name": "skus.findByCode",
2291
+ "operation": "findByCode",
2292
+ "objectName": "@happyvertical/smrt-products:SkuCollection",
2293
+ "path": "/skus/findByCode",
2294
+ "method": "POST"
2295
+ },
2296
+ {
2297
+ "kind": "api",
2298
+ "name": "skus.findByBarcode",
2299
+ "operation": "findByBarcode",
2300
+ "objectName": "@happyvertical/smrt-products:SkuCollection",
2301
+ "path": "/skus/findByBarcode",
2302
+ "method": "POST"
2303
+ },
2304
+ {
2305
+ "kind": "api",
2306
+ "name": "skus.findByProduct",
2307
+ "operation": "findByProduct",
2308
+ "objectName": "@happyvertical/smrt-products:SkuCollection",
2309
+ "path": "/skus/findByProduct",
2310
+ "method": "POST"
2311
+ },
2312
+ {
2313
+ "kind": "api",
2314
+ "name": "skus.findByParent",
2315
+ "operation": "findByParent",
2316
+ "objectName": "@happyvertical/smrt-products:SkuCollection",
2317
+ "path": "/skus/findByParent",
2318
+ "method": "POST"
2319
+ },
2320
+ {
2321
+ "kind": "api",
2322
+ "name": "skus.findActive",
2323
+ "operation": "findActive",
2324
+ "objectName": "@happyvertical/smrt-products:SkuCollection",
2325
+ "path": "/skus/findActive",
2326
+ "method": "POST"
2327
+ },
2328
+ {
2329
+ "kind": "cli",
2330
+ "name": "skucollection_findByCode",
2331
+ "operation": "findByCode",
2332
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
2333
+ },
2334
+ {
2335
+ "kind": "cli",
2336
+ "name": "skucollection_findByBarcode",
2337
+ "operation": "findByBarcode",
2338
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
2339
+ },
2340
+ {
2341
+ "kind": "cli",
2342
+ "name": "skucollection_findByProduct",
2343
+ "operation": "findByProduct",
2344
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
2345
+ },
2346
+ {
2347
+ "kind": "cli",
2348
+ "name": "skucollection_findByParent",
2349
+ "operation": "findByParent",
2350
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
2351
+ },
2352
+ {
2353
+ "kind": "cli",
2354
+ "name": "skucollection_findActive",
2355
+ "operation": "findActive",
2356
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
2357
+ },
2358
+ {
2359
+ "kind": "mcp",
2360
+ "name": "skucollection_findbycode",
2361
+ "operation": "findByCode",
2362
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
2363
+ },
2364
+ {
2365
+ "kind": "mcp",
2366
+ "name": "skucollection_findbybarcode",
2367
+ "operation": "findByBarcode",
2368
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
2369
+ },
2370
+ {
2371
+ "kind": "mcp",
2372
+ "name": "skucollection_findbyproduct",
2373
+ "operation": "findByProduct",
2374
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
2375
+ },
2376
+ {
2377
+ "kind": "mcp",
2378
+ "name": "skucollection_findbyparent",
2379
+ "operation": "findByParent",
2380
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
2381
+ },
2382
+ {
2383
+ "kind": "mcp",
2384
+ "name": "skucollection_findactive",
2385
+ "operation": "findActive",
2386
+ "objectName": "@happyvertical/smrt-products:SkuCollection"
2387
+ },
2511
2388
  {
2512
2389
  "kind": "api",
2513
2390
  "name": "categories.list",
@@ -2644,6 +2521,36 @@
2644
2521
  "operation": "delete",
2645
2522
  "objectName": "@happyvertical/smrt-products:Material"
2646
2523
  },
2524
+ {
2525
+ "kind": "cli",
2526
+ "name": "material_getSpecification",
2527
+ "operation": "getSpecification",
2528
+ "objectName": "@happyvertical/smrt-products:Material"
2529
+ },
2530
+ {
2531
+ "kind": "cli",
2532
+ "name": "material_updateSpecification",
2533
+ "operation": "updateSpecification",
2534
+ "objectName": "@happyvertical/smrt-products:Material"
2535
+ },
2536
+ {
2537
+ "kind": "cli",
2538
+ "name": "material_getAssets",
2539
+ "operation": "getAssets",
2540
+ "objectName": "@happyvertical/smrt-products:Material"
2541
+ },
2542
+ {
2543
+ "kind": "cli",
2544
+ "name": "material_addAsset",
2545
+ "operation": "addAsset",
2546
+ "objectName": "@happyvertical/smrt-products:Material"
2547
+ },
2548
+ {
2549
+ "kind": "cli",
2550
+ "name": "material_removeAsset",
2551
+ "operation": "removeAsset",
2552
+ "objectName": "@happyvertical/smrt-products:Material"
2553
+ },
2647
2554
  {
2648
2555
  "kind": "mcp",
2649
2556
  "name": "material_list",
@@ -2718,6 +2625,36 @@
2718
2625
  "operation": "delete",
2719
2626
  "objectName": "@happyvertical/smrt-products:Product"
2720
2627
  },
2628
+ {
2629
+ "kind": "cli",
2630
+ "name": "product_getSpecification",
2631
+ "operation": "getSpecification",
2632
+ "objectName": "@happyvertical/smrt-products:Product"
2633
+ },
2634
+ {
2635
+ "kind": "cli",
2636
+ "name": "product_updateSpecification",
2637
+ "operation": "updateSpecification",
2638
+ "objectName": "@happyvertical/smrt-products:Product"
2639
+ },
2640
+ {
2641
+ "kind": "cli",
2642
+ "name": "product_getAssets",
2643
+ "operation": "getAssets",
2644
+ "objectName": "@happyvertical/smrt-products:Product"
2645
+ },
2646
+ {
2647
+ "kind": "cli",
2648
+ "name": "product_addAsset",
2649
+ "operation": "addAsset",
2650
+ "objectName": "@happyvertical/smrt-products:Product"
2651
+ },
2652
+ {
2653
+ "kind": "cli",
2654
+ "name": "product_removeAsset",
2655
+ "operation": "removeAsset",
2656
+ "objectName": "@happyvertical/smrt-products:Product"
2657
+ },
2721
2658
  {
2722
2659
  "kind": "mcp",
2723
2660
  "name": "product_list",
@@ -2792,6 +2729,18 @@
2792
2729
  "operation": "delete",
2793
2730
  "objectName": "@happyvertical/smrt-products:ProductVariant"
2794
2731
  },
2732
+ {
2733
+ "kind": "cli",
2734
+ "name": "productvariant_getValues",
2735
+ "operation": "getValues",
2736
+ "objectName": "@happyvertical/smrt-products:ProductVariant"
2737
+ },
2738
+ {
2739
+ "kind": "cli",
2740
+ "name": "productvariant_setValues",
2741
+ "operation": "setValues",
2742
+ "objectName": "@happyvertical/smrt-products:ProductVariant"
2743
+ },
2795
2744
  {
2796
2745
  "kind": "mcp",
2797
2746
  "name": "productvariant_list",
@@ -2866,6 +2815,18 @@
2866
2815
  "operation": "delete",
2867
2816
  "objectName": "@happyvertical/smrt-products:Sku"
2868
2817
  },
2818
+ {
2819
+ "kind": "cli",
2820
+ "name": "sku_getAttributes",
2821
+ "operation": "getAttributes",
2822
+ "objectName": "@happyvertical/smrt-products:Sku"
2823
+ },
2824
+ {
2825
+ "kind": "cli",
2826
+ "name": "sku_setAttributes",
2827
+ "operation": "setAttributes",
2828
+ "objectName": "@happyvertical/smrt-products:Sku"
2829
+ },
2869
2830
  {
2870
2831
  "kind": "mcp",
2871
2832
  "name": "sku_list",