@final-commerce/common 2.1.1 → 2.2.0-beta.1
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/bin/gate-save.mjs +20 -1
- package/dist/index.d.mts +78 -1
- package/dist/index.d.ts +78 -1
- package/dist/index.js +325 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +299 -1
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +35 -0
- package/dist/pos-types/index.d.ts +35 -0
- package/package.json +1 -1
|
@@ -400,6 +400,7 @@ declare enum InventorySpecificActionType {
|
|
|
400
400
|
REFUND_RESTOCK_RETURN = "REFUND_RESTOCK_RETURN",
|
|
401
401
|
REFUND_DAMAGE = "REFUND_DAMAGE",
|
|
402
402
|
SALE = "SALE",
|
|
403
|
+
COMPOSED_FOR_SALE = "COMPOSED_FOR_SALE",
|
|
403
404
|
TRANSFER = "TRANSFER",
|
|
404
405
|
BULK_RECOUNT = "BULK_RECOUNT",
|
|
405
406
|
APPLIED_FROM_WOO = "APPLIED_FROM_WOO",
|
|
@@ -450,6 +451,11 @@ interface RefundLineItem {
|
|
|
450
451
|
fee?: OrderLineItemFee;
|
|
451
452
|
lineNetWithFees?: number;
|
|
452
453
|
quantity?: number;
|
|
454
|
+
stockQuantity?: number;
|
|
455
|
+
unitId?: string;
|
|
456
|
+
unitAbbreviation?: string;
|
|
457
|
+
unitRatioToBase?: number;
|
|
458
|
+
stockVariantId?: string;
|
|
453
459
|
total?: number;
|
|
454
460
|
price?: number;
|
|
455
461
|
name?: string;
|
|
@@ -1070,6 +1076,8 @@ interface Variant extends BaseEntity {
|
|
|
1070
1076
|
metadata?: Metadata[];
|
|
1071
1077
|
attributes?: AttributeEmbedded[];
|
|
1072
1078
|
inventory?: VariantInventory[];
|
|
1079
|
+
unitId?: string;
|
|
1080
|
+
stockVariantId?: string;
|
|
1073
1081
|
}
|
|
1074
1082
|
|
|
1075
1083
|
interface Address {
|
|
@@ -1324,6 +1332,11 @@ interface LineItem {
|
|
|
1324
1332
|
images?: string[];
|
|
1325
1333
|
attributes?: string;
|
|
1326
1334
|
isUnlimited?: boolean;
|
|
1335
|
+
unitId?: string;
|
|
1336
|
+
unitAbbreviation?: string;
|
|
1337
|
+
stockQuantity?: number;
|
|
1338
|
+
unitRatioToBase?: number;
|
|
1339
|
+
stockVariantId?: string;
|
|
1327
1340
|
}
|
|
1328
1341
|
|
|
1329
1342
|
interface TipPayment {
|
|
@@ -1397,6 +1410,11 @@ interface RefundedLineItem {
|
|
|
1397
1410
|
internalId?: string;
|
|
1398
1411
|
name: string;
|
|
1399
1412
|
quantity: number;
|
|
1413
|
+
stockQuantity?: number;
|
|
1414
|
+
unitId?: string;
|
|
1415
|
+
unitAbbreviation?: string;
|
|
1416
|
+
unitRatioToBase?: number;
|
|
1417
|
+
stockVariantId?: string;
|
|
1400
1418
|
price: number;
|
|
1401
1419
|
taxes: Tax[];
|
|
1402
1420
|
discount: DiscountLineItem;
|
|
@@ -1474,6 +1492,18 @@ interface CustomFee {
|
|
|
1474
1492
|
taxRateId?: string;
|
|
1475
1493
|
}
|
|
1476
1494
|
|
|
1495
|
+
interface MeasurementUnit {
|
|
1496
|
+
unitId: string;
|
|
1497
|
+
companyId: string | null;
|
|
1498
|
+
familyId: string;
|
|
1499
|
+
name: string;
|
|
1500
|
+
abbreviation: string;
|
|
1501
|
+
ratioToBase: number;
|
|
1502
|
+
precision: number;
|
|
1503
|
+
systemKey?: string;
|
|
1504
|
+
sellable?: false;
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1477
1507
|
interface ActiveProduct {
|
|
1478
1508
|
id: string;
|
|
1479
1509
|
internalId: string;
|
|
@@ -1500,6 +1530,8 @@ interface ActiveProduct {
|
|
|
1500
1530
|
isUnlimited?: boolean;
|
|
1501
1531
|
attributes?: string;
|
|
1502
1532
|
localQuantity?: number;
|
|
1533
|
+
unit?: MeasurementUnit;
|
|
1534
|
+
stockVariantId?: string;
|
|
1503
1535
|
_id?: string;
|
|
1504
1536
|
productType?: ProductType;
|
|
1505
1537
|
}
|
|
@@ -1589,6 +1621,9 @@ interface ProductVariant {
|
|
|
1589
1621
|
isDeleted?: boolean;
|
|
1590
1622
|
currency?: CurrencyCode;
|
|
1591
1623
|
minorUnits?: number;
|
|
1624
|
+
unitId?: string;
|
|
1625
|
+
unit?: MeasurementUnit;
|
|
1626
|
+
stockVariantId?: string;
|
|
1592
1627
|
}
|
|
1593
1628
|
interface FullProduct {
|
|
1594
1629
|
_id: string;
|
|
@@ -400,6 +400,7 @@ declare enum InventorySpecificActionType {
|
|
|
400
400
|
REFUND_RESTOCK_RETURN = "REFUND_RESTOCK_RETURN",
|
|
401
401
|
REFUND_DAMAGE = "REFUND_DAMAGE",
|
|
402
402
|
SALE = "SALE",
|
|
403
|
+
COMPOSED_FOR_SALE = "COMPOSED_FOR_SALE",
|
|
403
404
|
TRANSFER = "TRANSFER",
|
|
404
405
|
BULK_RECOUNT = "BULK_RECOUNT",
|
|
405
406
|
APPLIED_FROM_WOO = "APPLIED_FROM_WOO",
|
|
@@ -450,6 +451,11 @@ interface RefundLineItem {
|
|
|
450
451
|
fee?: OrderLineItemFee;
|
|
451
452
|
lineNetWithFees?: number;
|
|
452
453
|
quantity?: number;
|
|
454
|
+
stockQuantity?: number;
|
|
455
|
+
unitId?: string;
|
|
456
|
+
unitAbbreviation?: string;
|
|
457
|
+
unitRatioToBase?: number;
|
|
458
|
+
stockVariantId?: string;
|
|
453
459
|
total?: number;
|
|
454
460
|
price?: number;
|
|
455
461
|
name?: string;
|
|
@@ -1070,6 +1076,8 @@ interface Variant extends BaseEntity {
|
|
|
1070
1076
|
metadata?: Metadata[];
|
|
1071
1077
|
attributes?: AttributeEmbedded[];
|
|
1072
1078
|
inventory?: VariantInventory[];
|
|
1079
|
+
unitId?: string;
|
|
1080
|
+
stockVariantId?: string;
|
|
1073
1081
|
}
|
|
1074
1082
|
|
|
1075
1083
|
interface Address {
|
|
@@ -1324,6 +1332,11 @@ interface LineItem {
|
|
|
1324
1332
|
images?: string[];
|
|
1325
1333
|
attributes?: string;
|
|
1326
1334
|
isUnlimited?: boolean;
|
|
1335
|
+
unitId?: string;
|
|
1336
|
+
unitAbbreviation?: string;
|
|
1337
|
+
stockQuantity?: number;
|
|
1338
|
+
unitRatioToBase?: number;
|
|
1339
|
+
stockVariantId?: string;
|
|
1327
1340
|
}
|
|
1328
1341
|
|
|
1329
1342
|
interface TipPayment {
|
|
@@ -1397,6 +1410,11 @@ interface RefundedLineItem {
|
|
|
1397
1410
|
internalId?: string;
|
|
1398
1411
|
name: string;
|
|
1399
1412
|
quantity: number;
|
|
1413
|
+
stockQuantity?: number;
|
|
1414
|
+
unitId?: string;
|
|
1415
|
+
unitAbbreviation?: string;
|
|
1416
|
+
unitRatioToBase?: number;
|
|
1417
|
+
stockVariantId?: string;
|
|
1400
1418
|
price: number;
|
|
1401
1419
|
taxes: Tax[];
|
|
1402
1420
|
discount: DiscountLineItem;
|
|
@@ -1474,6 +1492,18 @@ interface CustomFee {
|
|
|
1474
1492
|
taxRateId?: string;
|
|
1475
1493
|
}
|
|
1476
1494
|
|
|
1495
|
+
interface MeasurementUnit {
|
|
1496
|
+
unitId: string;
|
|
1497
|
+
companyId: string | null;
|
|
1498
|
+
familyId: string;
|
|
1499
|
+
name: string;
|
|
1500
|
+
abbreviation: string;
|
|
1501
|
+
ratioToBase: number;
|
|
1502
|
+
precision: number;
|
|
1503
|
+
systemKey?: string;
|
|
1504
|
+
sellable?: false;
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1477
1507
|
interface ActiveProduct {
|
|
1478
1508
|
id: string;
|
|
1479
1509
|
internalId: string;
|
|
@@ -1500,6 +1530,8 @@ interface ActiveProduct {
|
|
|
1500
1530
|
isUnlimited?: boolean;
|
|
1501
1531
|
attributes?: string;
|
|
1502
1532
|
localQuantity?: number;
|
|
1533
|
+
unit?: MeasurementUnit;
|
|
1534
|
+
stockVariantId?: string;
|
|
1503
1535
|
_id?: string;
|
|
1504
1536
|
productType?: ProductType;
|
|
1505
1537
|
}
|
|
@@ -1589,6 +1621,9 @@ interface ProductVariant {
|
|
|
1589
1621
|
isDeleted?: boolean;
|
|
1590
1622
|
currency?: CurrencyCode;
|
|
1591
1623
|
minorUnits?: number;
|
|
1624
|
+
unitId?: string;
|
|
1625
|
+
unit?: MeasurementUnit;
|
|
1626
|
+
stockVariantId?: string;
|
|
1592
1627
|
}
|
|
1593
1628
|
interface FullProduct {
|
|
1594
1629
|
_id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@final-commerce/common",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-beta.1",
|
|
4
4
|
"description": "Shared utilities, types, constants, and engineering governance configs for the Final Commerce platform.",
|
|
5
5
|
"homepage": "https://github.com/Final-Commerce/common#readme",
|
|
6
6
|
"bugs": {
|