@final-commerce/common 2.11.1-online.1 → 2.11.1-online.10
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 +69 -34
- package/bin/lib/budget.mjs +71 -0
- package/dist/index.d.mts +212 -2
- package/dist/index.d.ts +212 -2
- package/dist/index.js +184 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +167 -9
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +36 -1
- package/dist/pos-types/index.d.ts +36 -1
- package/package.json +1 -1
|
@@ -348,6 +348,8 @@ interface OrderShippingLine {
|
|
|
348
348
|
optionId?: string;
|
|
349
349
|
minDays?: number;
|
|
350
350
|
maxDays?: number;
|
|
351
|
+
minMinutes?: number;
|
|
352
|
+
maxMinutes?: number;
|
|
351
353
|
pickupOutletId?: string;
|
|
352
354
|
taxes?: OrderTax[];
|
|
353
355
|
}
|
|
@@ -461,6 +463,27 @@ interface OrderCustomStatus {
|
|
|
461
463
|
setBy: string | null;
|
|
462
464
|
}
|
|
463
465
|
|
|
466
|
+
declare enum TaxExceptionSource {
|
|
467
|
+
PRODUCT = "product",
|
|
468
|
+
CATEGORY = "category"
|
|
469
|
+
}
|
|
470
|
+
interface TaxException {
|
|
471
|
+
place: string;
|
|
472
|
+
skip: string[];
|
|
473
|
+
reason?: string;
|
|
474
|
+
setBy?: string;
|
|
475
|
+
setAt?: string;
|
|
476
|
+
}
|
|
477
|
+
interface OrderTaxSkip {
|
|
478
|
+
code: string;
|
|
479
|
+
name: string;
|
|
480
|
+
place: string;
|
|
481
|
+
source: TaxExceptionSource | `${TaxExceptionSource}`;
|
|
482
|
+
label: string;
|
|
483
|
+
categoryId?: string;
|
|
484
|
+
reason?: string;
|
|
485
|
+
}
|
|
486
|
+
|
|
464
487
|
interface OrderLineItemDiscount {
|
|
465
488
|
itemDiscounts?: PriceModifierDetail[];
|
|
466
489
|
cartDiscount?: PriceModifierDetail;
|
|
@@ -540,6 +563,7 @@ interface OrderLineItem {
|
|
|
540
563
|
taxType?: string | null;
|
|
541
564
|
taxCategoryIds?: string[];
|
|
542
565
|
taxTableId?: string;
|
|
566
|
+
taxSkipped?: OrderTaxSkip[];
|
|
543
567
|
}
|
|
544
568
|
|
|
545
569
|
interface OrderCustomSaleDiscount {
|
|
@@ -736,6 +760,7 @@ interface Category extends BaseEntity {
|
|
|
736
760
|
menuOrder?: number;
|
|
737
761
|
source?: string;
|
|
738
762
|
taxType?: string | null;
|
|
763
|
+
taxExceptions?: TaxException[] | null;
|
|
739
764
|
}
|
|
740
765
|
|
|
741
766
|
interface CompanyExtension extends BaseEntity {
|
|
@@ -826,6 +851,7 @@ interface Customer extends BaseEntity {
|
|
|
826
851
|
shipping?: Address$1;
|
|
827
852
|
metadata?: Metadata[];
|
|
828
853
|
notes?: Note[];
|
|
854
|
+
verifiedShopperAt?: string;
|
|
829
855
|
}
|
|
830
856
|
|
|
831
857
|
interface DeviceEnvAttribute extends BaseDocument {
|
|
@@ -878,7 +904,7 @@ interface FlowWebApp extends BaseDocument {
|
|
|
878
904
|
}
|
|
879
905
|
|
|
880
906
|
type PaymentState = 'unpaid' | 'payment_pending' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'voided';
|
|
881
|
-
type FulfillmentState = 'draft' | 'pending' | 'on_hold' | 'in_progress' | 'fulfilled' | 'partially_fulfilled' | 'returned' | 'partially_returned' | 'cancelled';
|
|
907
|
+
type FulfillmentState = 'draft' | 'pending' | 'on_hold' | 'in_progress' | 'fulfilled' | 'partially_fulfilled' | 'return_pending' | 'returned' | 'partially_returned' | 'cancelled';
|
|
882
908
|
interface StatePair {
|
|
883
909
|
payment: PaymentState;
|
|
884
910
|
fulfillment: FulfillmentState;
|
|
@@ -996,6 +1022,7 @@ interface Order extends BaseEntity {
|
|
|
996
1022
|
completedAt?: string;
|
|
997
1023
|
customerId?: string;
|
|
998
1024
|
source: string;
|
|
1025
|
+
contactEmail?: string;
|
|
999
1026
|
sessionId?: string;
|
|
1000
1027
|
balance: number;
|
|
1001
1028
|
externalId?: string;
|
|
@@ -1076,6 +1103,7 @@ interface Product extends BaseEntity {
|
|
|
1076
1103
|
supplier?: string;
|
|
1077
1104
|
taxTable?: string | null;
|
|
1078
1105
|
taxType?: string | null;
|
|
1106
|
+
taxExceptions?: TaxException[] | null;
|
|
1079
1107
|
defaultVariantId?: string;
|
|
1080
1108
|
categories?: string[];
|
|
1081
1109
|
outlets?: string[];
|
|
@@ -1568,6 +1596,7 @@ interface LineItem {
|
|
|
1568
1596
|
taxType?: string | null;
|
|
1569
1597
|
taxCategoryIds?: string[];
|
|
1570
1598
|
taxTableId?: string;
|
|
1599
|
+
taxSkipped?: OrderTaxSkip[];
|
|
1571
1600
|
}
|
|
1572
1601
|
|
|
1573
1602
|
interface TipPayment {
|
|
@@ -1817,6 +1846,7 @@ interface FullProduct {
|
|
|
1817
1846
|
externalId: string;
|
|
1818
1847
|
taxTable: string;
|
|
1819
1848
|
taxType?: string | null;
|
|
1849
|
+
taxExceptions?: TaxException[] | null;
|
|
1820
1850
|
name: string;
|
|
1821
1851
|
description?: string;
|
|
1822
1852
|
shortDescription?: string;
|
|
@@ -1934,6 +1964,7 @@ interface ActiveProduct {
|
|
|
1934
1964
|
images: string[];
|
|
1935
1965
|
taxTableId: string;
|
|
1936
1966
|
taxType?: string | null;
|
|
1967
|
+
taxExceptions?: TaxException[] | null;
|
|
1937
1968
|
taxCategoryIds?: string[];
|
|
1938
1969
|
quantity: number;
|
|
1939
1970
|
note?: string;
|
|
@@ -1987,6 +2018,8 @@ interface ShippingOptionRule {
|
|
|
1987
2018
|
freeOver?: number | null;
|
|
1988
2019
|
minDays?: number | null;
|
|
1989
2020
|
maxDays?: number | null;
|
|
2021
|
+
minMinutes?: number | null;
|
|
2022
|
+
maxMinutes?: number | null;
|
|
1990
2023
|
channels: (ShippingChannel | `${ShippingChannel}`)[];
|
|
1991
2024
|
outletId?: string | null;
|
|
1992
2025
|
}
|
|
@@ -2011,6 +2044,8 @@ interface CartShipping {
|
|
|
2011
2044
|
taxes?: Tax[];
|
|
2012
2045
|
minDays: number | null;
|
|
2013
2046
|
maxDays: number | null;
|
|
2047
|
+
minMinutes?: number | null;
|
|
2048
|
+
maxMinutes?: number | null;
|
|
2014
2049
|
outletId: string | null;
|
|
2015
2050
|
rule?: Pick<ShippingOptionRule, 'price' | 'priceByTotal' | 'freeOver'>;
|
|
2016
2051
|
}
|
|
@@ -348,6 +348,8 @@ interface OrderShippingLine {
|
|
|
348
348
|
optionId?: string;
|
|
349
349
|
minDays?: number;
|
|
350
350
|
maxDays?: number;
|
|
351
|
+
minMinutes?: number;
|
|
352
|
+
maxMinutes?: number;
|
|
351
353
|
pickupOutletId?: string;
|
|
352
354
|
taxes?: OrderTax[];
|
|
353
355
|
}
|
|
@@ -461,6 +463,27 @@ interface OrderCustomStatus {
|
|
|
461
463
|
setBy: string | null;
|
|
462
464
|
}
|
|
463
465
|
|
|
466
|
+
declare enum TaxExceptionSource {
|
|
467
|
+
PRODUCT = "product",
|
|
468
|
+
CATEGORY = "category"
|
|
469
|
+
}
|
|
470
|
+
interface TaxException {
|
|
471
|
+
place: string;
|
|
472
|
+
skip: string[];
|
|
473
|
+
reason?: string;
|
|
474
|
+
setBy?: string;
|
|
475
|
+
setAt?: string;
|
|
476
|
+
}
|
|
477
|
+
interface OrderTaxSkip {
|
|
478
|
+
code: string;
|
|
479
|
+
name: string;
|
|
480
|
+
place: string;
|
|
481
|
+
source: TaxExceptionSource | `${TaxExceptionSource}`;
|
|
482
|
+
label: string;
|
|
483
|
+
categoryId?: string;
|
|
484
|
+
reason?: string;
|
|
485
|
+
}
|
|
486
|
+
|
|
464
487
|
interface OrderLineItemDiscount {
|
|
465
488
|
itemDiscounts?: PriceModifierDetail[];
|
|
466
489
|
cartDiscount?: PriceModifierDetail;
|
|
@@ -540,6 +563,7 @@ interface OrderLineItem {
|
|
|
540
563
|
taxType?: string | null;
|
|
541
564
|
taxCategoryIds?: string[];
|
|
542
565
|
taxTableId?: string;
|
|
566
|
+
taxSkipped?: OrderTaxSkip[];
|
|
543
567
|
}
|
|
544
568
|
|
|
545
569
|
interface OrderCustomSaleDiscount {
|
|
@@ -736,6 +760,7 @@ interface Category extends BaseEntity {
|
|
|
736
760
|
menuOrder?: number;
|
|
737
761
|
source?: string;
|
|
738
762
|
taxType?: string | null;
|
|
763
|
+
taxExceptions?: TaxException[] | null;
|
|
739
764
|
}
|
|
740
765
|
|
|
741
766
|
interface CompanyExtension extends BaseEntity {
|
|
@@ -826,6 +851,7 @@ interface Customer extends BaseEntity {
|
|
|
826
851
|
shipping?: Address$1;
|
|
827
852
|
metadata?: Metadata[];
|
|
828
853
|
notes?: Note[];
|
|
854
|
+
verifiedShopperAt?: string;
|
|
829
855
|
}
|
|
830
856
|
|
|
831
857
|
interface DeviceEnvAttribute extends BaseDocument {
|
|
@@ -878,7 +904,7 @@ interface FlowWebApp extends BaseDocument {
|
|
|
878
904
|
}
|
|
879
905
|
|
|
880
906
|
type PaymentState = 'unpaid' | 'payment_pending' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'voided';
|
|
881
|
-
type FulfillmentState = 'draft' | 'pending' | 'on_hold' | 'in_progress' | 'fulfilled' | 'partially_fulfilled' | 'returned' | 'partially_returned' | 'cancelled';
|
|
907
|
+
type FulfillmentState = 'draft' | 'pending' | 'on_hold' | 'in_progress' | 'fulfilled' | 'partially_fulfilled' | 'return_pending' | 'returned' | 'partially_returned' | 'cancelled';
|
|
882
908
|
interface StatePair {
|
|
883
909
|
payment: PaymentState;
|
|
884
910
|
fulfillment: FulfillmentState;
|
|
@@ -996,6 +1022,7 @@ interface Order extends BaseEntity {
|
|
|
996
1022
|
completedAt?: string;
|
|
997
1023
|
customerId?: string;
|
|
998
1024
|
source: string;
|
|
1025
|
+
contactEmail?: string;
|
|
999
1026
|
sessionId?: string;
|
|
1000
1027
|
balance: number;
|
|
1001
1028
|
externalId?: string;
|
|
@@ -1076,6 +1103,7 @@ interface Product extends BaseEntity {
|
|
|
1076
1103
|
supplier?: string;
|
|
1077
1104
|
taxTable?: string | null;
|
|
1078
1105
|
taxType?: string | null;
|
|
1106
|
+
taxExceptions?: TaxException[] | null;
|
|
1079
1107
|
defaultVariantId?: string;
|
|
1080
1108
|
categories?: string[];
|
|
1081
1109
|
outlets?: string[];
|
|
@@ -1568,6 +1596,7 @@ interface LineItem {
|
|
|
1568
1596
|
taxType?: string | null;
|
|
1569
1597
|
taxCategoryIds?: string[];
|
|
1570
1598
|
taxTableId?: string;
|
|
1599
|
+
taxSkipped?: OrderTaxSkip[];
|
|
1571
1600
|
}
|
|
1572
1601
|
|
|
1573
1602
|
interface TipPayment {
|
|
@@ -1817,6 +1846,7 @@ interface FullProduct {
|
|
|
1817
1846
|
externalId: string;
|
|
1818
1847
|
taxTable: string;
|
|
1819
1848
|
taxType?: string | null;
|
|
1849
|
+
taxExceptions?: TaxException[] | null;
|
|
1820
1850
|
name: string;
|
|
1821
1851
|
description?: string;
|
|
1822
1852
|
shortDescription?: string;
|
|
@@ -1934,6 +1964,7 @@ interface ActiveProduct {
|
|
|
1934
1964
|
images: string[];
|
|
1935
1965
|
taxTableId: string;
|
|
1936
1966
|
taxType?: string | null;
|
|
1967
|
+
taxExceptions?: TaxException[] | null;
|
|
1937
1968
|
taxCategoryIds?: string[];
|
|
1938
1969
|
quantity: number;
|
|
1939
1970
|
note?: string;
|
|
@@ -1987,6 +2018,8 @@ interface ShippingOptionRule {
|
|
|
1987
2018
|
freeOver?: number | null;
|
|
1988
2019
|
minDays?: number | null;
|
|
1989
2020
|
maxDays?: number | null;
|
|
2021
|
+
minMinutes?: number | null;
|
|
2022
|
+
maxMinutes?: number | null;
|
|
1990
2023
|
channels: (ShippingChannel | `${ShippingChannel}`)[];
|
|
1991
2024
|
outletId?: string | null;
|
|
1992
2025
|
}
|
|
@@ -2011,6 +2044,8 @@ interface CartShipping {
|
|
|
2011
2044
|
taxes?: Tax[];
|
|
2012
2045
|
minDays: number | null;
|
|
2013
2046
|
maxDays: number | null;
|
|
2047
|
+
minMinutes?: number | null;
|
|
2048
|
+
maxMinutes?: number | null;
|
|
2014
2049
|
outletId: string | null;
|
|
2015
2050
|
rule?: Pick<ShippingOptionRule, 'price' | 'priceByTotal' | 'freeOver'>;
|
|
2016
2051
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@final-commerce/common",
|
|
3
|
-
"version": "2.11.1-online.
|
|
3
|
+
"version": "2.11.1-online.10",
|
|
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": {
|