@final-commerce/common 2.6.1-staging2.1 → 2.7.0
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.d.mts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -4
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +87 -69
- package/dist/pos-types/index.d.ts +87 -69
- package/package.json +1 -1
|
@@ -151,6 +151,7 @@ interface OrderInCart {
|
|
|
151
151
|
|
|
152
152
|
interface OrderCustomStatus {
|
|
153
153
|
id: string;
|
|
154
|
+
key?: string;
|
|
154
155
|
label: string;
|
|
155
156
|
setAt: string;
|
|
156
157
|
setBy: string | null;
|
|
@@ -833,6 +834,84 @@ interface FlowWebApp extends BaseDocument {
|
|
|
833
834
|
customDomain?: string;
|
|
834
835
|
}
|
|
835
836
|
|
|
837
|
+
type PaymentState = 'unpaid' | 'payment_pending' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'voided';
|
|
838
|
+
type FulfillmentState = 'draft' | 'pending' | 'on_hold' | 'in_progress' | 'fulfilled' | 'partially_fulfilled' | 'returned' | 'partially_returned' | 'cancelled';
|
|
839
|
+
interface StatePair {
|
|
840
|
+
payment: PaymentState;
|
|
841
|
+
fulfillment: FulfillmentState;
|
|
842
|
+
}
|
|
843
|
+
type ConditionOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'notIn' | 'isEmpty' | 'isNotEmpty';
|
|
844
|
+
type PathMode = 'strict' | 'permissive';
|
|
845
|
+
|
|
846
|
+
interface PaymentTransitionPath {
|
|
847
|
+
from: PaymentState;
|
|
848
|
+
to: PaymentState;
|
|
849
|
+
conditionSetId?: string;
|
|
850
|
+
_sourceExtensionId?: string;
|
|
851
|
+
}
|
|
852
|
+
interface FulfillmentTransitionPath {
|
|
853
|
+
from: FulfillmentState;
|
|
854
|
+
to: FulfillmentState;
|
|
855
|
+
conditionSetId?: string;
|
|
856
|
+
_sourceExtensionId?: string;
|
|
857
|
+
}
|
|
858
|
+
interface Condition {
|
|
859
|
+
field: string;
|
|
860
|
+
operator: ConditionOperator;
|
|
861
|
+
value: unknown;
|
|
862
|
+
}
|
|
863
|
+
interface ConditionGroup {
|
|
864
|
+
conditions: Condition[];
|
|
865
|
+
}
|
|
866
|
+
interface TransitionConditionSet {
|
|
867
|
+
id: string;
|
|
868
|
+
label: string;
|
|
869
|
+
groups: ConditionGroup[];
|
|
870
|
+
_sourceExtensionId?: string;
|
|
871
|
+
}
|
|
872
|
+
type CrossAxisTrigger = {
|
|
873
|
+
axis: 'payment';
|
|
874
|
+
to: PaymentState | PaymentState[];
|
|
875
|
+
} | {
|
|
876
|
+
axis: 'fulfillment';
|
|
877
|
+
to: FulfillmentState | FulfillmentState[];
|
|
878
|
+
};
|
|
879
|
+
type CrossAxisRequires = {
|
|
880
|
+
axis: 'payment';
|
|
881
|
+
states: PaymentState[];
|
|
882
|
+
} | {
|
|
883
|
+
axis: 'fulfillment';
|
|
884
|
+
states: FulfillmentState[];
|
|
885
|
+
};
|
|
886
|
+
interface CrossAxisRule {
|
|
887
|
+
id: string;
|
|
888
|
+
label: string;
|
|
889
|
+
description?: string;
|
|
890
|
+
enabled: boolean;
|
|
891
|
+
trigger: CrossAxisTrigger;
|
|
892
|
+
requires: CrossAxisRequires;
|
|
893
|
+
_sourceExtensionId?: string;
|
|
894
|
+
}
|
|
895
|
+
interface DisplayStateRule {
|
|
896
|
+
paymentState?: PaymentState | PaymentState[];
|
|
897
|
+
fulfillmentState?: FulfillmentState | FulfillmentState[];
|
|
898
|
+
label: string;
|
|
899
|
+
color?: string;
|
|
900
|
+
icon?: string;
|
|
901
|
+
_sourceExtensionId?: string;
|
|
902
|
+
}
|
|
903
|
+
type TransitionBlockedBy = 'financial_invariant' | 'cross_axis_rule' | 'path' | 'condition';
|
|
904
|
+
|
|
905
|
+
interface OrderStatusDefinition {
|
|
906
|
+
id: string;
|
|
907
|
+
key: string;
|
|
908
|
+
defaultLabel: string;
|
|
909
|
+
color?: string;
|
|
910
|
+
icon?: string;
|
|
911
|
+
fulfillmentState?: FulfillmentState;
|
|
912
|
+
requiresPaymentState?: PaymentState[];
|
|
913
|
+
}
|
|
914
|
+
|
|
836
915
|
interface FlowWebAppVersion extends BaseDocument {
|
|
837
916
|
checkoutFlowId: string;
|
|
838
917
|
version: string;
|
|
@@ -841,6 +920,7 @@ interface FlowWebAppVersion extends BaseDocument {
|
|
|
841
920
|
fileCount: number;
|
|
842
921
|
sizeBytes: number;
|
|
843
922
|
changelog?: string;
|
|
923
|
+
orderStatuses?: OrderStatusDefinition[];
|
|
844
924
|
}
|
|
845
925
|
|
|
846
926
|
interface NonRevenueItem$1 {
|
|
@@ -1004,74 +1084,6 @@ interface Transaction extends BaseEntity {
|
|
|
1004
1084
|
minorUnits?: number;
|
|
1005
1085
|
}
|
|
1006
1086
|
|
|
1007
|
-
type PaymentState = 'unpaid' | 'payment_pending' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'voided';
|
|
1008
|
-
type FulfillmentState = 'draft' | 'pending' | 'on_hold' | 'in_progress' | 'fulfilled' | 'partially_fulfilled' | 'returned' | 'partially_returned' | 'cancelled';
|
|
1009
|
-
interface StatePair {
|
|
1010
|
-
payment: PaymentState;
|
|
1011
|
-
fulfillment: FulfillmentState;
|
|
1012
|
-
}
|
|
1013
|
-
type ConditionOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'notIn' | 'isEmpty' | 'isNotEmpty';
|
|
1014
|
-
type PathMode = 'strict' | 'permissive';
|
|
1015
|
-
|
|
1016
|
-
interface PaymentTransitionPath {
|
|
1017
|
-
from: PaymentState;
|
|
1018
|
-
to: PaymentState;
|
|
1019
|
-
conditionSetId?: string;
|
|
1020
|
-
_sourceExtensionId?: string;
|
|
1021
|
-
}
|
|
1022
|
-
interface FulfillmentTransitionPath {
|
|
1023
|
-
from: FulfillmentState;
|
|
1024
|
-
to: FulfillmentState;
|
|
1025
|
-
conditionSetId?: string;
|
|
1026
|
-
_sourceExtensionId?: string;
|
|
1027
|
-
}
|
|
1028
|
-
interface Condition {
|
|
1029
|
-
field: string;
|
|
1030
|
-
operator: ConditionOperator;
|
|
1031
|
-
value: unknown;
|
|
1032
|
-
}
|
|
1033
|
-
interface ConditionGroup {
|
|
1034
|
-
conditions: Condition[];
|
|
1035
|
-
}
|
|
1036
|
-
interface TransitionConditionSet {
|
|
1037
|
-
id: string;
|
|
1038
|
-
label: string;
|
|
1039
|
-
groups: ConditionGroup[];
|
|
1040
|
-
_sourceExtensionId?: string;
|
|
1041
|
-
}
|
|
1042
|
-
type CrossAxisTrigger = {
|
|
1043
|
-
axis: 'payment';
|
|
1044
|
-
to: PaymentState | PaymentState[];
|
|
1045
|
-
} | {
|
|
1046
|
-
axis: 'fulfillment';
|
|
1047
|
-
to: FulfillmentState | FulfillmentState[];
|
|
1048
|
-
};
|
|
1049
|
-
type CrossAxisRequires = {
|
|
1050
|
-
axis: 'payment';
|
|
1051
|
-
states: PaymentState[];
|
|
1052
|
-
} | {
|
|
1053
|
-
axis: 'fulfillment';
|
|
1054
|
-
states: FulfillmentState[];
|
|
1055
|
-
};
|
|
1056
|
-
interface CrossAxisRule {
|
|
1057
|
-
id: string;
|
|
1058
|
-
label: string;
|
|
1059
|
-
description?: string;
|
|
1060
|
-
enabled: boolean;
|
|
1061
|
-
trigger: CrossAxisTrigger;
|
|
1062
|
-
requires: CrossAxisRequires;
|
|
1063
|
-
_sourceExtensionId?: string;
|
|
1064
|
-
}
|
|
1065
|
-
interface DisplayStateRule {
|
|
1066
|
-
paymentState?: PaymentState | PaymentState[];
|
|
1067
|
-
fulfillmentState?: FulfillmentState | FulfillmentState[];
|
|
1068
|
-
label: string;
|
|
1069
|
-
color?: string;
|
|
1070
|
-
icon?: string;
|
|
1071
|
-
_sourceExtensionId?: string;
|
|
1072
|
-
}
|
|
1073
|
-
type TransitionBlockedBy = 'financial_invariant' | 'cross_axis_rule' | 'path' | 'condition';
|
|
1074
|
-
|
|
1075
1087
|
interface OrderStateConfig extends BaseEntity {
|
|
1076
1088
|
version: number;
|
|
1077
1089
|
name: string;
|
|
@@ -2411,6 +2423,7 @@ interface SelectionFlowContext {
|
|
|
2411
2423
|
flowVersionUrl: string | null;
|
|
2412
2424
|
flowSettings: Record<string, string> | null;
|
|
2413
2425
|
flowSettingsKey: Record<string, string> | null;
|
|
2426
|
+
orderStatuses?: OrderStatusDefinition[] | null;
|
|
2414
2427
|
}
|
|
2415
2428
|
interface SelectionContext {
|
|
2416
2429
|
user: ActiveUser;
|
|
@@ -2455,6 +2468,11 @@ interface BootstrapMessage {
|
|
|
2455
2468
|
};
|
|
2456
2469
|
paymentProvider?: PaymentProcessor;
|
|
2457
2470
|
printerSettings?: PrinterSettings | null;
|
|
2471
|
+
adyenCardEntry?: AdyenCardEntryConfig | null;
|
|
2472
|
+
}
|
|
2473
|
+
interface AdyenCardEntryConfig {
|
|
2474
|
+
clientKey: string;
|
|
2475
|
+
environment: 'test' | 'live';
|
|
2458
2476
|
}
|
|
2459
2477
|
interface TokenRefreshMessage {
|
|
2460
2478
|
type: 'TOKEN_REFRESH';
|
|
@@ -2542,4 +2560,4 @@ interface PubsubEventMessage {
|
|
|
2542
2560
|
}
|
|
2543
2561
|
type ServiceChannelMessage = PosBrainReadyMessage | HostHelloMessage | ServiceInitMessage | BootstrapMessage | TokenRefreshMessage | RequestTokenRefreshMessage | SelectionMessage | HostShutdownMessage | ReaderCapabilitiesMessage | PrinterSettingsMessage | RuntimeReadyMessage | HostNavigateMessage | SyncProgressMessage | DeviceOpRequestMessage | DeviceOpResponseMessage | PubsubTopicsRequestMessage | PubsubTopicsListMessage | PubsubSubscribeMessage | PubsubEventMessage;
|
|
2544
2562
|
|
|
2545
|
-
export { type ActiveCart, type ActiveCartProduct, type ActiveCompany, type ActiveCustomSales, type ActiveCustomer, type ActiveEntityChanges, ActiveEntityType, type ActiveFullProduct, type ActiveOrder, type ActiveOrderReservation, type ActiveOutlet, type ActivePark, type ActiveProduct, type ActiveRefundOrder, type ActiveSession, type ActiveSplitPayment, type ActiveStation, type ActiveTaxDetails, type ActiveTimer, type ActiveUpdatedOrder, type ActiveUser, type ActiveUserRole, type Address, type Attribute, type AttributeEmbedded, type AttributeOption, type BaseDocument, type BaseEntity, type BaseTile, type Booking, type BookingAvailability, type BookingResource, type BookingSlot, type BookingSlotResource, type BootstrapMessage, type CalculatedTaxDetails, type CartDiscountItem, type CartFeeItem, type CartFeeTaxEntry, type CartFeesDetails, type CartLineComponent, type CartLineModifier, type CartReservation, type CashDrawerPolicy, type CashPaymentSettings, type CashRoundingIncrement, type Category, type CompanyExtension, type CompanySettingsEavValue, type CompanySettingsEavValueType, type Composite, type CompositeChoice, type CompositeItem, type CompositeItemUnavailable, type CompositePart, type CompositePick, type CustomExtension, type CustomFee, type CustomSale, type CustomSaleDetails, type CustomTable, type CustomTableField, type CustomTableMetadata, type CustomTableRow, type CustomTableValue, type Customer, type CustomerNote, type DeviceEnvAttribute, type DeviceEnvCategory, type DeviceEnvValue, type DeviceOpName, type DeviceOpRequestMessage, type DeviceOpResponseMessage, type Discount, type DiscountDetail, type DiscountLineItem, type Enrich, EnvironmentDataKeys, EnvironmentDataSubKeys, type FeeDetail, type FeeLineItem, type Flow, type FlowSettings, type FlowSettingsKey, type FlowWebApp, type FlowWebAppVersion, type FullProduct, type HostHelloMessage, type HostNavigateMessage, type HostNavigateTarget, type HostShutdownMessage, type Inventory, type LineItem, type Metadata, type MetadataItem, type ModifierChoiceSelection, type ModifierSelection, type ModifierSelectionType, type NonRevenueItem, type Note, type Order, type OrderAssignedUser, type OrderCartDiscount, type OrderCartFee, type OrderCustomSale, type OrderCustomSaleDiscount, type OrderCustomSaleFee, type OrderCustomStatus, type OrderInCart, type OrderLineItem, type OrderLineItemComponent, type OrderLineItemDiscount, type OrderLineItemFee, type OrderLineItemModifier, type OrderNote, type OrderPaymentMethod, type OrderPosData, type OrderRefund, type OrderRefundSummary, type OrderReservation, type OrderStateActor, type OrderStateActorType, type OrderStateConfig, type OrderStateEvent, type OrderStateEventTrigger, type OrderStateHistoryEntry, type OrderStateOperation, type OrderStatePair, type OrderSummary, type OrderSummaryPayments, type OrderTax, type OrderTip, type Outlet, type PaymentMethod, type PaymentResponse, type PaymentSetting, PaymentStatus, type PosBrainReadyMessage, type PosDataItem, type PriceModifierDetail, type PrinterDetails, type PrinterSettings, type PrinterSettingsMessage, ProcessorType, type ProdDiscountBreakdown, type ProdFeeBreakdown, type ProdModifierBreakdown, type Product, type ProductTaxDetails, type ProductVariant, type PubsubEventMessage, type PubsubSubscribeMessage, type PubsubTopicsListMessage, type PubsubTopicsRequestMessage, type Reader, type ReaderAvailability, type ReaderCapabilities, type ReaderCapabilitiesMessage, type Refund, type RefundCartDiscount, type RefundDiscount, type RefundItem, type RefundItemDiscount, type RefundLineItem, type RefundPayment, type RefundProcessingStatus, type RefundSummary, type RefundTip, type RefundedCustomSale, type RefundedLineItem, type RefundedTipPayment, type RequestTokenRefreshMessage, type ResolvedModifier, type ResolvedModifierChoice, type Role, type RolePermission, type RuntimeReadyMessage, type SelectionContext, type SelectionFlowContext, type SelectionMessage, type SelectionRoleContext, type ServiceChannelMessage, type ServiceChannelMessageType, type ServiceInitMessage, type Session, type SessionClosingAmounts, type SmartGridSetting, type SmartGridSettings, type SmartGridSettingsData, type Station, type StripeAccount, type Summary, type SummaryPayments, type SyncProgressMessage, type Tax, type TaxRate, type TaxRateValue, type TaxTable, type TaxTableActive, type TaxTableRate, type TileGrid, type TimeClockEntry, type TimeClockEntryStatus, type Tip, type TipData, type TipPayment, type TipsDetails, type TokenRefreshMessage, type TopicDefinitionWire, type TopicEventWire, type Transaction, type TransactionPaymentData, type User, type UserType, type Variant, type VariantInventory };
|
|
2563
|
+
export { type ActiveCart, type ActiveCartProduct, type ActiveCompany, type ActiveCustomSales, type ActiveCustomer, type ActiveEntityChanges, ActiveEntityType, type ActiveFullProduct, type ActiveOrder, type ActiveOrderReservation, type ActiveOutlet, type ActivePark, type ActiveProduct, type ActiveRefundOrder, type ActiveSession, type ActiveSplitPayment, type ActiveStation, type ActiveTaxDetails, type ActiveTimer, type ActiveUpdatedOrder, type ActiveUser, type ActiveUserRole, type Address, type AdyenCardEntryConfig, type Attribute, type AttributeEmbedded, type AttributeOption, type BaseDocument, type BaseEntity, type BaseTile, type Booking, type BookingAvailability, type BookingResource, type BookingSlot, type BookingSlotResource, type BootstrapMessage, type CalculatedTaxDetails, type CartDiscountItem, type CartFeeItem, type CartFeeTaxEntry, type CartFeesDetails, type CartLineComponent, type CartLineModifier, type CartReservation, type CashDrawerPolicy, type CashPaymentSettings, type CashRoundingIncrement, type Category, type CompanyExtension, type CompanySettingsEavValue, type CompanySettingsEavValueType, type Composite, type CompositeChoice, type CompositeItem, type CompositeItemUnavailable, type CompositePart, type CompositePick, type CustomExtension, type CustomFee, type CustomSale, type CustomSaleDetails, type CustomTable, type CustomTableField, type CustomTableMetadata, type CustomTableRow, type CustomTableValue, type Customer, type CustomerNote, type DeviceEnvAttribute, type DeviceEnvCategory, type DeviceEnvValue, type DeviceOpName, type DeviceOpRequestMessage, type DeviceOpResponseMessage, type Discount, type DiscountDetail, type DiscountLineItem, type Enrich, EnvironmentDataKeys, EnvironmentDataSubKeys, type FeeDetail, type FeeLineItem, type Flow, type FlowSettings, type FlowSettingsKey, type FlowWebApp, type FlowWebAppVersion, type FullProduct, type HostHelloMessage, type HostNavigateMessage, type HostNavigateTarget, type HostShutdownMessage, type Inventory, type LineItem, type Metadata, type MetadataItem, type ModifierChoiceSelection, type ModifierSelection, type ModifierSelectionType, type NonRevenueItem, type Note, type Order, type OrderAssignedUser, type OrderCartDiscount, type OrderCartFee, type OrderCustomSale, type OrderCustomSaleDiscount, type OrderCustomSaleFee, type OrderCustomStatus, type OrderInCart, type OrderLineItem, type OrderLineItemComponent, type OrderLineItemDiscount, type OrderLineItemFee, type OrderLineItemModifier, type OrderNote, type OrderPaymentMethod, type OrderPosData, type OrderRefund, type OrderRefundSummary, type OrderReservation, type OrderStateActor, type OrderStateActorType, type OrderStateConfig, type OrderStateEvent, type OrderStateEventTrigger, type OrderStateHistoryEntry, type OrderStateOperation, type OrderStatePair, type OrderSummary, type OrderSummaryPayments, type OrderTax, type OrderTip, type Outlet, type PaymentMethod, type PaymentResponse, type PaymentSetting, PaymentStatus, type PosBrainReadyMessage, type PosDataItem, type PriceModifierDetail, type PrinterDetails, type PrinterSettings, type PrinterSettingsMessage, ProcessorType, type ProdDiscountBreakdown, type ProdFeeBreakdown, type ProdModifierBreakdown, type Product, type ProductTaxDetails, type ProductVariant, type PubsubEventMessage, type PubsubSubscribeMessage, type PubsubTopicsListMessage, type PubsubTopicsRequestMessage, type Reader, type ReaderAvailability, type ReaderCapabilities, type ReaderCapabilitiesMessage, type Refund, type RefundCartDiscount, type RefundDiscount, type RefundItem, type RefundItemDiscount, type RefundLineItem, type RefundPayment, type RefundProcessingStatus, type RefundSummary, type RefundTip, type RefundedCustomSale, type RefundedLineItem, type RefundedTipPayment, type RequestTokenRefreshMessage, type ResolvedModifier, type ResolvedModifierChoice, type Role, type RolePermission, type RuntimeReadyMessage, type SelectionContext, type SelectionFlowContext, type SelectionMessage, type SelectionRoleContext, type ServiceChannelMessage, type ServiceChannelMessageType, type ServiceInitMessage, type Session, type SessionClosingAmounts, type SmartGridSetting, type SmartGridSettings, type SmartGridSettingsData, type Station, type StripeAccount, type Summary, type SummaryPayments, type SyncProgressMessage, type Tax, type TaxRate, type TaxRateValue, type TaxTable, type TaxTableActive, type TaxTableRate, type TileGrid, type TimeClockEntry, type TimeClockEntryStatus, type Tip, type TipData, type TipPayment, type TipsDetails, type TokenRefreshMessage, type TopicDefinitionWire, type TopicEventWire, type Transaction, type TransactionPaymentData, type User, type UserType, type Variant, type VariantInventory };
|
|
@@ -151,6 +151,7 @@ interface OrderInCart {
|
|
|
151
151
|
|
|
152
152
|
interface OrderCustomStatus {
|
|
153
153
|
id: string;
|
|
154
|
+
key?: string;
|
|
154
155
|
label: string;
|
|
155
156
|
setAt: string;
|
|
156
157
|
setBy: string | null;
|
|
@@ -833,6 +834,84 @@ interface FlowWebApp extends BaseDocument {
|
|
|
833
834
|
customDomain?: string;
|
|
834
835
|
}
|
|
835
836
|
|
|
837
|
+
type PaymentState = 'unpaid' | 'payment_pending' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'voided';
|
|
838
|
+
type FulfillmentState = 'draft' | 'pending' | 'on_hold' | 'in_progress' | 'fulfilled' | 'partially_fulfilled' | 'returned' | 'partially_returned' | 'cancelled';
|
|
839
|
+
interface StatePair {
|
|
840
|
+
payment: PaymentState;
|
|
841
|
+
fulfillment: FulfillmentState;
|
|
842
|
+
}
|
|
843
|
+
type ConditionOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'notIn' | 'isEmpty' | 'isNotEmpty';
|
|
844
|
+
type PathMode = 'strict' | 'permissive';
|
|
845
|
+
|
|
846
|
+
interface PaymentTransitionPath {
|
|
847
|
+
from: PaymentState;
|
|
848
|
+
to: PaymentState;
|
|
849
|
+
conditionSetId?: string;
|
|
850
|
+
_sourceExtensionId?: string;
|
|
851
|
+
}
|
|
852
|
+
interface FulfillmentTransitionPath {
|
|
853
|
+
from: FulfillmentState;
|
|
854
|
+
to: FulfillmentState;
|
|
855
|
+
conditionSetId?: string;
|
|
856
|
+
_sourceExtensionId?: string;
|
|
857
|
+
}
|
|
858
|
+
interface Condition {
|
|
859
|
+
field: string;
|
|
860
|
+
operator: ConditionOperator;
|
|
861
|
+
value: unknown;
|
|
862
|
+
}
|
|
863
|
+
interface ConditionGroup {
|
|
864
|
+
conditions: Condition[];
|
|
865
|
+
}
|
|
866
|
+
interface TransitionConditionSet {
|
|
867
|
+
id: string;
|
|
868
|
+
label: string;
|
|
869
|
+
groups: ConditionGroup[];
|
|
870
|
+
_sourceExtensionId?: string;
|
|
871
|
+
}
|
|
872
|
+
type CrossAxisTrigger = {
|
|
873
|
+
axis: 'payment';
|
|
874
|
+
to: PaymentState | PaymentState[];
|
|
875
|
+
} | {
|
|
876
|
+
axis: 'fulfillment';
|
|
877
|
+
to: FulfillmentState | FulfillmentState[];
|
|
878
|
+
};
|
|
879
|
+
type CrossAxisRequires = {
|
|
880
|
+
axis: 'payment';
|
|
881
|
+
states: PaymentState[];
|
|
882
|
+
} | {
|
|
883
|
+
axis: 'fulfillment';
|
|
884
|
+
states: FulfillmentState[];
|
|
885
|
+
};
|
|
886
|
+
interface CrossAxisRule {
|
|
887
|
+
id: string;
|
|
888
|
+
label: string;
|
|
889
|
+
description?: string;
|
|
890
|
+
enabled: boolean;
|
|
891
|
+
trigger: CrossAxisTrigger;
|
|
892
|
+
requires: CrossAxisRequires;
|
|
893
|
+
_sourceExtensionId?: string;
|
|
894
|
+
}
|
|
895
|
+
interface DisplayStateRule {
|
|
896
|
+
paymentState?: PaymentState | PaymentState[];
|
|
897
|
+
fulfillmentState?: FulfillmentState | FulfillmentState[];
|
|
898
|
+
label: string;
|
|
899
|
+
color?: string;
|
|
900
|
+
icon?: string;
|
|
901
|
+
_sourceExtensionId?: string;
|
|
902
|
+
}
|
|
903
|
+
type TransitionBlockedBy = 'financial_invariant' | 'cross_axis_rule' | 'path' | 'condition';
|
|
904
|
+
|
|
905
|
+
interface OrderStatusDefinition {
|
|
906
|
+
id: string;
|
|
907
|
+
key: string;
|
|
908
|
+
defaultLabel: string;
|
|
909
|
+
color?: string;
|
|
910
|
+
icon?: string;
|
|
911
|
+
fulfillmentState?: FulfillmentState;
|
|
912
|
+
requiresPaymentState?: PaymentState[];
|
|
913
|
+
}
|
|
914
|
+
|
|
836
915
|
interface FlowWebAppVersion extends BaseDocument {
|
|
837
916
|
checkoutFlowId: string;
|
|
838
917
|
version: string;
|
|
@@ -841,6 +920,7 @@ interface FlowWebAppVersion extends BaseDocument {
|
|
|
841
920
|
fileCount: number;
|
|
842
921
|
sizeBytes: number;
|
|
843
922
|
changelog?: string;
|
|
923
|
+
orderStatuses?: OrderStatusDefinition[];
|
|
844
924
|
}
|
|
845
925
|
|
|
846
926
|
interface NonRevenueItem$1 {
|
|
@@ -1004,74 +1084,6 @@ interface Transaction extends BaseEntity {
|
|
|
1004
1084
|
minorUnits?: number;
|
|
1005
1085
|
}
|
|
1006
1086
|
|
|
1007
|
-
type PaymentState = 'unpaid' | 'payment_pending' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'voided';
|
|
1008
|
-
type FulfillmentState = 'draft' | 'pending' | 'on_hold' | 'in_progress' | 'fulfilled' | 'partially_fulfilled' | 'returned' | 'partially_returned' | 'cancelled';
|
|
1009
|
-
interface StatePair {
|
|
1010
|
-
payment: PaymentState;
|
|
1011
|
-
fulfillment: FulfillmentState;
|
|
1012
|
-
}
|
|
1013
|
-
type ConditionOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'notIn' | 'isEmpty' | 'isNotEmpty';
|
|
1014
|
-
type PathMode = 'strict' | 'permissive';
|
|
1015
|
-
|
|
1016
|
-
interface PaymentTransitionPath {
|
|
1017
|
-
from: PaymentState;
|
|
1018
|
-
to: PaymentState;
|
|
1019
|
-
conditionSetId?: string;
|
|
1020
|
-
_sourceExtensionId?: string;
|
|
1021
|
-
}
|
|
1022
|
-
interface FulfillmentTransitionPath {
|
|
1023
|
-
from: FulfillmentState;
|
|
1024
|
-
to: FulfillmentState;
|
|
1025
|
-
conditionSetId?: string;
|
|
1026
|
-
_sourceExtensionId?: string;
|
|
1027
|
-
}
|
|
1028
|
-
interface Condition {
|
|
1029
|
-
field: string;
|
|
1030
|
-
operator: ConditionOperator;
|
|
1031
|
-
value: unknown;
|
|
1032
|
-
}
|
|
1033
|
-
interface ConditionGroup {
|
|
1034
|
-
conditions: Condition[];
|
|
1035
|
-
}
|
|
1036
|
-
interface TransitionConditionSet {
|
|
1037
|
-
id: string;
|
|
1038
|
-
label: string;
|
|
1039
|
-
groups: ConditionGroup[];
|
|
1040
|
-
_sourceExtensionId?: string;
|
|
1041
|
-
}
|
|
1042
|
-
type CrossAxisTrigger = {
|
|
1043
|
-
axis: 'payment';
|
|
1044
|
-
to: PaymentState | PaymentState[];
|
|
1045
|
-
} | {
|
|
1046
|
-
axis: 'fulfillment';
|
|
1047
|
-
to: FulfillmentState | FulfillmentState[];
|
|
1048
|
-
};
|
|
1049
|
-
type CrossAxisRequires = {
|
|
1050
|
-
axis: 'payment';
|
|
1051
|
-
states: PaymentState[];
|
|
1052
|
-
} | {
|
|
1053
|
-
axis: 'fulfillment';
|
|
1054
|
-
states: FulfillmentState[];
|
|
1055
|
-
};
|
|
1056
|
-
interface CrossAxisRule {
|
|
1057
|
-
id: string;
|
|
1058
|
-
label: string;
|
|
1059
|
-
description?: string;
|
|
1060
|
-
enabled: boolean;
|
|
1061
|
-
trigger: CrossAxisTrigger;
|
|
1062
|
-
requires: CrossAxisRequires;
|
|
1063
|
-
_sourceExtensionId?: string;
|
|
1064
|
-
}
|
|
1065
|
-
interface DisplayStateRule {
|
|
1066
|
-
paymentState?: PaymentState | PaymentState[];
|
|
1067
|
-
fulfillmentState?: FulfillmentState | FulfillmentState[];
|
|
1068
|
-
label: string;
|
|
1069
|
-
color?: string;
|
|
1070
|
-
icon?: string;
|
|
1071
|
-
_sourceExtensionId?: string;
|
|
1072
|
-
}
|
|
1073
|
-
type TransitionBlockedBy = 'financial_invariant' | 'cross_axis_rule' | 'path' | 'condition';
|
|
1074
|
-
|
|
1075
1087
|
interface OrderStateConfig extends BaseEntity {
|
|
1076
1088
|
version: number;
|
|
1077
1089
|
name: string;
|
|
@@ -2411,6 +2423,7 @@ interface SelectionFlowContext {
|
|
|
2411
2423
|
flowVersionUrl: string | null;
|
|
2412
2424
|
flowSettings: Record<string, string> | null;
|
|
2413
2425
|
flowSettingsKey: Record<string, string> | null;
|
|
2426
|
+
orderStatuses?: OrderStatusDefinition[] | null;
|
|
2414
2427
|
}
|
|
2415
2428
|
interface SelectionContext {
|
|
2416
2429
|
user: ActiveUser;
|
|
@@ -2455,6 +2468,11 @@ interface BootstrapMessage {
|
|
|
2455
2468
|
};
|
|
2456
2469
|
paymentProvider?: PaymentProcessor;
|
|
2457
2470
|
printerSettings?: PrinterSettings | null;
|
|
2471
|
+
adyenCardEntry?: AdyenCardEntryConfig | null;
|
|
2472
|
+
}
|
|
2473
|
+
interface AdyenCardEntryConfig {
|
|
2474
|
+
clientKey: string;
|
|
2475
|
+
environment: 'test' | 'live';
|
|
2458
2476
|
}
|
|
2459
2477
|
interface TokenRefreshMessage {
|
|
2460
2478
|
type: 'TOKEN_REFRESH';
|
|
@@ -2542,4 +2560,4 @@ interface PubsubEventMessage {
|
|
|
2542
2560
|
}
|
|
2543
2561
|
type ServiceChannelMessage = PosBrainReadyMessage | HostHelloMessage | ServiceInitMessage | BootstrapMessage | TokenRefreshMessage | RequestTokenRefreshMessage | SelectionMessage | HostShutdownMessage | ReaderCapabilitiesMessage | PrinterSettingsMessage | RuntimeReadyMessage | HostNavigateMessage | SyncProgressMessage | DeviceOpRequestMessage | DeviceOpResponseMessage | PubsubTopicsRequestMessage | PubsubTopicsListMessage | PubsubSubscribeMessage | PubsubEventMessage;
|
|
2544
2562
|
|
|
2545
|
-
export { type ActiveCart, type ActiveCartProduct, type ActiveCompany, type ActiveCustomSales, type ActiveCustomer, type ActiveEntityChanges, ActiveEntityType, type ActiveFullProduct, type ActiveOrder, type ActiveOrderReservation, type ActiveOutlet, type ActivePark, type ActiveProduct, type ActiveRefundOrder, type ActiveSession, type ActiveSplitPayment, type ActiveStation, type ActiveTaxDetails, type ActiveTimer, type ActiveUpdatedOrder, type ActiveUser, type ActiveUserRole, type Address, type Attribute, type AttributeEmbedded, type AttributeOption, type BaseDocument, type BaseEntity, type BaseTile, type Booking, type BookingAvailability, type BookingResource, type BookingSlot, type BookingSlotResource, type BootstrapMessage, type CalculatedTaxDetails, type CartDiscountItem, type CartFeeItem, type CartFeeTaxEntry, type CartFeesDetails, type CartLineComponent, type CartLineModifier, type CartReservation, type CashDrawerPolicy, type CashPaymentSettings, type CashRoundingIncrement, type Category, type CompanyExtension, type CompanySettingsEavValue, type CompanySettingsEavValueType, type Composite, type CompositeChoice, type CompositeItem, type CompositeItemUnavailable, type CompositePart, type CompositePick, type CustomExtension, type CustomFee, type CustomSale, type CustomSaleDetails, type CustomTable, type CustomTableField, type CustomTableMetadata, type CustomTableRow, type CustomTableValue, type Customer, type CustomerNote, type DeviceEnvAttribute, type DeviceEnvCategory, type DeviceEnvValue, type DeviceOpName, type DeviceOpRequestMessage, type DeviceOpResponseMessage, type Discount, type DiscountDetail, type DiscountLineItem, type Enrich, EnvironmentDataKeys, EnvironmentDataSubKeys, type FeeDetail, type FeeLineItem, type Flow, type FlowSettings, type FlowSettingsKey, type FlowWebApp, type FlowWebAppVersion, type FullProduct, type HostHelloMessage, type HostNavigateMessage, type HostNavigateTarget, type HostShutdownMessage, type Inventory, type LineItem, type Metadata, type MetadataItem, type ModifierChoiceSelection, type ModifierSelection, type ModifierSelectionType, type NonRevenueItem, type Note, type Order, type OrderAssignedUser, type OrderCartDiscount, type OrderCartFee, type OrderCustomSale, type OrderCustomSaleDiscount, type OrderCustomSaleFee, type OrderCustomStatus, type OrderInCart, type OrderLineItem, type OrderLineItemComponent, type OrderLineItemDiscount, type OrderLineItemFee, type OrderLineItemModifier, type OrderNote, type OrderPaymentMethod, type OrderPosData, type OrderRefund, type OrderRefundSummary, type OrderReservation, type OrderStateActor, type OrderStateActorType, type OrderStateConfig, type OrderStateEvent, type OrderStateEventTrigger, type OrderStateHistoryEntry, type OrderStateOperation, type OrderStatePair, type OrderSummary, type OrderSummaryPayments, type OrderTax, type OrderTip, type Outlet, type PaymentMethod, type PaymentResponse, type PaymentSetting, PaymentStatus, type PosBrainReadyMessage, type PosDataItem, type PriceModifierDetail, type PrinterDetails, type PrinterSettings, type PrinterSettingsMessage, ProcessorType, type ProdDiscountBreakdown, type ProdFeeBreakdown, type ProdModifierBreakdown, type Product, type ProductTaxDetails, type ProductVariant, type PubsubEventMessage, type PubsubSubscribeMessage, type PubsubTopicsListMessage, type PubsubTopicsRequestMessage, type Reader, type ReaderAvailability, type ReaderCapabilities, type ReaderCapabilitiesMessage, type Refund, type RefundCartDiscount, type RefundDiscount, type RefundItem, type RefundItemDiscount, type RefundLineItem, type RefundPayment, type RefundProcessingStatus, type RefundSummary, type RefundTip, type RefundedCustomSale, type RefundedLineItem, type RefundedTipPayment, type RequestTokenRefreshMessage, type ResolvedModifier, type ResolvedModifierChoice, type Role, type RolePermission, type RuntimeReadyMessage, type SelectionContext, type SelectionFlowContext, type SelectionMessage, type SelectionRoleContext, type ServiceChannelMessage, type ServiceChannelMessageType, type ServiceInitMessage, type Session, type SessionClosingAmounts, type SmartGridSetting, type SmartGridSettings, type SmartGridSettingsData, type Station, type StripeAccount, type Summary, type SummaryPayments, type SyncProgressMessage, type Tax, type TaxRate, type TaxRateValue, type TaxTable, type TaxTableActive, type TaxTableRate, type TileGrid, type TimeClockEntry, type TimeClockEntryStatus, type Tip, type TipData, type TipPayment, type TipsDetails, type TokenRefreshMessage, type TopicDefinitionWire, type TopicEventWire, type Transaction, type TransactionPaymentData, type User, type UserType, type Variant, type VariantInventory };
|
|
2563
|
+
export { type ActiveCart, type ActiveCartProduct, type ActiveCompany, type ActiveCustomSales, type ActiveCustomer, type ActiveEntityChanges, ActiveEntityType, type ActiveFullProduct, type ActiveOrder, type ActiveOrderReservation, type ActiveOutlet, type ActivePark, type ActiveProduct, type ActiveRefundOrder, type ActiveSession, type ActiveSplitPayment, type ActiveStation, type ActiveTaxDetails, type ActiveTimer, type ActiveUpdatedOrder, type ActiveUser, type ActiveUserRole, type Address, type AdyenCardEntryConfig, type Attribute, type AttributeEmbedded, type AttributeOption, type BaseDocument, type BaseEntity, type BaseTile, type Booking, type BookingAvailability, type BookingResource, type BookingSlot, type BookingSlotResource, type BootstrapMessage, type CalculatedTaxDetails, type CartDiscountItem, type CartFeeItem, type CartFeeTaxEntry, type CartFeesDetails, type CartLineComponent, type CartLineModifier, type CartReservation, type CashDrawerPolicy, type CashPaymentSettings, type CashRoundingIncrement, type Category, type CompanyExtension, type CompanySettingsEavValue, type CompanySettingsEavValueType, type Composite, type CompositeChoice, type CompositeItem, type CompositeItemUnavailable, type CompositePart, type CompositePick, type CustomExtension, type CustomFee, type CustomSale, type CustomSaleDetails, type CustomTable, type CustomTableField, type CustomTableMetadata, type CustomTableRow, type CustomTableValue, type Customer, type CustomerNote, type DeviceEnvAttribute, type DeviceEnvCategory, type DeviceEnvValue, type DeviceOpName, type DeviceOpRequestMessage, type DeviceOpResponseMessage, type Discount, type DiscountDetail, type DiscountLineItem, type Enrich, EnvironmentDataKeys, EnvironmentDataSubKeys, type FeeDetail, type FeeLineItem, type Flow, type FlowSettings, type FlowSettingsKey, type FlowWebApp, type FlowWebAppVersion, type FullProduct, type HostHelloMessage, type HostNavigateMessage, type HostNavigateTarget, type HostShutdownMessage, type Inventory, type LineItem, type Metadata, type MetadataItem, type ModifierChoiceSelection, type ModifierSelection, type ModifierSelectionType, type NonRevenueItem, type Note, type Order, type OrderAssignedUser, type OrderCartDiscount, type OrderCartFee, type OrderCustomSale, type OrderCustomSaleDiscount, type OrderCustomSaleFee, type OrderCustomStatus, type OrderInCart, type OrderLineItem, type OrderLineItemComponent, type OrderLineItemDiscount, type OrderLineItemFee, type OrderLineItemModifier, type OrderNote, type OrderPaymentMethod, type OrderPosData, type OrderRefund, type OrderRefundSummary, type OrderReservation, type OrderStateActor, type OrderStateActorType, type OrderStateConfig, type OrderStateEvent, type OrderStateEventTrigger, type OrderStateHistoryEntry, type OrderStateOperation, type OrderStatePair, type OrderSummary, type OrderSummaryPayments, type OrderTax, type OrderTip, type Outlet, type PaymentMethod, type PaymentResponse, type PaymentSetting, PaymentStatus, type PosBrainReadyMessage, type PosDataItem, type PriceModifierDetail, type PrinterDetails, type PrinterSettings, type PrinterSettingsMessage, ProcessorType, type ProdDiscountBreakdown, type ProdFeeBreakdown, type ProdModifierBreakdown, type Product, type ProductTaxDetails, type ProductVariant, type PubsubEventMessage, type PubsubSubscribeMessage, type PubsubTopicsListMessage, type PubsubTopicsRequestMessage, type Reader, type ReaderAvailability, type ReaderCapabilities, type ReaderCapabilitiesMessage, type Refund, type RefundCartDiscount, type RefundDiscount, type RefundItem, type RefundItemDiscount, type RefundLineItem, type RefundPayment, type RefundProcessingStatus, type RefundSummary, type RefundTip, type RefundedCustomSale, type RefundedLineItem, type RefundedTipPayment, type RequestTokenRefreshMessage, type ResolvedModifier, type ResolvedModifierChoice, type Role, type RolePermission, type RuntimeReadyMessage, type SelectionContext, type SelectionFlowContext, type SelectionMessage, type SelectionRoleContext, type ServiceChannelMessage, type ServiceChannelMessageType, type ServiceInitMessage, type Session, type SessionClosingAmounts, type SmartGridSetting, type SmartGridSettings, type SmartGridSettingsData, type Station, type StripeAccount, type Summary, type SummaryPayments, type SyncProgressMessage, type Tax, type TaxRate, type TaxRateValue, type TaxTable, type TaxTableActive, type TaxTableRate, type TileGrid, type TimeClockEntry, type TimeClockEntryStatus, type Tip, type TipData, type TipPayment, type TipsDetails, type TokenRefreshMessage, type TopicDefinitionWire, type TopicEventWire, type Transaction, type TransactionPaymentData, type User, type UserType, type Variant, type VariantInventory };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@final-commerce/common",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
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": {
|