@happyvertical/smrt-manufacturing 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.
@@ -0,0 +1,623 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 1782177083281,
4
+ "packageName": "@happyvertical/smrt-manufacturing",
5
+ "packageVersion": "0.30.0",
6
+ "objects": {
7
+ "@happyvertical/smrt-manufacturing:BillOfMaterialsCollection": {
8
+ "name": "billofmaterialscollection",
9
+ "className": "BillOfMaterialsCollection",
10
+ "qualifiedName": "@happyvertical/smrt-manufacturing:BillOfMaterialsCollection",
11
+ "collection": "billofmaterialses",
12
+ "filePath": "/home/runner/_work/smrt/smrt/packages/manufacturing/src/collections/BillOfMaterialsCollection.ts",
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
24
+ }
25
+ ],
26
+ "returnType": "Promise<BillOfMaterials[]>",
27
+ "isStatic": false,
28
+ "isPublic": true
29
+ },
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
43
+ },
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
57
+ }
58
+ },
59
+ "decoratorConfig": {
60
+ "tableName": "manufacturing_boms"
61
+ },
62
+ "extends": "SmrtCollection",
63
+ "extendsTypeArg": "BillOfMaterials",
64
+ "exportName": "BillOfMaterialsCollection",
65
+ "collectionExportName": "BillOfMaterialsCollectionCollection",
66
+ "schema": {
67
+ "tableName": "manufacturing_boms",
68
+ "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);",
69
+ "columns": {
70
+ "id": {
71
+ "type": "UUID",
72
+ "primaryKey": true,
73
+ "referenceKind": "id",
74
+ "notNull": true
75
+ },
76
+ "slug": {
77
+ "type": "TEXT",
78
+ "notNull": true
79
+ },
80
+ "context": {
81
+ "type": "TEXT",
82
+ "notNull": true,
83
+ "default": ""
84
+ },
85
+ "created_at": {
86
+ "type": "TIMESTAMP",
87
+ "notNull": true,
88
+ "default": "current_timestamp"
89
+ },
90
+ "updated_at": {
91
+ "type": "TIMESTAMP",
92
+ "notNull": true,
93
+ "default": "current_timestamp"
94
+ }
95
+ },
96
+ "indexes": [
97
+ {
98
+ "name": "manufacturing_boms_id_idx",
99
+ "columns": [
100
+ "id"
101
+ ]
102
+ },
103
+ {
104
+ "name": "manufacturing_boms_slug_context_idx",
105
+ "columns": [
106
+ "slug",
107
+ "context"
108
+ ],
109
+ "unique": true
110
+ }
111
+ ],
112
+ "version": "ac053b14"
113
+ }
114
+ },
115
+ "@happyvertical/smrt-manufacturing:BomLineCollection": {
116
+ "name": "bomlinecollection",
117
+ "className": "BomLineCollection",
118
+ "qualifiedName": "@happyvertical/smrt-manufacturing:BomLineCollection",
119
+ "collection": "bomlines",
120
+ "filePath": "/home/runner/_work/smrt/smrt/packages/manufacturing/src/collections/BomLineCollection.ts",
121
+ "packageName": "@happyvertical/smrt-manufacturing",
122
+ "fields": {},
123
+ "methods": {
124
+ "findByBom": {
125
+ "name": "findByBom",
126
+ "async": true,
127
+ "parameters": [
128
+ {
129
+ "name": "bomId",
130
+ "type": "string",
131
+ "optional": false
132
+ }
133
+ ],
134
+ "returnType": "Promise<BomLine[]>",
135
+ "isStatic": false,
136
+ "isPublic": true
137
+ },
138
+ "findByComponent": {
139
+ "name": "findByComponent",
140
+ "async": true,
141
+ "parameters": [
142
+ {
143
+ "name": "componentSkuId",
144
+ "type": "string",
145
+ "optional": false
146
+ }
147
+ ],
148
+ "returnType": "Promise<BomLine[]>",
149
+ "isStatic": false,
150
+ "isPublic": true
151
+ }
152
+ },
153
+ "decoratorConfig": {
154
+ "tableName": "manufacturing_bom_lines"
155
+ },
156
+ "extends": "SmrtCollection",
157
+ "extendsTypeArg": "BomLine",
158
+ "exportName": "BomLineCollection",
159
+ "collectionExportName": "BomLineCollectionCollection",
160
+ "schema": {
161
+ "tableName": "manufacturing_bom_lines",
162
+ "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);",
163
+ "columns": {
164
+ "id": {
165
+ "type": "UUID",
166
+ "primaryKey": true,
167
+ "referenceKind": "id",
168
+ "notNull": true
169
+ },
170
+ "slug": {
171
+ "type": "TEXT",
172
+ "notNull": true
173
+ },
174
+ "context": {
175
+ "type": "TEXT",
176
+ "notNull": true,
177
+ "default": ""
178
+ },
179
+ "created_at": {
180
+ "type": "TIMESTAMP",
181
+ "notNull": true,
182
+ "default": "current_timestamp"
183
+ },
184
+ "updated_at": {
185
+ "type": "TIMESTAMP",
186
+ "notNull": true,
187
+ "default": "current_timestamp"
188
+ }
189
+ },
190
+ "indexes": [
191
+ {
192
+ "name": "manufacturing_bom_lines_id_idx",
193
+ "columns": [
194
+ "id"
195
+ ]
196
+ },
197
+ {
198
+ "name": "manufacturing_bom_lines_slug_context_idx",
199
+ "columns": [
200
+ "slug",
201
+ "context"
202
+ ],
203
+ "unique": true
204
+ }
205
+ ],
206
+ "version": "9b18ab50"
207
+ }
208
+ },
209
+ "@happyvertical/smrt-manufacturing:BillOfMaterials": {
210
+ "name": "billofmaterials",
211
+ "className": "BillOfMaterials",
212
+ "qualifiedName": "@happyvertical/smrt-manufacturing:BillOfMaterials",
213
+ "collection": "billofmaterialses",
214
+ "filePath": "/home/runner/_work/smrt/smrt/packages/manufacturing/src/models/BillOfMaterials.ts",
215
+ "packageName": "@happyvertical/smrt-manufacturing",
216
+ "fields": {
217
+ "tenantId": {
218
+ "type": "text",
219
+ "required": false,
220
+ "_meta": {
221
+ "sqlType": "UUID",
222
+ "nullable": true,
223
+ "__tenancy": {
224
+ "isTenantIdField": true,
225
+ "autoFilter": true,
226
+ "required": false,
227
+ "autoPopulate": true,
228
+ "nullable": true,
229
+ "mode": "optional",
230
+ "field": "tenantId",
231
+ "allowSuperAdminBypass": false
232
+ }
233
+ }
234
+ },
235
+ "productId": {
236
+ "type": "text",
237
+ "required": true,
238
+ "default": "",
239
+ "_meta": {
240
+ "required": true
241
+ }
242
+ },
243
+ "version": {
244
+ "type": "integer",
245
+ "required": true,
246
+ "default": 1,
247
+ "_meta": {
248
+ "required": true
249
+ }
250
+ },
251
+ "effectiveDate": {
252
+ "type": "datetime",
253
+ "required": false
254
+ },
255
+ "status": {
256
+ "type": "text",
257
+ "required": true,
258
+ "default": "draft",
259
+ "_meta": {
260
+ "required": true
261
+ }
262
+ },
263
+ "notes": {
264
+ "type": "text",
265
+ "required": false,
266
+ "default": ""
267
+ },
268
+ "currency": {
269
+ "type": "text",
270
+ "required": false,
271
+ "default": "USD"
272
+ }
273
+ },
274
+ "methods": {},
275
+ "decoratorConfig": {
276
+ "tableName": "manufacturing_boms",
277
+ "conflictColumns": [
278
+ "product_id",
279
+ "version",
280
+ "tenant_id"
281
+ ],
282
+ "api": {
283
+ "include": [
284
+ "list",
285
+ "get",
286
+ "create",
287
+ "update"
288
+ ]
289
+ },
290
+ "mcp": {
291
+ "include": [
292
+ "list",
293
+ "get"
294
+ ]
295
+ },
296
+ "cli": true,
297
+ "tenantScoped": {
298
+ "mode": "optional"
299
+ }
300
+ },
301
+ "extends": "SmrtObject",
302
+ "exportName": "BillOfMaterials",
303
+ "collectionExportName": "BillOfMaterialsCollection",
304
+ "validationRules": [
305
+ {
306
+ "field": "productId",
307
+ "rule": "required",
308
+ "fieldType": "text"
309
+ },
310
+ {
311
+ "field": "version",
312
+ "rule": "required",
313
+ "fieldType": "integer"
314
+ },
315
+ {
316
+ "field": "status",
317
+ "rule": "required",
318
+ "fieldType": "text"
319
+ }
320
+ ],
321
+ "schema": {
322
+ "tableName": "manufacturing_boms",
323
+ "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);",
324
+ "columns": {
325
+ "id": {
326
+ "type": "UUID",
327
+ "primaryKey": true,
328
+ "referenceKind": "id",
329
+ "notNull": true
330
+ },
331
+ "slug": {
332
+ "type": "TEXT",
333
+ "notNull": true
334
+ },
335
+ "context": {
336
+ "type": "TEXT",
337
+ "notNull": true,
338
+ "default": ""
339
+ },
340
+ "created_at": {
341
+ "type": "TIMESTAMP",
342
+ "notNull": true,
343
+ "default": "current_timestamp"
344
+ },
345
+ "updated_at": {
346
+ "type": "TIMESTAMP",
347
+ "notNull": true,
348
+ "default": "current_timestamp"
349
+ },
350
+ "tenant_id": {
351
+ "type": "UUID",
352
+ "referenceKind": "tenantId",
353
+ "notNull": false,
354
+ "unique": false
355
+ },
356
+ "product_id": {
357
+ "type": "TEXT",
358
+ "notNull": true,
359
+ "unique": false,
360
+ "default": ""
361
+ },
362
+ "version": {
363
+ "type": "INTEGER",
364
+ "notNull": true,
365
+ "unique": false,
366
+ "default": 1
367
+ },
368
+ "effective_date": {
369
+ "type": "TIMESTAMP",
370
+ "notNull": false,
371
+ "unique": false
372
+ },
373
+ "status": {
374
+ "type": "TEXT",
375
+ "notNull": true,
376
+ "unique": false,
377
+ "default": "draft"
378
+ },
379
+ "notes": {
380
+ "type": "TEXT",
381
+ "notNull": false,
382
+ "unique": false,
383
+ "default": ""
384
+ },
385
+ "currency": {
386
+ "type": "TEXT",
387
+ "notNull": false,
388
+ "unique": false,
389
+ "default": "USD"
390
+ }
391
+ },
392
+ "indexes": [
393
+ {
394
+ "name": "manufacturing_boms_id_idx",
395
+ "columns": [
396
+ "id"
397
+ ]
398
+ },
399
+ {
400
+ "name": "manufacturing_boms_product_id_version_idx",
401
+ "columns": [
402
+ "product_id",
403
+ "version",
404
+ "tenant_id"
405
+ ],
406
+ "unique": true
407
+ }
408
+ ],
409
+ "version": "b2691adc"
410
+ }
411
+ },
412
+ "@happyvertical/smrt-manufacturing:BomLine": {
413
+ "name": "bomline",
414
+ "className": "BomLine",
415
+ "qualifiedName": "@happyvertical/smrt-manufacturing:BomLine",
416
+ "collection": "bomlines",
417
+ "filePath": "/home/runner/_work/smrt/smrt/packages/manufacturing/src/models/BomLine.ts",
418
+ "packageName": "@happyvertical/smrt-manufacturing",
419
+ "fields": {
420
+ "tenantId": {
421
+ "type": "text",
422
+ "required": false,
423
+ "_meta": {
424
+ "sqlType": "UUID",
425
+ "nullable": true,
426
+ "__tenancy": {
427
+ "isTenantIdField": true,
428
+ "autoFilter": true,
429
+ "required": false,
430
+ "autoPopulate": true,
431
+ "nullable": true,
432
+ "mode": "optional",
433
+ "field": "tenantId",
434
+ "allowSuperAdminBypass": false
435
+ }
436
+ }
437
+ },
438
+ "bomId": {
439
+ "type": "text",
440
+ "required": true,
441
+ "default": "",
442
+ "_meta": {
443
+ "required": true
444
+ }
445
+ },
446
+ "componentSkuId": {
447
+ "type": "text",
448
+ "required": true,
449
+ "default": "",
450
+ "_meta": {
451
+ "required": true
452
+ }
453
+ },
454
+ "qtyPerUnit": {
455
+ "type": "decimal",
456
+ "required": false,
457
+ "_meta": {}
458
+ },
459
+ "uom": {
460
+ "type": "text",
461
+ "required": false,
462
+ "default": "each"
463
+ },
464
+ "wastePercent": {
465
+ "type": "decimal",
466
+ "required": false,
467
+ "_meta": {}
468
+ },
469
+ "notes": {
470
+ "type": "text",
471
+ "required": false,
472
+ "default": ""
473
+ }
474
+ },
475
+ "methods": {
476
+ "effectiveQtyPerUnit": {
477
+ "name": "effectiveQtyPerUnit",
478
+ "async": false,
479
+ "parameters": [],
480
+ "returnType": "number",
481
+ "isStatic": false,
482
+ "isPublic": true
483
+ }
484
+ },
485
+ "decoratorConfig": {
486
+ "tableName": "manufacturing_bom_lines",
487
+ "conflictColumns": [
488
+ "bom_id",
489
+ "component_sku_id",
490
+ "tenant_id"
491
+ ],
492
+ "api": {
493
+ "include": [
494
+ "list",
495
+ "get",
496
+ "create",
497
+ "update"
498
+ ]
499
+ },
500
+ "mcp": {
501
+ "include": [
502
+ "list",
503
+ "get"
504
+ ]
505
+ },
506
+ "cli": true,
507
+ "tenantScoped": {
508
+ "mode": "optional"
509
+ }
510
+ },
511
+ "extends": "SmrtObject",
512
+ "exportName": "BomLine",
513
+ "collectionExportName": "BomLineCollection",
514
+ "validationRules": [
515
+ {
516
+ "field": "bomId",
517
+ "rule": "required",
518
+ "fieldType": "text"
519
+ },
520
+ {
521
+ "field": "componentSkuId",
522
+ "rule": "required",
523
+ "fieldType": "text"
524
+ }
525
+ ],
526
+ "schema": {
527
+ "tableName": "manufacturing_bom_lines",
528
+ "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);",
529
+ "columns": {
530
+ "id": {
531
+ "type": "UUID",
532
+ "primaryKey": true,
533
+ "referenceKind": "id",
534
+ "notNull": true
535
+ },
536
+ "slug": {
537
+ "type": "TEXT",
538
+ "notNull": true
539
+ },
540
+ "context": {
541
+ "type": "TEXT",
542
+ "notNull": true,
543
+ "default": ""
544
+ },
545
+ "created_at": {
546
+ "type": "TIMESTAMP",
547
+ "notNull": true,
548
+ "default": "current_timestamp"
549
+ },
550
+ "updated_at": {
551
+ "type": "TIMESTAMP",
552
+ "notNull": true,
553
+ "default": "current_timestamp"
554
+ },
555
+ "tenant_id": {
556
+ "type": "UUID",
557
+ "referenceKind": "tenantId",
558
+ "notNull": false,
559
+ "unique": false
560
+ },
561
+ "bom_id": {
562
+ "type": "TEXT",
563
+ "notNull": true,
564
+ "unique": false,
565
+ "default": ""
566
+ },
567
+ "component_sku_id": {
568
+ "type": "TEXT",
569
+ "notNull": true,
570
+ "unique": false,
571
+ "default": ""
572
+ },
573
+ "qty_per_unit": {
574
+ "type": "REAL",
575
+ "notNull": false,
576
+ "unique": false
577
+ },
578
+ "uom": {
579
+ "type": "TEXT",
580
+ "notNull": false,
581
+ "unique": false,
582
+ "default": "each"
583
+ },
584
+ "waste_percent": {
585
+ "type": "REAL",
586
+ "notNull": false,
587
+ "unique": false
588
+ },
589
+ "notes": {
590
+ "type": "TEXT",
591
+ "notNull": false,
592
+ "unique": false,
593
+ "default": ""
594
+ }
595
+ },
596
+ "indexes": [
597
+ {
598
+ "name": "manufacturing_bom_lines_id_idx",
599
+ "columns": [
600
+ "id"
601
+ ]
602
+ },
603
+ {
604
+ "name": "manufacturing_bom_lines_bom_id_component_sku_id_idx",
605
+ "columns": [
606
+ "bom_id",
607
+ "component_sku_id",
608
+ "tenant_id"
609
+ ],
610
+ "unique": true
611
+ }
612
+ ],
613
+ "version": "cfbae7e8"
614
+ }
615
+ }
616
+ },
617
+ "moduleType": "smrt",
618
+ "smrtDependencies": [
619
+ "@happyvertical/smrt-core",
620
+ "@happyvertical/smrt-inventory",
621
+ "@happyvertical/smrt-tenancy"
622
+ ]
623
+ }