@happyvertical/smrt-manufacturing 0.51.8 → 0.51.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,67 +2,120 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-manufacturing",
5
- "packageVersion": "0.51.8",
5
+ "packageVersion": "0.51.10",
6
6
  "objects": {
7
- "@happyvertical/smrt-manufacturing:BillOfMaterialsCollection": {
8
- "name": "billofmaterialscollection",
9
- "className": "BillOfMaterialsCollection",
10
- "qualifiedName": "@happyvertical/smrt-manufacturing:BillOfMaterialsCollection",
7
+ "@happyvertical/smrt-manufacturing:BillOfMaterials": {
8
+ "name": "billofmaterials",
9
+ "className": "BillOfMaterials",
10
+ "qualifiedName": "@happyvertical/smrt-manufacturing:BillOfMaterials",
11
11
  "collection": "billofmaterialses",
12
- "filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/collections/BillOfMaterialsCollection.ts",
12
+ "filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/models/BillOfMaterials.ts",
13
13
  "packageName": "@happyvertical/smrt-manufacturing",
14
- "fields": {},
15
- "methods": {
16
- "findByProduct": {
17
- "name": "findByProduct",
18
- "async": true,
19
- "parameters": [
20
- {
21
- "name": "productId",
22
- "type": "string",
23
- "optional": false
14
+ "fields": {
15
+ "tenantId": {
16
+ "type": "text",
17
+ "required": false,
18
+ "_meta": {
19
+ "sqlType": "UUID",
20
+ "nullable": true,
21
+ "__tenancy": {
22
+ "isTenantIdField": true,
23
+ "autoFilter": true,
24
+ "required": false,
25
+ "autoPopulate": true,
26
+ "nullable": true,
27
+ "mode": "optional",
28
+ "field": "tenantId",
29
+ "allowSuperAdminBypass": false
24
30
  }
25
- ],
26
- "returnType": "Promise<BillOfMaterials[]>",
27
- "isStatic": false,
28
- "isPublic": true
31
+ }
29
32
  },
30
- "findActiveForProduct": {
31
- "name": "findActiveForProduct",
32
- "async": true,
33
- "parameters": [
34
- {
35
- "name": "productId",
36
- "type": "string",
37
- "optional": false
38
- }
39
- ],
40
- "returnType": "Promise<BillOfMaterials | null>",
41
- "isStatic": false,
42
- "isPublic": true
33
+ "productId": {
34
+ "type": "text",
35
+ "required": true,
36
+ "default": "",
37
+ "_meta": {
38
+ "required": true
39
+ }
43
40
  },
44
- "findByStatus": {
45
- "name": "findByStatus",
46
- "async": true,
47
- "parameters": [
48
- {
49
- "name": "status",
50
- "type": "BomStatus",
51
- "optional": false
52
- }
53
- ],
54
- "returnType": "Promise<BillOfMaterials[]>",
55
- "isStatic": false,
56
- "isPublic": true
41
+ "version": {
42
+ "type": "integer",
43
+ "required": true,
44
+ "default": 1,
45
+ "_meta": {
46
+ "required": true
47
+ }
48
+ },
49
+ "effectiveDate": {
50
+ "type": "datetime",
51
+ "required": false
52
+ },
53
+ "status": {
54
+ "type": "text",
55
+ "required": true,
56
+ "default": "draft",
57
+ "_meta": {
58
+ "required": true
59
+ }
60
+ },
61
+ "notes": {
62
+ "type": "text",
63
+ "required": false,
64
+ "default": ""
65
+ },
66
+ "currency": {
67
+ "type": "text",
68
+ "required": false,
69
+ "default": "USD"
57
70
  }
58
71
  },
72
+ "methods": {},
59
73
  "decoratorConfig": {
60
- "tableName": "manufacturing_boms"
74
+ "tableName": "manufacturing_boms",
75
+ "conflictColumns": [
76
+ "product_id",
77
+ "version",
78
+ "tenant_id"
79
+ ],
80
+ "api": {
81
+ "include": [
82
+ "list",
83
+ "get",
84
+ "create",
85
+ "update"
86
+ ]
87
+ },
88
+ "mcp": {
89
+ "include": [
90
+ "list",
91
+ "get"
92
+ ]
93
+ },
94
+ "cli": true,
95
+ "tenantScoped": {
96
+ "mode": "optional"
97
+ }
61
98
  },
62
- "extends": "SmrtCollection",
63
- "extendsTypeArg": "BillOfMaterials",
64
- "exportName": "BillOfMaterialsCollection",
65
- "collectionExportName": "BillOfMaterialsCollectionCollection",
99
+ "extends": "SmrtObject",
100
+ "exportName": "BillOfMaterials",
101
+ "collectionExportName": "BillOfMaterialsCollection",
102
+ "validationRules": [
103
+ {
104
+ "field": "productId",
105
+ "rule": "required",
106
+ "fieldType": "text"
107
+ },
108
+ {
109
+ "field": "version",
110
+ "rule": "required",
111
+ "fieldType": "integer"
112
+ },
113
+ {
114
+ "field": "status",
115
+ "rule": "required",
116
+ "fieldType": "text"
117
+ }
118
+ ],
66
119
  "schema": {
67
120
  "tableName": "manufacturing_boms",
68
121
  "ddl": "CREATE TABLE IF NOT EXISTS \"manufacturing_boms\" (\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 \"version\" INTEGER NOT NULL DEFAULT 1,\n \"effective_date\" TIMESTAMP,\n \"status\" TEXT NOT NULL DEFAULT 'draft',\n \"notes\" TEXT DEFAULT '',\n \"currency\" TEXT DEFAULT 'USD'\n);",
@@ -164,54 +217,125 @@
164
217
  },
165
218
  "importPath": "@happyvertical/smrt-manufacturing"
166
219
  },
167
- "@happyvertical/smrt-manufacturing:BomLineCollection": {
168
- "name": "bomlinecollection",
169
- "className": "BomLineCollection",
170
- "qualifiedName": "@happyvertical/smrt-manufacturing:BomLineCollection",
220
+ "@happyvertical/smrt-manufacturing:BomLine": {
221
+ "name": "bomline",
222
+ "className": "BomLine",
223
+ "qualifiedName": "@happyvertical/smrt-manufacturing:BomLine",
171
224
  "collection": "bomlines",
172
- "filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/collections/BomLineCollection.ts",
225
+ "filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/models/BomLine.ts",
173
226
  "packageName": "@happyvertical/smrt-manufacturing",
174
- "fields": {},
175
- "methods": {
176
- "findByBom": {
177
- "name": "findByBom",
178
- "async": true,
179
- "parameters": [
180
- {
181
- "name": "bomId",
182
- "type": "string",
183
- "optional": false
227
+ "fields": {
228
+ "tenantId": {
229
+ "type": "text",
230
+ "required": false,
231
+ "_meta": {
232
+ "sqlType": "UUID",
233
+ "nullable": true,
234
+ "__tenancy": {
235
+ "isTenantIdField": true,
236
+ "autoFilter": true,
237
+ "required": false,
238
+ "autoPopulate": true,
239
+ "nullable": true,
240
+ "mode": "optional",
241
+ "field": "tenantId",
242
+ "allowSuperAdminBypass": false
184
243
  }
185
- ],
186
- "returnType": "Promise<BomLine[]>",
187
- "isStatic": false,
188
- "isPublic": true
244
+ }
189
245
  },
190
- "findByComponent": {
191
- "name": "findByComponent",
192
- "async": true,
193
- "parameters": [
194
- {
195
- "name": "componentSkuId",
196
- "type": "string",
197
- "optional": false
198
- }
199
- ],
200
- "returnType": "Promise<BomLine[]>",
246
+ "bomId": {
247
+ "type": "text",
248
+ "required": true,
249
+ "default": "",
250
+ "_meta": {
251
+ "required": true
252
+ }
253
+ },
254
+ "componentSkuId": {
255
+ "type": "text",
256
+ "required": true,
257
+ "default": "",
258
+ "_meta": {
259
+ "required": true
260
+ }
261
+ },
262
+ "qtyPerUnit": {
263
+ "type": "decimal",
264
+ "required": false,
265
+ "_meta": {}
266
+ },
267
+ "uom": {
268
+ "type": "text",
269
+ "required": false,
270
+ "default": "each"
271
+ },
272
+ "wastePercent": {
273
+ "type": "decimal",
274
+ "required": false,
275
+ "_meta": {}
276
+ },
277
+ "notes": {
278
+ "type": "text",
279
+ "required": false,
280
+ "default": ""
281
+ }
282
+ },
283
+ "methods": {
284
+ "effectiveQtyPerUnit": {
285
+ "name": "effectiveQtyPerUnit",
286
+ "async": false,
287
+ "parameters": [],
288
+ "returnType": "number",
201
289
  "isStatic": false,
202
290
  "isPublic": true
203
291
  }
204
292
  },
205
293
  "decoratorConfig": {
206
- "tableName": "manufacturing_bom_lines"
207
- },
208
- "extends": "SmrtCollection",
209
- "extendsTypeArg": "BomLine",
210
- "exportName": "BomLineCollection",
211
- "collectionExportName": "BomLineCollectionCollection",
212
- "schema": {
213
294
  "tableName": "manufacturing_bom_lines",
214
- "ddl": "CREATE TABLE IF NOT EXISTS \"manufacturing_bom_lines\" (\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 \"bom_id\" TEXT NOT NULL DEFAULT '',\n \"component_sku_id\" TEXT NOT NULL DEFAULT '',\n \"qty_per_unit\" REAL,\n \"uom\" TEXT DEFAULT 'each',\n \"waste_percent\" REAL,\n \"notes\" TEXT DEFAULT ''\n);",
295
+ "conflictColumns": [
296
+ "bom_id",
297
+ "component_sku_id",
298
+ "tenant_id"
299
+ ],
300
+ "api": {
301
+ "include": [
302
+ "list",
303
+ "get",
304
+ "create",
305
+ "update"
306
+ ]
307
+ },
308
+ "mcp": {
309
+ "include": [
310
+ "list",
311
+ "get"
312
+ ]
313
+ },
314
+ "cli": {
315
+ "skipApiCheck": true
316
+ },
317
+ "tenantScoped": {
318
+ "mode": "optional"
319
+ }
320
+ },
321
+ "extends": "SmrtObject",
322
+ "exportName": "BomLine",
323
+ "collectionExportName": "BomLineCollection",
324
+ "validationRules": [
325
+ {
326
+ "field": "bomId",
327
+ "rule": "required",
328
+ "fieldType": "text"
329
+ },
330
+ {
331
+ "field": "componentSkuId",
332
+ "rule": "required",
333
+ "fieldType": "text"
334
+ }
335
+ ],
336
+ "schema": {
337
+ "tableName": "manufacturing_bom_lines",
338
+ "ddl": "CREATE TABLE IF NOT EXISTS \"manufacturing_bom_lines\" (\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 \"bom_id\" TEXT NOT NULL DEFAULT '',\n \"component_sku_id\" TEXT NOT NULL DEFAULT '',\n \"qty_per_unit\" REAL,\n \"uom\" TEXT DEFAULT 'each',\n \"waste_percent\" REAL,\n \"notes\" TEXT DEFAULT ''\n);",
215
339
  "columns": {
216
340
  "id": {
217
341
  "type": "UUID",
@@ -309,118 +433,65 @@
309
433
  },
310
434
  "importPath": "@happyvertical/smrt-manufacturing"
311
435
  },
312
- "@happyvertical/smrt-manufacturing:BillOfMaterials": {
313
- "name": "billofmaterials",
314
- "className": "BillOfMaterials",
315
- "qualifiedName": "@happyvertical/smrt-manufacturing:BillOfMaterials",
436
+ "@happyvertical/smrt-manufacturing:BillOfMaterialsCollection": {
437
+ "name": "billofmaterialscollection",
438
+ "className": "BillOfMaterialsCollection",
439
+ "qualifiedName": "@happyvertical/smrt-manufacturing:BillOfMaterialsCollection",
316
440
  "collection": "billofmaterialses",
317
- "filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/models/BillOfMaterials.ts",
441
+ "filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/collections/BillOfMaterialsCollection.ts",
318
442
  "packageName": "@happyvertical/smrt-manufacturing",
319
- "fields": {
320
- "tenantId": {
321
- "type": "text",
322
- "required": false,
323
- "_meta": {
324
- "sqlType": "UUID",
325
- "nullable": true,
326
- "__tenancy": {
327
- "isTenantIdField": true,
328
- "autoFilter": true,
329
- "required": false,
330
- "autoPopulate": true,
331
- "nullable": true,
332
- "mode": "optional",
333
- "field": "tenantId",
334
- "allowSuperAdminBypass": false
443
+ "fields": {},
444
+ "methods": {
445
+ "findByProduct": {
446
+ "name": "findByProduct",
447
+ "async": true,
448
+ "parameters": [
449
+ {
450
+ "name": "productId",
451
+ "type": "string",
452
+ "optional": false
335
453
  }
336
- }
337
- },
338
- "productId": {
339
- "type": "text",
340
- "required": true,
341
- "default": "",
342
- "_meta": {
343
- "required": true
344
- }
345
- },
346
- "version": {
347
- "type": "integer",
348
- "required": true,
349
- "default": 1,
350
- "_meta": {
351
- "required": true
352
- }
353
- },
354
- "effectiveDate": {
355
- "type": "datetime",
356
- "required": false
357
- },
358
- "status": {
359
- "type": "text",
360
- "required": true,
361
- "default": "draft",
362
- "_meta": {
363
- "required": true
364
- }
454
+ ],
455
+ "returnType": "Promise<BillOfMaterials[]>",
456
+ "isStatic": false,
457
+ "isPublic": true
365
458
  },
366
- "notes": {
367
- "type": "text",
368
- "required": false,
369
- "default": ""
459
+ "findActiveForProduct": {
460
+ "name": "findActiveForProduct",
461
+ "async": true,
462
+ "parameters": [
463
+ {
464
+ "name": "productId",
465
+ "type": "string",
466
+ "optional": false
467
+ }
468
+ ],
469
+ "returnType": "Promise<BillOfMaterials | null>",
470
+ "isStatic": false,
471
+ "isPublic": true
370
472
  },
371
- "currency": {
372
- "type": "text",
373
- "required": false,
374
- "default": "USD"
473
+ "findByStatus": {
474
+ "name": "findByStatus",
475
+ "async": true,
476
+ "parameters": [
477
+ {
478
+ "name": "status",
479
+ "type": "BomStatus",
480
+ "optional": false
481
+ }
482
+ ],
483
+ "returnType": "Promise<BillOfMaterials[]>",
484
+ "isStatic": false,
485
+ "isPublic": true
375
486
  }
376
487
  },
377
- "methods": {},
378
488
  "decoratorConfig": {
379
- "tableName": "manufacturing_boms",
380
- "conflictColumns": [
381
- "product_id",
382
- "version",
383
- "tenant_id"
384
- ],
385
- "api": {
386
- "include": [
387
- "list",
388
- "get",
389
- "create",
390
- "update"
391
- ]
392
- },
393
- "mcp": {
394
- "include": [
395
- "list",
396
- "get"
397
- ]
398
- },
399
- "cli": true,
400
- "tenantScoped": {
401
- "mode": "optional"
402
- }
489
+ "tableName": "manufacturing_boms"
403
490
  },
404
- "extends": "SmrtObject",
405
- "exportName": "BillOfMaterials",
406
- "collectionExportName": "BillOfMaterialsCollection",
407
- "validationRules": [
408
- {
409
- "field": "productId",
410
- "rule": "required",
411
- "fieldType": "text"
412
- },
413
- {
414
- "field": "version",
415
- "rule": "required",
416
- "fieldType": "integer"
417
- },
418
- {
419
- "field": "status",
420
- "rule": "required",
421
- "fieldType": "text"
422
- }
423
- ],
491
+ "extends": "SmrtCollection",
492
+ "extendsTypeArg": "BillOfMaterials",
493
+ "exportName": "BillOfMaterialsCollection",
494
+ "collectionExportName": "BillOfMaterialsCollectionCollection",
424
495
  "schema": {
425
496
  "tableName": "manufacturing_boms",
426
497
  "ddl": "CREATE TABLE IF NOT EXISTS \"manufacturing_boms\" (\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 \"version\" INTEGER NOT NULL DEFAULT 1,\n \"effective_date\" TIMESTAMP,\n \"status\" TEXT NOT NULL DEFAULT 'draft',\n \"notes\" TEXT DEFAULT '',\n \"currency\" TEXT DEFAULT 'USD'\n);",
@@ -522,122 +593,51 @@
522
593
  },
523
594
  "importPath": "@happyvertical/smrt-manufacturing"
524
595
  },
525
- "@happyvertical/smrt-manufacturing:BomLine": {
526
- "name": "bomline",
527
- "className": "BomLine",
528
- "qualifiedName": "@happyvertical/smrt-manufacturing:BomLine",
596
+ "@happyvertical/smrt-manufacturing:BomLineCollection": {
597
+ "name": "bomlinecollection",
598
+ "className": "BomLineCollection",
599
+ "qualifiedName": "@happyvertical/smrt-manufacturing:BomLineCollection",
529
600
  "collection": "bomlines",
530
- "filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/models/BomLine.ts",
601
+ "filePath": "/home/runner/work/smrt/smrt/packages/manufacturing/src/collections/BomLineCollection.ts",
531
602
  "packageName": "@happyvertical/smrt-manufacturing",
532
- "fields": {
533
- "tenantId": {
534
- "type": "text",
535
- "required": false,
536
- "_meta": {
537
- "sqlType": "UUID",
538
- "nullable": true,
539
- "__tenancy": {
540
- "isTenantIdField": true,
541
- "autoFilter": true,
542
- "required": false,
543
- "autoPopulate": true,
544
- "nullable": true,
545
- "mode": "optional",
546
- "field": "tenantId",
547
- "allowSuperAdminBypass": false
603
+ "fields": {},
604
+ "methods": {
605
+ "findByBom": {
606
+ "name": "findByBom",
607
+ "async": true,
608
+ "parameters": [
609
+ {
610
+ "name": "bomId",
611
+ "type": "string",
612
+ "optional": false
548
613
  }
549
- }
550
- },
551
- "bomId": {
552
- "type": "text",
553
- "required": true,
554
- "default": "",
555
- "_meta": {
556
- "required": true
557
- }
558
- },
559
- "componentSkuId": {
560
- "type": "text",
561
- "required": true,
562
- "default": "",
563
- "_meta": {
564
- "required": true
565
- }
566
- },
567
- "qtyPerUnit": {
568
- "type": "decimal",
569
- "required": false,
570
- "_meta": {}
571
- },
572
- "uom": {
573
- "type": "text",
574
- "required": false,
575
- "default": "each"
576
- },
577
- "wastePercent": {
578
- "type": "decimal",
579
- "required": false,
580
- "_meta": {}
614
+ ],
615
+ "returnType": "Promise<BomLine[]>",
616
+ "isStatic": false,
617
+ "isPublic": true
581
618
  },
582
- "notes": {
583
- "type": "text",
584
- "required": false,
585
- "default": ""
586
- }
587
- },
588
- "methods": {
589
- "effectiveQtyPerUnit": {
590
- "name": "effectiveQtyPerUnit",
591
- "async": false,
592
- "parameters": [],
593
- "returnType": "number",
619
+ "findByComponent": {
620
+ "name": "findByComponent",
621
+ "async": true,
622
+ "parameters": [
623
+ {
624
+ "name": "componentSkuId",
625
+ "type": "string",
626
+ "optional": false
627
+ }
628
+ ],
629
+ "returnType": "Promise<BomLine[]>",
594
630
  "isStatic": false,
595
631
  "isPublic": true
596
632
  }
597
633
  },
598
634
  "decoratorConfig": {
599
- "tableName": "manufacturing_bom_lines",
600
- "conflictColumns": [
601
- "bom_id",
602
- "component_sku_id",
603
- "tenant_id"
604
- ],
605
- "api": {
606
- "include": [
607
- "list",
608
- "get",
609
- "create",
610
- "update"
611
- ]
612
- },
613
- "mcp": {
614
- "include": [
615
- "list",
616
- "get"
617
- ]
618
- },
619
- "cli": {
620
- "skipApiCheck": true
621
- },
622
- "tenantScoped": {
623
- "mode": "optional"
624
- }
635
+ "tableName": "manufacturing_bom_lines"
625
636
  },
626
- "extends": "SmrtObject",
627
- "exportName": "BomLine",
628
- "collectionExportName": "BomLineCollection",
629
- "validationRules": [
630
- {
631
- "field": "bomId",
632
- "rule": "required",
633
- "fieldType": "text"
634
- },
635
- {
636
- "field": "componentSkuId",
637
- "rule": "required",
638
- "fieldType": "text"
639
- }
640
- ],
637
+ "extends": "SmrtCollection",
638
+ "extendsTypeArg": "BomLine",
639
+ "exportName": "BomLineCollection",
640
+ "collectionExportName": "BomLineCollectionCollection",
641
641
  "schema": {
642
642
  "tableName": "manufacturing_bom_lines",
643
643
  "ddl": "CREATE TABLE IF NOT EXISTS \"manufacturing_bom_lines\" (\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 \"bom_id\" TEXT NOT NULL DEFAULT '',\n \"component_sku_id\" TEXT NOT NULL DEFAULT '',\n \"qty_per_unit\" REAL,\n \"uom\" TEXT DEFAULT 'each',\n \"waste_percent\" REAL,\n \"notes\" TEXT DEFAULT ''\n);",