@happyvertical/smrt-products 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/AGENTS.md +122 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +7 -0
  4. package/README.md +115 -0
  5. package/dist/lib/__smrt-register__.d.ts +2 -0
  6. package/dist/lib/__smrt-register__.d.ts.map +1 -0
  7. package/dist/lib/app/main.d.ts +6 -0
  8. package/dist/lib/app/main.d.ts.map +1 -0
  9. package/dist/lib/chunks/ProductAssetCollection-DFPXN43q.js +64 -0
  10. package/dist/lib/chunks/ProductAssetCollection-DFPXN43q.js.map +1 -0
  11. package/dist/lib/chunks/ProductForm-DHeb2L24.js +371 -0
  12. package/dist/lib/chunks/ProductForm-DHeb2L24.js.map +1 -0
  13. package/dist/lib/chunks/Sku-DUKtbYWT.js +511 -0
  14. package/dist/lib/chunks/Sku-DUKtbYWT.js.map +1 -0
  15. package/dist/lib/chunks/SkuCollection-C0tdkEdL.js +160 -0
  16. package/dist/lib/chunks/SkuCollection-C0tdkEdL.js.map +1 -0
  17. package/dist/lib/chunks/__smrt-register__-BIgFaVKn.js +5 -0
  18. package/dist/lib/chunks/__smrt-register__-BIgFaVKn.js.map +1 -0
  19. package/dist/lib/chunks/index-i3-ci1FB.js +6 -0
  20. package/dist/lib/chunks/index-i3-ci1FB.js.map +1 -0
  21. package/dist/lib/chunks/product-store.svelte-Dayd5n3W.js +132 -0
  22. package/dist/lib/chunks/product-store.svelte-Dayd5n3W.js.map +1 -0
  23. package/dist/lib/client.d.ts +9 -0
  24. package/dist/lib/client.d.ts.map +1 -0
  25. package/dist/lib/collections.d.ts +2 -0
  26. package/dist/lib/collections.d.ts.map +1 -0
  27. package/dist/lib/collections.js +12 -0
  28. package/dist/lib/collections.js.map +1 -0
  29. package/dist/lib/components.d.ts +2 -0
  30. package/dist/lib/components.d.ts.map +1 -0
  31. package/dist/lib/components.js +6 -0
  32. package/dist/lib/components.js.map +1 -0
  33. package/dist/lib/generated.d.ts +2 -0
  34. package/dist/lib/generated.d.ts.map +1 -0
  35. package/dist/lib/generated.js +5 -0
  36. package/dist/lib/generated.js.map +1 -0
  37. package/dist/lib/index.d.ts +14 -0
  38. package/dist/lib/index.d.ts.map +1 -0
  39. package/dist/lib/index.js +228 -0
  40. package/dist/lib/index.js.map +1 -0
  41. package/dist/lib/lib/collections/CategoryCollection.d.ts +20 -0
  42. package/dist/lib/lib/collections/CategoryCollection.d.ts.map +1 -0
  43. package/dist/lib/lib/collections/MaterialCollection.d.ts +20 -0
  44. package/dist/lib/lib/collections/MaterialCollection.d.ts.map +1 -0
  45. package/dist/lib/lib/collections/ProductAssetCollection.d.ts +16 -0
  46. package/dist/lib/lib/collections/ProductAssetCollection.d.ts.map +1 -0
  47. package/dist/lib/lib/collections/ProductCollection.d.ts +12 -0
  48. package/dist/lib/lib/collections/ProductCollection.d.ts.map +1 -0
  49. package/dist/lib/lib/collections/ProductVariantCollection.d.ts +10 -0
  50. package/dist/lib/lib/collections/ProductVariantCollection.d.ts.map +1 -0
  51. package/dist/lib/lib/collections/SkuCollection.d.ts +31 -0
  52. package/dist/lib/lib/collections/SkuCollection.d.ts.map +1 -0
  53. package/dist/lib/lib/collections/index.d.ts +7 -0
  54. package/dist/lib/lib/collections/index.d.ts.map +1 -0
  55. package/dist/lib/lib/components/ProductCard.svelte +173 -0
  56. package/dist/lib/lib/components/ProductCard.svelte.d.ts +10 -0
  57. package/dist/lib/lib/components/ProductCard.svelte.d.ts.map +1 -0
  58. package/dist/lib/lib/components/ProductForm.svelte +289 -0
  59. package/dist/lib/lib/components/ProductForm.svelte.d.ts +11 -0
  60. package/dist/lib/lib/components/ProductForm.svelte.d.ts.map +1 -0
  61. package/dist/lib/lib/components/TestComponent.svelte +25 -0
  62. package/dist/lib/lib/components/TestComponent.svelte.d.ts +7 -0
  63. package/dist/lib/lib/components/TestComponent.svelte.d.ts.map +1 -0
  64. package/dist/lib/lib/components/auto-generated/AutoForm.svelte +240 -0
  65. package/dist/lib/lib/components/auto-generated/AutoForm.svelte.d.ts +13 -0
  66. package/dist/lib/lib/components/auto-generated/AutoForm.svelte.d.ts.map +1 -0
  67. package/dist/lib/lib/components/auto-generated/FieldRenderer.svelte +205 -0
  68. package/dist/lib/lib/components/auto-generated/FieldRenderer.svelte.d.ts +14 -0
  69. package/dist/lib/lib/components/auto-generated/FieldRenderer.svelte.d.ts.map +1 -0
  70. package/dist/lib/lib/components/index.d.ts +12 -0
  71. package/dist/lib/lib/components/index.d.ts.map +1 -0
  72. package/dist/lib/lib/components/index.js +11 -0
  73. package/dist/lib/lib/features/CategoryManager.svelte +80 -0
  74. package/dist/lib/lib/features/CategoryManager.svelte.d.ts +7 -0
  75. package/dist/lib/lib/features/CategoryManager.svelte.d.ts.map +1 -0
  76. package/dist/lib/lib/features/ProductCatalog.svelte +299 -0
  77. package/dist/lib/lib/features/ProductCatalog.svelte.d.ts +8 -0
  78. package/dist/lib/lib/features/ProductCatalog.svelte.d.ts.map +1 -0
  79. package/dist/lib/lib/federation-entry.d.ts +11 -0
  80. package/dist/lib/lib/federation-entry.d.ts.map +1 -0
  81. package/dist/lib/lib/generated/index.d.ts +2 -0
  82. package/dist/lib/lib/generated/index.d.ts.map +1 -0
  83. package/dist/lib/lib/i18n.d.ts +79 -0
  84. package/dist/lib/lib/i18n.d.ts.map +1 -0
  85. package/dist/lib/lib/index.d.ts +20 -0
  86. package/dist/lib/lib/index.d.ts.map +1 -0
  87. package/dist/lib/lib/mock-smrt-client.d.ts +40 -0
  88. package/dist/lib/lib/mock-smrt-client.d.ts.map +1 -0
  89. package/dist/lib/lib/mock-smrt-client.js +129 -0
  90. package/dist/lib/lib/mock-smrt-client.js.map +1 -0
  91. package/dist/lib/lib/models/Category.d.ts +38 -0
  92. package/dist/lib/lib/models/Category.d.ts.map +1 -0
  93. package/dist/lib/lib/models/Material.d.ts +22 -0
  94. package/dist/lib/lib/models/Material.d.ts.map +1 -0
  95. package/dist/lib/lib/models/Product.d.ts +57 -0
  96. package/dist/lib/lib/models/Product.d.ts.map +1 -0
  97. package/dist/lib/lib/models/ProductAsset.d.ts +17 -0
  98. package/dist/lib/lib/models/ProductAsset.d.ts.map +1 -0
  99. package/dist/lib/lib/models/ProductVariant.d.ts +51 -0
  100. package/dist/lib/lib/models/ProductVariant.d.ts.map +1 -0
  101. package/dist/lib/lib/models/Sku.d.ts +79 -0
  102. package/dist/lib/lib/models/Sku.d.ts.map +1 -0
  103. package/dist/lib/lib/models/index.d.ts +15 -0
  104. package/dist/lib/lib/models/index.d.ts.map +1 -0
  105. package/dist/lib/lib/models/types.d.ts +41 -0
  106. package/dist/lib/lib/models/types.d.ts.map +1 -0
  107. package/dist/lib/lib/stores/index.d.ts +8 -0
  108. package/dist/lib/lib/stores/index.d.ts.map +1 -0
  109. package/dist/lib/lib/stores/index.js +7 -0
  110. package/dist/lib/lib/stores/product-store.client.svelte.d.ts +45 -0
  111. package/dist/lib/lib/stores/product-store.client.svelte.d.ts.map +1 -0
  112. package/dist/lib/lib/stores/product-store.client.svelte.js +147 -0
  113. package/dist/lib/lib/stores/product-store.svelte.d.ts +29 -0
  114. package/dist/lib/lib/stores/product-store.svelte.d.ts.map +1 -0
  115. package/dist/lib/lib/stores/product-store.svelte.js +144 -0
  116. package/dist/lib/lib/types.d.ts +43 -0
  117. package/dist/lib/lib/types.d.ts.map +1 -0
  118. package/dist/lib/lib/utils/index.d.ts +10 -0
  119. package/dist/lib/lib/utils/index.d.ts.map +1 -0
  120. package/dist/lib/main.d.ts +5 -0
  121. package/dist/lib/main.d.ts.map +1 -0
  122. package/dist/lib/manifest.json +3758 -0
  123. package/dist/lib/mcp.d.ts +14 -0
  124. package/dist/lib/mcp.d.ts.map +1 -0
  125. package/dist/lib/models.d.ts +2 -0
  126. package/dist/lib/models.d.ts.map +1 -0
  127. package/dist/lib/models.js +12 -0
  128. package/dist/lib/models.js.map +1 -0
  129. package/dist/lib/native-api-server.d.ts +7 -0
  130. package/dist/lib/native-api-server.d.ts.map +1 -0
  131. package/dist/lib/server.d.ts +11 -0
  132. package/dist/lib/server.d.ts.map +1 -0
  133. package/dist/lib/simple-api-server.d.ts +7 -0
  134. package/dist/lib/simple-api-server.d.ts.map +1 -0
  135. package/dist/lib/simple-server.d.ts +6 -0
  136. package/dist/lib/simple-server.d.ts.map +1 -0
  137. package/dist/lib/smrt-knowledge.json +1584 -0
  138. package/dist/lib/smrt-products.css +233 -0
  139. package/dist/lib/stores.d.ts +2 -0
  140. package/dist/lib/stores.d.ts.map +1 -0
  141. package/dist/lib/stores.js +6 -0
  142. package/dist/lib/stores.js.map +1 -0
  143. package/dist/lib/utils.d.ts +2 -0
  144. package/dist/lib/utils.d.ts.map +1 -0
  145. package/dist/lib/utils.js +27 -0
  146. package/dist/lib/utils.js.map +1 -0
  147. package/package.json +127 -0
@@ -0,0 +1,3758 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 1782177098796,
4
+ "packageName": "@happyvertical/smrt-products",
5
+ "packageVersion": "0.30.0",
6
+ "objects": {
7
+ "@happyvertical/smrt-products:CategoryCollection": {
8
+ "name": "categorycollection",
9
+ "className": "CategoryCollection",
10
+ "qualifiedName": "@happyvertical/smrt-products:CategoryCollection",
11
+ "collection": "categories",
12
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/collections/CategoryCollection.ts",
13
+ "packageName": "@happyvertical/smrt-products",
14
+ "fields": {},
15
+ "methods": {
16
+ "getRootCategories": {
17
+ "name": "getRootCategories",
18
+ "async": true,
19
+ "parameters": [],
20
+ "returnType": "Promise<Category[]>",
21
+ "isStatic": false,
22
+ "isPublic": true
23
+ }
24
+ },
25
+ "decoratorConfig": {},
26
+ "extends": "SmrtCollection",
27
+ "extendsTypeArg": "Category",
28
+ "exportName": "CategoryCollection",
29
+ "collectionExportName": "CategoryCollectionCollection",
30
+ "schema": {
31
+ "tableName": "category_collections",
32
+ "ddl": "CREATE TABLE IF NOT EXISTS \"category_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
33
+ "columns": {
34
+ "id": {
35
+ "type": "UUID",
36
+ "primaryKey": true,
37
+ "referenceKind": "id",
38
+ "notNull": true
39
+ },
40
+ "slug": {
41
+ "type": "TEXT",
42
+ "notNull": true
43
+ },
44
+ "context": {
45
+ "type": "TEXT",
46
+ "notNull": true,
47
+ "default": ""
48
+ },
49
+ "created_at": {
50
+ "type": "TIMESTAMP",
51
+ "notNull": true,
52
+ "default": "current_timestamp"
53
+ },
54
+ "updated_at": {
55
+ "type": "TIMESTAMP",
56
+ "notNull": true,
57
+ "default": "current_timestamp"
58
+ }
59
+ },
60
+ "indexes": [
61
+ {
62
+ "name": "category_collections_id_idx",
63
+ "columns": [
64
+ "id"
65
+ ]
66
+ },
67
+ {
68
+ "name": "category_collections_slug_context_idx",
69
+ "columns": [
70
+ "slug",
71
+ "context"
72
+ ],
73
+ "unique": true
74
+ }
75
+ ],
76
+ "version": "f2f42d47"
77
+ }
78
+ },
79
+ "@happyvertical/smrt-products:MaterialCollection": {
80
+ "name": "materialcollection",
81
+ "className": "MaterialCollection",
82
+ "qualifiedName": "@happyvertical/smrt-products:MaterialCollection",
83
+ "collection": "products",
84
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/collections/MaterialCollection.ts",
85
+ "packageName": "@happyvertical/smrt-products",
86
+ "fields": {},
87
+ "methods": {
88
+ "findByKind": {
89
+ "name": "findByKind",
90
+ "async": true,
91
+ "parameters": [
92
+ {
93
+ "name": "materialKind",
94
+ "type": "MaterialKind",
95
+ "optional": false
96
+ }
97
+ ],
98
+ "returnType": "Promise<Material[]>",
99
+ "isStatic": false,
100
+ "isPublic": true
101
+ }
102
+ },
103
+ "decoratorConfig": {
104
+ "tableName": "products"
105
+ },
106
+ "extends": "ProductCollection",
107
+ "exportName": "MaterialCollection",
108
+ "collectionExportName": "MaterialCollectionCollection",
109
+ "schema": {
110
+ "tableName": "products",
111
+ "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 \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
112
+ "columns": {
113
+ "id": {
114
+ "type": "UUID",
115
+ "primaryKey": true,
116
+ "referenceKind": "id",
117
+ "notNull": true
118
+ },
119
+ "slug": {
120
+ "type": "TEXT",
121
+ "notNull": true
122
+ },
123
+ "context": {
124
+ "type": "TEXT",
125
+ "notNull": true,
126
+ "default": ""
127
+ },
128
+ "created_at": {
129
+ "type": "TIMESTAMP",
130
+ "notNull": true,
131
+ "default": "current_timestamp"
132
+ },
133
+ "updated_at": {
134
+ "type": "TIMESTAMP",
135
+ "notNull": true,
136
+ "default": "current_timestamp"
137
+ }
138
+ },
139
+ "indexes": [
140
+ {
141
+ "name": "products_id_idx",
142
+ "columns": [
143
+ "id"
144
+ ]
145
+ },
146
+ {
147
+ "name": "products_slug_context_idx",
148
+ "columns": [
149
+ "slug",
150
+ "context"
151
+ ],
152
+ "unique": true
153
+ }
154
+ ],
155
+ "version": "d7d2c125"
156
+ }
157
+ },
158
+ "@happyvertical/smrt-products:ProductAssetCollection": {
159
+ "name": "productassetcollection",
160
+ "className": "ProductAssetCollection",
161
+ "qualifiedName": "@happyvertical/smrt-products:ProductAssetCollection",
162
+ "collection": "productassets",
163
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/collections/ProductAssetCollection.ts",
164
+ "packageName": "@happyvertical/smrt-products",
165
+ "fields": {},
166
+ "methods": {
167
+ "byLeft": {
168
+ "name": "byLeft",
169
+ "async": true,
170
+ "parameters": [
171
+ {
172
+ "name": "leftId",
173
+ "type": "string",
174
+ "optional": false
175
+ },
176
+ {
177
+ "name": "opts",
178
+ "type": "JunctionFilterOptions",
179
+ "optional": true
180
+ }
181
+ ],
182
+ "returnType": "Promise<TItem[]>",
183
+ "isStatic": false,
184
+ "isPublic": true
185
+ },
186
+ "byRight": {
187
+ "name": "byRight",
188
+ "async": true,
189
+ "parameters": [
190
+ {
191
+ "name": "rightId",
192
+ "type": "string",
193
+ "optional": false
194
+ },
195
+ {
196
+ "name": "opts",
197
+ "type": "JunctionFilterOptions",
198
+ "optional": true
199
+ }
200
+ ],
201
+ "returnType": "Promise<TItem[]>",
202
+ "isStatic": false,
203
+ "isPublic": true
204
+ },
205
+ "attach": {
206
+ "name": "attach",
207
+ "async": true,
208
+ "parameters": [
209
+ {
210
+ "name": "leftId",
211
+ "type": "string",
212
+ "optional": false
213
+ },
214
+ {
215
+ "name": "rightId",
216
+ "type": "string",
217
+ "optional": false
218
+ },
219
+ {
220
+ "name": "opts",
221
+ "type": "JunctionAttachOptions",
222
+ "optional": true
223
+ }
224
+ ],
225
+ "returnType": "Promise<TItem>",
226
+ "isStatic": false,
227
+ "isPublic": true
228
+ },
229
+ "detach": {
230
+ "name": "detach",
231
+ "async": true,
232
+ "parameters": [
233
+ {
234
+ "name": "leftId",
235
+ "type": "string",
236
+ "optional": false
237
+ },
238
+ {
239
+ "name": "rightId",
240
+ "type": "string",
241
+ "optional": false
242
+ },
243
+ {
244
+ "name": "opts",
245
+ "type": "JunctionFilterOptions",
246
+ "optional": true
247
+ }
248
+ ],
249
+ "returnType": "Promise<void>",
250
+ "isStatic": false,
251
+ "isPublic": true
252
+ },
253
+ "setLinks": {
254
+ "name": "setLinks",
255
+ "async": true,
256
+ "parameters": [
257
+ {
258
+ "name": "leftId",
259
+ "type": "string",
260
+ "optional": false
261
+ },
262
+ {
263
+ "name": "rightIds",
264
+ "type": "string[]",
265
+ "optional": false
266
+ },
267
+ {
268
+ "name": "opts",
269
+ "type": "JunctionAttachOptions",
270
+ "optional": true
271
+ }
272
+ ],
273
+ "returnType": "Promise<void>",
274
+ "isStatic": false,
275
+ "isPublic": true
276
+ },
277
+ "getAssets": {
278
+ "name": "getAssets",
279
+ "async": true,
280
+ "parameters": [
281
+ {
282
+ "name": "productId",
283
+ "type": "string",
284
+ "optional": false
285
+ },
286
+ {
287
+ "name": "relationship",
288
+ "type": "string",
289
+ "optional": true
290
+ }
291
+ ],
292
+ "returnType": "Promise<Asset[]>",
293
+ "isStatic": false,
294
+ "isPublic": true
295
+ },
296
+ "addAsset": {
297
+ "name": "addAsset",
298
+ "async": true,
299
+ "parameters": [
300
+ {
301
+ "name": "productId",
302
+ "type": "string",
303
+ "optional": false
304
+ },
305
+ {
306
+ "name": "asset",
307
+ "type": "Asset",
308
+ "optional": false
309
+ },
310
+ {
311
+ "name": "relationship",
312
+ "type": "any",
313
+ "optional": true,
314
+ "default": "attachment"
315
+ },
316
+ {
317
+ "name": "sortOrder",
318
+ "type": "any",
319
+ "optional": true
320
+ }
321
+ ],
322
+ "returnType": "Promise<void>",
323
+ "isStatic": false,
324
+ "isPublic": true
325
+ },
326
+ "removeAsset": {
327
+ "name": "removeAsset",
328
+ "async": true,
329
+ "parameters": [
330
+ {
331
+ "name": "productId",
332
+ "type": "string",
333
+ "optional": false
334
+ },
335
+ {
336
+ "name": "assetId",
337
+ "type": "string",
338
+ "optional": false
339
+ },
340
+ {
341
+ "name": "relationship",
342
+ "type": "string",
343
+ "optional": true
344
+ }
345
+ ],
346
+ "returnType": "Promise<void>",
347
+ "isStatic": false,
348
+ "isPublic": true
349
+ }
350
+ },
351
+ "decoratorConfig": {
352
+ "api": false,
353
+ "mcp": false,
354
+ "cli": false,
355
+ "tableName": "product_assets"
356
+ },
357
+ "extends": "SmrtJunction",
358
+ "extendsTypeArg": "ProductAsset",
359
+ "exportName": "ProductAssetCollection",
360
+ "collectionExportName": "ProductAssetCollectionCollection",
361
+ "schema": {
362
+ "tableName": "product_assets",
363
+ "ddl": "CREATE TABLE IF NOT EXISTS \"product_assets\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
364
+ "columns": {
365
+ "id": {
366
+ "type": "UUID",
367
+ "primaryKey": true,
368
+ "referenceKind": "id",
369
+ "notNull": true
370
+ },
371
+ "slug": {
372
+ "type": "TEXT",
373
+ "notNull": true
374
+ },
375
+ "context": {
376
+ "type": "TEXT",
377
+ "notNull": true,
378
+ "default": ""
379
+ },
380
+ "created_at": {
381
+ "type": "TIMESTAMP",
382
+ "notNull": true,
383
+ "default": "current_timestamp"
384
+ },
385
+ "updated_at": {
386
+ "type": "TIMESTAMP",
387
+ "notNull": true,
388
+ "default": "current_timestamp"
389
+ }
390
+ },
391
+ "indexes": [
392
+ {
393
+ "name": "product_assets_id_idx",
394
+ "columns": [
395
+ "id"
396
+ ]
397
+ },
398
+ {
399
+ "name": "product_assets_slug_context_idx",
400
+ "columns": [
401
+ "slug",
402
+ "context"
403
+ ],
404
+ "unique": true
405
+ }
406
+ ],
407
+ "version": "ffb1b593"
408
+ }
409
+ },
410
+ "@happyvertical/smrt-products:ProductCollection": {
411
+ "name": "productcollection",
412
+ "className": "ProductCollection",
413
+ "qualifiedName": "@happyvertical/smrt-products:ProductCollection",
414
+ "collection": "products",
415
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/collections/ProductCollection.ts",
416
+ "packageName": "@happyvertical/smrt-products",
417
+ "fields": {},
418
+ "methods": {
419
+ "findByManufacturer": {
420
+ "name": "findByManufacturer",
421
+ "async": true,
422
+ "parameters": [
423
+ {
424
+ "name": "manufacturer",
425
+ "type": "string",
426
+ "optional": false
427
+ }
428
+ ],
429
+ "returnType": "Promise<Product[]>",
430
+ "isStatic": false,
431
+ "isPublic": true
432
+ },
433
+ "findInStock": {
434
+ "name": "findInStock",
435
+ "async": true,
436
+ "parameters": [],
437
+ "returnType": "Promise<Product[]>",
438
+ "isStatic": false,
439
+ "isPublic": true
440
+ },
441
+ "getAssets": {
442
+ "name": "getAssets",
443
+ "async": true,
444
+ "parameters": [
445
+ {
446
+ "name": "productId",
447
+ "type": "string",
448
+ "optional": false
449
+ },
450
+ {
451
+ "name": "relationship",
452
+ "type": "string",
453
+ "optional": true
454
+ }
455
+ ],
456
+ "returnType": "Promise<Asset[]>",
457
+ "isStatic": false,
458
+ "isPublic": true
459
+ },
460
+ "addAsset": {
461
+ "name": "addAsset",
462
+ "async": true,
463
+ "parameters": [
464
+ {
465
+ "name": "productId",
466
+ "type": "string",
467
+ "optional": false
468
+ },
469
+ {
470
+ "name": "asset",
471
+ "type": "Asset",
472
+ "optional": false
473
+ },
474
+ {
475
+ "name": "relationship",
476
+ "type": "any",
477
+ "optional": true,
478
+ "default": "attachment"
479
+ },
480
+ {
481
+ "name": "sortOrder",
482
+ "type": "any",
483
+ "optional": true
484
+ }
485
+ ],
486
+ "returnType": "Promise<void>",
487
+ "isStatic": false,
488
+ "isPublic": true
489
+ },
490
+ "removeAsset": {
491
+ "name": "removeAsset",
492
+ "async": true,
493
+ "parameters": [
494
+ {
495
+ "name": "productId",
496
+ "type": "string",
497
+ "optional": false
498
+ },
499
+ {
500
+ "name": "assetId",
501
+ "type": "string",
502
+ "optional": false
503
+ },
504
+ {
505
+ "name": "relationship",
506
+ "type": "string",
507
+ "optional": true
508
+ }
509
+ ],
510
+ "returnType": "Promise<void>",
511
+ "isStatic": false,
512
+ "isPublic": true
513
+ }
514
+ },
515
+ "decoratorConfig": {},
516
+ "extends": "SmrtCollection",
517
+ "extendsTypeArg": "Product",
518
+ "exportName": "ProductCollection",
519
+ "collectionExportName": "ProductCollectionCollection",
520
+ "schema": {
521
+ "tableName": "product_collections",
522
+ "ddl": "CREATE TABLE IF NOT EXISTS \"product_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
523
+ "columns": {
524
+ "id": {
525
+ "type": "UUID",
526
+ "primaryKey": true,
527
+ "referenceKind": "id",
528
+ "notNull": true
529
+ },
530
+ "slug": {
531
+ "type": "TEXT",
532
+ "notNull": true
533
+ },
534
+ "context": {
535
+ "type": "TEXT",
536
+ "notNull": true,
537
+ "default": ""
538
+ },
539
+ "created_at": {
540
+ "type": "TIMESTAMP",
541
+ "notNull": true,
542
+ "default": "current_timestamp"
543
+ },
544
+ "updated_at": {
545
+ "type": "TIMESTAMP",
546
+ "notNull": true,
547
+ "default": "current_timestamp"
548
+ }
549
+ },
550
+ "indexes": [
551
+ {
552
+ "name": "product_collections_id_idx",
553
+ "columns": [
554
+ "id"
555
+ ]
556
+ },
557
+ {
558
+ "name": "product_collections_slug_context_idx",
559
+ "columns": [
560
+ "slug",
561
+ "context"
562
+ ],
563
+ "unique": true
564
+ }
565
+ ],
566
+ "version": "51a90ef1"
567
+ }
568
+ },
569
+ "@happyvertical/smrt-products:ProductVariantCollection": {
570
+ "name": "productvariantcollection",
571
+ "className": "ProductVariantCollection",
572
+ "qualifiedName": "@happyvertical/smrt-products:ProductVariantCollection",
573
+ "collection": "productvariants",
574
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/collections/ProductVariantCollection.ts",
575
+ "packageName": "@happyvertical/smrt-products",
576
+ "fields": {},
577
+ "methods": {
578
+ "findForProduct": {
579
+ "name": "findForProduct",
580
+ "async": true,
581
+ "parameters": [
582
+ {
583
+ "name": "productId",
584
+ "type": "string",
585
+ "optional": false
586
+ }
587
+ ],
588
+ "returnType": "Promise<ProductVariant[]>",
589
+ "isStatic": false,
590
+ "isPublic": true
591
+ },
592
+ "findAxis": {
593
+ "name": "findAxis",
594
+ "async": true,
595
+ "parameters": [
596
+ {
597
+ "name": "productId",
598
+ "type": "string",
599
+ "optional": false
600
+ },
601
+ {
602
+ "name": "axisName",
603
+ "type": "string",
604
+ "optional": false
605
+ }
606
+ ],
607
+ "returnType": "Promise<ProductVariant | null>",
608
+ "isStatic": false,
609
+ "isPublic": true
610
+ }
611
+ },
612
+ "decoratorConfig": {
613
+ "tableName": "product_variants"
614
+ },
615
+ "extends": "SmrtCollection",
616
+ "extendsTypeArg": "ProductVariant",
617
+ "exportName": "ProductVariantCollection",
618
+ "collectionExportName": "ProductVariantCollectionCollection",
619
+ "schema": {
620
+ "tableName": "product_variants",
621
+ "ddl": "CREATE TABLE IF NOT EXISTS \"product_variants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
622
+ "columns": {
623
+ "id": {
624
+ "type": "UUID",
625
+ "primaryKey": true,
626
+ "referenceKind": "id",
627
+ "notNull": true
628
+ },
629
+ "slug": {
630
+ "type": "TEXT",
631
+ "notNull": true
632
+ },
633
+ "context": {
634
+ "type": "TEXT",
635
+ "notNull": true,
636
+ "default": ""
637
+ },
638
+ "created_at": {
639
+ "type": "TIMESTAMP",
640
+ "notNull": true,
641
+ "default": "current_timestamp"
642
+ },
643
+ "updated_at": {
644
+ "type": "TIMESTAMP",
645
+ "notNull": true,
646
+ "default": "current_timestamp"
647
+ }
648
+ },
649
+ "indexes": [
650
+ {
651
+ "name": "product_variants_id_idx",
652
+ "columns": [
653
+ "id"
654
+ ]
655
+ },
656
+ {
657
+ "name": "product_variants_slug_context_idx",
658
+ "columns": [
659
+ "slug",
660
+ "context"
661
+ ],
662
+ "unique": true
663
+ }
664
+ ],
665
+ "version": "7e192164"
666
+ }
667
+ },
668
+ "@happyvertical/smrt-products:SkuCollection": {
669
+ "name": "skucollection",
670
+ "className": "SkuCollection",
671
+ "qualifiedName": "@happyvertical/smrt-products:SkuCollection",
672
+ "collection": "skus",
673
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/collections/SkuCollection.ts",
674
+ "packageName": "@happyvertical/smrt-products",
675
+ "fields": {},
676
+ "methods": {
677
+ "findByCode": {
678
+ "name": "findByCode",
679
+ "async": true,
680
+ "parameters": [
681
+ {
682
+ "name": "code",
683
+ "type": "string",
684
+ "optional": false
685
+ }
686
+ ],
687
+ "returnType": "Promise<Sku | null>",
688
+ "isStatic": false,
689
+ "isPublic": true
690
+ },
691
+ "findByBarcode": {
692
+ "name": "findByBarcode",
693
+ "async": true,
694
+ "parameters": [
695
+ {
696
+ "name": "barcode",
697
+ "type": "string",
698
+ "optional": false
699
+ }
700
+ ],
701
+ "returnType": "Promise<Sku | null>",
702
+ "isStatic": false,
703
+ "isPublic": true
704
+ },
705
+ "findByProduct": {
706
+ "name": "findByProduct",
707
+ "async": true,
708
+ "parameters": [
709
+ {
710
+ "name": "productId",
711
+ "type": "string",
712
+ "optional": false
713
+ }
714
+ ],
715
+ "returnType": "Promise<Sku[]>",
716
+ "isStatic": false,
717
+ "isPublic": true
718
+ },
719
+ "findByParent": {
720
+ "name": "findByParent",
721
+ "async": true,
722
+ "parameters": [
723
+ {
724
+ "name": "parentSkuId",
725
+ "type": "string",
726
+ "optional": false
727
+ }
728
+ ],
729
+ "returnType": "Promise<Sku[]>",
730
+ "isStatic": false,
731
+ "isPublic": true
732
+ },
733
+ "findActive": {
734
+ "name": "findActive",
735
+ "async": true,
736
+ "parameters": [
737
+ {
738
+ "name": "productId",
739
+ "type": "string",
740
+ "optional": true
741
+ }
742
+ ],
743
+ "returnType": "Promise<Sku[]>",
744
+ "isStatic": false,
745
+ "isPublic": true
746
+ }
747
+ },
748
+ "decoratorConfig": {
749
+ "tableName": "product_skus"
750
+ },
751
+ "extends": "SmrtCollection",
752
+ "extendsTypeArg": "Sku",
753
+ "exportName": "SkuCollection",
754
+ "collectionExportName": "SkuCollectionCollection",
755
+ "schema": {
756
+ "tableName": "product_skus",
757
+ "ddl": "CREATE TABLE IF NOT EXISTS \"product_skus\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
758
+ "columns": {
759
+ "id": {
760
+ "type": "UUID",
761
+ "primaryKey": true,
762
+ "referenceKind": "id",
763
+ "notNull": true
764
+ },
765
+ "slug": {
766
+ "type": "TEXT",
767
+ "notNull": true
768
+ },
769
+ "context": {
770
+ "type": "TEXT",
771
+ "notNull": true,
772
+ "default": ""
773
+ },
774
+ "created_at": {
775
+ "type": "TIMESTAMP",
776
+ "notNull": true,
777
+ "default": "current_timestamp"
778
+ },
779
+ "updated_at": {
780
+ "type": "TIMESTAMP",
781
+ "notNull": true,
782
+ "default": "current_timestamp"
783
+ }
784
+ },
785
+ "indexes": [
786
+ {
787
+ "name": "product_skus_id_idx",
788
+ "columns": [
789
+ "id"
790
+ ]
791
+ },
792
+ {
793
+ "name": "product_skus_slug_context_idx",
794
+ "columns": [
795
+ "slug",
796
+ "context"
797
+ ],
798
+ "unique": true
799
+ }
800
+ ],
801
+ "version": "f3e8dedc"
802
+ }
803
+ },
804
+ "@happyvertical/smrt-products:Category": {
805
+ "name": "category",
806
+ "className": "Category",
807
+ "qualifiedName": "@happyvertical/smrt-products:Category",
808
+ "collection": "categories",
809
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/models/Category.ts",
810
+ "packageName": "@happyvertical/smrt-products",
811
+ "fields": {
812
+ "created_at": {
813
+ "type": "datetime",
814
+ "required": false
815
+ },
816
+ "updated_at": {
817
+ "type": "datetime",
818
+ "required": false
819
+ },
820
+ "tenantId": {
821
+ "type": "text",
822
+ "required": false,
823
+ "_meta": {
824
+ "sqlType": "UUID",
825
+ "nullable": true,
826
+ "__tenancy": {
827
+ "isTenantIdField": true,
828
+ "autoFilter": true,
829
+ "required": false,
830
+ "autoPopulate": true,
831
+ "nullable": true,
832
+ "mode": "optional",
833
+ "field": "tenantId",
834
+ "allowSuperAdminBypass": false
835
+ }
836
+ }
837
+ },
838
+ "name": {
839
+ "type": "text",
840
+ "required": false
841
+ },
842
+ "description": {
843
+ "type": "text",
844
+ "required": false
845
+ },
846
+ "parentId": {
847
+ "type": "foreignKey",
848
+ "required": false,
849
+ "related": "Category"
850
+ },
851
+ "level": {
852
+ "type": "integer",
853
+ "required": true,
854
+ "default": 0
855
+ },
856
+ "productCount": {
857
+ "type": "integer",
858
+ "required": true,
859
+ "default": 0
860
+ },
861
+ "active": {
862
+ "type": "boolean",
863
+ "required": true,
864
+ "default": true
865
+ }
866
+ },
867
+ "methods": {
868
+ "getAiUsageSnapshot": {
869
+ "name": "getAiUsageSnapshot",
870
+ "async": false,
871
+ "parameters": [],
872
+ "returnType": "AiUsageSnapshot | undefined",
873
+ "isStatic": false,
874
+ "isPublic": true
875
+ },
876
+ "resetAiUsage": {
877
+ "name": "resetAiUsage",
878
+ "async": false,
879
+ "parameters": [],
880
+ "returnType": "void",
881
+ "isStatic": false,
882
+ "isPublic": true
883
+ },
884
+ "listAiUsage": {
885
+ "name": "listAiUsage",
886
+ "async": true,
887
+ "parameters": [
888
+ {
889
+ "name": "options",
890
+ "type": "AiUsageListOptions",
891
+ "optional": true
892
+ }
893
+ ],
894
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
895
+ "isStatic": false,
896
+ "isPublic": true
897
+ },
898
+ "summarizeAiUsage": {
899
+ "name": "summarizeAiUsage",
900
+ "async": true,
901
+ "parameters": [
902
+ {
903
+ "name": "options",
904
+ "type": "AiUsageSummaryOptions",
905
+ "optional": true
906
+ }
907
+ ],
908
+ "returnType": "Promise<Record<string, AiUsageStats>>",
909
+ "isStatic": false,
910
+ "isPublic": true
911
+ },
912
+ "destroy": {
913
+ "name": "destroy",
914
+ "async": false,
915
+ "parameters": [],
916
+ "returnType": "void",
917
+ "isStatic": false,
918
+ "isPublic": true
919
+ },
920
+ "markAsPersisted": {
921
+ "name": "markAsPersisted",
922
+ "async": false,
923
+ "parameters": [],
924
+ "returnType": "void",
925
+ "isStatic": false,
926
+ "isPublic": true
927
+ },
928
+ "initialize": {
929
+ "name": "initialize",
930
+ "async": true,
931
+ "parameters": [],
932
+ "returnType": "Promise",
933
+ "isStatic": false,
934
+ "isPublic": true
935
+ },
936
+ "loadDataFromDb": {
937
+ "name": "loadDataFromDb",
938
+ "async": true,
939
+ "parameters": [
940
+ {
941
+ "name": "data",
942
+ "type": "any",
943
+ "optional": false
944
+ }
945
+ ],
946
+ "returnType": "any",
947
+ "isStatic": false,
948
+ "isPublic": true
949
+ },
950
+ "getFields": {
951
+ "name": "getFields",
952
+ "async": true,
953
+ "parameters": [],
954
+ "returnType": "any",
955
+ "isStatic": false,
956
+ "isPublic": true
957
+ },
958
+ "toJSON": {
959
+ "name": "toJSON",
960
+ "async": false,
961
+ "parameters": [],
962
+ "returnType": "any",
963
+ "isStatic": false,
964
+ "isPublic": true
965
+ },
966
+ "toPlainObject": {
967
+ "name": "toPlainObject",
968
+ "async": false,
969
+ "parameters": [],
970
+ "returnType": "Record<string>",
971
+ "isStatic": false,
972
+ "isPublic": true
973
+ },
974
+ "toPublicJSON": {
975
+ "name": "toPublicJSON",
976
+ "async": false,
977
+ "parameters": [],
978
+ "returnType": "Record<string>",
979
+ "isStatic": false,
980
+ "isPublic": true
981
+ },
982
+ "getId": {
983
+ "name": "getId",
984
+ "async": true,
985
+ "parameters": [],
986
+ "returnType": "any",
987
+ "isStatic": false,
988
+ "isPublic": true
989
+ },
990
+ "getSlug": {
991
+ "name": "getSlug",
992
+ "async": true,
993
+ "parameters": [],
994
+ "returnType": "any",
995
+ "isStatic": false,
996
+ "isPublic": true
997
+ },
998
+ "getSavedId": {
999
+ "name": "getSavedId",
1000
+ "async": true,
1001
+ "parameters": [],
1002
+ "returnType": "any",
1003
+ "isStatic": false,
1004
+ "isPublic": true
1005
+ },
1006
+ "isSaved": {
1007
+ "name": "isSaved",
1008
+ "async": true,
1009
+ "parameters": [],
1010
+ "returnType": "any",
1011
+ "isStatic": false,
1012
+ "isPublic": true
1013
+ },
1014
+ "save": {
1015
+ "name": "save",
1016
+ "async": true,
1017
+ "parameters": [],
1018
+ "returnType": "any",
1019
+ "isStatic": false,
1020
+ "isPublic": true
1021
+ },
1022
+ "classifyConstraintError": {
1023
+ "name": "classifyConstraintError",
1024
+ "async": false,
1025
+ "parameters": [
1026
+ {
1027
+ "name": "message",
1028
+ "type": "string",
1029
+ "optional": false
1030
+ }
1031
+ ],
1032
+ "returnType": "'unique' | 'not_null' | null",
1033
+ "isStatic": true,
1034
+ "isPublic": true
1035
+ },
1036
+ "loadFromId": {
1037
+ "name": "loadFromId",
1038
+ "async": true,
1039
+ "parameters": [],
1040
+ "returnType": "any",
1041
+ "isStatic": false,
1042
+ "isPublic": true
1043
+ },
1044
+ "loadFromSlug": {
1045
+ "name": "loadFromSlug",
1046
+ "async": true,
1047
+ "parameters": [],
1048
+ "returnType": "any",
1049
+ "isStatic": false,
1050
+ "isPublic": true
1051
+ },
1052
+ "is": {
1053
+ "name": "is",
1054
+ "async": true,
1055
+ "parameters": [
1056
+ {
1057
+ "name": "criteria",
1058
+ "type": "string",
1059
+ "optional": false
1060
+ },
1061
+ {
1062
+ "name": "options",
1063
+ "type": "any",
1064
+ "optional": true
1065
+ }
1066
+ ],
1067
+ "returnType": "any",
1068
+ "isStatic": false,
1069
+ "isPublic": true
1070
+ },
1071
+ "do": {
1072
+ "name": "do",
1073
+ "async": true,
1074
+ "parameters": [
1075
+ {
1076
+ "name": "instructions",
1077
+ "type": "string",
1078
+ "optional": false
1079
+ },
1080
+ {
1081
+ "name": "options",
1082
+ "type": "any",
1083
+ "optional": true
1084
+ }
1085
+ ],
1086
+ "returnType": "any",
1087
+ "isStatic": false,
1088
+ "isPublic": true
1089
+ },
1090
+ "describe": {
1091
+ "name": "describe",
1092
+ "async": true,
1093
+ "parameters": [
1094
+ {
1095
+ "name": "options",
1096
+ "type": "any",
1097
+ "optional": true
1098
+ }
1099
+ ],
1100
+ "returnType": "any",
1101
+ "isStatic": false,
1102
+ "isPublic": true
1103
+ },
1104
+ "delete": {
1105
+ "name": "delete",
1106
+ "async": true,
1107
+ "parameters": [],
1108
+ "returnType": "Promise<void>",
1109
+ "isStatic": false,
1110
+ "isPublic": true
1111
+ },
1112
+ "isRelatedLoaded": {
1113
+ "name": "isRelatedLoaded",
1114
+ "async": false,
1115
+ "parameters": [
1116
+ {
1117
+ "name": "fieldName",
1118
+ "type": "string",
1119
+ "optional": false
1120
+ }
1121
+ ],
1122
+ "returnType": "boolean",
1123
+ "isStatic": false,
1124
+ "isPublic": true
1125
+ },
1126
+ "loadRelated": {
1127
+ "name": "loadRelated",
1128
+ "async": true,
1129
+ "parameters": [
1130
+ {
1131
+ "name": "fieldName",
1132
+ "type": "string",
1133
+ "optional": false
1134
+ },
1135
+ {
1136
+ "name": "opts",
1137
+ "type": "LoadRelatedOptions",
1138
+ "optional": true
1139
+ }
1140
+ ],
1141
+ "returnType": "Promise<any>",
1142
+ "isStatic": false,
1143
+ "isPublic": true
1144
+ },
1145
+ "loadRelatedMany": {
1146
+ "name": "loadRelatedMany",
1147
+ "async": true,
1148
+ "parameters": [
1149
+ {
1150
+ "name": "fieldName",
1151
+ "type": "string",
1152
+ "optional": false
1153
+ },
1154
+ {
1155
+ "name": "opts",
1156
+ "type": "LoadRelatedOptions",
1157
+ "optional": true
1158
+ }
1159
+ ],
1160
+ "returnType": "Promise<any[]>",
1161
+ "isStatic": false,
1162
+ "isPublic": true
1163
+ },
1164
+ "getRelated": {
1165
+ "name": "getRelated",
1166
+ "async": true,
1167
+ "parameters": [
1168
+ {
1169
+ "name": "fieldName",
1170
+ "type": "string",
1171
+ "optional": false
1172
+ },
1173
+ {
1174
+ "name": "opts",
1175
+ "type": "LoadRelatedOptions",
1176
+ "optional": true
1177
+ }
1178
+ ],
1179
+ "returnType": "Promise<any>",
1180
+ "isStatic": false,
1181
+ "isPublic": true
1182
+ },
1183
+ "getAvailableTools": {
1184
+ "name": "getAvailableTools",
1185
+ "async": false,
1186
+ "parameters": [],
1187
+ "returnType": "AITool[]",
1188
+ "isStatic": false,
1189
+ "isPublic": true
1190
+ },
1191
+ "executeToolCall": {
1192
+ "name": "executeToolCall",
1193
+ "async": true,
1194
+ "parameters": [
1195
+ {
1196
+ "name": "toolCall",
1197
+ "type": "ToolCall",
1198
+ "optional": false
1199
+ }
1200
+ ],
1201
+ "returnType": "Promise<ToolCallResult>",
1202
+ "isStatic": false,
1203
+ "isPublic": true
1204
+ },
1205
+ "remember": {
1206
+ "name": "remember",
1207
+ "async": true,
1208
+ "parameters": [
1209
+ {
1210
+ "name": "options",
1211
+ "type": "object",
1212
+ "optional": false
1213
+ }
1214
+ ],
1215
+ "returnType": "Promise<void>",
1216
+ "isStatic": false,
1217
+ "isPublic": true
1218
+ },
1219
+ "recall": {
1220
+ "name": "recall",
1221
+ "async": true,
1222
+ "parameters": [
1223
+ {
1224
+ "name": "options",
1225
+ "type": "object",
1226
+ "optional": false
1227
+ }
1228
+ ],
1229
+ "returnType": "Promise<any | null>",
1230
+ "isStatic": false,
1231
+ "isPublic": true
1232
+ },
1233
+ "recallAll": {
1234
+ "name": "recallAll",
1235
+ "async": true,
1236
+ "parameters": [
1237
+ {
1238
+ "name": "options",
1239
+ "type": "object",
1240
+ "optional": true
1241
+ }
1242
+ ],
1243
+ "returnType": "Promise<Map<string, any>>",
1244
+ "isStatic": false,
1245
+ "isPublic": true
1246
+ },
1247
+ "forget": {
1248
+ "name": "forget",
1249
+ "async": true,
1250
+ "parameters": [
1251
+ {
1252
+ "name": "options",
1253
+ "type": "object",
1254
+ "optional": false
1255
+ }
1256
+ ],
1257
+ "returnType": "Promise<void>",
1258
+ "isStatic": false,
1259
+ "isPublic": true
1260
+ },
1261
+ "forgetScope": {
1262
+ "name": "forgetScope",
1263
+ "async": true,
1264
+ "parameters": [
1265
+ {
1266
+ "name": "options",
1267
+ "type": "object",
1268
+ "optional": false
1269
+ }
1270
+ ],
1271
+ "returnType": "Promise<number>",
1272
+ "isStatic": false,
1273
+ "isPublic": true
1274
+ },
1275
+ "generateEmbeddings": {
1276
+ "name": "generateEmbeddings",
1277
+ "async": true,
1278
+ "parameters": [
1279
+ {
1280
+ "name": "options",
1281
+ "type": "GenerateEmbeddingsOptions",
1282
+ "optional": true
1283
+ }
1284
+ ],
1285
+ "returnType": "Promise<void>",
1286
+ "isStatic": false,
1287
+ "isPublic": true
1288
+ },
1289
+ "getEmbedding": {
1290
+ "name": "getEmbedding",
1291
+ "async": true,
1292
+ "parameters": [
1293
+ {
1294
+ "name": "fieldName",
1295
+ "type": "string",
1296
+ "optional": false
1297
+ },
1298
+ {
1299
+ "name": "model",
1300
+ "type": "string",
1301
+ "optional": true
1302
+ }
1303
+ ],
1304
+ "returnType": "Promise<number[] | null>",
1305
+ "isStatic": false,
1306
+ "isPublic": true
1307
+ },
1308
+ "hasStaleEmbeddings": {
1309
+ "name": "hasStaleEmbeddings",
1310
+ "async": true,
1311
+ "parameters": [],
1312
+ "returnType": "Promise<boolean>",
1313
+ "isStatic": false,
1314
+ "isPublic": true
1315
+ },
1316
+ "clearEmbeddings": {
1317
+ "name": "clearEmbeddings",
1318
+ "async": true,
1319
+ "parameters": [],
1320
+ "returnType": "Promise<void>",
1321
+ "isStatic": false,
1322
+ "isPublic": true
1323
+ },
1324
+ "getProducts": {
1325
+ "name": "getProducts",
1326
+ "async": true,
1327
+ "parameters": [],
1328
+ "returnType": "any",
1329
+ "isStatic": false,
1330
+ "isPublic": true
1331
+ },
1332
+ "getSubcategories": {
1333
+ "name": "getSubcategories",
1334
+ "async": true,
1335
+ "parameters": [],
1336
+ "returnType": "any",
1337
+ "isStatic": false,
1338
+ "isPublic": true
1339
+ },
1340
+ "updateProductCount": {
1341
+ "name": "updateProductCount",
1342
+ "async": true,
1343
+ "parameters": [],
1344
+ "returnType": "Promise<void>",
1345
+ "isStatic": false,
1346
+ "isPublic": true
1347
+ },
1348
+ "getRootCategories": {
1349
+ "name": "getRootCategories",
1350
+ "async": true,
1351
+ "parameters": [],
1352
+ "returnType": "Promise<Category[]>",
1353
+ "isStatic": true,
1354
+ "isPublic": true
1355
+ }
1356
+ },
1357
+ "decoratorConfig": {
1358
+ "tableStrategy": "sti",
1359
+ "api": {
1360
+ "include": [
1361
+ "list",
1362
+ "get",
1363
+ "create",
1364
+ "update"
1365
+ ]
1366
+ },
1367
+ "mcp": {
1368
+ "include": [
1369
+ "list",
1370
+ "get"
1371
+ ]
1372
+ },
1373
+ "cli": true,
1374
+ "tenantScoped": {
1375
+ "mode": "optional"
1376
+ }
1377
+ },
1378
+ "extends": "SmrtObject",
1379
+ "exportName": "Category",
1380
+ "collectionExportName": "CategoryCollection",
1381
+ "validationRules": [
1382
+ {
1383
+ "field": "level",
1384
+ "rule": "required",
1385
+ "fieldType": "integer"
1386
+ },
1387
+ {
1388
+ "field": "productCount",
1389
+ "rule": "required",
1390
+ "fieldType": "integer"
1391
+ },
1392
+ {
1393
+ "field": "active",
1394
+ "rule": "required",
1395
+ "fieldType": "boolean"
1396
+ }
1397
+ ],
1398
+ "schema": {
1399
+ "tableName": "categories",
1400
+ "ddl": "CREATE TABLE IF NOT EXISTS \"categories\" (\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 \"name\" TEXT,\n \"description\" TEXT,\n \"parent_id\" UUID,\n \"level\" INTEGER DEFAULT 0,\n \"product_count\" INTEGER DEFAULT 0,\n \"active\" BOOLEAN DEFAULT TRUE\n);",
1401
+ "columns": {
1402
+ "id": {
1403
+ "type": "UUID",
1404
+ "primaryKey": true,
1405
+ "referenceKind": "id",
1406
+ "notNull": true
1407
+ },
1408
+ "slug": {
1409
+ "type": "TEXT",
1410
+ "notNull": true
1411
+ },
1412
+ "context": {
1413
+ "type": "TEXT",
1414
+ "notNull": true,
1415
+ "default": ""
1416
+ },
1417
+ "_meta_type": {
1418
+ "type": "TEXT",
1419
+ "notNull": true
1420
+ },
1421
+ "_meta_data": {
1422
+ "type": "JSON",
1423
+ "notNull": false
1424
+ },
1425
+ "created_at": {
1426
+ "type": "TIMESTAMP",
1427
+ "notNull": true,
1428
+ "default": "current_timestamp"
1429
+ },
1430
+ "updated_at": {
1431
+ "type": "TIMESTAMP",
1432
+ "notNull": true,
1433
+ "default": "current_timestamp"
1434
+ },
1435
+ "tenant_id": {
1436
+ "type": "UUID",
1437
+ "referenceKind": "tenantId",
1438
+ "notNull": false
1439
+ },
1440
+ "name": {
1441
+ "type": "TEXT",
1442
+ "notNull": false
1443
+ },
1444
+ "description": {
1445
+ "type": "TEXT",
1446
+ "notNull": false
1447
+ },
1448
+ "parent_id": {
1449
+ "type": "UUID",
1450
+ "referenceKind": "foreignKey",
1451
+ "notNull": false
1452
+ },
1453
+ "level": {
1454
+ "type": "INTEGER",
1455
+ "notNull": false,
1456
+ "default": 0
1457
+ },
1458
+ "product_count": {
1459
+ "type": "INTEGER",
1460
+ "notNull": false,
1461
+ "default": 0
1462
+ },
1463
+ "active": {
1464
+ "type": "BOOLEAN",
1465
+ "notNull": false,
1466
+ "default": true
1467
+ }
1468
+ },
1469
+ "indexes": [
1470
+ {
1471
+ "name": "categories_id_idx",
1472
+ "columns": [
1473
+ "id"
1474
+ ]
1475
+ },
1476
+ {
1477
+ "name": "categories_slug_context_meta_type_idx",
1478
+ "columns": [
1479
+ "slug",
1480
+ "context",
1481
+ "_meta_type"
1482
+ ],
1483
+ "unique": true
1484
+ },
1485
+ {
1486
+ "name": "categories_meta_type_idx",
1487
+ "columns": [
1488
+ "_meta_type"
1489
+ ]
1490
+ }
1491
+ ],
1492
+ "version": "9b7d356d"
1493
+ }
1494
+ },
1495
+ "@happyvertical/smrt-products:Material": {
1496
+ "name": "material",
1497
+ "className": "Material",
1498
+ "qualifiedName": "@happyvertical/smrt-products:Material",
1499
+ "collection": "products",
1500
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/models/Material.ts",
1501
+ "packageName": "@happyvertical/smrt-products",
1502
+ "fields": {
1503
+ "created_at": {
1504
+ "type": "datetime",
1505
+ "required": false
1506
+ },
1507
+ "updated_at": {
1508
+ "type": "datetime",
1509
+ "required": false
1510
+ },
1511
+ "tenantId": {
1512
+ "type": "text",
1513
+ "required": false,
1514
+ "_meta": {
1515
+ "sqlType": "UUID",
1516
+ "nullable": true,
1517
+ "__tenancy": {
1518
+ "isTenantIdField": true,
1519
+ "autoFilter": true,
1520
+ "required": false,
1521
+ "autoPopulate": true,
1522
+ "nullable": true,
1523
+ "mode": "optional",
1524
+ "field": "tenantId",
1525
+ "allowSuperAdminBypass": false
1526
+ }
1527
+ }
1528
+ },
1529
+ "productType": {
1530
+ "type": "text",
1531
+ "required": false
1532
+ },
1533
+ "name": {
1534
+ "type": "text",
1535
+ "required": false
1536
+ },
1537
+ "description": {
1538
+ "type": "text",
1539
+ "required": false
1540
+ },
1541
+ "category": {
1542
+ "type": "text",
1543
+ "required": false
1544
+ },
1545
+ "manufacturer": {
1546
+ "type": "text",
1547
+ "required": false
1548
+ },
1549
+ "model": {
1550
+ "type": "text",
1551
+ "required": false
1552
+ },
1553
+ "price": {
1554
+ "type": "integer",
1555
+ "required": true,
1556
+ "default": 0
1557
+ },
1558
+ "inStock": {
1559
+ "type": "boolean",
1560
+ "required": true,
1561
+ "default": true
1562
+ },
1563
+ "specifications": {
1564
+ "type": "json",
1565
+ "required": false,
1566
+ "default": {}
1567
+ },
1568
+ "tags": {
1569
+ "type": "json",
1570
+ "required": false,
1571
+ "default": []
1572
+ },
1573
+ "materialKind": {
1574
+ "type": "meta",
1575
+ "required": false,
1576
+ "default": "component",
1577
+ "_meta": {
1578
+ "underlyingType": "text"
1579
+ }
1580
+ },
1581
+ "uom": {
1582
+ "type": "meta",
1583
+ "required": false,
1584
+ "default": "each",
1585
+ "_meta": {
1586
+ "underlyingType": "text"
1587
+ }
1588
+ },
1589
+ "costPerUnit": {
1590
+ "type": "meta",
1591
+ "required": false,
1592
+ "default": 0,
1593
+ "_meta": {
1594
+ "underlyingType": "decimal"
1595
+ }
1596
+ }
1597
+ },
1598
+ "methods": {
1599
+ "getAiUsageSnapshot": {
1600
+ "name": "getAiUsageSnapshot",
1601
+ "async": false,
1602
+ "parameters": [],
1603
+ "returnType": "AiUsageSnapshot | undefined",
1604
+ "isStatic": false,
1605
+ "isPublic": true
1606
+ },
1607
+ "resetAiUsage": {
1608
+ "name": "resetAiUsage",
1609
+ "async": false,
1610
+ "parameters": [],
1611
+ "returnType": "void",
1612
+ "isStatic": false,
1613
+ "isPublic": true
1614
+ },
1615
+ "listAiUsage": {
1616
+ "name": "listAiUsage",
1617
+ "async": true,
1618
+ "parameters": [
1619
+ {
1620
+ "name": "options",
1621
+ "type": "AiUsageListOptions",
1622
+ "optional": true
1623
+ }
1624
+ ],
1625
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
1626
+ "isStatic": false,
1627
+ "isPublic": true
1628
+ },
1629
+ "summarizeAiUsage": {
1630
+ "name": "summarizeAiUsage",
1631
+ "async": true,
1632
+ "parameters": [
1633
+ {
1634
+ "name": "options",
1635
+ "type": "AiUsageSummaryOptions",
1636
+ "optional": true
1637
+ }
1638
+ ],
1639
+ "returnType": "Promise<Record<string, AiUsageStats>>",
1640
+ "isStatic": false,
1641
+ "isPublic": true
1642
+ },
1643
+ "destroy": {
1644
+ "name": "destroy",
1645
+ "async": false,
1646
+ "parameters": [],
1647
+ "returnType": "void",
1648
+ "isStatic": false,
1649
+ "isPublic": true
1650
+ },
1651
+ "markAsPersisted": {
1652
+ "name": "markAsPersisted",
1653
+ "async": false,
1654
+ "parameters": [],
1655
+ "returnType": "void",
1656
+ "isStatic": false,
1657
+ "isPublic": true
1658
+ },
1659
+ "initialize": {
1660
+ "name": "initialize",
1661
+ "async": true,
1662
+ "parameters": [],
1663
+ "returnType": "Promise",
1664
+ "isStatic": false,
1665
+ "isPublic": true
1666
+ },
1667
+ "loadDataFromDb": {
1668
+ "name": "loadDataFromDb",
1669
+ "async": true,
1670
+ "parameters": [
1671
+ {
1672
+ "name": "data",
1673
+ "type": "any",
1674
+ "optional": false
1675
+ }
1676
+ ],
1677
+ "returnType": "any",
1678
+ "isStatic": false,
1679
+ "isPublic": true
1680
+ },
1681
+ "getFields": {
1682
+ "name": "getFields",
1683
+ "async": true,
1684
+ "parameters": [],
1685
+ "returnType": "any",
1686
+ "isStatic": false,
1687
+ "isPublic": true
1688
+ },
1689
+ "toJSON": {
1690
+ "name": "toJSON",
1691
+ "async": false,
1692
+ "parameters": [],
1693
+ "returnType": "any",
1694
+ "isStatic": false,
1695
+ "isPublic": true
1696
+ },
1697
+ "toPlainObject": {
1698
+ "name": "toPlainObject",
1699
+ "async": false,
1700
+ "parameters": [],
1701
+ "returnType": "Record<string>",
1702
+ "isStatic": false,
1703
+ "isPublic": true
1704
+ },
1705
+ "toPublicJSON": {
1706
+ "name": "toPublicJSON",
1707
+ "async": false,
1708
+ "parameters": [],
1709
+ "returnType": "Record<string>",
1710
+ "isStatic": false,
1711
+ "isPublic": true
1712
+ },
1713
+ "getId": {
1714
+ "name": "getId",
1715
+ "async": true,
1716
+ "parameters": [],
1717
+ "returnType": "any",
1718
+ "isStatic": false,
1719
+ "isPublic": true
1720
+ },
1721
+ "getSlug": {
1722
+ "name": "getSlug",
1723
+ "async": true,
1724
+ "parameters": [],
1725
+ "returnType": "any",
1726
+ "isStatic": false,
1727
+ "isPublic": true
1728
+ },
1729
+ "getSavedId": {
1730
+ "name": "getSavedId",
1731
+ "async": true,
1732
+ "parameters": [],
1733
+ "returnType": "any",
1734
+ "isStatic": false,
1735
+ "isPublic": true
1736
+ },
1737
+ "isSaved": {
1738
+ "name": "isSaved",
1739
+ "async": true,
1740
+ "parameters": [],
1741
+ "returnType": "any",
1742
+ "isStatic": false,
1743
+ "isPublic": true
1744
+ },
1745
+ "save": {
1746
+ "name": "save",
1747
+ "async": true,
1748
+ "parameters": [],
1749
+ "returnType": "any",
1750
+ "isStatic": false,
1751
+ "isPublic": true
1752
+ },
1753
+ "classifyConstraintError": {
1754
+ "name": "classifyConstraintError",
1755
+ "async": false,
1756
+ "parameters": [
1757
+ {
1758
+ "name": "message",
1759
+ "type": "string",
1760
+ "optional": false
1761
+ }
1762
+ ],
1763
+ "returnType": "'unique' | 'not_null' | null",
1764
+ "isStatic": true,
1765
+ "isPublic": true
1766
+ },
1767
+ "loadFromId": {
1768
+ "name": "loadFromId",
1769
+ "async": true,
1770
+ "parameters": [],
1771
+ "returnType": "any",
1772
+ "isStatic": false,
1773
+ "isPublic": true
1774
+ },
1775
+ "loadFromSlug": {
1776
+ "name": "loadFromSlug",
1777
+ "async": true,
1778
+ "parameters": [],
1779
+ "returnType": "any",
1780
+ "isStatic": false,
1781
+ "isPublic": true
1782
+ },
1783
+ "is": {
1784
+ "name": "is",
1785
+ "async": true,
1786
+ "parameters": [
1787
+ {
1788
+ "name": "criteria",
1789
+ "type": "string",
1790
+ "optional": false
1791
+ },
1792
+ {
1793
+ "name": "options",
1794
+ "type": "any",
1795
+ "optional": true
1796
+ }
1797
+ ],
1798
+ "returnType": "any",
1799
+ "isStatic": false,
1800
+ "isPublic": true
1801
+ },
1802
+ "do": {
1803
+ "name": "do",
1804
+ "async": true,
1805
+ "parameters": [
1806
+ {
1807
+ "name": "instructions",
1808
+ "type": "string",
1809
+ "optional": false
1810
+ },
1811
+ {
1812
+ "name": "options",
1813
+ "type": "any",
1814
+ "optional": true
1815
+ }
1816
+ ],
1817
+ "returnType": "any",
1818
+ "isStatic": false,
1819
+ "isPublic": true
1820
+ },
1821
+ "describe": {
1822
+ "name": "describe",
1823
+ "async": true,
1824
+ "parameters": [
1825
+ {
1826
+ "name": "options",
1827
+ "type": "any",
1828
+ "optional": true
1829
+ }
1830
+ ],
1831
+ "returnType": "any",
1832
+ "isStatic": false,
1833
+ "isPublic": true
1834
+ },
1835
+ "delete": {
1836
+ "name": "delete",
1837
+ "async": true,
1838
+ "parameters": [],
1839
+ "returnType": "Promise<void>",
1840
+ "isStatic": false,
1841
+ "isPublic": true
1842
+ },
1843
+ "isRelatedLoaded": {
1844
+ "name": "isRelatedLoaded",
1845
+ "async": false,
1846
+ "parameters": [
1847
+ {
1848
+ "name": "fieldName",
1849
+ "type": "string",
1850
+ "optional": false
1851
+ }
1852
+ ],
1853
+ "returnType": "boolean",
1854
+ "isStatic": false,
1855
+ "isPublic": true
1856
+ },
1857
+ "loadRelated": {
1858
+ "name": "loadRelated",
1859
+ "async": true,
1860
+ "parameters": [
1861
+ {
1862
+ "name": "fieldName",
1863
+ "type": "string",
1864
+ "optional": false
1865
+ },
1866
+ {
1867
+ "name": "opts",
1868
+ "type": "LoadRelatedOptions",
1869
+ "optional": true
1870
+ }
1871
+ ],
1872
+ "returnType": "Promise<any>",
1873
+ "isStatic": false,
1874
+ "isPublic": true
1875
+ },
1876
+ "loadRelatedMany": {
1877
+ "name": "loadRelatedMany",
1878
+ "async": true,
1879
+ "parameters": [
1880
+ {
1881
+ "name": "fieldName",
1882
+ "type": "string",
1883
+ "optional": false
1884
+ },
1885
+ {
1886
+ "name": "opts",
1887
+ "type": "LoadRelatedOptions",
1888
+ "optional": true
1889
+ }
1890
+ ],
1891
+ "returnType": "Promise<any[]>",
1892
+ "isStatic": false,
1893
+ "isPublic": true
1894
+ },
1895
+ "getRelated": {
1896
+ "name": "getRelated",
1897
+ "async": true,
1898
+ "parameters": [
1899
+ {
1900
+ "name": "fieldName",
1901
+ "type": "string",
1902
+ "optional": false
1903
+ },
1904
+ {
1905
+ "name": "opts",
1906
+ "type": "LoadRelatedOptions",
1907
+ "optional": true
1908
+ }
1909
+ ],
1910
+ "returnType": "Promise<any>",
1911
+ "isStatic": false,
1912
+ "isPublic": true
1913
+ },
1914
+ "getAvailableTools": {
1915
+ "name": "getAvailableTools",
1916
+ "async": false,
1917
+ "parameters": [],
1918
+ "returnType": "AITool[]",
1919
+ "isStatic": false,
1920
+ "isPublic": true
1921
+ },
1922
+ "executeToolCall": {
1923
+ "name": "executeToolCall",
1924
+ "async": true,
1925
+ "parameters": [
1926
+ {
1927
+ "name": "toolCall",
1928
+ "type": "ToolCall",
1929
+ "optional": false
1930
+ }
1931
+ ],
1932
+ "returnType": "Promise<ToolCallResult>",
1933
+ "isStatic": false,
1934
+ "isPublic": true
1935
+ },
1936
+ "remember": {
1937
+ "name": "remember",
1938
+ "async": true,
1939
+ "parameters": [
1940
+ {
1941
+ "name": "options",
1942
+ "type": "object",
1943
+ "optional": false
1944
+ }
1945
+ ],
1946
+ "returnType": "Promise<void>",
1947
+ "isStatic": false,
1948
+ "isPublic": true
1949
+ },
1950
+ "recall": {
1951
+ "name": "recall",
1952
+ "async": true,
1953
+ "parameters": [
1954
+ {
1955
+ "name": "options",
1956
+ "type": "object",
1957
+ "optional": false
1958
+ }
1959
+ ],
1960
+ "returnType": "Promise<any | null>",
1961
+ "isStatic": false,
1962
+ "isPublic": true
1963
+ },
1964
+ "recallAll": {
1965
+ "name": "recallAll",
1966
+ "async": true,
1967
+ "parameters": [
1968
+ {
1969
+ "name": "options",
1970
+ "type": "object",
1971
+ "optional": true
1972
+ }
1973
+ ],
1974
+ "returnType": "Promise<Map<string, any>>",
1975
+ "isStatic": false,
1976
+ "isPublic": true
1977
+ },
1978
+ "forget": {
1979
+ "name": "forget",
1980
+ "async": true,
1981
+ "parameters": [
1982
+ {
1983
+ "name": "options",
1984
+ "type": "object",
1985
+ "optional": false
1986
+ }
1987
+ ],
1988
+ "returnType": "Promise<void>",
1989
+ "isStatic": false,
1990
+ "isPublic": true
1991
+ },
1992
+ "forgetScope": {
1993
+ "name": "forgetScope",
1994
+ "async": true,
1995
+ "parameters": [
1996
+ {
1997
+ "name": "options",
1998
+ "type": "object",
1999
+ "optional": false
2000
+ }
2001
+ ],
2002
+ "returnType": "Promise<number>",
2003
+ "isStatic": false,
2004
+ "isPublic": true
2005
+ },
2006
+ "generateEmbeddings": {
2007
+ "name": "generateEmbeddings",
2008
+ "async": true,
2009
+ "parameters": [
2010
+ {
2011
+ "name": "options",
2012
+ "type": "GenerateEmbeddingsOptions",
2013
+ "optional": true
2014
+ }
2015
+ ],
2016
+ "returnType": "Promise<void>",
2017
+ "isStatic": false,
2018
+ "isPublic": true
2019
+ },
2020
+ "getEmbedding": {
2021
+ "name": "getEmbedding",
2022
+ "async": true,
2023
+ "parameters": [
2024
+ {
2025
+ "name": "fieldName",
2026
+ "type": "string",
2027
+ "optional": false
2028
+ },
2029
+ {
2030
+ "name": "model",
2031
+ "type": "string",
2032
+ "optional": true
2033
+ }
2034
+ ],
2035
+ "returnType": "Promise<number[] | null>",
2036
+ "isStatic": false,
2037
+ "isPublic": true
2038
+ },
2039
+ "hasStaleEmbeddings": {
2040
+ "name": "hasStaleEmbeddings",
2041
+ "async": true,
2042
+ "parameters": [],
2043
+ "returnType": "Promise<boolean>",
2044
+ "isStatic": false,
2045
+ "isPublic": true
2046
+ },
2047
+ "clearEmbeddings": {
2048
+ "name": "clearEmbeddings",
2049
+ "async": true,
2050
+ "parameters": [],
2051
+ "returnType": "Promise<void>",
2052
+ "isStatic": false,
2053
+ "isPublic": true
2054
+ },
2055
+ "getSpecification": {
2056
+ "name": "getSpecification",
2057
+ "async": true,
2058
+ "parameters": [
2059
+ {
2060
+ "name": "key",
2061
+ "type": "string",
2062
+ "optional": false
2063
+ }
2064
+ ],
2065
+ "returnType": "Promise<any>",
2066
+ "isStatic": false,
2067
+ "isPublic": true
2068
+ },
2069
+ "updateSpecification": {
2070
+ "name": "updateSpecification",
2071
+ "async": true,
2072
+ "parameters": [
2073
+ {
2074
+ "name": "key",
2075
+ "type": "string",
2076
+ "optional": false
2077
+ },
2078
+ {
2079
+ "name": "value",
2080
+ "type": "any",
2081
+ "optional": false
2082
+ }
2083
+ ],
2084
+ "returnType": "Promise<void>",
2085
+ "isStatic": false,
2086
+ "isPublic": true
2087
+ },
2088
+ "getAssets": {
2089
+ "name": "getAssets",
2090
+ "async": true,
2091
+ "parameters": [
2092
+ {
2093
+ "name": "relationship",
2094
+ "type": "string",
2095
+ "optional": true
2096
+ }
2097
+ ],
2098
+ "returnType": "Promise<Asset[]>",
2099
+ "isStatic": false,
2100
+ "isPublic": true
2101
+ },
2102
+ "addAsset": {
2103
+ "name": "addAsset",
2104
+ "async": true,
2105
+ "parameters": [
2106
+ {
2107
+ "name": "asset",
2108
+ "type": "Asset",
2109
+ "optional": false
2110
+ },
2111
+ {
2112
+ "name": "relationship",
2113
+ "type": "any",
2114
+ "optional": true,
2115
+ "default": "attachment"
2116
+ },
2117
+ {
2118
+ "name": "sortOrder",
2119
+ "type": "any",
2120
+ "optional": true
2121
+ }
2122
+ ],
2123
+ "returnType": "Promise<void>",
2124
+ "isStatic": false,
2125
+ "isPublic": true
2126
+ },
2127
+ "removeAsset": {
2128
+ "name": "removeAsset",
2129
+ "async": true,
2130
+ "parameters": [
2131
+ {
2132
+ "name": "assetId",
2133
+ "type": "string",
2134
+ "optional": false
2135
+ },
2136
+ {
2137
+ "name": "relationship",
2138
+ "type": "string",
2139
+ "optional": true
2140
+ }
2141
+ ],
2142
+ "returnType": "Promise<void>",
2143
+ "isStatic": false,
2144
+ "isPublic": true
2145
+ },
2146
+ "searchByText": {
2147
+ "name": "searchByText",
2148
+ "async": true,
2149
+ "parameters": [
2150
+ {
2151
+ "name": "_query",
2152
+ "type": "string",
2153
+ "optional": false
2154
+ }
2155
+ ],
2156
+ "returnType": "Promise<Product[]>",
2157
+ "isStatic": true,
2158
+ "isPublic": true
2159
+ },
2160
+ "findByManufacturer": {
2161
+ "name": "findByManufacturer",
2162
+ "async": true,
2163
+ "parameters": [
2164
+ {
2165
+ "name": "_manufacturer",
2166
+ "type": "string",
2167
+ "optional": false
2168
+ }
2169
+ ],
2170
+ "returnType": "Promise<Product[]>",
2171
+ "isStatic": true,
2172
+ "isPublic": true
2173
+ }
2174
+ },
2175
+ "decoratorConfig": {
2176
+ "api": {
2177
+ "include": [
2178
+ "list",
2179
+ "get",
2180
+ "create",
2181
+ "update"
2182
+ ]
2183
+ },
2184
+ "mcp": {
2185
+ "include": [
2186
+ "list",
2187
+ "get"
2188
+ ]
2189
+ },
2190
+ "cli": true,
2191
+ "tenantScoped": {
2192
+ "mode": "optional"
2193
+ },
2194
+ "tableName": "products",
2195
+ "tableStrategy": "sti"
2196
+ },
2197
+ "extends": "Product",
2198
+ "exportName": "Material",
2199
+ "collectionExportName": "MaterialCollection",
2200
+ "validationRules": [
2201
+ {
2202
+ "field": "price",
2203
+ "rule": "required",
2204
+ "fieldType": "integer"
2205
+ },
2206
+ {
2207
+ "field": "inStock",
2208
+ "rule": "required",
2209
+ "fieldType": "boolean"
2210
+ }
2211
+ ],
2212
+ "schema": {
2213
+ "tableName": "products",
2214
+ "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);",
2215
+ "columns": {
2216
+ "id": {
2217
+ "type": "UUID",
2218
+ "primaryKey": true,
2219
+ "referenceKind": "id",
2220
+ "notNull": true
2221
+ },
2222
+ "slug": {
2223
+ "type": "TEXT",
2224
+ "notNull": true
2225
+ },
2226
+ "context": {
2227
+ "type": "TEXT",
2228
+ "notNull": true,
2229
+ "default": ""
2230
+ },
2231
+ "_meta_type": {
2232
+ "type": "TEXT",
2233
+ "notNull": true
2234
+ },
2235
+ "_meta_data": {
2236
+ "type": "JSON",
2237
+ "notNull": false
2238
+ },
2239
+ "created_at": {
2240
+ "type": "TIMESTAMP",
2241
+ "notNull": true,
2242
+ "default": "current_timestamp"
2243
+ },
2244
+ "updated_at": {
2245
+ "type": "TIMESTAMP",
2246
+ "notNull": true,
2247
+ "default": "current_timestamp"
2248
+ },
2249
+ "tenant_id": {
2250
+ "type": "UUID",
2251
+ "referenceKind": "tenantId",
2252
+ "notNull": false
2253
+ },
2254
+ "product_type": {
2255
+ "type": "TEXT",
2256
+ "notNull": false
2257
+ },
2258
+ "name": {
2259
+ "type": "TEXT",
2260
+ "notNull": false
2261
+ },
2262
+ "description": {
2263
+ "type": "TEXT",
2264
+ "notNull": false
2265
+ },
2266
+ "category": {
2267
+ "type": "TEXT",
2268
+ "notNull": false
2269
+ },
2270
+ "manufacturer": {
2271
+ "type": "TEXT",
2272
+ "notNull": false
2273
+ },
2274
+ "model": {
2275
+ "type": "TEXT",
2276
+ "notNull": false
2277
+ },
2278
+ "price": {
2279
+ "type": "INTEGER",
2280
+ "notNull": false,
2281
+ "default": 0
2282
+ },
2283
+ "in_stock": {
2284
+ "type": "BOOLEAN",
2285
+ "notNull": false,
2286
+ "default": true
2287
+ },
2288
+ "specifications": {
2289
+ "type": "JSON",
2290
+ "notNull": false,
2291
+ "default": {}
2292
+ },
2293
+ "tags": {
2294
+ "type": "JSON",
2295
+ "notNull": false,
2296
+ "default": []
2297
+ }
2298
+ },
2299
+ "indexes": [
2300
+ {
2301
+ "name": "products_id_idx",
2302
+ "columns": [
2303
+ "id"
2304
+ ]
2305
+ },
2306
+ {
2307
+ "name": "products_slug_context_meta_type_idx",
2308
+ "columns": [
2309
+ "slug",
2310
+ "context",
2311
+ "_meta_type"
2312
+ ],
2313
+ "unique": true
2314
+ },
2315
+ {
2316
+ "name": "products_meta_type_idx",
2317
+ "columns": [
2318
+ "_meta_type"
2319
+ ]
2320
+ }
2321
+ ],
2322
+ "version": "4a33c96d"
2323
+ }
2324
+ },
2325
+ "@happyvertical/smrt-products:Product": {
2326
+ "name": "product",
2327
+ "className": "Product",
2328
+ "qualifiedName": "@happyvertical/smrt-products:Product",
2329
+ "collection": "products",
2330
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/models/Product.ts",
2331
+ "packageName": "@happyvertical/smrt-products",
2332
+ "fields": {
2333
+ "created_at": {
2334
+ "type": "datetime",
2335
+ "required": false
2336
+ },
2337
+ "updated_at": {
2338
+ "type": "datetime",
2339
+ "required": false
2340
+ },
2341
+ "tenantId": {
2342
+ "type": "text",
2343
+ "required": false,
2344
+ "_meta": {
2345
+ "sqlType": "UUID",
2346
+ "nullable": true,
2347
+ "__tenancy": {
2348
+ "isTenantIdField": true,
2349
+ "autoFilter": true,
2350
+ "required": false,
2351
+ "autoPopulate": true,
2352
+ "nullable": true,
2353
+ "mode": "optional",
2354
+ "field": "tenantId",
2355
+ "allowSuperAdminBypass": false
2356
+ }
2357
+ }
2358
+ },
2359
+ "productType": {
2360
+ "type": "text",
2361
+ "required": false
2362
+ },
2363
+ "name": {
2364
+ "type": "text",
2365
+ "required": false
2366
+ },
2367
+ "description": {
2368
+ "type": "text",
2369
+ "required": false
2370
+ },
2371
+ "category": {
2372
+ "type": "text",
2373
+ "required": false
2374
+ },
2375
+ "manufacturer": {
2376
+ "type": "text",
2377
+ "required": false
2378
+ },
2379
+ "model": {
2380
+ "type": "text",
2381
+ "required": false
2382
+ },
2383
+ "price": {
2384
+ "type": "integer",
2385
+ "required": true,
2386
+ "default": 0
2387
+ },
2388
+ "inStock": {
2389
+ "type": "boolean",
2390
+ "required": true,
2391
+ "default": true
2392
+ },
2393
+ "specifications": {
2394
+ "type": "json",
2395
+ "required": false,
2396
+ "default": {}
2397
+ },
2398
+ "tags": {
2399
+ "type": "json",
2400
+ "required": false,
2401
+ "default": []
2402
+ }
2403
+ },
2404
+ "methods": {
2405
+ "getAiUsageSnapshot": {
2406
+ "name": "getAiUsageSnapshot",
2407
+ "async": false,
2408
+ "parameters": [],
2409
+ "returnType": "AiUsageSnapshot | undefined",
2410
+ "isStatic": false,
2411
+ "isPublic": true
2412
+ },
2413
+ "resetAiUsage": {
2414
+ "name": "resetAiUsage",
2415
+ "async": false,
2416
+ "parameters": [],
2417
+ "returnType": "void",
2418
+ "isStatic": false,
2419
+ "isPublic": true
2420
+ },
2421
+ "listAiUsage": {
2422
+ "name": "listAiUsage",
2423
+ "async": true,
2424
+ "parameters": [
2425
+ {
2426
+ "name": "options",
2427
+ "type": "AiUsageListOptions",
2428
+ "optional": true
2429
+ }
2430
+ ],
2431
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
2432
+ "isStatic": false,
2433
+ "isPublic": true
2434
+ },
2435
+ "summarizeAiUsage": {
2436
+ "name": "summarizeAiUsage",
2437
+ "async": true,
2438
+ "parameters": [
2439
+ {
2440
+ "name": "options",
2441
+ "type": "AiUsageSummaryOptions",
2442
+ "optional": true
2443
+ }
2444
+ ],
2445
+ "returnType": "Promise<Record<string, AiUsageStats>>",
2446
+ "isStatic": false,
2447
+ "isPublic": true
2448
+ },
2449
+ "destroy": {
2450
+ "name": "destroy",
2451
+ "async": false,
2452
+ "parameters": [],
2453
+ "returnType": "void",
2454
+ "isStatic": false,
2455
+ "isPublic": true
2456
+ },
2457
+ "markAsPersisted": {
2458
+ "name": "markAsPersisted",
2459
+ "async": false,
2460
+ "parameters": [],
2461
+ "returnType": "void",
2462
+ "isStatic": false,
2463
+ "isPublic": true
2464
+ },
2465
+ "initialize": {
2466
+ "name": "initialize",
2467
+ "async": true,
2468
+ "parameters": [],
2469
+ "returnType": "Promise",
2470
+ "isStatic": false,
2471
+ "isPublic": true
2472
+ },
2473
+ "loadDataFromDb": {
2474
+ "name": "loadDataFromDb",
2475
+ "async": true,
2476
+ "parameters": [
2477
+ {
2478
+ "name": "data",
2479
+ "type": "any",
2480
+ "optional": false
2481
+ }
2482
+ ],
2483
+ "returnType": "any",
2484
+ "isStatic": false,
2485
+ "isPublic": true
2486
+ },
2487
+ "getFields": {
2488
+ "name": "getFields",
2489
+ "async": true,
2490
+ "parameters": [],
2491
+ "returnType": "any",
2492
+ "isStatic": false,
2493
+ "isPublic": true
2494
+ },
2495
+ "toJSON": {
2496
+ "name": "toJSON",
2497
+ "async": false,
2498
+ "parameters": [],
2499
+ "returnType": "any",
2500
+ "isStatic": false,
2501
+ "isPublic": true
2502
+ },
2503
+ "toPlainObject": {
2504
+ "name": "toPlainObject",
2505
+ "async": false,
2506
+ "parameters": [],
2507
+ "returnType": "Record<string>",
2508
+ "isStatic": false,
2509
+ "isPublic": true
2510
+ },
2511
+ "toPublicJSON": {
2512
+ "name": "toPublicJSON",
2513
+ "async": false,
2514
+ "parameters": [],
2515
+ "returnType": "Record<string>",
2516
+ "isStatic": false,
2517
+ "isPublic": true
2518
+ },
2519
+ "getId": {
2520
+ "name": "getId",
2521
+ "async": true,
2522
+ "parameters": [],
2523
+ "returnType": "any",
2524
+ "isStatic": false,
2525
+ "isPublic": true
2526
+ },
2527
+ "getSlug": {
2528
+ "name": "getSlug",
2529
+ "async": true,
2530
+ "parameters": [],
2531
+ "returnType": "any",
2532
+ "isStatic": false,
2533
+ "isPublic": true
2534
+ },
2535
+ "getSavedId": {
2536
+ "name": "getSavedId",
2537
+ "async": true,
2538
+ "parameters": [],
2539
+ "returnType": "any",
2540
+ "isStatic": false,
2541
+ "isPublic": true
2542
+ },
2543
+ "isSaved": {
2544
+ "name": "isSaved",
2545
+ "async": true,
2546
+ "parameters": [],
2547
+ "returnType": "any",
2548
+ "isStatic": false,
2549
+ "isPublic": true
2550
+ },
2551
+ "save": {
2552
+ "name": "save",
2553
+ "async": true,
2554
+ "parameters": [],
2555
+ "returnType": "any",
2556
+ "isStatic": false,
2557
+ "isPublic": true
2558
+ },
2559
+ "classifyConstraintError": {
2560
+ "name": "classifyConstraintError",
2561
+ "async": false,
2562
+ "parameters": [
2563
+ {
2564
+ "name": "message",
2565
+ "type": "string",
2566
+ "optional": false
2567
+ }
2568
+ ],
2569
+ "returnType": "'unique' | 'not_null' | null",
2570
+ "isStatic": true,
2571
+ "isPublic": true
2572
+ },
2573
+ "loadFromId": {
2574
+ "name": "loadFromId",
2575
+ "async": true,
2576
+ "parameters": [],
2577
+ "returnType": "any",
2578
+ "isStatic": false,
2579
+ "isPublic": true
2580
+ },
2581
+ "loadFromSlug": {
2582
+ "name": "loadFromSlug",
2583
+ "async": true,
2584
+ "parameters": [],
2585
+ "returnType": "any",
2586
+ "isStatic": false,
2587
+ "isPublic": true
2588
+ },
2589
+ "is": {
2590
+ "name": "is",
2591
+ "async": true,
2592
+ "parameters": [
2593
+ {
2594
+ "name": "criteria",
2595
+ "type": "string",
2596
+ "optional": false
2597
+ },
2598
+ {
2599
+ "name": "options",
2600
+ "type": "any",
2601
+ "optional": true
2602
+ }
2603
+ ],
2604
+ "returnType": "any",
2605
+ "isStatic": false,
2606
+ "isPublic": true
2607
+ },
2608
+ "do": {
2609
+ "name": "do",
2610
+ "async": true,
2611
+ "parameters": [
2612
+ {
2613
+ "name": "instructions",
2614
+ "type": "string",
2615
+ "optional": false
2616
+ },
2617
+ {
2618
+ "name": "options",
2619
+ "type": "any",
2620
+ "optional": true
2621
+ }
2622
+ ],
2623
+ "returnType": "any",
2624
+ "isStatic": false,
2625
+ "isPublic": true
2626
+ },
2627
+ "describe": {
2628
+ "name": "describe",
2629
+ "async": true,
2630
+ "parameters": [
2631
+ {
2632
+ "name": "options",
2633
+ "type": "any",
2634
+ "optional": true
2635
+ }
2636
+ ],
2637
+ "returnType": "any",
2638
+ "isStatic": false,
2639
+ "isPublic": true
2640
+ },
2641
+ "delete": {
2642
+ "name": "delete",
2643
+ "async": true,
2644
+ "parameters": [],
2645
+ "returnType": "Promise<void>",
2646
+ "isStatic": false,
2647
+ "isPublic": true
2648
+ },
2649
+ "isRelatedLoaded": {
2650
+ "name": "isRelatedLoaded",
2651
+ "async": false,
2652
+ "parameters": [
2653
+ {
2654
+ "name": "fieldName",
2655
+ "type": "string",
2656
+ "optional": false
2657
+ }
2658
+ ],
2659
+ "returnType": "boolean",
2660
+ "isStatic": false,
2661
+ "isPublic": true
2662
+ },
2663
+ "loadRelated": {
2664
+ "name": "loadRelated",
2665
+ "async": true,
2666
+ "parameters": [
2667
+ {
2668
+ "name": "fieldName",
2669
+ "type": "string",
2670
+ "optional": false
2671
+ },
2672
+ {
2673
+ "name": "opts",
2674
+ "type": "LoadRelatedOptions",
2675
+ "optional": true
2676
+ }
2677
+ ],
2678
+ "returnType": "Promise<any>",
2679
+ "isStatic": false,
2680
+ "isPublic": true
2681
+ },
2682
+ "loadRelatedMany": {
2683
+ "name": "loadRelatedMany",
2684
+ "async": true,
2685
+ "parameters": [
2686
+ {
2687
+ "name": "fieldName",
2688
+ "type": "string",
2689
+ "optional": false
2690
+ },
2691
+ {
2692
+ "name": "opts",
2693
+ "type": "LoadRelatedOptions",
2694
+ "optional": true
2695
+ }
2696
+ ],
2697
+ "returnType": "Promise<any[]>",
2698
+ "isStatic": false,
2699
+ "isPublic": true
2700
+ },
2701
+ "getRelated": {
2702
+ "name": "getRelated",
2703
+ "async": true,
2704
+ "parameters": [
2705
+ {
2706
+ "name": "fieldName",
2707
+ "type": "string",
2708
+ "optional": false
2709
+ },
2710
+ {
2711
+ "name": "opts",
2712
+ "type": "LoadRelatedOptions",
2713
+ "optional": true
2714
+ }
2715
+ ],
2716
+ "returnType": "Promise<any>",
2717
+ "isStatic": false,
2718
+ "isPublic": true
2719
+ },
2720
+ "getAvailableTools": {
2721
+ "name": "getAvailableTools",
2722
+ "async": false,
2723
+ "parameters": [],
2724
+ "returnType": "AITool[]",
2725
+ "isStatic": false,
2726
+ "isPublic": true
2727
+ },
2728
+ "executeToolCall": {
2729
+ "name": "executeToolCall",
2730
+ "async": true,
2731
+ "parameters": [
2732
+ {
2733
+ "name": "toolCall",
2734
+ "type": "ToolCall",
2735
+ "optional": false
2736
+ }
2737
+ ],
2738
+ "returnType": "Promise<ToolCallResult>",
2739
+ "isStatic": false,
2740
+ "isPublic": true
2741
+ },
2742
+ "remember": {
2743
+ "name": "remember",
2744
+ "async": true,
2745
+ "parameters": [
2746
+ {
2747
+ "name": "options",
2748
+ "type": "object",
2749
+ "optional": false
2750
+ }
2751
+ ],
2752
+ "returnType": "Promise<void>",
2753
+ "isStatic": false,
2754
+ "isPublic": true
2755
+ },
2756
+ "recall": {
2757
+ "name": "recall",
2758
+ "async": true,
2759
+ "parameters": [
2760
+ {
2761
+ "name": "options",
2762
+ "type": "object",
2763
+ "optional": false
2764
+ }
2765
+ ],
2766
+ "returnType": "Promise<any | null>",
2767
+ "isStatic": false,
2768
+ "isPublic": true
2769
+ },
2770
+ "recallAll": {
2771
+ "name": "recallAll",
2772
+ "async": true,
2773
+ "parameters": [
2774
+ {
2775
+ "name": "options",
2776
+ "type": "object",
2777
+ "optional": true
2778
+ }
2779
+ ],
2780
+ "returnType": "Promise<Map<string, any>>",
2781
+ "isStatic": false,
2782
+ "isPublic": true
2783
+ },
2784
+ "forget": {
2785
+ "name": "forget",
2786
+ "async": true,
2787
+ "parameters": [
2788
+ {
2789
+ "name": "options",
2790
+ "type": "object",
2791
+ "optional": false
2792
+ }
2793
+ ],
2794
+ "returnType": "Promise<void>",
2795
+ "isStatic": false,
2796
+ "isPublic": true
2797
+ },
2798
+ "forgetScope": {
2799
+ "name": "forgetScope",
2800
+ "async": true,
2801
+ "parameters": [
2802
+ {
2803
+ "name": "options",
2804
+ "type": "object",
2805
+ "optional": false
2806
+ }
2807
+ ],
2808
+ "returnType": "Promise<number>",
2809
+ "isStatic": false,
2810
+ "isPublic": true
2811
+ },
2812
+ "generateEmbeddings": {
2813
+ "name": "generateEmbeddings",
2814
+ "async": true,
2815
+ "parameters": [
2816
+ {
2817
+ "name": "options",
2818
+ "type": "GenerateEmbeddingsOptions",
2819
+ "optional": true
2820
+ }
2821
+ ],
2822
+ "returnType": "Promise<void>",
2823
+ "isStatic": false,
2824
+ "isPublic": true
2825
+ },
2826
+ "getEmbedding": {
2827
+ "name": "getEmbedding",
2828
+ "async": true,
2829
+ "parameters": [
2830
+ {
2831
+ "name": "fieldName",
2832
+ "type": "string",
2833
+ "optional": false
2834
+ },
2835
+ {
2836
+ "name": "model",
2837
+ "type": "string",
2838
+ "optional": true
2839
+ }
2840
+ ],
2841
+ "returnType": "Promise<number[] | null>",
2842
+ "isStatic": false,
2843
+ "isPublic": true
2844
+ },
2845
+ "hasStaleEmbeddings": {
2846
+ "name": "hasStaleEmbeddings",
2847
+ "async": true,
2848
+ "parameters": [],
2849
+ "returnType": "Promise<boolean>",
2850
+ "isStatic": false,
2851
+ "isPublic": true
2852
+ },
2853
+ "clearEmbeddings": {
2854
+ "name": "clearEmbeddings",
2855
+ "async": true,
2856
+ "parameters": [],
2857
+ "returnType": "Promise<void>",
2858
+ "isStatic": false,
2859
+ "isPublic": true
2860
+ },
2861
+ "getSpecification": {
2862
+ "name": "getSpecification",
2863
+ "async": true,
2864
+ "parameters": [
2865
+ {
2866
+ "name": "key",
2867
+ "type": "string",
2868
+ "optional": false
2869
+ }
2870
+ ],
2871
+ "returnType": "Promise<any>",
2872
+ "isStatic": false,
2873
+ "isPublic": true
2874
+ },
2875
+ "updateSpecification": {
2876
+ "name": "updateSpecification",
2877
+ "async": true,
2878
+ "parameters": [
2879
+ {
2880
+ "name": "key",
2881
+ "type": "string",
2882
+ "optional": false
2883
+ },
2884
+ {
2885
+ "name": "value",
2886
+ "type": "any",
2887
+ "optional": false
2888
+ }
2889
+ ],
2890
+ "returnType": "Promise<void>",
2891
+ "isStatic": false,
2892
+ "isPublic": true
2893
+ },
2894
+ "getAssets": {
2895
+ "name": "getAssets",
2896
+ "async": true,
2897
+ "parameters": [
2898
+ {
2899
+ "name": "relationship",
2900
+ "type": "string",
2901
+ "optional": true
2902
+ }
2903
+ ],
2904
+ "returnType": "Promise<Asset[]>",
2905
+ "isStatic": false,
2906
+ "isPublic": true
2907
+ },
2908
+ "addAsset": {
2909
+ "name": "addAsset",
2910
+ "async": true,
2911
+ "parameters": [
2912
+ {
2913
+ "name": "asset",
2914
+ "type": "Asset",
2915
+ "optional": false
2916
+ },
2917
+ {
2918
+ "name": "relationship",
2919
+ "type": "any",
2920
+ "optional": true,
2921
+ "default": "attachment"
2922
+ },
2923
+ {
2924
+ "name": "sortOrder",
2925
+ "type": "any",
2926
+ "optional": true
2927
+ }
2928
+ ],
2929
+ "returnType": "Promise<void>",
2930
+ "isStatic": false,
2931
+ "isPublic": true
2932
+ },
2933
+ "removeAsset": {
2934
+ "name": "removeAsset",
2935
+ "async": true,
2936
+ "parameters": [
2937
+ {
2938
+ "name": "assetId",
2939
+ "type": "string",
2940
+ "optional": false
2941
+ },
2942
+ {
2943
+ "name": "relationship",
2944
+ "type": "string",
2945
+ "optional": true
2946
+ }
2947
+ ],
2948
+ "returnType": "Promise<void>",
2949
+ "isStatic": false,
2950
+ "isPublic": true
2951
+ },
2952
+ "searchByText": {
2953
+ "name": "searchByText",
2954
+ "async": true,
2955
+ "parameters": [
2956
+ {
2957
+ "name": "_query",
2958
+ "type": "string",
2959
+ "optional": false
2960
+ }
2961
+ ],
2962
+ "returnType": "Promise<Product[]>",
2963
+ "isStatic": true,
2964
+ "isPublic": true
2965
+ },
2966
+ "findByManufacturer": {
2967
+ "name": "findByManufacturer",
2968
+ "async": true,
2969
+ "parameters": [
2970
+ {
2971
+ "name": "_manufacturer",
2972
+ "type": "string",
2973
+ "optional": false
2974
+ }
2975
+ ],
2976
+ "returnType": "Promise<Product[]>",
2977
+ "isStatic": true,
2978
+ "isPublic": true
2979
+ }
2980
+ },
2981
+ "decoratorConfig": {
2982
+ "tableStrategy": "sti",
2983
+ "api": {
2984
+ "include": [
2985
+ "list",
2986
+ "get",
2987
+ "create",
2988
+ "update"
2989
+ ]
2990
+ },
2991
+ "mcp": {
2992
+ "include": [
2993
+ "list",
2994
+ "get"
2995
+ ]
2996
+ },
2997
+ "cli": true,
2998
+ "tenantScoped": {
2999
+ "mode": "optional"
3000
+ }
3001
+ },
3002
+ "extends": "SmrtObject",
3003
+ "exportName": "Product",
3004
+ "collectionExportName": "ProductCollection",
3005
+ "validationRules": [
3006
+ {
3007
+ "field": "price",
3008
+ "rule": "required",
3009
+ "fieldType": "integer"
3010
+ },
3011
+ {
3012
+ "field": "inStock",
3013
+ "rule": "required",
3014
+ "fieldType": "boolean"
3015
+ }
3016
+ ],
3017
+ "schema": {
3018
+ "tableName": "products",
3019
+ "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);",
3020
+ "columns": {
3021
+ "id": {
3022
+ "type": "UUID",
3023
+ "primaryKey": true,
3024
+ "referenceKind": "id",
3025
+ "notNull": true
3026
+ },
3027
+ "slug": {
3028
+ "type": "TEXT",
3029
+ "notNull": true
3030
+ },
3031
+ "context": {
3032
+ "type": "TEXT",
3033
+ "notNull": true,
3034
+ "default": ""
3035
+ },
3036
+ "_meta_type": {
3037
+ "type": "TEXT",
3038
+ "notNull": true
3039
+ },
3040
+ "_meta_data": {
3041
+ "type": "JSON",
3042
+ "notNull": false
3043
+ },
3044
+ "created_at": {
3045
+ "type": "TIMESTAMP",
3046
+ "notNull": true,
3047
+ "default": "current_timestamp"
3048
+ },
3049
+ "updated_at": {
3050
+ "type": "TIMESTAMP",
3051
+ "notNull": true,
3052
+ "default": "current_timestamp"
3053
+ },
3054
+ "tenant_id": {
3055
+ "type": "UUID",
3056
+ "referenceKind": "tenantId",
3057
+ "notNull": false
3058
+ },
3059
+ "product_type": {
3060
+ "type": "TEXT",
3061
+ "notNull": false
3062
+ },
3063
+ "name": {
3064
+ "type": "TEXT",
3065
+ "notNull": false
3066
+ },
3067
+ "description": {
3068
+ "type": "TEXT",
3069
+ "notNull": false
3070
+ },
3071
+ "category": {
3072
+ "type": "TEXT",
3073
+ "notNull": false
3074
+ },
3075
+ "manufacturer": {
3076
+ "type": "TEXT",
3077
+ "notNull": false
3078
+ },
3079
+ "model": {
3080
+ "type": "TEXT",
3081
+ "notNull": false
3082
+ },
3083
+ "price": {
3084
+ "type": "INTEGER",
3085
+ "notNull": false,
3086
+ "default": 0
3087
+ },
3088
+ "in_stock": {
3089
+ "type": "BOOLEAN",
3090
+ "notNull": false,
3091
+ "default": true
3092
+ },
3093
+ "specifications": {
3094
+ "type": "JSON",
3095
+ "notNull": false,
3096
+ "default": {}
3097
+ },
3098
+ "tags": {
3099
+ "type": "JSON",
3100
+ "notNull": false,
3101
+ "default": []
3102
+ }
3103
+ },
3104
+ "indexes": [
3105
+ {
3106
+ "name": "products_id_idx",
3107
+ "columns": [
3108
+ "id"
3109
+ ]
3110
+ },
3111
+ {
3112
+ "name": "products_slug_context_meta_type_idx",
3113
+ "columns": [
3114
+ "slug",
3115
+ "context",
3116
+ "_meta_type"
3117
+ ],
3118
+ "unique": true
3119
+ },
3120
+ {
3121
+ "name": "products_meta_type_idx",
3122
+ "columns": [
3123
+ "_meta_type"
3124
+ ]
3125
+ }
3126
+ ],
3127
+ "version": "a7b4d592"
3128
+ }
3129
+ },
3130
+ "@happyvertical/smrt-products:ProductAsset": {
3131
+ "name": "productasset",
3132
+ "className": "ProductAsset",
3133
+ "qualifiedName": "@happyvertical/smrt-products:ProductAsset",
3134
+ "collection": "productassets",
3135
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/models/ProductAsset.ts",
3136
+ "packageName": "@happyvertical/smrt-products",
3137
+ "fields": {
3138
+ "tenantId": {
3139
+ "type": "text",
3140
+ "required": false,
3141
+ "_meta": {
3142
+ "sqlType": "UUID",
3143
+ "nullable": true,
3144
+ "__tenancy": {
3145
+ "isTenantIdField": true,
3146
+ "autoFilter": true,
3147
+ "required": false,
3148
+ "autoPopulate": true,
3149
+ "nullable": true,
3150
+ "mode": "optional",
3151
+ "field": "tenantId",
3152
+ "allowSuperAdminBypass": false
3153
+ }
3154
+ }
3155
+ },
3156
+ "productId": {
3157
+ "type": "foreignKey",
3158
+ "required": true,
3159
+ "related": "Product",
3160
+ "_meta": {
3161
+ "required": true
3162
+ }
3163
+ },
3164
+ "assetId": {
3165
+ "type": "crossPackageRef",
3166
+ "required": true,
3167
+ "related": "@happyvertical/smrt-assets:Asset"
3168
+ },
3169
+ "relationship": {
3170
+ "type": "text",
3171
+ "required": true,
3172
+ "_meta": {
3173
+ "required": true
3174
+ }
3175
+ },
3176
+ "sortOrder": {
3177
+ "type": "integer",
3178
+ "required": true,
3179
+ "default": 0
3180
+ }
3181
+ },
3182
+ "methods": {},
3183
+ "decoratorConfig": {
3184
+ "tableName": "product_assets",
3185
+ "conflictColumns": [
3186
+ "product_id",
3187
+ "asset_id",
3188
+ "relationship",
3189
+ "tenant_id"
3190
+ ],
3191
+ "api": false,
3192
+ "mcp": false,
3193
+ "cli": false,
3194
+ "tenantScoped": {
3195
+ "mode": "optional"
3196
+ }
3197
+ },
3198
+ "extends": "SmrtObject",
3199
+ "exportName": "ProductAsset",
3200
+ "collectionExportName": "ProductAssetCollection",
3201
+ "validationRules": [
3202
+ {
3203
+ "field": "productId",
3204
+ "rule": "required",
3205
+ "fieldType": "foreignKey"
3206
+ },
3207
+ {
3208
+ "field": "assetId",
3209
+ "rule": "required",
3210
+ "fieldType": "crossPackageRef"
3211
+ },
3212
+ {
3213
+ "field": "relationship",
3214
+ "rule": "required",
3215
+ "fieldType": "text"
3216
+ },
3217
+ {
3218
+ "field": "sortOrder",
3219
+ "rule": "required",
3220
+ "fieldType": "integer"
3221
+ }
3222
+ ],
3223
+ "schema": {
3224
+ "tableName": "product_assets",
3225
+ "ddl": "CREATE TABLE IF NOT EXISTS \"product_assets\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_id\" UUID NOT NULL,\n \"asset_id\" UUID NOT NULL,\n \"relationship\" TEXT NOT NULL,\n \"sort_order\" INTEGER NOT NULL DEFAULT 0\n);",
3226
+ "columns": {
3227
+ "id": {
3228
+ "type": "UUID",
3229
+ "primaryKey": true,
3230
+ "referenceKind": "id",
3231
+ "notNull": true
3232
+ },
3233
+ "slug": {
3234
+ "type": "TEXT",
3235
+ "notNull": true
3236
+ },
3237
+ "context": {
3238
+ "type": "TEXT",
3239
+ "notNull": true,
3240
+ "default": ""
3241
+ },
3242
+ "created_at": {
3243
+ "type": "TIMESTAMP",
3244
+ "notNull": true,
3245
+ "default": "current_timestamp"
3246
+ },
3247
+ "updated_at": {
3248
+ "type": "TIMESTAMP",
3249
+ "notNull": true,
3250
+ "default": "current_timestamp"
3251
+ },
3252
+ "tenant_id": {
3253
+ "type": "UUID",
3254
+ "referenceKind": "tenantId",
3255
+ "notNull": false,
3256
+ "unique": false
3257
+ },
3258
+ "product_id": {
3259
+ "type": "UUID",
3260
+ "referenceKind": "foreignKey",
3261
+ "notNull": true,
3262
+ "unique": false
3263
+ },
3264
+ "asset_id": {
3265
+ "type": "UUID",
3266
+ "referenceKind": "crossPackageRef",
3267
+ "notNull": true,
3268
+ "unique": false
3269
+ },
3270
+ "relationship": {
3271
+ "type": "TEXT",
3272
+ "notNull": true,
3273
+ "unique": false
3274
+ },
3275
+ "sort_order": {
3276
+ "type": "INTEGER",
3277
+ "notNull": true,
3278
+ "unique": false,
3279
+ "default": 0
3280
+ }
3281
+ },
3282
+ "indexes": [
3283
+ {
3284
+ "name": "product_assets_id_idx",
3285
+ "columns": [
3286
+ "id"
3287
+ ]
3288
+ },
3289
+ {
3290
+ "name": "product_assets_product_id_asset_id_idx",
3291
+ "columns": [
3292
+ "product_id",
3293
+ "asset_id",
3294
+ "relationship",
3295
+ "tenant_id"
3296
+ ],
3297
+ "unique": true
3298
+ }
3299
+ ],
3300
+ "version": "320e1554"
3301
+ }
3302
+ },
3303
+ "@happyvertical/smrt-products:ProductVariant": {
3304
+ "name": "productvariant",
3305
+ "className": "ProductVariant",
3306
+ "qualifiedName": "@happyvertical/smrt-products:ProductVariant",
3307
+ "collection": "productvariants",
3308
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/models/ProductVariant.ts",
3309
+ "packageName": "@happyvertical/smrt-products",
3310
+ "fields": {
3311
+ "tenantId": {
3312
+ "type": "text",
3313
+ "required": false,
3314
+ "_meta": {
3315
+ "sqlType": "UUID",
3316
+ "nullable": true,
3317
+ "__tenancy": {
3318
+ "isTenantIdField": true,
3319
+ "autoFilter": true,
3320
+ "required": false,
3321
+ "autoPopulate": true,
3322
+ "nullable": true,
3323
+ "mode": "optional",
3324
+ "field": "tenantId",
3325
+ "allowSuperAdminBypass": false
3326
+ }
3327
+ }
3328
+ },
3329
+ "productId": {
3330
+ "type": "text",
3331
+ "required": true,
3332
+ "default": "",
3333
+ "_meta": {
3334
+ "required": true
3335
+ }
3336
+ },
3337
+ "axisName": {
3338
+ "type": "text",
3339
+ "required": true,
3340
+ "default": "",
3341
+ "_meta": {
3342
+ "required": true
3343
+ }
3344
+ },
3345
+ "label": {
3346
+ "type": "text",
3347
+ "required": false,
3348
+ "default": ""
3349
+ },
3350
+ "allowedValues": {
3351
+ "type": "text",
3352
+ "required": false,
3353
+ "default": "[]"
3354
+ },
3355
+ "sortOrder": {
3356
+ "type": "integer",
3357
+ "required": false,
3358
+ "default": 0
3359
+ }
3360
+ },
3361
+ "methods": {
3362
+ "getValues": {
3363
+ "name": "getValues",
3364
+ "async": false,
3365
+ "parameters": [],
3366
+ "returnType": "string[]",
3367
+ "isStatic": false,
3368
+ "isPublic": true
3369
+ },
3370
+ "setValues": {
3371
+ "name": "setValues",
3372
+ "async": false,
3373
+ "parameters": [
3374
+ {
3375
+ "name": "value",
3376
+ "type": "string[] | string",
3377
+ "optional": false
3378
+ }
3379
+ ],
3380
+ "returnType": "void",
3381
+ "isStatic": false,
3382
+ "isPublic": true
3383
+ }
3384
+ },
3385
+ "decoratorConfig": {
3386
+ "tableName": "product_variants",
3387
+ "conflictColumns": [
3388
+ "product_id",
3389
+ "axis_name",
3390
+ "tenant_id"
3391
+ ],
3392
+ "api": {
3393
+ "include": [
3394
+ "list",
3395
+ "get",
3396
+ "create",
3397
+ "update"
3398
+ ]
3399
+ },
3400
+ "mcp": {
3401
+ "include": [
3402
+ "list",
3403
+ "get"
3404
+ ]
3405
+ },
3406
+ "cli": true,
3407
+ "tenantScoped": {
3408
+ "mode": "optional"
3409
+ }
3410
+ },
3411
+ "extends": "SmrtObject",
3412
+ "exportName": "ProductVariant",
3413
+ "collectionExportName": "ProductVariantCollection",
3414
+ "validationRules": [
3415
+ {
3416
+ "field": "productId",
3417
+ "rule": "required",
3418
+ "fieldType": "text"
3419
+ },
3420
+ {
3421
+ "field": "axisName",
3422
+ "rule": "required",
3423
+ "fieldType": "text"
3424
+ }
3425
+ ],
3426
+ "schema": {
3427
+ "tableName": "product_variants",
3428
+ "ddl": "CREATE TABLE IF NOT EXISTS \"product_variants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_id\" TEXT NOT NULL DEFAULT '',\n \"axis_name\" TEXT NOT NULL DEFAULT '',\n \"label\" TEXT DEFAULT '',\n \"allowed_values\" TEXT DEFAULT '[]',\n \"sort_order\" INTEGER DEFAULT 0\n);",
3429
+ "columns": {
3430
+ "id": {
3431
+ "type": "UUID",
3432
+ "primaryKey": true,
3433
+ "referenceKind": "id",
3434
+ "notNull": true
3435
+ },
3436
+ "slug": {
3437
+ "type": "TEXT",
3438
+ "notNull": true
3439
+ },
3440
+ "context": {
3441
+ "type": "TEXT",
3442
+ "notNull": true,
3443
+ "default": ""
3444
+ },
3445
+ "created_at": {
3446
+ "type": "TIMESTAMP",
3447
+ "notNull": true,
3448
+ "default": "current_timestamp"
3449
+ },
3450
+ "updated_at": {
3451
+ "type": "TIMESTAMP",
3452
+ "notNull": true,
3453
+ "default": "current_timestamp"
3454
+ },
3455
+ "tenant_id": {
3456
+ "type": "UUID",
3457
+ "referenceKind": "tenantId",
3458
+ "notNull": false,
3459
+ "unique": false
3460
+ },
3461
+ "product_id": {
3462
+ "type": "TEXT",
3463
+ "notNull": true,
3464
+ "unique": false,
3465
+ "default": ""
3466
+ },
3467
+ "axis_name": {
3468
+ "type": "TEXT",
3469
+ "notNull": true,
3470
+ "unique": false,
3471
+ "default": ""
3472
+ },
3473
+ "label": {
3474
+ "type": "TEXT",
3475
+ "notNull": false,
3476
+ "unique": false,
3477
+ "default": ""
3478
+ },
3479
+ "allowed_values": {
3480
+ "type": "TEXT",
3481
+ "notNull": false,
3482
+ "unique": false,
3483
+ "default": "[]"
3484
+ },
3485
+ "sort_order": {
3486
+ "type": "INTEGER",
3487
+ "notNull": false,
3488
+ "unique": false,
3489
+ "default": 0
3490
+ }
3491
+ },
3492
+ "indexes": [
3493
+ {
3494
+ "name": "product_variants_id_idx",
3495
+ "columns": [
3496
+ "id"
3497
+ ]
3498
+ },
3499
+ {
3500
+ "name": "product_variants_product_id_axis_name_idx",
3501
+ "columns": [
3502
+ "product_id",
3503
+ "axis_name",
3504
+ "tenant_id"
3505
+ ],
3506
+ "unique": true
3507
+ }
3508
+ ],
3509
+ "version": "2891ff02"
3510
+ }
3511
+ },
3512
+ "@happyvertical/smrt-products:Sku": {
3513
+ "name": "sku",
3514
+ "className": "Sku",
3515
+ "qualifiedName": "@happyvertical/smrt-products:Sku",
3516
+ "collection": "skus",
3517
+ "filePath": "/home/runner/_work/smrt/smrt/packages/products/src/lib/models/Sku.ts",
3518
+ "packageName": "@happyvertical/smrt-products",
3519
+ "fields": {
3520
+ "tenantId": {
3521
+ "type": "text",
3522
+ "required": false,
3523
+ "_meta": {
3524
+ "sqlType": "UUID",
3525
+ "nullable": true,
3526
+ "__tenancy": {
3527
+ "isTenantIdField": true,
3528
+ "autoFilter": true,
3529
+ "required": false,
3530
+ "autoPopulate": true,
3531
+ "nullable": true,
3532
+ "mode": "optional",
3533
+ "field": "tenantId",
3534
+ "allowSuperAdminBypass": false
3535
+ }
3536
+ }
3537
+ },
3538
+ "productId": {
3539
+ "type": "text",
3540
+ "required": true,
3541
+ "default": "",
3542
+ "_meta": {
3543
+ "required": true
3544
+ }
3545
+ },
3546
+ "code": {
3547
+ "type": "text",
3548
+ "required": true,
3549
+ "default": "",
3550
+ "_meta": {
3551
+ "required": true
3552
+ }
3553
+ },
3554
+ "barcode": {
3555
+ "type": "text",
3556
+ "required": false,
3557
+ "default": ""
3558
+ },
3559
+ "name": {
3560
+ "type": "text",
3561
+ "required": false,
3562
+ "default": ""
3563
+ },
3564
+ "attributes": {
3565
+ "type": "text",
3566
+ "required": false,
3567
+ "default": "{}"
3568
+ },
3569
+ "weightGrams": {
3570
+ "type": "decimal",
3571
+ "required": false,
3572
+ "_meta": {}
3573
+ },
3574
+ "parentSkuId": {
3575
+ "type": "text",
3576
+ "required": false,
3577
+ "default": ""
3578
+ },
3579
+ "active": {
3580
+ "type": "boolean",
3581
+ "required": false,
3582
+ "default": true
3583
+ }
3584
+ },
3585
+ "methods": {
3586
+ "getAttributes": {
3587
+ "name": "getAttributes",
3588
+ "async": false,
3589
+ "parameters": [],
3590
+ "returnType": "Record<string>",
3591
+ "isStatic": false,
3592
+ "isPublic": true
3593
+ },
3594
+ "setAttributes": {
3595
+ "name": "setAttributes",
3596
+ "async": false,
3597
+ "parameters": [
3598
+ {
3599
+ "name": "value",
3600
+ "type": "Record<string> | string",
3601
+ "optional": false
3602
+ }
3603
+ ],
3604
+ "returnType": "void",
3605
+ "isStatic": false,
3606
+ "isPublic": true
3607
+ }
3608
+ },
3609
+ "decoratorConfig": {
3610
+ "tableName": "product_skus",
3611
+ "conflictColumns": [
3612
+ "code",
3613
+ "tenant_id"
3614
+ ],
3615
+ "api": {
3616
+ "include": [
3617
+ "list",
3618
+ "get",
3619
+ "create",
3620
+ "update"
3621
+ ]
3622
+ },
3623
+ "mcp": {
3624
+ "include": [
3625
+ "list",
3626
+ "get"
3627
+ ]
3628
+ },
3629
+ "cli": true,
3630
+ "tenantScoped": {
3631
+ "mode": "optional"
3632
+ }
3633
+ },
3634
+ "extends": "SmrtObject",
3635
+ "exportName": "Sku",
3636
+ "collectionExportName": "SkuCollection",
3637
+ "validationRules": [
3638
+ {
3639
+ "field": "productId",
3640
+ "rule": "required",
3641
+ "fieldType": "text"
3642
+ },
3643
+ {
3644
+ "field": "code",
3645
+ "rule": "required",
3646
+ "fieldType": "text"
3647
+ }
3648
+ ],
3649
+ "schema": {
3650
+ "tableName": "product_skus",
3651
+ "ddl": "CREATE TABLE IF NOT EXISTS \"product_skus\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_id\" TEXT NOT NULL DEFAULT '',\n \"code\" TEXT NOT NULL DEFAULT '',\n \"barcode\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"attributes\" TEXT DEFAULT '{}',\n \"weight_grams\" REAL,\n \"parent_sku_id\" TEXT DEFAULT '',\n \"active\" BOOLEAN DEFAULT TRUE\n);",
3652
+ "columns": {
3653
+ "id": {
3654
+ "type": "UUID",
3655
+ "primaryKey": true,
3656
+ "referenceKind": "id",
3657
+ "notNull": true
3658
+ },
3659
+ "slug": {
3660
+ "type": "TEXT",
3661
+ "notNull": true
3662
+ },
3663
+ "context": {
3664
+ "type": "TEXT",
3665
+ "notNull": true,
3666
+ "default": ""
3667
+ },
3668
+ "created_at": {
3669
+ "type": "TIMESTAMP",
3670
+ "notNull": true,
3671
+ "default": "current_timestamp"
3672
+ },
3673
+ "updated_at": {
3674
+ "type": "TIMESTAMP",
3675
+ "notNull": true,
3676
+ "default": "current_timestamp"
3677
+ },
3678
+ "tenant_id": {
3679
+ "type": "UUID",
3680
+ "referenceKind": "tenantId",
3681
+ "notNull": false,
3682
+ "unique": false
3683
+ },
3684
+ "product_id": {
3685
+ "type": "TEXT",
3686
+ "notNull": true,
3687
+ "unique": false,
3688
+ "default": ""
3689
+ },
3690
+ "code": {
3691
+ "type": "TEXT",
3692
+ "notNull": true,
3693
+ "unique": false,
3694
+ "default": ""
3695
+ },
3696
+ "barcode": {
3697
+ "type": "TEXT",
3698
+ "notNull": false,
3699
+ "unique": false,
3700
+ "default": ""
3701
+ },
3702
+ "name": {
3703
+ "type": "TEXT",
3704
+ "notNull": false,
3705
+ "unique": false,
3706
+ "default": ""
3707
+ },
3708
+ "attributes": {
3709
+ "type": "TEXT",
3710
+ "notNull": false,
3711
+ "unique": false,
3712
+ "default": "{}"
3713
+ },
3714
+ "weight_grams": {
3715
+ "type": "REAL",
3716
+ "notNull": false,
3717
+ "unique": false
3718
+ },
3719
+ "parent_sku_id": {
3720
+ "type": "TEXT",
3721
+ "notNull": false,
3722
+ "unique": false,
3723
+ "default": ""
3724
+ },
3725
+ "active": {
3726
+ "type": "BOOLEAN",
3727
+ "notNull": false,
3728
+ "unique": false,
3729
+ "default": true
3730
+ }
3731
+ },
3732
+ "indexes": [
3733
+ {
3734
+ "name": "product_skus_id_idx",
3735
+ "columns": [
3736
+ "id"
3737
+ ]
3738
+ },
3739
+ {
3740
+ "name": "product_skus_code_tenant_id_idx",
3741
+ "columns": [
3742
+ "code",
3743
+ "tenant_id"
3744
+ ],
3745
+ "unique": true
3746
+ }
3747
+ ],
3748
+ "version": "89d5a311"
3749
+ }
3750
+ }
3751
+ },
3752
+ "moduleType": "smrt",
3753
+ "smrtDependencies": [
3754
+ "@happyvertical/smrt-assets",
3755
+ "@happyvertical/smrt-core",
3756
+ "@happyvertical/smrt-tenancy"
3757
+ ]
3758
+ }