@happyvertical/smrt-products 0.40.65 → 0.40.66

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.
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
+ "sensitiveFieldsExcluded": true,
3
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
4
5
  "packageName": "@happyvertical/smrt-products",
5
- "packageVersion": "0.40.65",
6
+ "packageVersion": "0.40.66",
6
7
  "sourceManifestPath": "dist/lib/manifest.json",
7
8
  "agentDocPath": "AGENTS.md",
8
9
  "sourceHashes": {
9
- "manifest": "b8cdab90f633f46c13ba519f59eca2c6191a9f0b09afe43c7b918dcfffb68871",
10
- "packageJson": "5801cc49b50be924b4b732dd51fd4a2a608e00a281cc26b511aad8b6b83a7667",
10
+ "manifest": "8d7e0943151a3b5e9587c0be37aa5e6af126b3880c2e9f25fecb3f5310efa07d",
11
+ "packageJson": "a98a8b5c3cd3e701df4c4d542f86db037f9c6eed37ccc424dde134222ba3bb24",
11
12
  "agents": "33d82ef8e2eb4597c4165e7576c20a02a76d224a75cadcbd89f9ce9cc1deae3c"
12
13
  },
13
14
  "exports": [
@@ -83,6 +84,13 @@
83
84
  "methods": [
84
85
  "getRootCategories"
85
86
  ],
87
+ "methodSignatures": [
88
+ {
89
+ "name": "getRootCategories",
90
+ "async": true,
91
+ "returns": "Promise<Category[]>"
92
+ }
93
+ ],
86
94
  "surfaces": [],
87
95
  "relationshipFeatures": [
88
96
  "uuidColumns"
@@ -102,6 +110,16 @@
102
110
  "methods": [
103
111
  "findByKind"
104
112
  ],
113
+ "methodSignatures": [
114
+ {
115
+ "name": "findByKind",
116
+ "async": true,
117
+ "params": [
118
+ "materialKind: MaterialKind"
119
+ ],
120
+ "returns": "Promise<Material[]>"
121
+ }
122
+ ],
105
123
  "surfaces": [],
106
124
  "relationshipFeatures": [
107
125
  "uuidColumns"
@@ -128,6 +146,86 @@
128
146
  "removeAsset",
129
147
  "setLinks"
130
148
  ],
149
+ "methodSignatures": [
150
+ {
151
+ "name": "addAsset",
152
+ "async": true,
153
+ "params": [
154
+ "productId: string",
155
+ "asset: Asset",
156
+ "relationship?: any",
157
+ "sortOrder?: any"
158
+ ],
159
+ "returns": "Promise<void>"
160
+ },
161
+ {
162
+ "name": "attach",
163
+ "async": true,
164
+ "params": [
165
+ "leftId: string",
166
+ "rightId: string",
167
+ "opts?: JunctionAttachOptions"
168
+ ],
169
+ "returns": "Promise<TItem>"
170
+ },
171
+ {
172
+ "name": "byLeft",
173
+ "async": true,
174
+ "params": [
175
+ "leftId: string",
176
+ "opts?: JunctionFilterOptions"
177
+ ],
178
+ "returns": "Promise<TItem[]>"
179
+ },
180
+ {
181
+ "name": "byRight",
182
+ "async": true,
183
+ "params": [
184
+ "rightId: string",
185
+ "opts?: JunctionFilterOptions"
186
+ ],
187
+ "returns": "Promise<TItem[]>"
188
+ },
189
+ {
190
+ "name": "detach",
191
+ "async": true,
192
+ "params": [
193
+ "leftId: string",
194
+ "rightId: string",
195
+ "opts?: JunctionFilterOptions"
196
+ ],
197
+ "returns": "Promise<void>"
198
+ },
199
+ {
200
+ "name": "getAssets",
201
+ "async": true,
202
+ "params": [
203
+ "productId: string",
204
+ "relationship?: string"
205
+ ],
206
+ "returns": "Promise<Asset[]>"
207
+ },
208
+ {
209
+ "name": "removeAsset",
210
+ "async": true,
211
+ "params": [
212
+ "productId: string",
213
+ "assetId: string",
214
+ "relationship?: string"
215
+ ],
216
+ "returns": "Promise<void>"
217
+ },
218
+ {
219
+ "name": "setLinks",
220
+ "async": true,
221
+ "params": [
222
+ "leftId: string",
223
+ "rightIds: string[]",
224
+ "opts?: JunctionAttachOptions"
225
+ ],
226
+ "returns": "Promise<void>"
227
+ }
228
+ ],
131
229
  "surfaces": [],
132
230
  "relationshipFeatures": [
133
231
  "SmrtJunction",
@@ -152,6 +250,51 @@
152
250
  "getAssets",
153
251
  "removeAsset"
154
252
  ],
253
+ "methodSignatures": [
254
+ {
255
+ "name": "addAsset",
256
+ "async": true,
257
+ "params": [
258
+ "productId: string",
259
+ "asset: Asset",
260
+ "relationship?: any",
261
+ "sortOrder?: any"
262
+ ],
263
+ "returns": "Promise<void>"
264
+ },
265
+ {
266
+ "name": "findByManufacturer",
267
+ "async": true,
268
+ "params": [
269
+ "manufacturer: string"
270
+ ],
271
+ "returns": "Promise<Product[]>"
272
+ },
273
+ {
274
+ "name": "findInStock",
275
+ "async": true,
276
+ "returns": "Promise<Product[]>"
277
+ },
278
+ {
279
+ "name": "getAssets",
280
+ "async": true,
281
+ "params": [
282
+ "productId: string",
283
+ "relationship?: string"
284
+ ],
285
+ "returns": "Promise<Asset[]>"
286
+ },
287
+ {
288
+ "name": "removeAsset",
289
+ "async": true,
290
+ "params": [
291
+ "productId: string",
292
+ "assetId: string",
293
+ "relationship?: string"
294
+ ],
295
+ "returns": "Promise<void>"
296
+ }
297
+ ],
155
298
  "surfaces": [],
156
299
  "relationshipFeatures": [
157
300
  "uuidColumns"
@@ -172,6 +315,25 @@
172
315
  "findAxis",
173
316
  "findForProduct"
174
317
  ],
318
+ "methodSignatures": [
319
+ {
320
+ "name": "findAxis",
321
+ "async": true,
322
+ "params": [
323
+ "productId: string",
324
+ "axisName: string"
325
+ ],
326
+ "returns": "Promise<ProductVariant | null>"
327
+ },
328
+ {
329
+ "name": "findForProduct",
330
+ "async": true,
331
+ "params": [
332
+ "productId: string"
333
+ ],
334
+ "returns": "Promise<ProductVariant[]>"
335
+ }
336
+ ],
175
337
  "surfaces": [],
176
338
  "relationshipFeatures": [
177
339
  "uuidColumns"
@@ -195,6 +357,48 @@
195
357
  "findByParent",
196
358
  "findByProduct"
197
359
  ],
360
+ "methodSignatures": [
361
+ {
362
+ "name": "findActive",
363
+ "async": true,
364
+ "params": [
365
+ "productId?: string"
366
+ ],
367
+ "returns": "Promise<Sku[]>"
368
+ },
369
+ {
370
+ "name": "findByBarcode",
371
+ "async": true,
372
+ "params": [
373
+ "barcode: string"
374
+ ],
375
+ "returns": "Promise<Sku | null>"
376
+ },
377
+ {
378
+ "name": "findByCode",
379
+ "async": true,
380
+ "params": [
381
+ "code: string"
382
+ ],
383
+ "returns": "Promise<Sku | null>"
384
+ },
385
+ {
386
+ "name": "findByParent",
387
+ "async": true,
388
+ "params": [
389
+ "parentSkuId: string"
390
+ ],
391
+ "returns": "Promise<Sku[]>"
392
+ },
393
+ {
394
+ "name": "findByProduct",
395
+ "async": true,
396
+ "params": [
397
+ "productId: string"
398
+ ],
399
+ "returns": "Promise<Sku[]>"
400
+ }
401
+ ],
198
402
  "surfaces": [],
199
403
  "relationshipFeatures": [
200
404
  "uuidColumns"
@@ -251,19 +455,22 @@
251
455
  "name": "level",
252
456
  "type": "integer",
253
457
  "required": true,
254
- "columnType": "INTEGER"
458
+ "columnType": "INTEGER",
459
+ "default": 0
255
460
  },
256
461
  {
257
462
  "name": "productCount",
258
463
  "type": "integer",
259
464
  "required": true,
260
- "columnType": "INTEGER"
465
+ "columnType": "INTEGER",
466
+ "default": 0
261
467
  },
262
468
  {
263
469
  "name": "active",
264
470
  "type": "boolean",
265
471
  "required": true,
266
- "columnType": "BOOLEAN"
472
+ "columnType": "BOOLEAN",
473
+ "default": true
267
474
  }
268
475
  ],
269
476
  "relationships": [
@@ -318,6 +525,278 @@
318
525
  "toPlainObject",
319
526
  "toPublicJSON"
320
527
  ],
528
+ "methodSignatures": [
529
+ {
530
+ "name": "_setLoadedRelationship",
531
+ "params": [
532
+ "fieldName: string",
533
+ "value: any"
534
+ ],
535
+ "returns": "void"
536
+ },
537
+ {
538
+ "name": "classifyConstraintError",
539
+ "static": true,
540
+ "params": [
541
+ "message: string"
542
+ ],
543
+ "returns": "'unique' | 'not_null' | null"
544
+ },
545
+ {
546
+ "name": "clearEmbeddings",
547
+ "async": true,
548
+ "returns": "Promise<void>"
549
+ },
550
+ {
551
+ "name": "delete",
552
+ "async": true,
553
+ "returns": "Promise<void>"
554
+ },
555
+ {
556
+ "name": "describe",
557
+ "async": true,
558
+ "params": [
559
+ "options?: AiOperationOptions"
560
+ ],
561
+ "returns": "any"
562
+ },
563
+ {
564
+ "name": "destroy",
565
+ "returns": "void"
566
+ },
567
+ {
568
+ "name": "do",
569
+ "async": true,
570
+ "params": [
571
+ "instructions: string",
572
+ "options?: AiOperationOptions"
573
+ ],
574
+ "returns": "any"
575
+ },
576
+ {
577
+ "name": "executeToolCall",
578
+ "async": true,
579
+ "params": [
580
+ "toolCall: ToolCall"
581
+ ],
582
+ "returns": "Promise<ToolCallResult>"
583
+ },
584
+ {
585
+ "name": "forget",
586
+ "async": true,
587
+ "params": [
588
+ "options: object"
589
+ ],
590
+ "returns": "Promise<void>"
591
+ },
592
+ {
593
+ "name": "forgetScope",
594
+ "async": true,
595
+ "params": [
596
+ "options: object"
597
+ ],
598
+ "returns": "Promise<number>"
599
+ },
600
+ {
601
+ "name": "generateEmbeddings",
602
+ "async": true,
603
+ "params": [
604
+ "options?: GenerateEmbeddingsOptions"
605
+ ],
606
+ "returns": "Promise<void>"
607
+ },
608
+ {
609
+ "name": "getAiUsageSnapshot",
610
+ "returns": "AiUsageSnapshot | undefined"
611
+ },
612
+ {
613
+ "name": "getAvailableTools",
614
+ "returns": "AITool[]"
615
+ },
616
+ {
617
+ "name": "getEmbedding",
618
+ "async": true,
619
+ "params": [
620
+ "fieldName: string",
621
+ "model?: string"
622
+ ],
623
+ "returns": "Promise<number[] | null>"
624
+ },
625
+ {
626
+ "name": "getFields",
627
+ "async": true,
628
+ "returns": "Promise<any>"
629
+ },
630
+ {
631
+ "name": "getId",
632
+ "async": true,
633
+ "returns": "any"
634
+ },
635
+ {
636
+ "name": "getRelated",
637
+ "async": true,
638
+ "params": [
639
+ "fieldName: string",
640
+ "opts?: LoadRelatedOptions"
641
+ ],
642
+ "returns": "Promise<any>"
643
+ },
644
+ {
645
+ "name": "getSavedId",
646
+ "async": true,
647
+ "returns": "any"
648
+ },
649
+ {
650
+ "name": "getSlug",
651
+ "async": true,
652
+ "returns": "any"
653
+ },
654
+ {
655
+ "name": "hasStaleEmbeddings",
656
+ "async": true,
657
+ "returns": "Promise<boolean>"
658
+ },
659
+ {
660
+ "name": "initialize",
661
+ "async": true,
662
+ "returns": "Promise"
663
+ },
664
+ {
665
+ "name": "is",
666
+ "async": true,
667
+ "params": [
668
+ "criteria: string",
669
+ "options?: AiOperationOptions"
670
+ ],
671
+ "returns": "any"
672
+ },
673
+ {
674
+ "name": "isRelatedLoaded",
675
+ "params": [
676
+ "fieldName: string"
677
+ ],
678
+ "returns": "boolean"
679
+ },
680
+ {
681
+ "name": "isSaved",
682
+ "async": true,
683
+ "returns": "any"
684
+ },
685
+ {
686
+ "name": "listAiUsage",
687
+ "async": true,
688
+ "params": [
689
+ "options?: AiUsageListOptions"
690
+ ],
691
+ "returns": "Promise<SmrtAiUsageRecord[]>"
692
+ },
693
+ {
694
+ "name": "loadDataFromDb",
695
+ "async": true,
696
+ "params": [
697
+ "data: Record<string>"
698
+ ],
699
+ "returns": "any"
700
+ },
701
+ {
702
+ "name": "loadFromId",
703
+ "async": true,
704
+ "returns": "any"
705
+ },
706
+ {
707
+ "name": "loadFromSlug",
708
+ "async": true,
709
+ "returns": "any"
710
+ },
711
+ {
712
+ "name": "loadRelated",
713
+ "async": true,
714
+ "params": [
715
+ "fieldName: string",
716
+ "opts?: LoadRelatedOptions"
717
+ ],
718
+ "returns": "Promise<any>"
719
+ },
720
+ {
721
+ "name": "loadRelatedMany",
722
+ "async": true,
723
+ "params": [
724
+ "fieldName: string",
725
+ "opts?: LoadRelatedOptions"
726
+ ],
727
+ "returns": "Promise<any[]>"
728
+ },
729
+ {
730
+ "name": "markAsPersisted",
731
+ "returns": "void"
732
+ },
733
+ {
734
+ "name": "recall",
735
+ "async": true,
736
+ "params": [
737
+ "options: object"
738
+ ],
739
+ "returns": "Promise"
740
+ },
741
+ {
742
+ "name": "recallAll",
743
+ "async": true,
744
+ "params": [
745
+ "options?: object"
746
+ ],
747
+ "returns": "Promise<Map<string>>"
748
+ },
749
+ {
750
+ "name": "remember",
751
+ "async": true,
752
+ "params": [
753
+ "options: object"
754
+ ],
755
+ "returns": "Promise<void>"
756
+ },
757
+ {
758
+ "name": "requireInsertOnSave",
759
+ "returns": "void"
760
+ },
761
+ {
762
+ "name": "resetAiUsage",
763
+ "returns": "void"
764
+ },
765
+ {
766
+ "name": "save",
767
+ "async": true,
768
+ "returns": "any"
769
+ },
770
+ {
771
+ "name": "summarizeAiUsage",
772
+ "async": true,
773
+ "params": [
774
+ "options?: AiUsageSummaryOptions"
775
+ ],
776
+ "returns": "Promise<Record<string, AiUsageStats>>"
777
+ },
778
+ {
779
+ "name": "toJSON",
780
+ "returns": "any"
781
+ },
782
+ {
783
+ "name": "toPlainObject",
784
+ "returns": "Record<string>"
785
+ },
786
+ {
787
+ "name": "toPublicJSON",
788
+ "params": [
789
+ "options?: PublicJsonOptions"
790
+ ],
791
+ "returns": "Record<string>"
792
+ }
793
+ ],
794
+ "tenant": {
795
+ "scoped": true,
796
+ "mode": "optional",
797
+ "field": "tenantId"
798
+ },
799
+ "tableStrategy": "sti",
321
800
  "surfaces": [
322
801
  {
323
802
  "kind": "api",
@@ -467,40 +946,47 @@
467
946
  "name": "price",
468
947
  "type": "integer",
469
948
  "required": true,
470
- "columnType": "INTEGER"
949
+ "columnType": "INTEGER",
950
+ "default": 0
471
951
  },
472
952
  {
473
953
  "name": "inStock",
474
954
  "type": "boolean",
475
955
  "required": true,
476
- "columnType": "BOOLEAN"
956
+ "columnType": "BOOLEAN",
957
+ "default": true
477
958
  },
478
959
  {
479
960
  "name": "specifications",
480
961
  "type": "json",
481
962
  "required": false,
482
- "columnType": "JSON"
963
+ "columnType": "JSON",
964
+ "default": {}
483
965
  },
484
966
  {
485
967
  "name": "tags",
486
968
  "type": "json",
487
969
  "required": false,
488
- "columnType": "JSON"
970
+ "columnType": "JSON",
971
+ "default": []
489
972
  },
490
973
  {
491
974
  "name": "materialKind",
492
975
  "type": "meta",
493
- "required": false
976
+ "required": false,
977
+ "default": "component"
494
978
  },
495
979
  {
496
980
  "name": "uom",
497
981
  "type": "meta",
498
- "required": false
982
+ "required": false,
983
+ "default": "each"
499
984
  },
500
985
  {
501
986
  "name": "costPerUnit",
502
987
  "type": "meta",
503
- "required": false
988
+ "required": false,
989
+ "default": 0
504
990
  }
505
991
  ],
506
992
  "relationships": [],
@@ -552,6 +1038,322 @@
552
1038
  "toPublicJSON",
553
1039
  "updateSpecification"
554
1040
  ],
1041
+ "methodSignatures": [
1042
+ {
1043
+ "name": "_setLoadedRelationship",
1044
+ "params": [
1045
+ "fieldName: string",
1046
+ "value: any"
1047
+ ],
1048
+ "returns": "void"
1049
+ },
1050
+ {
1051
+ "name": "addAsset",
1052
+ "async": true,
1053
+ "params": [
1054
+ "asset: Asset",
1055
+ "relationship?: any",
1056
+ "sortOrder?: any"
1057
+ ],
1058
+ "returns": "Promise<void>"
1059
+ },
1060
+ {
1061
+ "name": "classifyConstraintError",
1062
+ "static": true,
1063
+ "params": [
1064
+ "message: string"
1065
+ ],
1066
+ "returns": "'unique' | 'not_null' | null"
1067
+ },
1068
+ {
1069
+ "name": "clearEmbeddings",
1070
+ "async": true,
1071
+ "returns": "Promise<void>"
1072
+ },
1073
+ {
1074
+ "name": "delete",
1075
+ "async": true,
1076
+ "returns": "Promise<void>"
1077
+ },
1078
+ {
1079
+ "name": "describe",
1080
+ "async": true,
1081
+ "params": [
1082
+ "options?: AiOperationOptions"
1083
+ ],
1084
+ "returns": "any"
1085
+ },
1086
+ {
1087
+ "name": "destroy",
1088
+ "returns": "void"
1089
+ },
1090
+ {
1091
+ "name": "do",
1092
+ "async": true,
1093
+ "params": [
1094
+ "instructions: string",
1095
+ "options?: AiOperationOptions"
1096
+ ],
1097
+ "returns": "any"
1098
+ },
1099
+ {
1100
+ "name": "executeToolCall",
1101
+ "async": true,
1102
+ "params": [
1103
+ "toolCall: ToolCall"
1104
+ ],
1105
+ "returns": "Promise<ToolCallResult>"
1106
+ },
1107
+ {
1108
+ "name": "forget",
1109
+ "async": true,
1110
+ "params": [
1111
+ "options: object"
1112
+ ],
1113
+ "returns": "Promise<void>"
1114
+ },
1115
+ {
1116
+ "name": "forgetScope",
1117
+ "async": true,
1118
+ "params": [
1119
+ "options: object"
1120
+ ],
1121
+ "returns": "Promise<number>"
1122
+ },
1123
+ {
1124
+ "name": "generateEmbeddings",
1125
+ "async": true,
1126
+ "params": [
1127
+ "options?: GenerateEmbeddingsOptions"
1128
+ ],
1129
+ "returns": "Promise<void>"
1130
+ },
1131
+ {
1132
+ "name": "getAiUsageSnapshot",
1133
+ "returns": "AiUsageSnapshot | undefined"
1134
+ },
1135
+ {
1136
+ "name": "getAssets",
1137
+ "async": true,
1138
+ "params": [
1139
+ "relationship?: string"
1140
+ ],
1141
+ "returns": "Promise<Asset[]>"
1142
+ },
1143
+ {
1144
+ "name": "getAvailableTools",
1145
+ "returns": "AITool[]"
1146
+ },
1147
+ {
1148
+ "name": "getEmbedding",
1149
+ "async": true,
1150
+ "params": [
1151
+ "fieldName: string",
1152
+ "model?: string"
1153
+ ],
1154
+ "returns": "Promise<number[] | null>"
1155
+ },
1156
+ {
1157
+ "name": "getFields",
1158
+ "async": true,
1159
+ "returns": "Promise<any>"
1160
+ },
1161
+ {
1162
+ "name": "getId",
1163
+ "async": true,
1164
+ "returns": "any"
1165
+ },
1166
+ {
1167
+ "name": "getRelated",
1168
+ "async": true,
1169
+ "params": [
1170
+ "fieldName: string",
1171
+ "opts?: LoadRelatedOptions"
1172
+ ],
1173
+ "returns": "Promise<any>"
1174
+ },
1175
+ {
1176
+ "name": "getSavedId",
1177
+ "async": true,
1178
+ "returns": "any"
1179
+ },
1180
+ {
1181
+ "name": "getSlug",
1182
+ "async": true,
1183
+ "returns": "any"
1184
+ },
1185
+ {
1186
+ "name": "getSpecification",
1187
+ "async": true,
1188
+ "params": [
1189
+ "key: string"
1190
+ ],
1191
+ "returns": "Promise"
1192
+ },
1193
+ {
1194
+ "name": "hasStaleEmbeddings",
1195
+ "async": true,
1196
+ "returns": "Promise<boolean>"
1197
+ },
1198
+ {
1199
+ "name": "initialize",
1200
+ "async": true,
1201
+ "returns": "Promise"
1202
+ },
1203
+ {
1204
+ "name": "is",
1205
+ "async": true,
1206
+ "params": [
1207
+ "criteria: string",
1208
+ "options?: AiOperationOptions"
1209
+ ],
1210
+ "returns": "any"
1211
+ },
1212
+ {
1213
+ "name": "isRelatedLoaded",
1214
+ "params": [
1215
+ "fieldName: string"
1216
+ ],
1217
+ "returns": "boolean"
1218
+ },
1219
+ {
1220
+ "name": "isSaved",
1221
+ "async": true,
1222
+ "returns": "any"
1223
+ },
1224
+ {
1225
+ "name": "listAiUsage",
1226
+ "async": true,
1227
+ "params": [
1228
+ "options?: AiUsageListOptions"
1229
+ ],
1230
+ "returns": "Promise<SmrtAiUsageRecord[]>"
1231
+ },
1232
+ {
1233
+ "name": "loadDataFromDb",
1234
+ "async": true,
1235
+ "params": [
1236
+ "data: Record<string>"
1237
+ ],
1238
+ "returns": "any"
1239
+ },
1240
+ {
1241
+ "name": "loadFromId",
1242
+ "async": true,
1243
+ "returns": "any"
1244
+ },
1245
+ {
1246
+ "name": "loadFromSlug",
1247
+ "async": true,
1248
+ "returns": "any"
1249
+ },
1250
+ {
1251
+ "name": "loadRelated",
1252
+ "async": true,
1253
+ "params": [
1254
+ "fieldName: string",
1255
+ "opts?: LoadRelatedOptions"
1256
+ ],
1257
+ "returns": "Promise<any>"
1258
+ },
1259
+ {
1260
+ "name": "loadRelatedMany",
1261
+ "async": true,
1262
+ "params": [
1263
+ "fieldName: string",
1264
+ "opts?: LoadRelatedOptions"
1265
+ ],
1266
+ "returns": "Promise<any[]>"
1267
+ },
1268
+ {
1269
+ "name": "markAsPersisted",
1270
+ "returns": "void"
1271
+ },
1272
+ {
1273
+ "name": "recall",
1274
+ "async": true,
1275
+ "params": [
1276
+ "options: object"
1277
+ ],
1278
+ "returns": "Promise"
1279
+ },
1280
+ {
1281
+ "name": "recallAll",
1282
+ "async": true,
1283
+ "params": [
1284
+ "options?: object"
1285
+ ],
1286
+ "returns": "Promise<Map<string>>"
1287
+ },
1288
+ {
1289
+ "name": "remember",
1290
+ "async": true,
1291
+ "params": [
1292
+ "options: object"
1293
+ ],
1294
+ "returns": "Promise<void>"
1295
+ },
1296
+ {
1297
+ "name": "removeAsset",
1298
+ "async": true,
1299
+ "params": [
1300
+ "assetId: string",
1301
+ "relationship?: string"
1302
+ ],
1303
+ "returns": "Promise<void>"
1304
+ },
1305
+ {
1306
+ "name": "requireInsertOnSave",
1307
+ "returns": "void"
1308
+ },
1309
+ {
1310
+ "name": "resetAiUsage",
1311
+ "returns": "void"
1312
+ },
1313
+ {
1314
+ "name": "save",
1315
+ "async": true,
1316
+ "returns": "any"
1317
+ },
1318
+ {
1319
+ "name": "summarizeAiUsage",
1320
+ "async": true,
1321
+ "params": [
1322
+ "options?: AiUsageSummaryOptions"
1323
+ ],
1324
+ "returns": "Promise<Record<string, AiUsageStats>>"
1325
+ },
1326
+ {
1327
+ "name": "toJSON",
1328
+ "returns": "any"
1329
+ },
1330
+ {
1331
+ "name": "toPlainObject",
1332
+ "returns": "Record<string>"
1333
+ },
1334
+ {
1335
+ "name": "toPublicJSON",
1336
+ "params": [
1337
+ "options?: PublicJsonOptions"
1338
+ ],
1339
+ "returns": "Record<string>"
1340
+ },
1341
+ {
1342
+ "name": "updateSpecification",
1343
+ "async": true,
1344
+ "params": [
1345
+ "key: string",
1346
+ "value: any"
1347
+ ],
1348
+ "returns": "Promise<void>"
1349
+ }
1350
+ ],
1351
+ "tenant": {
1352
+ "scoped": true,
1353
+ "mode": "optional",
1354
+ "field": "tenantId"
1355
+ },
1356
+ "tableStrategy": "sti",
555
1357
  "surfaces": [
556
1358
  {
557
1359
  "kind": "api",
@@ -700,25 +1502,29 @@
700
1502
  "name": "price",
701
1503
  "type": "integer",
702
1504
  "required": true,
703
- "columnType": "INTEGER"
1505
+ "columnType": "INTEGER",
1506
+ "default": 0
704
1507
  },
705
1508
  {
706
1509
  "name": "inStock",
707
1510
  "type": "boolean",
708
1511
  "required": true,
709
- "columnType": "BOOLEAN"
1512
+ "columnType": "BOOLEAN",
1513
+ "default": true
710
1514
  },
711
1515
  {
712
1516
  "name": "specifications",
713
1517
  "type": "json",
714
1518
  "required": false,
715
- "columnType": "JSON"
1519
+ "columnType": "JSON",
1520
+ "default": {}
716
1521
  },
717
1522
  {
718
1523
  "name": "tags",
719
1524
  "type": "json",
720
1525
  "required": false,
721
- "columnType": "JSON"
1526
+ "columnType": "JSON",
1527
+ "default": []
722
1528
  }
723
1529
  ],
724
1530
  "relationships": [],
@@ -770,6 +1576,322 @@
770
1576
  "toPublicJSON",
771
1577
  "updateSpecification"
772
1578
  ],
1579
+ "methodSignatures": [
1580
+ {
1581
+ "name": "_setLoadedRelationship",
1582
+ "params": [
1583
+ "fieldName: string",
1584
+ "value: any"
1585
+ ],
1586
+ "returns": "void"
1587
+ },
1588
+ {
1589
+ "name": "addAsset",
1590
+ "async": true,
1591
+ "params": [
1592
+ "asset: Asset",
1593
+ "relationship?: any",
1594
+ "sortOrder?: any"
1595
+ ],
1596
+ "returns": "Promise<void>"
1597
+ },
1598
+ {
1599
+ "name": "classifyConstraintError",
1600
+ "static": true,
1601
+ "params": [
1602
+ "message: string"
1603
+ ],
1604
+ "returns": "'unique' | 'not_null' | null"
1605
+ },
1606
+ {
1607
+ "name": "clearEmbeddings",
1608
+ "async": true,
1609
+ "returns": "Promise<void>"
1610
+ },
1611
+ {
1612
+ "name": "delete",
1613
+ "async": true,
1614
+ "returns": "Promise<void>"
1615
+ },
1616
+ {
1617
+ "name": "describe",
1618
+ "async": true,
1619
+ "params": [
1620
+ "options?: AiOperationOptions"
1621
+ ],
1622
+ "returns": "any"
1623
+ },
1624
+ {
1625
+ "name": "destroy",
1626
+ "returns": "void"
1627
+ },
1628
+ {
1629
+ "name": "do",
1630
+ "async": true,
1631
+ "params": [
1632
+ "instructions: string",
1633
+ "options?: AiOperationOptions"
1634
+ ],
1635
+ "returns": "any"
1636
+ },
1637
+ {
1638
+ "name": "executeToolCall",
1639
+ "async": true,
1640
+ "params": [
1641
+ "toolCall: ToolCall"
1642
+ ],
1643
+ "returns": "Promise<ToolCallResult>"
1644
+ },
1645
+ {
1646
+ "name": "forget",
1647
+ "async": true,
1648
+ "params": [
1649
+ "options: object"
1650
+ ],
1651
+ "returns": "Promise<void>"
1652
+ },
1653
+ {
1654
+ "name": "forgetScope",
1655
+ "async": true,
1656
+ "params": [
1657
+ "options: object"
1658
+ ],
1659
+ "returns": "Promise<number>"
1660
+ },
1661
+ {
1662
+ "name": "generateEmbeddings",
1663
+ "async": true,
1664
+ "params": [
1665
+ "options?: GenerateEmbeddingsOptions"
1666
+ ],
1667
+ "returns": "Promise<void>"
1668
+ },
1669
+ {
1670
+ "name": "getAiUsageSnapshot",
1671
+ "returns": "AiUsageSnapshot | undefined"
1672
+ },
1673
+ {
1674
+ "name": "getAssets",
1675
+ "async": true,
1676
+ "params": [
1677
+ "relationship?: string"
1678
+ ],
1679
+ "returns": "Promise<Asset[]>"
1680
+ },
1681
+ {
1682
+ "name": "getAvailableTools",
1683
+ "returns": "AITool[]"
1684
+ },
1685
+ {
1686
+ "name": "getEmbedding",
1687
+ "async": true,
1688
+ "params": [
1689
+ "fieldName: string",
1690
+ "model?: string"
1691
+ ],
1692
+ "returns": "Promise<number[] | null>"
1693
+ },
1694
+ {
1695
+ "name": "getFields",
1696
+ "async": true,
1697
+ "returns": "Promise<any>"
1698
+ },
1699
+ {
1700
+ "name": "getId",
1701
+ "async": true,
1702
+ "returns": "any"
1703
+ },
1704
+ {
1705
+ "name": "getRelated",
1706
+ "async": true,
1707
+ "params": [
1708
+ "fieldName: string",
1709
+ "opts?: LoadRelatedOptions"
1710
+ ],
1711
+ "returns": "Promise<any>"
1712
+ },
1713
+ {
1714
+ "name": "getSavedId",
1715
+ "async": true,
1716
+ "returns": "any"
1717
+ },
1718
+ {
1719
+ "name": "getSlug",
1720
+ "async": true,
1721
+ "returns": "any"
1722
+ },
1723
+ {
1724
+ "name": "getSpecification",
1725
+ "async": true,
1726
+ "params": [
1727
+ "key: string"
1728
+ ],
1729
+ "returns": "Promise"
1730
+ },
1731
+ {
1732
+ "name": "hasStaleEmbeddings",
1733
+ "async": true,
1734
+ "returns": "Promise<boolean>"
1735
+ },
1736
+ {
1737
+ "name": "initialize",
1738
+ "async": true,
1739
+ "returns": "Promise"
1740
+ },
1741
+ {
1742
+ "name": "is",
1743
+ "async": true,
1744
+ "params": [
1745
+ "criteria: string",
1746
+ "options?: AiOperationOptions"
1747
+ ],
1748
+ "returns": "any"
1749
+ },
1750
+ {
1751
+ "name": "isRelatedLoaded",
1752
+ "params": [
1753
+ "fieldName: string"
1754
+ ],
1755
+ "returns": "boolean"
1756
+ },
1757
+ {
1758
+ "name": "isSaved",
1759
+ "async": true,
1760
+ "returns": "any"
1761
+ },
1762
+ {
1763
+ "name": "listAiUsage",
1764
+ "async": true,
1765
+ "params": [
1766
+ "options?: AiUsageListOptions"
1767
+ ],
1768
+ "returns": "Promise<SmrtAiUsageRecord[]>"
1769
+ },
1770
+ {
1771
+ "name": "loadDataFromDb",
1772
+ "async": true,
1773
+ "params": [
1774
+ "data: Record<string>"
1775
+ ],
1776
+ "returns": "any"
1777
+ },
1778
+ {
1779
+ "name": "loadFromId",
1780
+ "async": true,
1781
+ "returns": "any"
1782
+ },
1783
+ {
1784
+ "name": "loadFromSlug",
1785
+ "async": true,
1786
+ "returns": "any"
1787
+ },
1788
+ {
1789
+ "name": "loadRelated",
1790
+ "async": true,
1791
+ "params": [
1792
+ "fieldName: string",
1793
+ "opts?: LoadRelatedOptions"
1794
+ ],
1795
+ "returns": "Promise<any>"
1796
+ },
1797
+ {
1798
+ "name": "loadRelatedMany",
1799
+ "async": true,
1800
+ "params": [
1801
+ "fieldName: string",
1802
+ "opts?: LoadRelatedOptions"
1803
+ ],
1804
+ "returns": "Promise<any[]>"
1805
+ },
1806
+ {
1807
+ "name": "markAsPersisted",
1808
+ "returns": "void"
1809
+ },
1810
+ {
1811
+ "name": "recall",
1812
+ "async": true,
1813
+ "params": [
1814
+ "options: object"
1815
+ ],
1816
+ "returns": "Promise"
1817
+ },
1818
+ {
1819
+ "name": "recallAll",
1820
+ "async": true,
1821
+ "params": [
1822
+ "options?: object"
1823
+ ],
1824
+ "returns": "Promise<Map<string>>"
1825
+ },
1826
+ {
1827
+ "name": "remember",
1828
+ "async": true,
1829
+ "params": [
1830
+ "options: object"
1831
+ ],
1832
+ "returns": "Promise<void>"
1833
+ },
1834
+ {
1835
+ "name": "removeAsset",
1836
+ "async": true,
1837
+ "params": [
1838
+ "assetId: string",
1839
+ "relationship?: string"
1840
+ ],
1841
+ "returns": "Promise<void>"
1842
+ },
1843
+ {
1844
+ "name": "requireInsertOnSave",
1845
+ "returns": "void"
1846
+ },
1847
+ {
1848
+ "name": "resetAiUsage",
1849
+ "returns": "void"
1850
+ },
1851
+ {
1852
+ "name": "save",
1853
+ "async": true,
1854
+ "returns": "any"
1855
+ },
1856
+ {
1857
+ "name": "summarizeAiUsage",
1858
+ "async": true,
1859
+ "params": [
1860
+ "options?: AiUsageSummaryOptions"
1861
+ ],
1862
+ "returns": "Promise<Record<string, AiUsageStats>>"
1863
+ },
1864
+ {
1865
+ "name": "toJSON",
1866
+ "returns": "any"
1867
+ },
1868
+ {
1869
+ "name": "toPlainObject",
1870
+ "returns": "Record<string>"
1871
+ },
1872
+ {
1873
+ "name": "toPublicJSON",
1874
+ "params": [
1875
+ "options?: PublicJsonOptions"
1876
+ ],
1877
+ "returns": "Record<string>"
1878
+ },
1879
+ {
1880
+ "name": "updateSpecification",
1881
+ "async": true,
1882
+ "params": [
1883
+ "key: string",
1884
+ "value: any"
1885
+ ],
1886
+ "returns": "Promise<void>"
1887
+ }
1888
+ ],
1889
+ "tenant": {
1890
+ "scoped": true,
1891
+ "mode": "optional",
1892
+ "field": "tenantId"
1893
+ },
1894
+ "tableStrategy": "sti",
773
1895
  "surfaces": [
774
1896
  {
775
1897
  "kind": "api",
@@ -890,7 +2012,8 @@
890
2012
  "name": "sortOrder",
891
2013
  "type": "integer",
892
2014
  "required": true,
893
- "columnType": "INTEGER"
2015
+ "columnType": "INTEGER",
2016
+ "default": 0
894
2017
  }
895
2018
  ],
896
2019
  "relationships": [
@@ -910,6 +2033,17 @@
910
2033
  }
911
2034
  ],
912
2035
  "methods": [],
2036
+ "tenant": {
2037
+ "scoped": true,
2038
+ "mode": "optional",
2039
+ "field": "tenantId"
2040
+ },
2041
+ "conflictColumns": [
2042
+ "product_id",
2043
+ "asset_id",
2044
+ "relationship",
2045
+ "tenant_id"
2046
+ ],
913
2047
  "surfaces": [],
914
2048
  "relationshipFeatures": [
915
2049
  "crossPackageRef",
@@ -937,31 +2071,36 @@
937
2071
  "name": "productId",
938
2072
  "type": "text",
939
2073
  "required": true,
940
- "columnType": "TEXT"
2074
+ "columnType": "TEXT",
2075
+ "default": ""
941
2076
  },
942
2077
  {
943
2078
  "name": "axisName",
944
2079
  "type": "text",
945
2080
  "required": true,
946
- "columnType": "TEXT"
2081
+ "columnType": "TEXT",
2082
+ "default": ""
947
2083
  },
948
2084
  {
949
2085
  "name": "label",
950
2086
  "type": "text",
951
2087
  "required": false,
952
- "columnType": "TEXT"
2088
+ "columnType": "TEXT",
2089
+ "default": ""
953
2090
  },
954
2091
  {
955
2092
  "name": "allowedValues",
956
2093
  "type": "text",
957
2094
  "required": false,
958
- "columnType": "TEXT"
2095
+ "columnType": "TEXT",
2096
+ "default": "[]"
959
2097
  },
960
2098
  {
961
2099
  "name": "sortOrder",
962
2100
  "type": "integer",
963
2101
  "required": false,
964
- "columnType": "INTEGER"
2102
+ "columnType": "INTEGER",
2103
+ "default": 0
965
2104
  }
966
2105
  ],
967
2106
  "relationships": [],
@@ -969,6 +2108,29 @@
969
2108
  "getValues",
970
2109
  "setValues"
971
2110
  ],
2111
+ "methodSignatures": [
2112
+ {
2113
+ "name": "getValues",
2114
+ "returns": "string[]"
2115
+ },
2116
+ {
2117
+ "name": "setValues",
2118
+ "params": [
2119
+ "value: string[] | string"
2120
+ ],
2121
+ "returns": "void"
2122
+ }
2123
+ ],
2124
+ "tenant": {
2125
+ "scoped": true,
2126
+ "mode": "optional",
2127
+ "field": "tenantId"
2128
+ },
2129
+ "conflictColumns": [
2130
+ "product_id",
2131
+ "axis_name",
2132
+ "tenant_id"
2133
+ ],
972
2134
  "surfaces": [
973
2135
  {
974
2136
  "kind": "api",
@@ -1069,31 +2231,36 @@
1069
2231
  "name": "productId",
1070
2232
  "type": "text",
1071
2233
  "required": true,
1072
- "columnType": "TEXT"
2234
+ "columnType": "TEXT",
2235
+ "default": ""
1073
2236
  },
1074
2237
  {
1075
2238
  "name": "code",
1076
2239
  "type": "text",
1077
2240
  "required": true,
1078
- "columnType": "TEXT"
2241
+ "columnType": "TEXT",
2242
+ "default": ""
1079
2243
  },
1080
2244
  {
1081
2245
  "name": "barcode",
1082
2246
  "type": "text",
1083
2247
  "required": false,
1084
- "columnType": "TEXT"
2248
+ "columnType": "TEXT",
2249
+ "default": ""
1085
2250
  },
1086
2251
  {
1087
2252
  "name": "name",
1088
2253
  "type": "text",
1089
2254
  "required": false,
1090
- "columnType": "TEXT"
2255
+ "columnType": "TEXT",
2256
+ "default": ""
1091
2257
  },
1092
2258
  {
1093
2259
  "name": "attributes",
1094
2260
  "type": "text",
1095
2261
  "required": false,
1096
- "columnType": "TEXT"
2262
+ "columnType": "TEXT",
2263
+ "default": "{}"
1097
2264
  },
1098
2265
  {
1099
2266
  "name": "weightGrams",
@@ -1105,13 +2272,15 @@
1105
2272
  "name": "parentSkuId",
1106
2273
  "type": "text",
1107
2274
  "required": false,
1108
- "columnType": "TEXT"
2275
+ "columnType": "TEXT",
2276
+ "default": ""
1109
2277
  },
1110
2278
  {
1111
2279
  "name": "active",
1112
2280
  "type": "boolean",
1113
2281
  "required": false,
1114
- "columnType": "BOOLEAN"
2282
+ "columnType": "BOOLEAN",
2283
+ "default": true
1115
2284
  }
1116
2285
  ],
1117
2286
  "relationships": [],
@@ -1119,6 +2288,28 @@
1119
2288
  "getAttributes",
1120
2289
  "setAttributes"
1121
2290
  ],
2291
+ "methodSignatures": [
2292
+ {
2293
+ "name": "getAttributes",
2294
+ "returns": "Record<string>"
2295
+ },
2296
+ {
2297
+ "name": "setAttributes",
2298
+ "params": [
2299
+ "value: Record<string> | string"
2300
+ ],
2301
+ "returns": "void"
2302
+ }
2303
+ ],
2304
+ "tenant": {
2305
+ "scoped": true,
2306
+ "mode": "optional",
2307
+ "field": "tenantId"
2308
+ },
2309
+ "conflictColumns": [
2310
+ "code",
2311
+ "tenant_id"
2312
+ ],
1122
2313
  "surfaces": [
1123
2314
  {
1124
2315
  "kind": "api",