@happyvertical/smrt-products 0.56.0 → 0.56.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/lib/chunks/{ProductAssetCollection-pTm67_Vn.js → ProductAssetCollection-BuvXAMhk.js} +3 -3
  2. package/dist/lib/chunks/{ProductAssetCollection-pTm67_Vn.js.map → ProductAssetCollection-BuvXAMhk.js.map} +1 -1
  3. package/dist/lib/chunks/{ProductCollection-BJXVIE6A.js → ProductCollection-DG_vHXBB.js} +2 -2
  4. package/dist/lib/chunks/{ProductCollection-BJXVIE6A.js.map → ProductCollection-DG_vHXBB.js.map} +1 -1
  5. package/dist/lib/chunks/{Sku-CdhhTtjd.js → Sku-DOFW6Izt.js} +10 -2
  6. package/dist/lib/chunks/Sku-DOFW6Izt.js.map +1 -0
  7. package/dist/lib/chunks/__smrt-register__-CJ2Uym6T.js +6 -0
  8. package/dist/lib/chunks/__smrt-register__-CJ2Uym6T.js.map +1 -0
  9. package/dist/lib/chunks/{collections-BSkv0c_w.js → collections-DD9nJecp.js} +5 -5
  10. package/dist/lib/chunks/{collections-BSkv0c_w.js.map → collections-DD9nJecp.js.map} +1 -1
  11. package/dist/lib/chunks/{generated-Bc7lfF_t.js → generated-DH3DyJcQ.js} +2 -2
  12. package/dist/lib/chunks/{generated-Bc7lfF_t.js.map → generated-DH3DyJcQ.js.map} +1 -1
  13. package/dist/lib/chunks/models-BR8_apA1.js +2 -0
  14. package/dist/lib/collections.js +3 -3
  15. package/dist/lib/generated.js +1 -1
  16. package/dist/lib/index.js +7 -7
  17. package/dist/lib/lib/models/Product.d.ts +6 -0
  18. package/dist/lib/lib/models/Product.d.ts.map +1 -1
  19. package/dist/lib/manifest.json +206 -14
  20. package/dist/lib/models.js +2 -2
  21. package/dist/lib/smrt-knowledge.json +158 -483
  22. package/package.json +15 -15
  23. package/dist/lib/chunks/Sku-CdhhTtjd.js.map +0 -1
  24. package/dist/lib/chunks/__smrt-register__-CxtOiAsr.js +0 -6
  25. package/dist/lib/chunks/__smrt-register__-CxtOiAsr.js.map +0 -1
  26. package/dist/lib/chunks/models-C2Ytgu_O.js +0 -2
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-products",
5
- "packageVersion": "0.56.0",
5
+ "packageVersion": "0.56.2",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-products:CategoryCollection": {
8
8
  "name": "categorycollection",
@@ -22,7 +22,22 @@
22
22
  "isPublic": true
23
23
  }
24
24
  },
25
- "decoratorConfig": {},
25
+ "decoratorConfig": {
26
+ "api": {
27
+ "include": [
28
+ "list",
29
+ "get",
30
+ "create",
31
+ "update"
32
+ ]
33
+ },
34
+ "mcp": {
35
+ "include": [
36
+ "list",
37
+ "get"
38
+ ]
39
+ }
40
+ },
26
41
  "extends": "SmrtCollection",
27
42
  "extendsTypeArg": "Category",
28
43
  "exportName": "CategoryCollection",
@@ -260,14 +275,28 @@
260
275
  }
261
276
  },
262
277
  "decoratorConfig": {
263
- "tableName": "products"
278
+ "tableName": "products",
279
+ "api": {
280
+ "include": [
281
+ "list",
282
+ "get",
283
+ "create",
284
+ "update"
285
+ ]
286
+ },
287
+ "mcp": {
288
+ "include": [
289
+ "list",
290
+ "get"
291
+ ]
292
+ }
264
293
  },
265
294
  "extends": "ProductCollection",
266
295
  "exportName": "MaterialCollection",
267
296
  "collectionExportName": "MaterialCollectionCollection",
268
297
  "schema": {
269
298
  "tableName": "products",
270
- "ddl": "CREATE TABLE IF NOT EXISTS \"products\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_type\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"category\" TEXT,\n \"manufacturer\" TEXT,\n \"model\" TEXT,\n \"price\" INTEGER DEFAULT 0,\n \"in_stock\" BOOLEAN DEFAULT TRUE,\n \"specifications\" JSON DEFAULT '{}',\n \"tags\" JSON DEFAULT '[]'\n);",
299
+ "ddl": "CREATE TABLE IF NOT EXISTS \"products\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_type\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"category\" TEXT,\n \"manufacturer\" TEXT,\n \"model\" TEXT,\n \"price\" INTEGER DEFAULT 0,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"in_stock\" BOOLEAN DEFAULT TRUE,\n \"specifications\" JSON DEFAULT '{}',\n \"tags\" JSON DEFAULT '[]'\n);",
271
300
  "columns": {
272
301
  "id": {
273
302
  "type": "UUID",
@@ -336,6 +365,16 @@
336
365
  "notNull": false,
337
366
  "default": 0
338
367
  },
368
+ "default_sales_tax_code_id": {
369
+ "type": "UUID",
370
+ "referenceKind": "crossPackageRef",
371
+ "notNull": false
372
+ },
373
+ "default_purchase_tax_code_id": {
374
+ "type": "UUID",
375
+ "referenceKind": "crossPackageRef",
376
+ "notNull": false
377
+ },
339
378
  "in_stock": {
340
379
  "type": "BOOLEAN",
341
380
  "notNull": false,
@@ -376,9 +415,21 @@
376
415
  "tenant_id",
377
416
  "created_at"
378
417
  ]
418
+ },
419
+ {
420
+ "name": "products_default_sales_tax_code_id_idx",
421
+ "columns": [
422
+ "default_sales_tax_code_id"
423
+ ]
424
+ },
425
+ {
426
+ "name": "products_default_purchase_tax_code_id_idx",
427
+ "columns": [
428
+ "default_purchase_tax_code_id"
429
+ ]
379
430
  }
380
431
  ],
381
- "version": "a7b4d592"
432
+ "version": "d8402a81"
382
433
  },
383
434
  "importPath": "@happyvertical/smrt-products/collections"
384
435
  },
@@ -792,14 +843,29 @@
792
843
  "isPublic": true
793
844
  }
794
845
  },
795
- "decoratorConfig": {},
846
+ "decoratorConfig": {
847
+ "api": {
848
+ "include": [
849
+ "list",
850
+ "get",
851
+ "create",
852
+ "update"
853
+ ]
854
+ },
855
+ "mcp": {
856
+ "include": [
857
+ "list",
858
+ "get"
859
+ ]
860
+ }
861
+ },
796
862
  "extends": "SmrtCollection",
797
863
  "extendsTypeArg": "Product",
798
864
  "exportName": "ProductCollection",
799
865
  "collectionExportName": "ProductCollectionCollection",
800
866
  "schema": {
801
867
  "tableName": "products",
802
- "ddl": "CREATE TABLE IF NOT EXISTS \"products\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_type\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"category\" TEXT,\n \"manufacturer\" TEXT,\n \"model\" TEXT,\n \"price\" INTEGER DEFAULT 0,\n \"in_stock\" BOOLEAN DEFAULT TRUE,\n \"specifications\" JSON DEFAULT '{}',\n \"tags\" JSON DEFAULT '[]'\n);",
868
+ "ddl": "CREATE TABLE IF NOT EXISTS \"products\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_type\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"category\" TEXT,\n \"manufacturer\" TEXT,\n \"model\" TEXT,\n \"price\" INTEGER DEFAULT 0,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"in_stock\" BOOLEAN DEFAULT TRUE,\n \"specifications\" JSON DEFAULT '{}',\n \"tags\" JSON DEFAULT '[]'\n);",
803
869
  "columns": {
804
870
  "id": {
805
871
  "type": "UUID",
@@ -868,6 +934,16 @@
868
934
  "notNull": false,
869
935
  "default": 0
870
936
  },
937
+ "default_sales_tax_code_id": {
938
+ "type": "UUID",
939
+ "referenceKind": "crossPackageRef",
940
+ "notNull": false
941
+ },
942
+ "default_purchase_tax_code_id": {
943
+ "type": "UUID",
944
+ "referenceKind": "crossPackageRef",
945
+ "notNull": false
946
+ },
871
947
  "in_stock": {
872
948
  "type": "BOOLEAN",
873
949
  "notNull": false,
@@ -908,9 +984,21 @@
908
984
  "tenant_id",
909
985
  "created_at"
910
986
  ]
987
+ },
988
+ {
989
+ "name": "products_default_sales_tax_code_id_idx",
990
+ "columns": [
991
+ "default_sales_tax_code_id"
992
+ ]
993
+ },
994
+ {
995
+ "name": "products_default_purchase_tax_code_id_idx",
996
+ "columns": [
997
+ "default_purchase_tax_code_id"
998
+ ]
911
999
  }
912
1000
  ],
913
- "version": "a7b4d592"
1001
+ "version": "d8402a81"
914
1002
  },
915
1003
  "importPath": "@happyvertical/smrt-products/collections"
916
1004
  },
@@ -958,7 +1046,21 @@
958
1046
  }
959
1047
  },
960
1048
  "decoratorConfig": {
961
- "tableName": "product_variants"
1049
+ "tableName": "product_variants",
1050
+ "api": {
1051
+ "include": [
1052
+ "list",
1053
+ "get",
1054
+ "create",
1055
+ "update"
1056
+ ]
1057
+ },
1058
+ "mcp": {
1059
+ "include": [
1060
+ "list",
1061
+ "get"
1062
+ ]
1063
+ }
962
1064
  },
963
1065
  "extends": "SmrtCollection",
964
1066
  "extendsTypeArg": "ProductVariant",
@@ -1141,7 +1243,21 @@
1141
1243
  }
1142
1244
  },
1143
1245
  "decoratorConfig": {
1144
- "tableName": "product_skus"
1246
+ "tableName": "product_skus",
1247
+ "api": {
1248
+ "include": [
1249
+ "list",
1250
+ "get",
1251
+ "create",
1252
+ "update"
1253
+ ]
1254
+ },
1255
+ "mcp": {
1256
+ "include": [
1257
+ "list",
1258
+ "get"
1259
+ ]
1260
+ }
1145
1261
  },
1146
1262
  "extends": "SmrtCollection",
1147
1263
  "extendsTypeArg": "Sku",
@@ -1565,6 +1681,22 @@
1565
1681
  "description": "The price in minor units (cents), for example 1999 for 19.99."
1566
1682
  }
1567
1683
  },
1684
+ "defaultSalesTaxCodeId": {
1685
+ "type": "crossPackageRef",
1686
+ "required": false,
1687
+ "related": "@happyvertical/smrt-commerce:TaxCode",
1688
+ "_meta": {
1689
+ "description": "The tax code normally used when this product is sold."
1690
+ }
1691
+ },
1692
+ "defaultPurchaseTaxCodeId": {
1693
+ "type": "crossPackageRef",
1694
+ "required": false,
1695
+ "related": "@happyvertical/smrt-commerce:TaxCode",
1696
+ "_meta": {
1697
+ "description": "The tax code normally used when this product is purchased."
1698
+ }
1699
+ },
1568
1700
  "inStock": {
1569
1701
  "type": "boolean",
1570
1702
  "required": true,
@@ -1740,7 +1872,7 @@
1740
1872
  ],
1741
1873
  "schema": {
1742
1874
  "tableName": "products",
1743
- "ddl": "CREATE TABLE IF NOT EXISTS \"products\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_type\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"category\" TEXT,\n \"manufacturer\" TEXT,\n \"model\" TEXT,\n \"price\" INTEGER DEFAULT 0,\n \"in_stock\" BOOLEAN DEFAULT TRUE,\n \"specifications\" JSON DEFAULT '{}',\n \"tags\" JSON DEFAULT '[]'\n);",
1875
+ "ddl": "CREATE TABLE IF NOT EXISTS \"products\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_type\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"category\" TEXT,\n \"manufacturer\" TEXT,\n \"model\" TEXT,\n \"price\" INTEGER DEFAULT 0,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"in_stock\" BOOLEAN DEFAULT TRUE,\n \"specifications\" JSON DEFAULT '{}',\n \"tags\" JSON DEFAULT '[]'\n);",
1744
1876
  "columns": {
1745
1877
  "id": {
1746
1878
  "type": "UUID",
@@ -1809,6 +1941,16 @@
1809
1941
  "notNull": false,
1810
1942
  "default": 0
1811
1943
  },
1944
+ "default_sales_tax_code_id": {
1945
+ "type": "UUID",
1946
+ "referenceKind": "crossPackageRef",
1947
+ "notNull": false
1948
+ },
1949
+ "default_purchase_tax_code_id": {
1950
+ "type": "UUID",
1951
+ "referenceKind": "crossPackageRef",
1952
+ "notNull": false
1953
+ },
1812
1954
  "in_stock": {
1813
1955
  "type": "BOOLEAN",
1814
1956
  "notNull": false,
@@ -1849,9 +1991,21 @@
1849
1991
  "tenant_id",
1850
1992
  "created_at"
1851
1993
  ]
1994
+ },
1995
+ {
1996
+ "name": "products_default_sales_tax_code_id_idx",
1997
+ "columns": [
1998
+ "default_sales_tax_code_id"
1999
+ ]
2000
+ },
2001
+ {
2002
+ "name": "products_default_purchase_tax_code_id_idx",
2003
+ "columns": [
2004
+ "default_purchase_tax_code_id"
2005
+ ]
1852
2006
  }
1853
2007
  ],
1854
- "version": "a7b4d592"
2008
+ "version": "d8402a81"
1855
2009
  },
1856
2010
  "importPath": "@happyvertical/smrt-products/models"
1857
2011
  },
@@ -1936,6 +2090,22 @@
1936
2090
  "description": "The price in minor units (cents), for example 1999 for 19.99."
1937
2091
  }
1938
2092
  },
2093
+ "defaultSalesTaxCodeId": {
2094
+ "type": "crossPackageRef",
2095
+ "required": false,
2096
+ "related": "@happyvertical/smrt-commerce:TaxCode",
2097
+ "_meta": {
2098
+ "description": "The tax code normally used when this product is sold."
2099
+ }
2100
+ },
2101
+ "defaultPurchaseTaxCodeId": {
2102
+ "type": "crossPackageRef",
2103
+ "required": false,
2104
+ "related": "@happyvertical/smrt-commerce:TaxCode",
2105
+ "_meta": {
2106
+ "description": "The tax code normally used when this product is purchased."
2107
+ }
2108
+ },
1939
2109
  "inStock": {
1940
2110
  "type": "boolean",
1941
2111
  "required": true,
@@ -2092,7 +2262,7 @@
2092
2262
  ],
2093
2263
  "schema": {
2094
2264
  "tableName": "products",
2095
- "ddl": "CREATE TABLE IF NOT EXISTS \"products\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_type\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"category\" TEXT,\n \"manufacturer\" TEXT,\n \"model\" TEXT,\n \"price\" INTEGER DEFAULT 0,\n \"in_stock\" BOOLEAN DEFAULT TRUE,\n \"specifications\" JSON DEFAULT '{}',\n \"tags\" JSON DEFAULT '[]'\n);",
2265
+ "ddl": "CREATE TABLE IF NOT EXISTS \"products\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_type\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"category\" TEXT,\n \"manufacturer\" TEXT,\n \"model\" TEXT,\n \"price\" INTEGER DEFAULT 0,\n \"default_sales_tax_code_id\" UUID,\n \"default_purchase_tax_code_id\" UUID,\n \"in_stock\" BOOLEAN DEFAULT TRUE,\n \"specifications\" JSON DEFAULT '{}',\n \"tags\" JSON DEFAULT '[]'\n);",
2096
2266
  "columns": {
2097
2267
  "id": {
2098
2268
  "type": "UUID",
@@ -2161,6 +2331,16 @@
2161
2331
  "notNull": false,
2162
2332
  "default": 0
2163
2333
  },
2334
+ "default_sales_tax_code_id": {
2335
+ "type": "UUID",
2336
+ "referenceKind": "crossPackageRef",
2337
+ "notNull": false
2338
+ },
2339
+ "default_purchase_tax_code_id": {
2340
+ "type": "UUID",
2341
+ "referenceKind": "crossPackageRef",
2342
+ "notNull": false
2343
+ },
2164
2344
  "in_stock": {
2165
2345
  "type": "BOOLEAN",
2166
2346
  "notNull": false,
@@ -2201,9 +2381,21 @@
2201
2381
  "tenant_id",
2202
2382
  "created_at"
2203
2383
  ]
2384
+ },
2385
+ {
2386
+ "name": "products_default_sales_tax_code_id_idx",
2387
+ "columns": [
2388
+ "default_sales_tax_code_id"
2389
+ ]
2390
+ },
2391
+ {
2392
+ "name": "products_default_purchase_tax_code_id_idx",
2393
+ "columns": [
2394
+ "default_purchase_tax_code_id"
2395
+ ]
2204
2396
  }
2205
2397
  ],
2206
- "version": "a7b4d592"
2398
+ "version": "d8402a81"
2207
2399
  },
2208
2400
  "importPath": "@happyvertical/smrt-products/models"
2209
2401
  },
@@ -1,3 +1,3 @@
1
- import { a as Product, i as Material, n as ProductVariant, o as ProductType, r as ProductAsset, s as Category, t as Sku } from "./chunks/Sku-CdhhTtjd.js";
2
- import "./chunks/models-C2Ytgu_O.js";
1
+ import { a as Product, i as Material, n as ProductVariant, o as ProductType, r as ProductAsset, s as Category, t as Sku } from "./chunks/Sku-DOFW6Izt.js";
2
+ import "./chunks/models-BR8_apA1.js";
3
3
  export { Category, Material, Product, ProductAsset, ProductType, ProductVariant, Sku };