@final-commerce/common 2.11.0 → 2.11.1-online.2
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-done.mjs +11 -24
- package/dist/index.d.mts +215 -1
- package/dist/index.d.ts +215 -1
- package/dist/index.js +233 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +219 -0
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +37 -12
- package/dist/pos-types/index.d.ts +37 -12
- package/package.json +1 -1
|
@@ -38,18 +38,6 @@ interface VariantInventory {
|
|
|
38
38
|
outletId: string;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
interface OrderTax {
|
|
42
|
-
name: string;
|
|
43
|
-
taxTableId?: string;
|
|
44
|
-
taxTableName?: string;
|
|
45
|
-
id?: string;
|
|
46
|
-
percentage: number;
|
|
47
|
-
amount: number;
|
|
48
|
-
taxableAmount?: number;
|
|
49
|
-
compounding?: boolean;
|
|
50
|
-
priority?: number;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
41
|
declare enum CurrencyCode {
|
|
54
42
|
USD = "USD",
|
|
55
43
|
EUR = "EUR",
|
|
@@ -332,6 +320,26 @@ declare enum ShippingChannel {
|
|
|
332
320
|
POS = "pos"
|
|
333
321
|
}
|
|
334
322
|
|
|
323
|
+
declare enum TaxSource {
|
|
324
|
+
MERCHANT = "merchant",
|
|
325
|
+
AUTOMATIC = "automatic"
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
interface OrderTax {
|
|
329
|
+
name: string;
|
|
330
|
+
taxTableId?: string;
|
|
331
|
+
taxTableName?: string;
|
|
332
|
+
id?: string;
|
|
333
|
+
percentage: number;
|
|
334
|
+
amount: number;
|
|
335
|
+
taxableAmount?: number;
|
|
336
|
+
compounding?: boolean;
|
|
337
|
+
priority?: number;
|
|
338
|
+
source?: TaxSource | `${TaxSource}`;
|
|
339
|
+
code?: string;
|
|
340
|
+
place?: string;
|
|
341
|
+
}
|
|
342
|
+
|
|
335
343
|
interface OrderShippingLine {
|
|
336
344
|
type: ShippingOptionType | `${ShippingOptionType}`;
|
|
337
345
|
name?: string;
|
|
@@ -529,6 +537,9 @@ interface OrderLineItem {
|
|
|
529
537
|
stockQuantity?: number;
|
|
530
538
|
unitRatioToBase?: number;
|
|
531
539
|
stockVariantId?: string;
|
|
540
|
+
taxType?: string | null;
|
|
541
|
+
taxCategoryIds?: string[];
|
|
542
|
+
taxTableId?: string;
|
|
532
543
|
}
|
|
533
544
|
|
|
534
545
|
interface OrderCustomSaleDiscount {
|
|
@@ -724,6 +735,7 @@ interface Category extends BaseEntity {
|
|
|
724
735
|
parentId?: string;
|
|
725
736
|
menuOrder?: number;
|
|
726
737
|
source?: string;
|
|
738
|
+
taxType?: string | null;
|
|
727
739
|
}
|
|
728
740
|
|
|
729
741
|
interface CompanyExtension extends BaseEntity {
|
|
@@ -984,6 +996,7 @@ interface Order extends BaseEntity {
|
|
|
984
996
|
completedAt?: string;
|
|
985
997
|
customerId?: string;
|
|
986
998
|
source: string;
|
|
999
|
+
contactEmail?: string;
|
|
987
1000
|
sessionId?: string;
|
|
988
1001
|
balance: number;
|
|
989
1002
|
externalId?: string;
|
|
@@ -1007,6 +1020,8 @@ interface Order extends BaseEntity {
|
|
|
1007
1020
|
billing?: Address$1;
|
|
1008
1021
|
shipping?: Address$1;
|
|
1009
1022
|
shippingLine?: OrderShippingLine;
|
|
1023
|
+
taxPlace?: string;
|
|
1024
|
+
taxTableVersion?: string;
|
|
1010
1025
|
lineItems: Partial<OrderLineItem>[];
|
|
1011
1026
|
customSales?: OrderCustomSale[];
|
|
1012
1027
|
nonRevenueItems?: NonRevenueItem$1[];
|
|
@@ -1061,6 +1076,7 @@ interface Product extends BaseEntity {
|
|
|
1061
1076
|
maxPrice?: number;
|
|
1062
1077
|
supplier?: string;
|
|
1063
1078
|
taxTable?: string | null;
|
|
1079
|
+
taxType?: string | null;
|
|
1064
1080
|
defaultVariantId?: string;
|
|
1065
1081
|
categories?: string[];
|
|
1066
1082
|
outlets?: string[];
|
|
@@ -1294,6 +1310,9 @@ interface Tax {
|
|
|
1294
1310
|
taxTableId: string;
|
|
1295
1311
|
compounding?: boolean;
|
|
1296
1312
|
priority?: number;
|
|
1313
|
+
source?: TaxSource | `${TaxSource}`;
|
|
1314
|
+
code?: string;
|
|
1315
|
+
place?: string;
|
|
1297
1316
|
}
|
|
1298
1317
|
interface Tip {
|
|
1299
1318
|
amount: number;
|
|
@@ -1547,6 +1566,9 @@ interface LineItem {
|
|
|
1547
1566
|
stockQuantity?: number;
|
|
1548
1567
|
unitRatioToBase?: number;
|
|
1549
1568
|
stockVariantId?: string;
|
|
1569
|
+
taxType?: string | null;
|
|
1570
|
+
taxCategoryIds?: string[];
|
|
1571
|
+
taxTableId?: string;
|
|
1550
1572
|
}
|
|
1551
1573
|
|
|
1552
1574
|
interface TipPayment {
|
|
@@ -1795,6 +1817,7 @@ interface FullProduct {
|
|
|
1795
1817
|
companyId?: string;
|
|
1796
1818
|
externalId: string;
|
|
1797
1819
|
taxTable: string;
|
|
1820
|
+
taxType?: string | null;
|
|
1798
1821
|
name: string;
|
|
1799
1822
|
description?: string;
|
|
1800
1823
|
shortDescription?: string;
|
|
@@ -1911,6 +1934,8 @@ interface ActiveProduct {
|
|
|
1911
1934
|
price: number;
|
|
1912
1935
|
images: string[];
|
|
1913
1936
|
taxTableId: string;
|
|
1937
|
+
taxType?: string | null;
|
|
1938
|
+
taxCategoryIds?: string[];
|
|
1914
1939
|
quantity: number;
|
|
1915
1940
|
note?: string;
|
|
1916
1941
|
discounts?: Discount[];
|
|
@@ -38,18 +38,6 @@ interface VariantInventory {
|
|
|
38
38
|
outletId: string;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
interface OrderTax {
|
|
42
|
-
name: string;
|
|
43
|
-
taxTableId?: string;
|
|
44
|
-
taxTableName?: string;
|
|
45
|
-
id?: string;
|
|
46
|
-
percentage: number;
|
|
47
|
-
amount: number;
|
|
48
|
-
taxableAmount?: number;
|
|
49
|
-
compounding?: boolean;
|
|
50
|
-
priority?: number;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
41
|
declare enum CurrencyCode {
|
|
54
42
|
USD = "USD",
|
|
55
43
|
EUR = "EUR",
|
|
@@ -332,6 +320,26 @@ declare enum ShippingChannel {
|
|
|
332
320
|
POS = "pos"
|
|
333
321
|
}
|
|
334
322
|
|
|
323
|
+
declare enum TaxSource {
|
|
324
|
+
MERCHANT = "merchant",
|
|
325
|
+
AUTOMATIC = "automatic"
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
interface OrderTax {
|
|
329
|
+
name: string;
|
|
330
|
+
taxTableId?: string;
|
|
331
|
+
taxTableName?: string;
|
|
332
|
+
id?: string;
|
|
333
|
+
percentage: number;
|
|
334
|
+
amount: number;
|
|
335
|
+
taxableAmount?: number;
|
|
336
|
+
compounding?: boolean;
|
|
337
|
+
priority?: number;
|
|
338
|
+
source?: TaxSource | `${TaxSource}`;
|
|
339
|
+
code?: string;
|
|
340
|
+
place?: string;
|
|
341
|
+
}
|
|
342
|
+
|
|
335
343
|
interface OrderShippingLine {
|
|
336
344
|
type: ShippingOptionType | `${ShippingOptionType}`;
|
|
337
345
|
name?: string;
|
|
@@ -529,6 +537,9 @@ interface OrderLineItem {
|
|
|
529
537
|
stockQuantity?: number;
|
|
530
538
|
unitRatioToBase?: number;
|
|
531
539
|
stockVariantId?: string;
|
|
540
|
+
taxType?: string | null;
|
|
541
|
+
taxCategoryIds?: string[];
|
|
542
|
+
taxTableId?: string;
|
|
532
543
|
}
|
|
533
544
|
|
|
534
545
|
interface OrderCustomSaleDiscount {
|
|
@@ -724,6 +735,7 @@ interface Category extends BaseEntity {
|
|
|
724
735
|
parentId?: string;
|
|
725
736
|
menuOrder?: number;
|
|
726
737
|
source?: string;
|
|
738
|
+
taxType?: string | null;
|
|
727
739
|
}
|
|
728
740
|
|
|
729
741
|
interface CompanyExtension extends BaseEntity {
|
|
@@ -984,6 +996,7 @@ interface Order extends BaseEntity {
|
|
|
984
996
|
completedAt?: string;
|
|
985
997
|
customerId?: string;
|
|
986
998
|
source: string;
|
|
999
|
+
contactEmail?: string;
|
|
987
1000
|
sessionId?: string;
|
|
988
1001
|
balance: number;
|
|
989
1002
|
externalId?: string;
|
|
@@ -1007,6 +1020,8 @@ interface Order extends BaseEntity {
|
|
|
1007
1020
|
billing?: Address$1;
|
|
1008
1021
|
shipping?: Address$1;
|
|
1009
1022
|
shippingLine?: OrderShippingLine;
|
|
1023
|
+
taxPlace?: string;
|
|
1024
|
+
taxTableVersion?: string;
|
|
1010
1025
|
lineItems: Partial<OrderLineItem>[];
|
|
1011
1026
|
customSales?: OrderCustomSale[];
|
|
1012
1027
|
nonRevenueItems?: NonRevenueItem$1[];
|
|
@@ -1061,6 +1076,7 @@ interface Product extends BaseEntity {
|
|
|
1061
1076
|
maxPrice?: number;
|
|
1062
1077
|
supplier?: string;
|
|
1063
1078
|
taxTable?: string | null;
|
|
1079
|
+
taxType?: string | null;
|
|
1064
1080
|
defaultVariantId?: string;
|
|
1065
1081
|
categories?: string[];
|
|
1066
1082
|
outlets?: string[];
|
|
@@ -1294,6 +1310,9 @@ interface Tax {
|
|
|
1294
1310
|
taxTableId: string;
|
|
1295
1311
|
compounding?: boolean;
|
|
1296
1312
|
priority?: number;
|
|
1313
|
+
source?: TaxSource | `${TaxSource}`;
|
|
1314
|
+
code?: string;
|
|
1315
|
+
place?: string;
|
|
1297
1316
|
}
|
|
1298
1317
|
interface Tip {
|
|
1299
1318
|
amount: number;
|
|
@@ -1547,6 +1566,9 @@ interface LineItem {
|
|
|
1547
1566
|
stockQuantity?: number;
|
|
1548
1567
|
unitRatioToBase?: number;
|
|
1549
1568
|
stockVariantId?: string;
|
|
1569
|
+
taxType?: string | null;
|
|
1570
|
+
taxCategoryIds?: string[];
|
|
1571
|
+
taxTableId?: string;
|
|
1550
1572
|
}
|
|
1551
1573
|
|
|
1552
1574
|
interface TipPayment {
|
|
@@ -1795,6 +1817,7 @@ interface FullProduct {
|
|
|
1795
1817
|
companyId?: string;
|
|
1796
1818
|
externalId: string;
|
|
1797
1819
|
taxTable: string;
|
|
1820
|
+
taxType?: string | null;
|
|
1798
1821
|
name: string;
|
|
1799
1822
|
description?: string;
|
|
1800
1823
|
shortDescription?: string;
|
|
@@ -1911,6 +1934,8 @@ interface ActiveProduct {
|
|
|
1911
1934
|
price: number;
|
|
1912
1935
|
images: string[];
|
|
1913
1936
|
taxTableId: string;
|
|
1937
|
+
taxType?: string | null;
|
|
1938
|
+
taxCategoryIds?: string[];
|
|
1914
1939
|
quantity: number;
|
|
1915
1940
|
note?: string;
|
|
1916
1941
|
discounts?: Discount[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@final-commerce/common",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.1-online.2",
|
|
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": {
|