@happyvertical/smrt-inventory 0.61.2 → 0.61.4
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.
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +721 -315
- package/dist/models/InventoryLocation.d.ts.map +1 -1
- package/dist/models/Lot.d.ts.map +1 -1
- package/dist/models/LotCorrection.d.ts.map +1 -1
- package/dist/models/LotDocument.d.ts.map +1 -1
- package/dist/models/LotStockLevel.d.ts.map +1 -1
- package/dist/models/LotUsage.d.ts.map +1 -1
- package/dist/models/StockLevel.d.ts.map +1 -1
- package/dist/models/StockMovement.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +5 -5
- package/package.json +8 -8
package/dist/manifest.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-inventory",
|
|
5
|
-
"packageVersion": "0.61.
|
|
5
|
+
"packageVersion": "0.61.4",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-inventory:InventoryLocationCollection": {
|
|
8
8
|
"name": "inventorylocationcollection",
|
|
9
9
|
"className": "InventoryLocationCollection",
|
|
10
10
|
"qualifiedName": "@happyvertical/smrt-inventory:InventoryLocationCollection",
|
|
11
11
|
"collection": "inventorylocations",
|
|
12
|
-
"filePath": "
|
|
12
|
+
"filePath": "src/collections/InventoryLocationCollection.ts",
|
|
13
13
|
"packageName": "@happyvertical/smrt-inventory",
|
|
14
14
|
"fields": {},
|
|
15
15
|
"methods": {
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
"className": "LotCollection",
|
|
203
203
|
"qualifiedName": "@happyvertical/smrt-inventory:LotCollection",
|
|
204
204
|
"collection": "lots",
|
|
205
|
-
"filePath": "
|
|
205
|
+
"filePath": "src/collections/LotCollection.ts",
|
|
206
206
|
"packageName": "@happyvertical/smrt-inventory",
|
|
207
207
|
"fields": {},
|
|
208
208
|
"methods": {
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
],
|
|
263
263
|
"schema": {
|
|
264
264
|
"tableName": "inventory_lots",
|
|
265
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"inventory_lots\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"sku_id\" TEXT,\n \"kind\" TEXT DEFAULT 'lot',\n \"lot_number\" TEXT
|
|
265
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"inventory_lots\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"sku_id\" TEXT,\n \"kind\" TEXT DEFAULT 'lot',\n \"lot_number\" TEXT DEFAULT '',\n \"search_key\" TEXT DEFAULT '',\n \"identity_key\" TEXT NOT NULL DEFAULT '',\n \"unique_number\" BOOLEAN DEFAULT FALSE,\n \"received_qty\" REAL,\n \"unit\" TEXT DEFAULT '',\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"attributes\" TEXT,\n \"status\" TEXT DEFAULT 'active',\n \"received_at\" TIMESTAMP,\n \"received_by_profile_id\" UUID,\n \"last_used_at\" TIMESTAMP\n);",
|
|
266
266
|
"columns": {
|
|
267
267
|
"_sync_origin_device_id": {
|
|
268
268
|
"type": "TEXT"
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
},
|
|
315
315
|
"lot_number": {
|
|
316
316
|
"type": "TEXT",
|
|
317
|
-
"notNull":
|
|
317
|
+
"notNull": false,
|
|
318
318
|
"unique": false,
|
|
319
319
|
"default": ""
|
|
320
320
|
},
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
]
|
|
426
426
|
}
|
|
427
427
|
],
|
|
428
|
-
"version": "
|
|
428
|
+
"version": "3b8aef6c"
|
|
429
429
|
},
|
|
430
430
|
"importPath": "@happyvertical/smrt-inventory"
|
|
431
431
|
},
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
"className": "LotCorrectionCollection",
|
|
435
435
|
"qualifiedName": "@happyvertical/smrt-inventory:LotCorrectionCollection",
|
|
436
436
|
"collection": "lotcorrections",
|
|
437
|
-
"filePath": "
|
|
437
|
+
"filePath": "src/collections/LotCorrectionCollection.ts",
|
|
438
438
|
"packageName": "@happyvertical/smrt-inventory",
|
|
439
439
|
"fields": {},
|
|
440
440
|
"methods": {},
|
|
@@ -471,7 +471,7 @@
|
|
|
471
471
|
],
|
|
472
472
|
"schema": {
|
|
473
473
|
"tableName": "inventory_lot_corrections",
|
|
474
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"inventory_lot_corrections\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"lot_id\" UUID NOT NULL,\n \"kind\" TEXT NOT NULL DEFAULT 'attribute',\n \"field\" TEXT DEFAULT '',\n \"old_value\" TEXT,\n \"new_value\" TEXT,\n \"reason\" TEXT
|
|
474
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"inventory_lot_corrections\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"lot_id\" UUID NOT NULL,\n \"kind\" TEXT NOT NULL DEFAULT 'attribute',\n \"field\" TEXT DEFAULT '',\n \"old_value\" TEXT,\n \"new_value\" TEXT,\n \"reason\" TEXT,\n \"usage_id\" TEXT,\n \"document_id\" TEXT,\n \"actor_profile_id\" UUID,\n \"corrected_at\" TIMESTAMP\n);",
|
|
475
475
|
"columns": {
|
|
476
476
|
"_sync_origin_device_id": {
|
|
477
477
|
"type": "TEXT"
|
|
@@ -550,7 +550,7 @@
|
|
|
550
550
|
},
|
|
551
551
|
"reason": {
|
|
552
552
|
"type": "TEXT",
|
|
553
|
-
"notNull":
|
|
553
|
+
"notNull": false,
|
|
554
554
|
"unique": false
|
|
555
555
|
},
|
|
556
556
|
"usage_id": {
|
|
@@ -603,7 +603,7 @@
|
|
|
603
603
|
]
|
|
604
604
|
}
|
|
605
605
|
],
|
|
606
|
-
"version": "
|
|
606
|
+
"version": "a4ab8ad7"
|
|
607
607
|
},
|
|
608
608
|
"importPath": "@happyvertical/smrt-inventory"
|
|
609
609
|
},
|
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
"className": "LotDocumentCollection",
|
|
613
613
|
"qualifiedName": "@happyvertical/smrt-inventory:LotDocumentCollection",
|
|
614
614
|
"collection": "lotdocuments",
|
|
615
|
-
"filePath": "
|
|
615
|
+
"filePath": "src/collections/LotDocumentCollection.ts",
|
|
616
616
|
"packageName": "@happyvertical/smrt-inventory",
|
|
617
617
|
"fields": {},
|
|
618
618
|
"methods": {},
|
|
@@ -791,7 +791,7 @@
|
|
|
791
791
|
"className": "LotStockLevelCollection",
|
|
792
792
|
"qualifiedName": "@happyvertical/smrt-inventory:LotStockLevelCollection",
|
|
793
793
|
"collection": "lotstocklevels",
|
|
794
|
-
"filePath": "
|
|
794
|
+
"filePath": "src/collections/LotStockLevelCollection.ts",
|
|
795
795
|
"packageName": "@happyvertical/smrt-inventory",
|
|
796
796
|
"fields": {},
|
|
797
797
|
"methods": {
|
|
@@ -988,7 +988,7 @@
|
|
|
988
988
|
"className": "LotUsageCollection",
|
|
989
989
|
"qualifiedName": "@happyvertical/smrt-inventory:LotUsageCollection",
|
|
990
990
|
"collection": "lotusages",
|
|
991
|
-
"filePath": "
|
|
991
|
+
"filePath": "src/collections/LotUsageCollection.ts",
|
|
992
992
|
"packageName": "@happyvertical/smrt-inventory",
|
|
993
993
|
"fields": {},
|
|
994
994
|
"methods": {
|
|
@@ -1238,7 +1238,7 @@
|
|
|
1238
1238
|
"className": "StockLevelCollection",
|
|
1239
1239
|
"qualifiedName": "@happyvertical/smrt-inventory:StockLevelCollection",
|
|
1240
1240
|
"collection": "stocklevels",
|
|
1241
|
-
"filePath": "
|
|
1241
|
+
"filePath": "src/collections/StockLevelCollection.ts",
|
|
1242
1242
|
"packageName": "@happyvertical/smrt-inventory",
|
|
1243
1243
|
"fields": {},
|
|
1244
1244
|
"methods": {
|
|
@@ -1490,7 +1490,7 @@
|
|
|
1490
1490
|
"className": "StockMovementCollection",
|
|
1491
1491
|
"qualifiedName": "@happyvertical/smrt-inventory:StockMovementCollection",
|
|
1492
1492
|
"collection": "stockmovements",
|
|
1493
|
-
"filePath": "
|
|
1493
|
+
"filePath": "src/collections/StockMovementCollection.ts",
|
|
1494
1494
|
"packageName": "@happyvertical/smrt-inventory",
|
|
1495
1495
|
"fields": {},
|
|
1496
1496
|
"methods": {
|
|
@@ -1733,15 +1733,12 @@
|
|
|
1733
1733
|
"className": "InventoryLocation",
|
|
1734
1734
|
"qualifiedName": "@happyvertical/smrt-inventory:InventoryLocation",
|
|
1735
1735
|
"collection": "inventorylocations",
|
|
1736
|
-
"filePath": "
|
|
1736
|
+
"filePath": "src/models/InventoryLocation.ts",
|
|
1737
1737
|
"packageName": "@happyvertical/smrt-inventory",
|
|
1738
1738
|
"fields": {
|
|
1739
1739
|
"tenantId": {
|
|
1740
1740
|
"type": "text",
|
|
1741
|
-
"required": false,
|
|
1742
1741
|
"_meta": {
|
|
1743
|
-
"sqlType": "UUID",
|
|
1744
|
-
"nullable": true,
|
|
1745
1742
|
"__tenancy": {
|
|
1746
1743
|
"isTenantIdField": true,
|
|
1747
1744
|
"autoFilter": true,
|
|
@@ -1751,44 +1748,79 @@
|
|
|
1751
1748
|
"mode": "optional",
|
|
1752
1749
|
"field": "tenantId",
|
|
1753
1750
|
"allowSuperAdminBypass": false
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1751
|
+
},
|
|
1752
|
+
"__statedOptions": [
|
|
1753
|
+
"sqlType",
|
|
1754
|
+
"nullable",
|
|
1755
|
+
"__tenancy",
|
|
1756
|
+
"required"
|
|
1757
|
+
],
|
|
1758
|
+
"sqlType": "UUID",
|
|
1759
|
+
"nullable": true,
|
|
1760
|
+
"required": false
|
|
1761
|
+
},
|
|
1762
|
+
"required": false
|
|
1756
1763
|
},
|
|
1757
1764
|
"code": {
|
|
1758
1765
|
"type": "text",
|
|
1759
|
-
"required": true,
|
|
1760
|
-
"default": "",
|
|
1761
|
-
"description": "A short code for the place stock is kept, for example MAIN.",
|
|
1762
1766
|
"_meta": {
|
|
1767
|
+
"__statedOptions": [
|
|
1768
|
+
"required",
|
|
1769
|
+
"requiredFor",
|
|
1770
|
+
"description",
|
|
1771
|
+
"default"
|
|
1772
|
+
],
|
|
1763
1773
|
"required": true,
|
|
1764
|
-
"description": "A short code for the place stock is kept, for example MAIN."
|
|
1765
|
-
|
|
1774
|
+
"description": "A short code for the place stock is kept, for example MAIN.",
|
|
1775
|
+
"requiredFor": "identity"
|
|
1776
|
+
},
|
|
1777
|
+
"required": true,
|
|
1778
|
+
"default": "",
|
|
1779
|
+
"description": "A short code for the place stock is kept, for example MAIN."
|
|
1766
1780
|
},
|
|
1767
1781
|
"name": {
|
|
1768
1782
|
"type": "text",
|
|
1769
|
-
"required": false,
|
|
1770
|
-
"default": "",
|
|
1771
|
-
"description": "What you call the place, for example Main warehouse.",
|
|
1772
1783
|
"_meta": {
|
|
1784
|
+
"__statedOptions": [
|
|
1785
|
+
"description",
|
|
1786
|
+
"default"
|
|
1787
|
+
],
|
|
1773
1788
|
"description": "What you call the place, for example Main warehouse."
|
|
1774
|
-
}
|
|
1789
|
+
},
|
|
1790
|
+
"required": false,
|
|
1791
|
+
"default": "",
|
|
1792
|
+
"description": "What you call the place, for example Main warehouse."
|
|
1775
1793
|
},
|
|
1776
1794
|
"kind": {
|
|
1777
1795
|
"type": "text",
|
|
1778
|
-
"required": false,
|
|
1779
|
-
"default": "warehouse",
|
|
1780
|
-
"description": "What sort of place it is, for example a warehouse or a shop floor.",
|
|
1781
1796
|
"_meta": {
|
|
1797
|
+
"__statedOptions": [
|
|
1798
|
+
"description",
|
|
1799
|
+
"default"
|
|
1800
|
+
],
|
|
1782
1801
|
"description": "What sort of place it is, for example a warehouse or a shop floor."
|
|
1783
|
-
}
|
|
1802
|
+
},
|
|
1803
|
+
"required": false,
|
|
1804
|
+
"default": "warehouse",
|
|
1805
|
+
"description": "What sort of place it is, for example a warehouse or a shop floor."
|
|
1784
1806
|
},
|
|
1785
1807
|
"placeId": {
|
|
1786
1808
|
"type": "text",
|
|
1809
|
+
"_meta": {
|
|
1810
|
+
"__statedOptions": [
|
|
1811
|
+
"default"
|
|
1812
|
+
]
|
|
1813
|
+
},
|
|
1787
1814
|
"required": false,
|
|
1788
1815
|
"default": ""
|
|
1789
1816
|
},
|
|
1790
1817
|
"active": {
|
|
1791
1818
|
"type": "boolean",
|
|
1819
|
+
"_meta": {
|
|
1820
|
+
"__statedOptions": [
|
|
1821
|
+
"default"
|
|
1822
|
+
]
|
|
1823
|
+
},
|
|
1792
1824
|
"required": false,
|
|
1793
1825
|
"default": true
|
|
1794
1826
|
}
|
|
@@ -1936,15 +1968,12 @@
|
|
|
1936
1968
|
"className": "Lot",
|
|
1937
1969
|
"qualifiedName": "@happyvertical/smrt-inventory:Lot",
|
|
1938
1970
|
"collection": "lots",
|
|
1939
|
-
"filePath": "
|
|
1971
|
+
"filePath": "src/models/Lot.ts",
|
|
1940
1972
|
"packageName": "@happyvertical/smrt-inventory",
|
|
1941
1973
|
"fields": {
|
|
1942
1974
|
"tenantId": {
|
|
1943
1975
|
"type": "text",
|
|
1944
|
-
"required": false,
|
|
1945
1976
|
"_meta": {
|
|
1946
|
-
"sqlType": "UUID",
|
|
1947
|
-
"nullable": true,
|
|
1948
1977
|
"__tenancy": {
|
|
1949
1978
|
"isTenantIdField": true,
|
|
1950
1979
|
"autoFilter": true,
|
|
@@ -1954,26 +1983,47 @@
|
|
|
1954
1983
|
"mode": "optional",
|
|
1955
1984
|
"field": "tenantId",
|
|
1956
1985
|
"allowSuperAdminBypass": false
|
|
1957
|
-
}
|
|
1958
|
-
|
|
1986
|
+
},
|
|
1987
|
+
"__statedOptions": [
|
|
1988
|
+
"sqlType",
|
|
1989
|
+
"nullable",
|
|
1990
|
+
"__tenancy",
|
|
1991
|
+
"required"
|
|
1992
|
+
],
|
|
1993
|
+
"sqlType": "UUID",
|
|
1994
|
+
"nullable": true,
|
|
1995
|
+
"required": false
|
|
1996
|
+
},
|
|
1997
|
+
"required": false
|
|
1959
1998
|
},
|
|
1960
1999
|
"skuId": {
|
|
1961
2000
|
"type": "text",
|
|
1962
|
-
"required": false,
|
|
1963
|
-
"description": "The item this lot is of, if catalogued.",
|
|
1964
2001
|
"_meta": {
|
|
2002
|
+
"__statedOptions": [
|
|
2003
|
+
"nullable",
|
|
2004
|
+
"description",
|
|
2005
|
+
"required"
|
|
2006
|
+
],
|
|
2007
|
+
"description": "The item this lot is of, if catalogued.",
|
|
1965
2008
|
"nullable": true,
|
|
1966
|
-
"
|
|
1967
|
-
}
|
|
2009
|
+
"required": false
|
|
2010
|
+
},
|
|
2011
|
+
"required": false,
|
|
2012
|
+
"description": "The item this lot is of, if catalogued."
|
|
1968
2013
|
},
|
|
1969
2014
|
"kind": {
|
|
1970
2015
|
"type": "text",
|
|
1971
|
-
"required": false,
|
|
1972
|
-
"default": "lot",
|
|
1973
|
-
"description": "Whether this is a batch (lot) or a single unit (serial).",
|
|
1974
2016
|
"_meta": {
|
|
2017
|
+
"__statedOptions": [
|
|
2018
|
+
"description",
|
|
2019
|
+
"default",
|
|
2020
|
+
"enum"
|
|
2021
|
+
],
|
|
1975
2022
|
"description": "Whether this is a batch (lot) or a single unit (serial)."
|
|
1976
2023
|
},
|
|
2024
|
+
"required": false,
|
|
2025
|
+
"default": "lot",
|
|
2026
|
+
"description": "Whether this is a batch (lot) or a single unit (serial).",
|
|
1977
2027
|
"enum": [
|
|
1978
2028
|
"lot",
|
|
1979
2029
|
"serial"
|
|
@@ -1981,119 +2031,175 @@
|
|
|
1981
2031
|
},
|
|
1982
2032
|
"lotNumber": {
|
|
1983
2033
|
"type": "text",
|
|
1984
|
-
"
|
|
2034
|
+
"_meta": {
|
|
2035
|
+
"__statedOptions": [
|
|
2036
|
+
"maxLength",
|
|
2037
|
+
"description",
|
|
2038
|
+
"default"
|
|
2039
|
+
],
|
|
2040
|
+
"description": "The batch code, supplier lot or serial number.",
|
|
2041
|
+
"maxLength": 128
|
|
2042
|
+
},
|
|
2043
|
+
"required": false,
|
|
1985
2044
|
"default": "",
|
|
1986
2045
|
"description": "The batch code, supplier lot or serial number.",
|
|
1987
|
-
"maxLength": 128
|
|
1988
|
-
"_meta": {
|
|
1989
|
-
"required": true,
|
|
1990
|
-
"maxLength": 128,
|
|
1991
|
-
"description": "The batch code, supplier lot or serial number."
|
|
1992
|
-
}
|
|
2046
|
+
"maxLength": 128
|
|
1993
2047
|
},
|
|
1994
2048
|
"searchKey": {
|
|
1995
2049
|
"type": "text",
|
|
2050
|
+
"_meta": {
|
|
2051
|
+
"__statedOptions": [
|
|
2052
|
+
"maxLength",
|
|
2053
|
+
"description",
|
|
2054
|
+
"default"
|
|
2055
|
+
],
|
|
2056
|
+
"description": "The number in normal form, used for lookup.",
|
|
2057
|
+
"maxLength": 160
|
|
2058
|
+
},
|
|
1996
2059
|
"required": false,
|
|
1997
2060
|
"default": "",
|
|
1998
2061
|
"description": "The number in normal form, used for lookup.",
|
|
1999
|
-
"maxLength": 160
|
|
2000
|
-
"_meta": {
|
|
2001
|
-
"maxLength": 160,
|
|
2002
|
-
"description": "The number in normal form, used for lookup."
|
|
2003
|
-
}
|
|
2062
|
+
"maxLength": 160
|
|
2004
2063
|
},
|
|
2005
2064
|
"identityKey": {
|
|
2006
2065
|
"type": "text",
|
|
2007
|
-
"required": true,
|
|
2008
|
-
"default": "",
|
|
2009
|
-
"description": "Internal identity that keeps lots from being created twice.",
|
|
2010
|
-
"maxLength": 160,
|
|
2011
2066
|
"_meta": {
|
|
2067
|
+
"__statedOptions": [
|
|
2068
|
+
"required",
|
|
2069
|
+
"requiredFor",
|
|
2070
|
+
"maxLength",
|
|
2071
|
+
"description",
|
|
2072
|
+
"default"
|
|
2073
|
+
],
|
|
2012
2074
|
"required": true,
|
|
2075
|
+
"description": "Internal identity that keeps lots from being created twice.",
|
|
2013
2076
|
"maxLength": 160,
|
|
2014
|
-
"
|
|
2015
|
-
}
|
|
2077
|
+
"requiredFor": "identity"
|
|
2078
|
+
},
|
|
2079
|
+
"required": true,
|
|
2080
|
+
"default": "",
|
|
2081
|
+
"description": "Internal identity that keeps lots from being created twice.",
|
|
2082
|
+
"maxLength": 160
|
|
2016
2083
|
},
|
|
2017
2084
|
"uniqueNumber": {
|
|
2018
2085
|
"type": "boolean",
|
|
2019
|
-
"required": false,
|
|
2020
|
-
"default": false,
|
|
2021
|
-
"description": "Whether the number must be unique for this item.",
|
|
2022
2086
|
"_meta": {
|
|
2087
|
+
"__statedOptions": [
|
|
2088
|
+
"description",
|
|
2089
|
+
"default"
|
|
2090
|
+
],
|
|
2023
2091
|
"description": "Whether the number must be unique for this item."
|
|
2024
|
-
}
|
|
2092
|
+
},
|
|
2093
|
+
"required": false,
|
|
2094
|
+
"default": false,
|
|
2095
|
+
"description": "Whether the number must be unique for this item."
|
|
2025
2096
|
},
|
|
2026
2097
|
"receivedQty": {
|
|
2027
2098
|
"type": "decimal",
|
|
2028
|
-
"required": false,
|
|
2029
|
-
"description": "How many came in on the receipt.",
|
|
2030
2099
|
"_meta": {
|
|
2100
|
+
"__statedOptions": [
|
|
2101
|
+
"description"
|
|
2102
|
+
],
|
|
2031
2103
|
"description": "How many came in on the receipt."
|
|
2032
|
-
}
|
|
2104
|
+
},
|
|
2105
|
+
"required": false,
|
|
2106
|
+
"description": "How many came in on the receipt."
|
|
2033
2107
|
},
|
|
2034
2108
|
"unit": {
|
|
2035
2109
|
"type": "text",
|
|
2036
|
-
"required": false,
|
|
2037
|
-
"default": "",
|
|
2038
|
-
"description": "The unit of measure.",
|
|
2039
2110
|
"_meta": {
|
|
2111
|
+
"__statedOptions": [
|
|
2112
|
+
"description",
|
|
2113
|
+
"default"
|
|
2114
|
+
],
|
|
2040
2115
|
"description": "The unit of measure."
|
|
2041
|
-
}
|
|
2116
|
+
},
|
|
2117
|
+
"required": false,
|
|
2118
|
+
"default": "",
|
|
2119
|
+
"description": "The unit of measure."
|
|
2042
2120
|
},
|
|
2043
2121
|
"sourceType": {
|
|
2044
2122
|
"type": "text",
|
|
2045
|
-
"required": false,
|
|
2046
|
-
"default": "",
|
|
2047
|
-
"description": "What kind of record received this lot.",
|
|
2048
2123
|
"_meta": {
|
|
2124
|
+
"__statedOptions": [
|
|
2125
|
+
"description",
|
|
2126
|
+
"default"
|
|
2127
|
+
],
|
|
2049
2128
|
"description": "What kind of record received this lot."
|
|
2050
|
-
}
|
|
2129
|
+
},
|
|
2130
|
+
"required": false,
|
|
2131
|
+
"default": "",
|
|
2132
|
+
"description": "What kind of record received this lot."
|
|
2051
2133
|
},
|
|
2052
2134
|
"sourceId": {
|
|
2053
2135
|
"type": "text",
|
|
2054
|
-
"required": false,
|
|
2055
|
-
"default": "",
|
|
2056
|
-
"description": "The record that received this lot.",
|
|
2057
2136
|
"_meta": {
|
|
2137
|
+
"__statedOptions": [
|
|
2138
|
+
"description",
|
|
2139
|
+
"default"
|
|
2140
|
+
],
|
|
2058
2141
|
"description": "The record that received this lot."
|
|
2059
|
-
}
|
|
2142
|
+
},
|
|
2143
|
+
"required": false,
|
|
2144
|
+
"default": "",
|
|
2145
|
+
"description": "The record that received this lot."
|
|
2060
2146
|
},
|
|
2061
2147
|
"attributes": {
|
|
2062
2148
|
"type": "text",
|
|
2063
|
-
"required": false,
|
|
2064
|
-
"description": "Anything else worth knowing about this lot, stored as JSON.",
|
|
2065
2149
|
"_meta": {
|
|
2150
|
+
"__statedOptions": [
|
|
2151
|
+
"description"
|
|
2152
|
+
],
|
|
2066
2153
|
"description": "Anything else worth knowing about this lot, stored as JSON."
|
|
2067
|
-
}
|
|
2154
|
+
},
|
|
2155
|
+
"required": false,
|
|
2156
|
+
"description": "Anything else worth knowing about this lot, stored as JSON."
|
|
2068
2157
|
},
|
|
2069
2158
|
"status": {
|
|
2070
2159
|
"type": "text",
|
|
2071
|
-
"required": false,
|
|
2072
|
-
"default": "active",
|
|
2073
|
-
"description": "Where the lot stands: active, quarantined, consumed or void.",
|
|
2074
2160
|
"_meta": {
|
|
2161
|
+
"__statedOptions": [
|
|
2162
|
+
"description",
|
|
2163
|
+
"default"
|
|
2164
|
+
],
|
|
2075
2165
|
"description": "Where the lot stands: active, quarantined, consumed or void."
|
|
2076
|
-
}
|
|
2166
|
+
},
|
|
2167
|
+
"required": false,
|
|
2168
|
+
"default": "active",
|
|
2169
|
+
"description": "Where the lot stands: active, quarantined, consumed or void."
|
|
2077
2170
|
},
|
|
2078
2171
|
"receivedAt": {
|
|
2079
2172
|
"type": "datetime",
|
|
2080
|
-
"required": false,
|
|
2081
|
-
"description": "When the lot was received.",
|
|
2082
2173
|
"_meta": {
|
|
2174
|
+
"__statedOptions": [
|
|
2175
|
+
"description"
|
|
2176
|
+
],
|
|
2083
2177
|
"description": "When the lot was received."
|
|
2084
|
-
}
|
|
2178
|
+
},
|
|
2179
|
+
"required": false,
|
|
2180
|
+
"description": "When the lot was received."
|
|
2085
2181
|
},
|
|
2086
2182
|
"receivedByProfileId": {
|
|
2087
2183
|
"type": "crossPackageRef",
|
|
2184
|
+
"_meta": {
|
|
2185
|
+
"__statedOptions": [
|
|
2186
|
+
"related"
|
|
2187
|
+
]
|
|
2188
|
+
},
|
|
2088
2189
|
"required": false,
|
|
2089
2190
|
"related": "@happyvertical/smrt-profiles:Profile"
|
|
2090
2191
|
},
|
|
2091
2192
|
"lastUsedAt": {
|
|
2092
2193
|
"type": "datetime",
|
|
2093
|
-
"required": false,
|
|
2094
2194
|
"_meta": {
|
|
2095
|
-
"
|
|
2096
|
-
|
|
2195
|
+
"__statedOptions": [
|
|
2196
|
+
"nullable",
|
|
2197
|
+
"required"
|
|
2198
|
+
],
|
|
2199
|
+
"nullable": true,
|
|
2200
|
+
"required": false
|
|
2201
|
+
},
|
|
2202
|
+
"required": false
|
|
2097
2203
|
}
|
|
2098
2204
|
},
|
|
2099
2205
|
"methods": {
|
|
@@ -2169,11 +2275,6 @@
|
|
|
2169
2275
|
"exportName": "Lot",
|
|
2170
2276
|
"collectionExportName": "LotCollection",
|
|
2171
2277
|
"validationRules": [
|
|
2172
|
-
{
|
|
2173
|
-
"field": "lotNumber",
|
|
2174
|
-
"rule": "required",
|
|
2175
|
-
"fieldType": "text"
|
|
2176
|
-
},
|
|
2177
2278
|
{
|
|
2178
2279
|
"field": "lotNumber",
|
|
2179
2280
|
"rule": "maxLength",
|
|
@@ -2200,7 +2301,7 @@
|
|
|
2200
2301
|
],
|
|
2201
2302
|
"schema": {
|
|
2202
2303
|
"tableName": "inventory_lots",
|
|
2203
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"inventory_lots\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"sku_id\" TEXT,\n \"kind\" TEXT DEFAULT 'lot',\n \"lot_number\" TEXT
|
|
2304
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"inventory_lots\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"sku_id\" TEXT,\n \"kind\" TEXT DEFAULT 'lot',\n \"lot_number\" TEXT DEFAULT '',\n \"search_key\" TEXT DEFAULT '',\n \"identity_key\" TEXT NOT NULL DEFAULT '',\n \"unique_number\" BOOLEAN DEFAULT FALSE,\n \"received_qty\" REAL,\n \"unit\" TEXT DEFAULT '',\n \"source_type\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"attributes\" TEXT,\n \"status\" TEXT DEFAULT 'active',\n \"received_at\" TIMESTAMP,\n \"received_by_profile_id\" UUID,\n \"last_used_at\" TIMESTAMP\n);",
|
|
2204
2305
|
"columns": {
|
|
2205
2306
|
"_sync_origin_device_id": {
|
|
2206
2307
|
"type": "TEXT"
|
|
@@ -2252,7 +2353,7 @@
|
|
|
2252
2353
|
},
|
|
2253
2354
|
"lot_number": {
|
|
2254
2355
|
"type": "TEXT",
|
|
2255
|
-
"notNull":
|
|
2356
|
+
"notNull": false,
|
|
2256
2357
|
"unique": false,
|
|
2257
2358
|
"default": ""
|
|
2258
2359
|
},
|
|
@@ -2363,7 +2464,7 @@
|
|
|
2363
2464
|
]
|
|
2364
2465
|
}
|
|
2365
2466
|
],
|
|
2366
|
-
"version": "
|
|
2467
|
+
"version": "3b8aef6c"
|
|
2367
2468
|
},
|
|
2368
2469
|
"importPath": "@happyvertical/smrt-inventory"
|
|
2369
2470
|
},
|
|
@@ -2372,15 +2473,12 @@
|
|
|
2372
2473
|
"className": "LotCorrection",
|
|
2373
2474
|
"qualifiedName": "@happyvertical/smrt-inventory:LotCorrection",
|
|
2374
2475
|
"collection": "lotcorrections",
|
|
2375
|
-
"filePath": "
|
|
2476
|
+
"filePath": "src/models/LotCorrection.ts",
|
|
2376
2477
|
"packageName": "@happyvertical/smrt-inventory",
|
|
2377
2478
|
"fields": {
|
|
2378
2479
|
"tenantId": {
|
|
2379
2480
|
"type": "text",
|
|
2380
|
-
"required": false,
|
|
2381
2481
|
"_meta": {
|
|
2382
|
-
"sqlType": "UUID",
|
|
2383
|
-
"nullable": true,
|
|
2384
2482
|
"__tenancy": {
|
|
2385
2483
|
"isTenantIdField": true,
|
|
2386
2484
|
"autoFilter": true,
|
|
@@ -2390,34 +2488,59 @@
|
|
|
2390
2488
|
"mode": "optional",
|
|
2391
2489
|
"field": "tenantId",
|
|
2392
2490
|
"allowSuperAdminBypass": false
|
|
2393
|
-
}
|
|
2394
|
-
|
|
2491
|
+
},
|
|
2492
|
+
"__statedOptions": [
|
|
2493
|
+
"sqlType",
|
|
2494
|
+
"nullable",
|
|
2495
|
+
"__tenancy",
|
|
2496
|
+
"required"
|
|
2497
|
+
],
|
|
2498
|
+
"sqlType": "UUID",
|
|
2499
|
+
"nullable": true,
|
|
2500
|
+
"required": false
|
|
2501
|
+
},
|
|
2502
|
+
"required": false
|
|
2395
2503
|
},
|
|
2396
2504
|
"lotId": {
|
|
2397
2505
|
"type": "foreignKey",
|
|
2398
|
-
"required": true,
|
|
2399
|
-
"related": "Lot",
|
|
2400
2506
|
"_meta": {
|
|
2507
|
+
"__statedOptions": [
|
|
2508
|
+
"required",
|
|
2509
|
+
"requiredFor",
|
|
2510
|
+
"onDelete",
|
|
2511
|
+
"onUpdate",
|
|
2512
|
+
"constraint",
|
|
2513
|
+
"related"
|
|
2514
|
+
],
|
|
2401
2515
|
"required": true,
|
|
2516
|
+
"requiredFor": "identity",
|
|
2517
|
+
"onDelete": "RESTRICT",
|
|
2518
|
+
"onUpdate": "RESTRICT",
|
|
2402
2519
|
"constraint": {
|
|
2403
2520
|
"engines": [
|
|
2404
2521
|
"postgres",
|
|
2405
2522
|
"sqlite"
|
|
2406
2523
|
]
|
|
2407
|
-
}
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2524
|
+
}
|
|
2525
|
+
},
|
|
2526
|
+
"required": true,
|
|
2527
|
+
"related": "Lot"
|
|
2411
2528
|
},
|
|
2412
2529
|
"kind": {
|
|
2413
2530
|
"type": "text",
|
|
2414
|
-
"required": true,
|
|
2415
|
-
"default": "attribute",
|
|
2416
|
-
"description": "What was corrected.",
|
|
2417
2531
|
"_meta": {
|
|
2532
|
+
"__statedOptions": [
|
|
2533
|
+
"required",
|
|
2534
|
+
"description",
|
|
2535
|
+
"default",
|
|
2536
|
+
"enum"
|
|
2537
|
+
],
|
|
2418
2538
|
"required": true,
|
|
2419
2539
|
"description": "What was corrected."
|
|
2420
2540
|
},
|
|
2541
|
+
"required": true,
|
|
2542
|
+
"default": "attribute",
|
|
2543
|
+
"description": "What was corrected.",
|
|
2421
2544
|
"enum": [
|
|
2422
2545
|
"lot_number",
|
|
2423
2546
|
"attribute",
|
|
@@ -2428,66 +2551,97 @@
|
|
|
2428
2551
|
},
|
|
2429
2552
|
"field": {
|
|
2430
2553
|
"type": "text",
|
|
2431
|
-
"required": false,
|
|
2432
|
-
"default": "",
|
|
2433
|
-
"description": "Which attribute changed, if one did.",
|
|
2434
2554
|
"_meta": {
|
|
2555
|
+
"__statedOptions": [
|
|
2556
|
+
"description",
|
|
2557
|
+
"default"
|
|
2558
|
+
],
|
|
2435
2559
|
"description": "Which attribute changed, if one did."
|
|
2436
|
-
}
|
|
2560
|
+
},
|
|
2561
|
+
"required": false,
|
|
2562
|
+
"default": "",
|
|
2563
|
+
"description": "Which attribute changed, if one did."
|
|
2437
2564
|
},
|
|
2438
2565
|
"oldValue": {
|
|
2439
2566
|
"type": "text",
|
|
2440
|
-
"required": false,
|
|
2441
|
-
"description": "What it was.",
|
|
2442
2567
|
"_meta": {
|
|
2568
|
+
"__statedOptions": [
|
|
2569
|
+
"description"
|
|
2570
|
+
],
|
|
2443
2571
|
"description": "What it was."
|
|
2444
|
-
}
|
|
2572
|
+
},
|
|
2573
|
+
"required": false,
|
|
2574
|
+
"description": "What it was."
|
|
2445
2575
|
},
|
|
2446
2576
|
"newValue": {
|
|
2447
2577
|
"type": "text",
|
|
2448
|
-
"required": false,
|
|
2449
|
-
"description": "What it is now.",
|
|
2450
2578
|
"_meta": {
|
|
2579
|
+
"__statedOptions": [
|
|
2580
|
+
"description"
|
|
2581
|
+
],
|
|
2451
2582
|
"description": "What it is now."
|
|
2452
|
-
}
|
|
2583
|
+
},
|
|
2584
|
+
"required": false,
|
|
2585
|
+
"description": "What it is now."
|
|
2453
2586
|
},
|
|
2454
2587
|
"reason": {
|
|
2455
2588
|
"type": "text",
|
|
2456
|
-
"required": true,
|
|
2457
|
-
"description": "Why it was corrected.",
|
|
2458
|
-
"maxLength": 1000,
|
|
2459
2589
|
"_meta": {
|
|
2460
|
-
"
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2590
|
+
"__statedOptions": [
|
|
2591
|
+
"maxLength",
|
|
2592
|
+
"description"
|
|
2593
|
+
],
|
|
2594
|
+
"description": "Why it was corrected.",
|
|
2595
|
+
"maxLength": 1000
|
|
2596
|
+
},
|
|
2597
|
+
"required": false,
|
|
2598
|
+
"description": "Why it was corrected.",
|
|
2599
|
+
"maxLength": 1000
|
|
2464
2600
|
},
|
|
2465
2601
|
"usageId": {
|
|
2466
2602
|
"type": "text",
|
|
2467
|
-
"required": false,
|
|
2468
2603
|
"_meta": {
|
|
2469
|
-
"
|
|
2470
|
-
|
|
2604
|
+
"__statedOptions": [
|
|
2605
|
+
"nullable",
|
|
2606
|
+
"required"
|
|
2607
|
+
],
|
|
2608
|
+
"nullable": true,
|
|
2609
|
+
"required": false
|
|
2610
|
+
},
|
|
2611
|
+
"required": false
|
|
2471
2612
|
},
|
|
2472
2613
|
"documentId": {
|
|
2473
2614
|
"type": "text",
|
|
2474
|
-
"required": false,
|
|
2475
2615
|
"_meta": {
|
|
2476
|
-
"
|
|
2477
|
-
|
|
2616
|
+
"__statedOptions": [
|
|
2617
|
+
"nullable",
|
|
2618
|
+
"required"
|
|
2619
|
+
],
|
|
2620
|
+
"nullable": true,
|
|
2621
|
+
"required": false
|
|
2622
|
+
},
|
|
2623
|
+
"required": false
|
|
2478
2624
|
},
|
|
2479
2625
|
"actorProfileId": {
|
|
2480
2626
|
"type": "crossPackageRef",
|
|
2627
|
+
"_meta": {
|
|
2628
|
+
"__statedOptions": [
|
|
2629
|
+
"related"
|
|
2630
|
+
]
|
|
2631
|
+
},
|
|
2481
2632
|
"required": false,
|
|
2482
2633
|
"related": "@happyvertical/smrt-profiles:Profile"
|
|
2483
2634
|
},
|
|
2484
2635
|
"correctedAt": {
|
|
2485
2636
|
"type": "datetime",
|
|
2486
|
-
"required": false,
|
|
2487
|
-
"description": "When it was corrected.",
|
|
2488
2637
|
"_meta": {
|
|
2638
|
+
"__statedOptions": [
|
|
2639
|
+
"description"
|
|
2640
|
+
],
|
|
2489
2641
|
"description": "When it was corrected."
|
|
2490
|
-
}
|
|
2642
|
+
},
|
|
2643
|
+
"required": false,
|
|
2644
|
+
"description": "When it was corrected."
|
|
2491
2645
|
}
|
|
2492
2646
|
},
|
|
2493
2647
|
"methods": {},
|
|
@@ -2540,11 +2694,6 @@
|
|
|
2540
2694
|
"rule": "required",
|
|
2541
2695
|
"fieldType": "text"
|
|
2542
2696
|
},
|
|
2543
|
-
{
|
|
2544
|
-
"field": "reason",
|
|
2545
|
-
"rule": "required",
|
|
2546
|
-
"fieldType": "text"
|
|
2547
|
-
},
|
|
2548
2697
|
{
|
|
2549
2698
|
"field": "reason",
|
|
2550
2699
|
"rule": "maxLength",
|
|
@@ -2554,7 +2703,7 @@
|
|
|
2554
2703
|
],
|
|
2555
2704
|
"schema": {
|
|
2556
2705
|
"tableName": "inventory_lot_corrections",
|
|
2557
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"inventory_lot_corrections\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"lot_id\" UUID NOT NULL,\n \"kind\" TEXT NOT NULL DEFAULT 'attribute',\n \"field\" TEXT DEFAULT '',\n \"old_value\" TEXT,\n \"new_value\" TEXT,\n \"reason\" TEXT
|
|
2706
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"inventory_lot_corrections\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"lot_id\" UUID NOT NULL,\n \"kind\" TEXT NOT NULL DEFAULT 'attribute',\n \"field\" TEXT DEFAULT '',\n \"old_value\" TEXT,\n \"new_value\" TEXT,\n \"reason\" TEXT,\n \"usage_id\" TEXT,\n \"document_id\" TEXT,\n \"actor_profile_id\" UUID,\n \"corrected_at\" TIMESTAMP\n);",
|
|
2558
2707
|
"columns": {
|
|
2559
2708
|
"_sync_origin_device_id": {
|
|
2560
2709
|
"type": "TEXT"
|
|
@@ -2633,7 +2782,7 @@
|
|
|
2633
2782
|
},
|
|
2634
2783
|
"reason": {
|
|
2635
2784
|
"type": "TEXT",
|
|
2636
|
-
"notNull":
|
|
2785
|
+
"notNull": false,
|
|
2637
2786
|
"unique": false
|
|
2638
2787
|
},
|
|
2639
2788
|
"usage_id": {
|
|
@@ -2686,7 +2835,7 @@
|
|
|
2686
2835
|
]
|
|
2687
2836
|
}
|
|
2688
2837
|
],
|
|
2689
|
-
"version": "
|
|
2838
|
+
"version": "a4ab8ad7"
|
|
2690
2839
|
},
|
|
2691
2840
|
"importPath": "@happyvertical/smrt-inventory"
|
|
2692
2841
|
},
|
|
@@ -2695,15 +2844,12 @@
|
|
|
2695
2844
|
"className": "LotDocument",
|
|
2696
2845
|
"qualifiedName": "@happyvertical/smrt-inventory:LotDocument",
|
|
2697
2846
|
"collection": "lotdocuments",
|
|
2698
|
-
"filePath": "
|
|
2847
|
+
"filePath": "src/models/LotDocument.ts",
|
|
2699
2848
|
"packageName": "@happyvertical/smrt-inventory",
|
|
2700
2849
|
"fields": {
|
|
2701
2850
|
"tenantId": {
|
|
2702
2851
|
"type": "text",
|
|
2703
|
-
"required": false,
|
|
2704
2852
|
"_meta": {
|
|
2705
|
-
"sqlType": "UUID",
|
|
2706
|
-
"nullable": true,
|
|
2707
2853
|
"__tenancy": {
|
|
2708
2854
|
"isTenantIdField": true,
|
|
2709
2855
|
"autoFilter": true,
|
|
@@ -2713,61 +2859,107 @@
|
|
|
2713
2859
|
"mode": "optional",
|
|
2714
2860
|
"field": "tenantId",
|
|
2715
2861
|
"allowSuperAdminBypass": false
|
|
2716
|
-
}
|
|
2717
|
-
|
|
2862
|
+
},
|
|
2863
|
+
"__statedOptions": [
|
|
2864
|
+
"sqlType",
|
|
2865
|
+
"nullable",
|
|
2866
|
+
"__tenancy",
|
|
2867
|
+
"required"
|
|
2868
|
+
],
|
|
2869
|
+
"sqlType": "UUID",
|
|
2870
|
+
"nullable": true,
|
|
2871
|
+
"required": false
|
|
2872
|
+
},
|
|
2873
|
+
"required": false
|
|
2718
2874
|
},
|
|
2719
2875
|
"lotId": {
|
|
2720
2876
|
"type": "foreignKey",
|
|
2721
|
-
"required": true,
|
|
2722
|
-
"related": "Lot",
|
|
2723
2877
|
"_meta": {
|
|
2878
|
+
"__statedOptions": [
|
|
2879
|
+
"required",
|
|
2880
|
+
"requiredFor",
|
|
2881
|
+
"onDelete",
|
|
2882
|
+
"onUpdate",
|
|
2883
|
+
"constraint",
|
|
2884
|
+
"related"
|
|
2885
|
+
],
|
|
2724
2886
|
"required": true,
|
|
2887
|
+
"requiredFor": "identity",
|
|
2888
|
+
"onDelete": "RESTRICT",
|
|
2889
|
+
"onUpdate": "RESTRICT",
|
|
2725
2890
|
"constraint": {
|
|
2726
2891
|
"engines": [
|
|
2727
2892
|
"postgres",
|
|
2728
2893
|
"sqlite"
|
|
2729
2894
|
]
|
|
2730
|
-
}
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2895
|
+
}
|
|
2896
|
+
},
|
|
2897
|
+
"required": true,
|
|
2898
|
+
"related": "Lot"
|
|
2734
2899
|
},
|
|
2735
2900
|
"assetId": {
|
|
2736
2901
|
"type": "crossPackageRef",
|
|
2902
|
+
"_meta": {
|
|
2903
|
+
"__statedOptions": [
|
|
2904
|
+
"related"
|
|
2905
|
+
]
|
|
2906
|
+
},
|
|
2737
2907
|
"required": false,
|
|
2738
2908
|
"related": "@happyvertical/smrt-assets:Asset"
|
|
2739
2909
|
},
|
|
2740
2910
|
"role": {
|
|
2741
2911
|
"type": "text",
|
|
2742
|
-
"required": false,
|
|
2743
|
-
"default": "certificate",
|
|
2744
|
-
"description": "What the document is for, for example certificate.",
|
|
2745
2912
|
"_meta": {
|
|
2913
|
+
"__statedOptions": [
|
|
2914
|
+
"description",
|
|
2915
|
+
"default"
|
|
2916
|
+
],
|
|
2746
2917
|
"description": "What the document is for, for example certificate."
|
|
2747
|
-
}
|
|
2918
|
+
},
|
|
2919
|
+
"required": false,
|
|
2920
|
+
"default": "certificate",
|
|
2921
|
+
"description": "What the document is for, for example certificate."
|
|
2748
2922
|
},
|
|
2749
2923
|
"attachedAt": {
|
|
2750
2924
|
"type": "datetime",
|
|
2751
|
-
"required": false,
|
|
2752
|
-
"description": "When it was attached.",
|
|
2753
2925
|
"_meta": {
|
|
2926
|
+
"__statedOptions": [
|
|
2927
|
+
"description"
|
|
2928
|
+
],
|
|
2754
2929
|
"description": "When it was attached."
|
|
2755
|
-
}
|
|
2930
|
+
},
|
|
2931
|
+
"required": false,
|
|
2932
|
+
"description": "When it was attached."
|
|
2756
2933
|
},
|
|
2757
2934
|
"attachedByProfileId": {
|
|
2758
2935
|
"type": "crossPackageRef",
|
|
2936
|
+
"_meta": {
|
|
2937
|
+
"__statedOptions": [
|
|
2938
|
+
"related"
|
|
2939
|
+
]
|
|
2940
|
+
},
|
|
2759
2941
|
"required": false,
|
|
2760
2942
|
"related": "@happyvertical/smrt-profiles:Profile"
|
|
2761
2943
|
},
|
|
2762
2944
|
"detachedAt": {
|
|
2763
2945
|
"type": "datetime",
|
|
2764
|
-
"required": false,
|
|
2765
2946
|
"_meta": {
|
|
2766
|
-
"
|
|
2767
|
-
|
|
2947
|
+
"__statedOptions": [
|
|
2948
|
+
"nullable",
|
|
2949
|
+
"required"
|
|
2950
|
+
],
|
|
2951
|
+
"nullable": true,
|
|
2952
|
+
"required": false
|
|
2953
|
+
},
|
|
2954
|
+
"required": false
|
|
2768
2955
|
},
|
|
2769
2956
|
"detachedByProfileId": {
|
|
2770
2957
|
"type": "crossPackageRef",
|
|
2958
|
+
"_meta": {
|
|
2959
|
+
"__statedOptions": [
|
|
2960
|
+
"related"
|
|
2961
|
+
]
|
|
2962
|
+
},
|
|
2771
2963
|
"required": false,
|
|
2772
2964
|
"related": "@happyvertical/smrt-profiles:Profile"
|
|
2773
2965
|
}
|
|
@@ -2964,15 +3156,12 @@
|
|
|
2964
3156
|
"className": "LotStockLevel",
|
|
2965
3157
|
"qualifiedName": "@happyvertical/smrt-inventory:LotStockLevel",
|
|
2966
3158
|
"collection": "lotstocklevels",
|
|
2967
|
-
"filePath": "
|
|
3159
|
+
"filePath": "src/models/LotStockLevel.ts",
|
|
2968
3160
|
"packageName": "@happyvertical/smrt-inventory",
|
|
2969
3161
|
"fields": {
|
|
2970
3162
|
"tenantId": {
|
|
2971
3163
|
"type": "text",
|
|
2972
|
-
"required": false,
|
|
2973
3164
|
"_meta": {
|
|
2974
|
-
"sqlType": "UUID",
|
|
2975
|
-
"nullable": true,
|
|
2976
3165
|
"__tenancy": {
|
|
2977
3166
|
"isTenantIdField": true,
|
|
2978
3167
|
"autoFilter": true,
|
|
@@ -2982,53 +3171,89 @@
|
|
|
2982
3171
|
"mode": "optional",
|
|
2983
3172
|
"field": "tenantId",
|
|
2984
3173
|
"allowSuperAdminBypass": false
|
|
2985
|
-
}
|
|
2986
|
-
|
|
3174
|
+
},
|
|
3175
|
+
"__statedOptions": [
|
|
3176
|
+
"sqlType",
|
|
3177
|
+
"nullable",
|
|
3178
|
+
"__tenancy",
|
|
3179
|
+
"required"
|
|
3180
|
+
],
|
|
3181
|
+
"sqlType": "UUID",
|
|
3182
|
+
"nullable": true,
|
|
3183
|
+
"required": false
|
|
3184
|
+
},
|
|
3185
|
+
"required": false
|
|
2987
3186
|
},
|
|
2988
3187
|
"lotId": {
|
|
2989
3188
|
"type": "foreignKey",
|
|
2990
|
-
"required": true,
|
|
2991
|
-
"related": "Lot",
|
|
2992
3189
|
"_meta": {
|
|
3190
|
+
"__statedOptions": [
|
|
3191
|
+
"required",
|
|
3192
|
+
"requiredFor",
|
|
3193
|
+
"onDelete",
|
|
3194
|
+
"onUpdate",
|
|
3195
|
+
"constraint",
|
|
3196
|
+
"related"
|
|
3197
|
+
],
|
|
2993
3198
|
"required": true,
|
|
3199
|
+
"requiredFor": "identity",
|
|
3200
|
+
"onDelete": "RESTRICT",
|
|
3201
|
+
"onUpdate": "RESTRICT",
|
|
2994
3202
|
"constraint": {
|
|
2995
3203
|
"engines": [
|
|
2996
3204
|
"postgres",
|
|
2997
3205
|
"sqlite"
|
|
2998
3206
|
]
|
|
2999
|
-
}
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3207
|
+
}
|
|
3208
|
+
},
|
|
3209
|
+
"required": true,
|
|
3210
|
+
"related": "Lot"
|
|
3003
3211
|
},
|
|
3004
3212
|
"skuId": {
|
|
3005
3213
|
"type": "text",
|
|
3006
|
-
"required": false,
|
|
3007
|
-
"default": "",
|
|
3008
|
-
"description": "The item the lot is of.",
|
|
3009
3214
|
"_meta": {
|
|
3215
|
+
"__statedOptions": [
|
|
3216
|
+
"description",
|
|
3217
|
+
"default"
|
|
3218
|
+
],
|
|
3010
3219
|
"description": "The item the lot is of."
|
|
3011
|
-
}
|
|
3220
|
+
},
|
|
3221
|
+
"required": false,
|
|
3222
|
+
"default": "",
|
|
3223
|
+
"description": "The item the lot is of."
|
|
3012
3224
|
},
|
|
3013
3225
|
"locationId": {
|
|
3014
3226
|
"type": "text",
|
|
3015
|
-
"required": true,
|
|
3016
|
-
"default": "",
|
|
3017
|
-
"description": "Where the lot is kept.",
|
|
3018
3227
|
"_meta": {
|
|
3228
|
+
"__statedOptions": [
|
|
3229
|
+
"required",
|
|
3230
|
+
"requiredFor",
|
|
3231
|
+
"description",
|
|
3232
|
+
"default"
|
|
3233
|
+
],
|
|
3019
3234
|
"required": true,
|
|
3020
|
-
"description": "Where the lot is kept."
|
|
3021
|
-
|
|
3235
|
+
"description": "Where the lot is kept.",
|
|
3236
|
+
"requiredFor": "identity"
|
|
3237
|
+
},
|
|
3238
|
+
"required": true,
|
|
3239
|
+
"default": "",
|
|
3240
|
+
"description": "Where the lot is kept."
|
|
3022
3241
|
},
|
|
3023
3242
|
"state": {
|
|
3024
3243
|
"type": "text",
|
|
3025
|
-
"required": true,
|
|
3026
|
-
"default": "available",
|
|
3027
|
-
"description": "The state of this stock: available, allocated, wip, qc_hold or damaged.",
|
|
3028
3244
|
"_meta": {
|
|
3245
|
+
"__statedOptions": [
|
|
3246
|
+
"required",
|
|
3247
|
+
"description",
|
|
3248
|
+
"default",
|
|
3249
|
+
"enum"
|
|
3250
|
+
],
|
|
3029
3251
|
"required": true,
|
|
3030
3252
|
"description": "The state of this stock: available, allocated, wip, qc_hold or damaged."
|
|
3031
3253
|
},
|
|
3254
|
+
"required": true,
|
|
3255
|
+
"default": "available",
|
|
3256
|
+
"description": "The state of this stock: available, allocated, wip, qc_hold or damaged.",
|
|
3032
3257
|
"enum": [
|
|
3033
3258
|
"available",
|
|
3034
3259
|
"allocated",
|
|
@@ -3039,11 +3264,14 @@
|
|
|
3039
3264
|
},
|
|
3040
3265
|
"qty": {
|
|
3041
3266
|
"type": "decimal",
|
|
3042
|
-
"required": false,
|
|
3043
|
-
"description": "How many are on hand.",
|
|
3044
3267
|
"_meta": {
|
|
3268
|
+
"__statedOptions": [
|
|
3269
|
+
"description"
|
|
3270
|
+
],
|
|
3045
3271
|
"description": "How many are on hand."
|
|
3046
|
-
}
|
|
3272
|
+
},
|
|
3273
|
+
"required": false,
|
|
3274
|
+
"description": "How many are on hand."
|
|
3047
3275
|
}
|
|
3048
3276
|
},
|
|
3049
3277
|
"methods": {},
|
|
@@ -3214,15 +3442,12 @@
|
|
|
3214
3442
|
"className": "LotUsage",
|
|
3215
3443
|
"qualifiedName": "@happyvertical/smrt-inventory:LotUsage",
|
|
3216
3444
|
"collection": "lotusages",
|
|
3217
|
-
"filePath": "
|
|
3445
|
+
"filePath": "src/models/LotUsage.ts",
|
|
3218
3446
|
"packageName": "@happyvertical/smrt-inventory",
|
|
3219
3447
|
"fields": {
|
|
3220
3448
|
"tenantId": {
|
|
3221
3449
|
"type": "text",
|
|
3222
|
-
"required": false,
|
|
3223
3450
|
"_meta": {
|
|
3224
|
-
"sqlType": "UUID",
|
|
3225
|
-
"nullable": true,
|
|
3226
3451
|
"__tenancy": {
|
|
3227
3452
|
"isTenantIdField": true,
|
|
3228
3453
|
"autoFilter": true,
|
|
@@ -3232,71 +3457,119 @@
|
|
|
3232
3457
|
"mode": "optional",
|
|
3233
3458
|
"field": "tenantId",
|
|
3234
3459
|
"allowSuperAdminBypass": false
|
|
3235
|
-
}
|
|
3236
|
-
|
|
3460
|
+
},
|
|
3461
|
+
"__statedOptions": [
|
|
3462
|
+
"sqlType",
|
|
3463
|
+
"nullable",
|
|
3464
|
+
"__tenancy",
|
|
3465
|
+
"required"
|
|
3466
|
+
],
|
|
3467
|
+
"sqlType": "UUID",
|
|
3468
|
+
"nullable": true,
|
|
3469
|
+
"required": false
|
|
3470
|
+
},
|
|
3471
|
+
"required": false
|
|
3237
3472
|
},
|
|
3238
3473
|
"lotId": {
|
|
3239
3474
|
"type": "foreignKey",
|
|
3240
|
-
"required": true,
|
|
3241
|
-
"related": "Lot",
|
|
3242
3475
|
"_meta": {
|
|
3476
|
+
"__statedOptions": [
|
|
3477
|
+
"required",
|
|
3478
|
+
"requiredFor",
|
|
3479
|
+
"onDelete",
|
|
3480
|
+
"onUpdate",
|
|
3481
|
+
"constraint",
|
|
3482
|
+
"related"
|
|
3483
|
+
],
|
|
3243
3484
|
"required": true,
|
|
3485
|
+
"requiredFor": "identity",
|
|
3486
|
+
"onDelete": "RESTRICT",
|
|
3487
|
+
"onUpdate": "RESTRICT",
|
|
3244
3488
|
"constraint": {
|
|
3245
3489
|
"engines": [
|
|
3246
3490
|
"postgres",
|
|
3247
3491
|
"sqlite"
|
|
3248
3492
|
]
|
|
3249
|
-
}
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3493
|
+
}
|
|
3494
|
+
},
|
|
3495
|
+
"required": true,
|
|
3496
|
+
"related": "Lot"
|
|
3253
3497
|
},
|
|
3254
3498
|
"consumerType": {
|
|
3255
3499
|
"type": "text",
|
|
3256
|
-
"required": true,
|
|
3257
|
-
"default": "",
|
|
3258
|
-
"description": "What kind of record used the lot.",
|
|
3259
3500
|
"_meta": {
|
|
3501
|
+
"__statedOptions": [
|
|
3502
|
+
"required",
|
|
3503
|
+
"requiredFor",
|
|
3504
|
+
"description",
|
|
3505
|
+
"default"
|
|
3506
|
+
],
|
|
3260
3507
|
"required": true,
|
|
3261
|
-
"description": "What kind of record used the lot."
|
|
3262
|
-
|
|
3508
|
+
"description": "What kind of record used the lot.",
|
|
3509
|
+
"requiredFor": "identity"
|
|
3510
|
+
},
|
|
3511
|
+
"required": true,
|
|
3512
|
+
"default": "",
|
|
3513
|
+
"description": "What kind of record used the lot."
|
|
3263
3514
|
},
|
|
3264
3515
|
"consumerId": {
|
|
3265
3516
|
"type": "text",
|
|
3266
|
-
"required": true,
|
|
3267
|
-
"default": "",
|
|
3268
|
-
"description": "The record that used the lot.",
|
|
3269
3517
|
"_meta": {
|
|
3518
|
+
"__statedOptions": [
|
|
3519
|
+
"required",
|
|
3520
|
+
"requiredFor",
|
|
3521
|
+
"description",
|
|
3522
|
+
"default"
|
|
3523
|
+
],
|
|
3270
3524
|
"required": true,
|
|
3271
|
-
"description": "The record that used the lot."
|
|
3272
|
-
|
|
3525
|
+
"description": "The record that used the lot.",
|
|
3526
|
+
"requiredFor": "identity"
|
|
3527
|
+
},
|
|
3528
|
+
"required": true,
|
|
3529
|
+
"default": "",
|
|
3530
|
+
"description": "The record that used the lot."
|
|
3273
3531
|
},
|
|
3274
3532
|
"qty": {
|
|
3275
3533
|
"type": "decimal",
|
|
3276
|
-
"required": false,
|
|
3277
|
-
"description": "How much was used.",
|
|
3278
3534
|
"_meta": {
|
|
3535
|
+
"__statedOptions": [
|
|
3536
|
+
"nullable",
|
|
3537
|
+
"description",
|
|
3538
|
+
"required"
|
|
3539
|
+
],
|
|
3540
|
+
"description": "How much was used.",
|
|
3279
3541
|
"nullable": true,
|
|
3280
|
-
"
|
|
3281
|
-
}
|
|
3542
|
+
"required": false
|
|
3543
|
+
},
|
|
3544
|
+
"required": false,
|
|
3545
|
+
"description": "How much was used."
|
|
3282
3546
|
},
|
|
3283
3547
|
"unit": {
|
|
3284
3548
|
"type": "text",
|
|
3285
|
-
"required": false,
|
|
3286
|
-
"default": "",
|
|
3287
|
-
"description": "The unit of measure.",
|
|
3288
3549
|
"_meta": {
|
|
3550
|
+
"__statedOptions": [
|
|
3551
|
+
"description",
|
|
3552
|
+
"default"
|
|
3553
|
+
],
|
|
3289
3554
|
"description": "The unit of measure."
|
|
3290
|
-
}
|
|
3555
|
+
},
|
|
3556
|
+
"required": false,
|
|
3557
|
+
"default": "",
|
|
3558
|
+
"description": "The unit of measure."
|
|
3291
3559
|
},
|
|
3292
3560
|
"status": {
|
|
3293
3561
|
"type": "text",
|
|
3294
|
-
"required": false,
|
|
3295
|
-
"default": "active",
|
|
3296
|
-
"description": "Whether the link still stands: active or unlinked.",
|
|
3297
3562
|
"_meta": {
|
|
3563
|
+
"__statedOptions": [
|
|
3564
|
+
"description",
|
|
3565
|
+
"default",
|
|
3566
|
+
"enum"
|
|
3567
|
+
],
|
|
3298
3568
|
"description": "Whether the link still stands: active or unlinked."
|
|
3299
3569
|
},
|
|
3570
|
+
"required": false,
|
|
3571
|
+
"default": "active",
|
|
3572
|
+
"description": "Whether the link still stands: active or unlinked.",
|
|
3300
3573
|
"enum": [
|
|
3301
3574
|
"active",
|
|
3302
3575
|
"unlinked"
|
|
@@ -3304,45 +3577,72 @@
|
|
|
3304
3577
|
},
|
|
3305
3578
|
"linkedAt": {
|
|
3306
3579
|
"type": "datetime",
|
|
3307
|
-
"required": false,
|
|
3308
|
-
"description": "When the lot was linked.",
|
|
3309
3580
|
"_meta": {
|
|
3581
|
+
"__statedOptions": [
|
|
3582
|
+
"description"
|
|
3583
|
+
],
|
|
3310
3584
|
"description": "When the lot was linked."
|
|
3311
|
-
}
|
|
3585
|
+
},
|
|
3586
|
+
"required": false,
|
|
3587
|
+
"description": "When the lot was linked."
|
|
3312
3588
|
},
|
|
3313
3589
|
"linkedByProfileId": {
|
|
3314
3590
|
"type": "crossPackageRef",
|
|
3591
|
+
"_meta": {
|
|
3592
|
+
"__statedOptions": [
|
|
3593
|
+
"related"
|
|
3594
|
+
]
|
|
3595
|
+
},
|
|
3315
3596
|
"required": false,
|
|
3316
3597
|
"related": "@happyvertical/smrt-profiles:Profile"
|
|
3317
3598
|
},
|
|
3318
3599
|
"unlinkedAt": {
|
|
3319
3600
|
"type": "datetime",
|
|
3320
|
-
"required": false,
|
|
3321
3601
|
"_meta": {
|
|
3322
|
-
"
|
|
3323
|
-
|
|
3602
|
+
"__statedOptions": [
|
|
3603
|
+
"nullable",
|
|
3604
|
+
"required"
|
|
3605
|
+
],
|
|
3606
|
+
"nullable": true,
|
|
3607
|
+
"required": false
|
|
3608
|
+
},
|
|
3609
|
+
"required": false
|
|
3324
3610
|
},
|
|
3325
3611
|
"unlinkedByProfileId": {
|
|
3326
3612
|
"type": "crossPackageRef",
|
|
3613
|
+
"_meta": {
|
|
3614
|
+
"__statedOptions": [
|
|
3615
|
+
"related"
|
|
3616
|
+
]
|
|
3617
|
+
},
|
|
3327
3618
|
"required": false,
|
|
3328
3619
|
"related": "@happyvertical/smrt-profiles:Profile"
|
|
3329
3620
|
},
|
|
3330
3621
|
"unlinkReason": {
|
|
3331
3622
|
"type": "text",
|
|
3332
|
-
"required": false,
|
|
3333
|
-
"description": "Why the link was removed.",
|
|
3334
3623
|
"_meta": {
|
|
3624
|
+
"__statedOptions": [
|
|
3625
|
+
"description"
|
|
3626
|
+
],
|
|
3335
3627
|
"description": "Why the link was removed."
|
|
3336
|
-
}
|
|
3628
|
+
},
|
|
3629
|
+
"required": false,
|
|
3630
|
+
"description": "Why the link was removed."
|
|
3337
3631
|
},
|
|
3338
3632
|
"movementId": {
|
|
3339
3633
|
"type": "text",
|
|
3340
|
-
"required": false,
|
|
3341
|
-
"description": "The stock movement for this use, if any.",
|
|
3342
3634
|
"_meta": {
|
|
3635
|
+
"__statedOptions": [
|
|
3636
|
+
"nullable",
|
|
3637
|
+
"description",
|
|
3638
|
+
"required"
|
|
3639
|
+
],
|
|
3640
|
+
"description": "The stock movement for this use, if any.",
|
|
3343
3641
|
"nullable": true,
|
|
3344
|
-
"
|
|
3345
|
-
}
|
|
3642
|
+
"required": false
|
|
3643
|
+
},
|
|
3644
|
+
"required": false,
|
|
3645
|
+
"description": "The stock movement for this use, if any."
|
|
3346
3646
|
}
|
|
3347
3647
|
},
|
|
3348
3648
|
"methods": {},
|
|
@@ -3584,15 +3884,12 @@
|
|
|
3584
3884
|
"className": "StockLevel",
|
|
3585
3885
|
"qualifiedName": "@happyvertical/smrt-inventory:StockLevel",
|
|
3586
3886
|
"collection": "stocklevels",
|
|
3587
|
-
"filePath": "
|
|
3887
|
+
"filePath": "src/models/StockLevel.ts",
|
|
3588
3888
|
"packageName": "@happyvertical/smrt-inventory",
|
|
3589
3889
|
"fields": {
|
|
3590
3890
|
"tenantId": {
|
|
3591
3891
|
"type": "text",
|
|
3592
|
-
"required": false,
|
|
3593
3892
|
"_meta": {
|
|
3594
|
-
"sqlType": "UUID",
|
|
3595
|
-
"nullable": true,
|
|
3596
3893
|
"__tenancy": {
|
|
3597
3894
|
"isTenantIdField": true,
|
|
3598
3895
|
"autoFilter": true,
|
|
@@ -3602,38 +3899,68 @@
|
|
|
3602
3899
|
"mode": "optional",
|
|
3603
3900
|
"field": "tenantId",
|
|
3604
3901
|
"allowSuperAdminBypass": false
|
|
3605
|
-
}
|
|
3606
|
-
|
|
3902
|
+
},
|
|
3903
|
+
"__statedOptions": [
|
|
3904
|
+
"sqlType",
|
|
3905
|
+
"nullable",
|
|
3906
|
+
"__tenancy",
|
|
3907
|
+
"required"
|
|
3908
|
+
],
|
|
3909
|
+
"sqlType": "UUID",
|
|
3910
|
+
"nullable": true,
|
|
3911
|
+
"required": false
|
|
3912
|
+
},
|
|
3913
|
+
"required": false
|
|
3607
3914
|
},
|
|
3608
3915
|
"skuId": {
|
|
3609
3916
|
"type": "text",
|
|
3610
|
-
"required": true,
|
|
3611
|
-
"default": "",
|
|
3612
|
-
"description": "The item being counted.",
|
|
3613
3917
|
"_meta": {
|
|
3918
|
+
"__statedOptions": [
|
|
3919
|
+
"required",
|
|
3920
|
+
"requiredFor",
|
|
3921
|
+
"description",
|
|
3922
|
+
"default"
|
|
3923
|
+
],
|
|
3614
3924
|
"required": true,
|
|
3615
|
-
"description": "The item being counted."
|
|
3616
|
-
|
|
3925
|
+
"description": "The item being counted.",
|
|
3926
|
+
"requiredFor": "identity"
|
|
3927
|
+
},
|
|
3928
|
+
"required": true,
|
|
3929
|
+
"default": "",
|
|
3930
|
+
"description": "The item being counted."
|
|
3617
3931
|
},
|
|
3618
3932
|
"locationId": {
|
|
3619
3933
|
"type": "text",
|
|
3620
|
-
"required": true,
|
|
3621
|
-
"default": "",
|
|
3622
|
-
"description": "Where the stock is kept.",
|
|
3623
3934
|
"_meta": {
|
|
3935
|
+
"__statedOptions": [
|
|
3936
|
+
"required",
|
|
3937
|
+
"requiredFor",
|
|
3938
|
+
"description",
|
|
3939
|
+
"default"
|
|
3940
|
+
],
|
|
3624
3941
|
"required": true,
|
|
3625
|
-
"description": "Where the stock is kept."
|
|
3626
|
-
|
|
3942
|
+
"description": "Where the stock is kept.",
|
|
3943
|
+
"requiredFor": "identity"
|
|
3944
|
+
},
|
|
3945
|
+
"required": true,
|
|
3946
|
+
"default": "",
|
|
3947
|
+
"description": "Where the stock is kept."
|
|
3627
3948
|
},
|
|
3628
3949
|
"state": {
|
|
3629
3950
|
"type": "text",
|
|
3630
|
-
"required": true,
|
|
3631
|
-
"default": "available",
|
|
3632
|
-
"description": "The state of this stock: available, allocated, wip, qc_hold or damaged.",
|
|
3633
3951
|
"_meta": {
|
|
3952
|
+
"__statedOptions": [
|
|
3953
|
+
"required",
|
|
3954
|
+
"description",
|
|
3955
|
+
"default",
|
|
3956
|
+
"enum"
|
|
3957
|
+
],
|
|
3634
3958
|
"required": true,
|
|
3635
3959
|
"description": "The state of this stock: available, allocated, wip, qc_hold or damaged."
|
|
3636
3960
|
},
|
|
3961
|
+
"required": true,
|
|
3962
|
+
"default": "available",
|
|
3963
|
+
"description": "The state of this stock: available, allocated, wip, qc_hold or damaged.",
|
|
3637
3964
|
"enum": [
|
|
3638
3965
|
"available",
|
|
3639
3966
|
"allocated",
|
|
@@ -3644,25 +3971,38 @@
|
|
|
3644
3971
|
},
|
|
3645
3972
|
"qty": {
|
|
3646
3973
|
"type": "decimal",
|
|
3647
|
-
"required": false,
|
|
3648
|
-
"description": "How many are on hand.",
|
|
3649
3974
|
"_meta": {
|
|
3975
|
+
"__statedOptions": [
|
|
3976
|
+
"description"
|
|
3977
|
+
],
|
|
3650
3978
|
"description": "How many are on hand."
|
|
3651
|
-
}
|
|
3979
|
+
},
|
|
3980
|
+
"required": false,
|
|
3981
|
+
"description": "How many are on hand."
|
|
3652
3982
|
},
|
|
3653
3983
|
"reorderPoint": {
|
|
3654
3984
|
"type": "decimal",
|
|
3655
|
-
"required": false,
|
|
3656
3985
|
"_meta": {
|
|
3657
|
-
"
|
|
3658
|
-
|
|
3986
|
+
"__statedOptions": [
|
|
3987
|
+
"nullable",
|
|
3988
|
+
"required"
|
|
3989
|
+
],
|
|
3990
|
+
"nullable": true,
|
|
3991
|
+
"required": false
|
|
3992
|
+
},
|
|
3993
|
+
"required": false
|
|
3659
3994
|
},
|
|
3660
3995
|
"reorderQuantity": {
|
|
3661
3996
|
"type": "decimal",
|
|
3662
|
-
"required": false,
|
|
3663
3997
|
"_meta": {
|
|
3664
|
-
"
|
|
3665
|
-
|
|
3998
|
+
"__statedOptions": [
|
|
3999
|
+
"nullable",
|
|
4000
|
+
"required"
|
|
4001
|
+
],
|
|
4002
|
+
"nullable": true,
|
|
4003
|
+
"required": false
|
|
4004
|
+
},
|
|
4005
|
+
"required": false
|
|
3666
4006
|
}
|
|
3667
4007
|
},
|
|
3668
4008
|
"methods": {},
|
|
@@ -3848,15 +4188,12 @@
|
|
|
3848
4188
|
"className": "StockMovement",
|
|
3849
4189
|
"qualifiedName": "@happyvertical/smrt-inventory:StockMovement",
|
|
3850
4190
|
"collection": "stockmovements",
|
|
3851
|
-
"filePath": "
|
|
4191
|
+
"filePath": "src/models/StockMovement.ts",
|
|
3852
4192
|
"packageName": "@happyvertical/smrt-inventory",
|
|
3853
4193
|
"fields": {
|
|
3854
4194
|
"tenantId": {
|
|
3855
4195
|
"type": "text",
|
|
3856
|
-
"required": false,
|
|
3857
4196
|
"_meta": {
|
|
3858
|
-
"sqlType": "UUID",
|
|
3859
|
-
"nullable": true,
|
|
3860
4197
|
"__tenancy": {
|
|
3861
4198
|
"isTenantIdField": true,
|
|
3862
4199
|
"autoFilter": true,
|
|
@@ -3866,45 +4203,79 @@
|
|
|
3866
4203
|
"mode": "optional",
|
|
3867
4204
|
"field": "tenantId",
|
|
3868
4205
|
"allowSuperAdminBypass": false
|
|
3869
|
-
}
|
|
3870
|
-
|
|
4206
|
+
},
|
|
4207
|
+
"__statedOptions": [
|
|
4208
|
+
"sqlType",
|
|
4209
|
+
"nullable",
|
|
4210
|
+
"__tenancy",
|
|
4211
|
+
"required"
|
|
4212
|
+
],
|
|
4213
|
+
"sqlType": "UUID",
|
|
4214
|
+
"nullable": true,
|
|
4215
|
+
"required": false
|
|
4216
|
+
},
|
|
4217
|
+
"required": false
|
|
3871
4218
|
},
|
|
3872
4219
|
"skuId": {
|
|
3873
4220
|
"type": "text",
|
|
3874
|
-
"required": true,
|
|
3875
|
-
"default": "",
|
|
3876
|
-
"description": "The item that moved.",
|
|
3877
4221
|
"_meta": {
|
|
4222
|
+
"__statedOptions": [
|
|
4223
|
+
"required",
|
|
4224
|
+
"requiredFor",
|
|
4225
|
+
"description",
|
|
4226
|
+
"default"
|
|
4227
|
+
],
|
|
3878
4228
|
"required": true,
|
|
3879
|
-
"description": "The item that moved."
|
|
3880
|
-
|
|
4229
|
+
"description": "The item that moved.",
|
|
4230
|
+
"requiredFor": "identity"
|
|
4231
|
+
},
|
|
4232
|
+
"required": true,
|
|
4233
|
+
"default": "",
|
|
4234
|
+
"description": "The item that moved."
|
|
3881
4235
|
},
|
|
3882
4236
|
"locationId": {
|
|
3883
4237
|
"type": "text",
|
|
3884
|
-
"required": true,
|
|
3885
|
-
"default": "",
|
|
3886
|
-
"description": "The place it moved at.",
|
|
3887
4238
|
"_meta": {
|
|
4239
|
+
"__statedOptions": [
|
|
4240
|
+
"required",
|
|
4241
|
+
"requiredFor",
|
|
4242
|
+
"description",
|
|
4243
|
+
"default"
|
|
4244
|
+
],
|
|
3888
4245
|
"required": true,
|
|
3889
|
-
"description": "The place it moved at."
|
|
3890
|
-
|
|
4246
|
+
"description": "The place it moved at.",
|
|
4247
|
+
"requiredFor": "identity"
|
|
4248
|
+
},
|
|
4249
|
+
"required": true,
|
|
4250
|
+
"default": "",
|
|
4251
|
+
"description": "The place it moved at."
|
|
3891
4252
|
},
|
|
3892
4253
|
"lotId": {
|
|
3893
4254
|
"type": "text",
|
|
3894
|
-
"required": false,
|
|
3895
|
-
"description": "The lot that moved, when tracked by lot.",
|
|
3896
4255
|
"_meta": {
|
|
4256
|
+
"__statedOptions": [
|
|
4257
|
+
"nullable",
|
|
4258
|
+
"description",
|
|
4259
|
+
"required"
|
|
4260
|
+
],
|
|
4261
|
+
"description": "The lot that moved, when tracked by lot.",
|
|
3897
4262
|
"nullable": true,
|
|
3898
|
-
"
|
|
3899
|
-
}
|
|
4263
|
+
"required": false
|
|
4264
|
+
},
|
|
4265
|
+
"required": false,
|
|
4266
|
+
"description": "The lot that moved, when tracked by lot."
|
|
3900
4267
|
},
|
|
3901
4268
|
"fromState": {
|
|
3902
4269
|
"type": "text",
|
|
3903
|
-
"required": false,
|
|
3904
|
-
"description": "What it was before, for example available or damaged.",
|
|
3905
4270
|
"_meta": {
|
|
4271
|
+
"__statedOptions": [
|
|
4272
|
+
"description",
|
|
4273
|
+
"enum"
|
|
4274
|
+
],
|
|
3906
4275
|
"description": "What it was before, for example available or damaged."
|
|
3907
4276
|
},
|
|
4277
|
+
"required": false,
|
|
4278
|
+
"description": "What it was before, for example available or damaged.",
|
|
3908
4279
|
"enum": [
|
|
3909
4280
|
"available",
|
|
3910
4281
|
"allocated",
|
|
@@ -3915,11 +4286,15 @@
|
|
|
3915
4286
|
},
|
|
3916
4287
|
"toState": {
|
|
3917
4288
|
"type": "text",
|
|
3918
|
-
"required": false,
|
|
3919
|
-
"description": "What it became.",
|
|
3920
4289
|
"_meta": {
|
|
4290
|
+
"__statedOptions": [
|
|
4291
|
+
"description",
|
|
4292
|
+
"enum"
|
|
4293
|
+
],
|
|
3921
4294
|
"description": "What it became."
|
|
3922
4295
|
},
|
|
4296
|
+
"required": false,
|
|
4297
|
+
"description": "What it became.",
|
|
3923
4298
|
"enum": [
|
|
3924
4299
|
"available",
|
|
3925
4300
|
"allocated",
|
|
@@ -3930,53 +4305,83 @@
|
|
|
3930
4305
|
},
|
|
3931
4306
|
"qty": {
|
|
3932
4307
|
"type": "decimal",
|
|
3933
|
-
"required": false,
|
|
3934
|
-
"description": "How many moved.",
|
|
3935
4308
|
"_meta": {
|
|
4309
|
+
"__statedOptions": [
|
|
4310
|
+
"description"
|
|
4311
|
+
],
|
|
3936
4312
|
"description": "How many moved."
|
|
3937
|
-
}
|
|
4313
|
+
},
|
|
4314
|
+
"required": false,
|
|
4315
|
+
"description": "How many moved."
|
|
3938
4316
|
},
|
|
3939
4317
|
"reasonCode": {
|
|
3940
4318
|
"type": "text",
|
|
3941
|
-
"required": true,
|
|
3942
|
-
"default": "adjustment",
|
|
3943
|
-
"description": "Why it moved, for example adjustment, sale or return.",
|
|
3944
4319
|
"_meta": {
|
|
4320
|
+
"__statedOptions": [
|
|
4321
|
+
"required",
|
|
4322
|
+
"description",
|
|
4323
|
+
"default"
|
|
4324
|
+
],
|
|
3945
4325
|
"required": true,
|
|
3946
4326
|
"description": "Why it moved, for example adjustment, sale or return."
|
|
3947
|
-
}
|
|
4327
|
+
},
|
|
4328
|
+
"required": true,
|
|
4329
|
+
"default": "adjustment",
|
|
4330
|
+
"description": "Why it moved, for example adjustment, sale or return."
|
|
3948
4331
|
},
|
|
3949
4332
|
"sourceType": {
|
|
3950
4333
|
"type": "text",
|
|
4334
|
+
"_meta": {
|
|
4335
|
+
"__statedOptions": [
|
|
4336
|
+
"default"
|
|
4337
|
+
]
|
|
4338
|
+
},
|
|
3951
4339
|
"required": false,
|
|
3952
4340
|
"default": ""
|
|
3953
4341
|
},
|
|
3954
4342
|
"sourceId": {
|
|
3955
4343
|
"type": "text",
|
|
4344
|
+
"_meta": {
|
|
4345
|
+
"__statedOptions": [
|
|
4346
|
+
"default"
|
|
4347
|
+
]
|
|
4348
|
+
},
|
|
3956
4349
|
"required": false,
|
|
3957
4350
|
"default": ""
|
|
3958
4351
|
},
|
|
3959
4352
|
"actorProfileId": {
|
|
3960
4353
|
"type": "crossPackageRef",
|
|
4354
|
+
"_meta": {
|
|
4355
|
+
"__statedOptions": [
|
|
4356
|
+
"related"
|
|
4357
|
+
]
|
|
4358
|
+
},
|
|
3961
4359
|
"required": false,
|
|
3962
4360
|
"related": "@happyvertical/smrt-profiles:Profile"
|
|
3963
4361
|
},
|
|
3964
4362
|
"note": {
|
|
3965
4363
|
"type": "text",
|
|
3966
|
-
"required": false,
|
|
3967
|
-
"default": "",
|
|
3968
|
-
"description": "Anything worth remembering about this movement.",
|
|
3969
4364
|
"_meta": {
|
|
4365
|
+
"__statedOptions": [
|
|
4366
|
+
"description",
|
|
4367
|
+
"default"
|
|
4368
|
+
],
|
|
3970
4369
|
"description": "Anything worth remembering about this movement."
|
|
3971
|
-
}
|
|
4370
|
+
},
|
|
4371
|
+
"required": false,
|
|
4372
|
+
"default": "",
|
|
4373
|
+
"description": "Anything worth remembering about this movement."
|
|
3972
4374
|
},
|
|
3973
4375
|
"occurredAt": {
|
|
3974
4376
|
"type": "datetime",
|
|
3975
|
-
"required": false,
|
|
3976
|
-
"description": "When it happened.",
|
|
3977
4377
|
"_meta": {
|
|
4378
|
+
"__statedOptions": [
|
|
4379
|
+
"description"
|
|
4380
|
+
],
|
|
3978
4381
|
"description": "When it happened."
|
|
3979
|
-
}
|
|
4382
|
+
},
|
|
4383
|
+
"required": false,
|
|
4384
|
+
"description": "When it happened."
|
|
3980
4385
|
}
|
|
3981
4386
|
},
|
|
3982
4387
|
"methods": {},
|
|
@@ -4320,5 +4725,6 @@
|
|
|
4320
4725
|
"@happyvertical/smrt-tenancy"
|
|
4321
4726
|
]
|
|
4322
4727
|
},
|
|
4728
|
+
"schemaFingerprint": "f9402b598d94659da6928d2cebf543793a5d25eb7969ff61e6b92b35e183db24",
|
|
4323
4729
|
"stampsConstructors": true
|
|
4324
4730
|
}
|