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