@final-commerce/common 2.2.3-staging3.1 → 2.2.3-staging3.3
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 +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +27 -3
- package/dist/pos-types/index.d.ts +27 -3
- package/dist/pos-types/index.js +1 -0
- package/dist/pos-types/index.js.map +1 -1
- package/dist/pos-types/index.mjs +1 -0
- package/dist/pos-types/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -434,6 +434,15 @@ interface FeesBreakdown {
|
|
|
434
434
|
refundedTaxableFees?: number;
|
|
435
435
|
refundedNonTaxableFees?: number;
|
|
436
436
|
}
|
|
437
|
+
interface ModifiersBreakdown {
|
|
438
|
+
grossTotal: number;
|
|
439
|
+
refundTotal: number;
|
|
440
|
+
netTotal: number;
|
|
441
|
+
taxableModifiers?: number;
|
|
442
|
+
nonTaxableModifiers?: number;
|
|
443
|
+
refundedTaxableModifiers?: number;
|
|
444
|
+
refundedNonTaxableModifiers?: number;
|
|
445
|
+
}
|
|
437
446
|
interface ProductDiscountBucket {
|
|
438
447
|
grossProductDiscounts: number;
|
|
439
448
|
refundedProductDiscounts: number;
|
|
@@ -456,6 +465,11 @@ interface FeesTuple {
|
|
|
456
465
|
refundedFees: number;
|
|
457
466
|
netFees: number;
|
|
458
467
|
}
|
|
468
|
+
interface ModifiersTuple {
|
|
469
|
+
grossModifiers: number;
|
|
470
|
+
refundedModifiers: number;
|
|
471
|
+
netModifiers: number;
|
|
472
|
+
}
|
|
459
473
|
interface DiscountsTuple {
|
|
460
474
|
grossDiscounts: number;
|
|
461
475
|
refundedDiscounts: number;
|
|
@@ -481,6 +495,7 @@ interface SalesSummary {
|
|
|
481
495
|
discounts: DiscountsTuple;
|
|
482
496
|
refundsItems: number;
|
|
483
497
|
fees: FeesTuple;
|
|
498
|
+
modifiers?: ModifiersTuple;
|
|
484
499
|
taxes?: TaxesTuple;
|
|
485
500
|
totalSales: number;
|
|
486
501
|
tips: TipsTuple;
|
|
@@ -542,6 +557,7 @@ interface SettlementBreakdown {
|
|
|
542
557
|
interface RefundsBreakdown {
|
|
543
558
|
itemsRefunded: number;
|
|
544
559
|
feesReversed: number;
|
|
560
|
+
modifiersReversed?: number;
|
|
545
561
|
discountsReversed: number;
|
|
546
562
|
taxRefunded: number;
|
|
547
563
|
totalRefunded: number;
|
|
@@ -597,6 +613,7 @@ interface EndOfSessionReport {
|
|
|
597
613
|
staffSales: StaffSales;
|
|
598
614
|
discountsBreakdown: DiscountsBreakdown;
|
|
599
615
|
feesBreakdown: FeesBreakdown;
|
|
616
|
+
modifiersBreakdown?: ModifiersBreakdown;
|
|
600
617
|
tipsBreakdown?: TipsBreakdown;
|
|
601
618
|
sessionNumber?: string;
|
|
602
619
|
stationName?: string;
|
|
@@ -1181,6 +1198,9 @@ interface ConfigUpdatedPayload {
|
|
|
1181
1198
|
}
|
|
1182
1199
|
type OrderStateEventPayload = StateTransitionCompletedPayload | StateTransitionBlockedPayload | ConfigUpdatedPayload;
|
|
1183
1200
|
|
|
1201
|
+
declare const ADYEN_ROLLOUT_COUNTRY_CODES: Set<string>;
|
|
1202
|
+
declare function isAdyenRolloutCountry(alpha2: string): boolean;
|
|
1203
|
+
|
|
1184
1204
|
interface CurrencyRate {
|
|
1185
1205
|
rate: number;
|
|
1186
1206
|
country: string;
|
|
@@ -1192,4 +1212,4 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
|
|
|
1192
1212
|
declare const OtherFixedRates: Record<string, CurrencyRate>;
|
|
1193
1213
|
declare const COUNTRY_CURRENCIES: Record<string, string>;
|
|
1194
1214
|
|
|
1195
|
-
export { type Amount, AttributeType, type AvailableTransition, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, CompanyType, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, type EndOfSessionReport, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderStateEventPayload, type OrderStateWritable, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, Platform, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ResidualPaymentMethod, ResidualStatus, type ResolveTemplateResult, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, addAmounts, amountToString, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, inferStatesFromLegacyStatus, isConditionOperator, isFulfillmentState, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, multiplyAmount, normalizeMongoIdString, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, removeFragment, resolveFamily, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, signReportForDisplay, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, violatesFinancialInvariant };
|
|
1215
|
+
export { ADYEN_ROLLOUT_COUNTRY_CODES, type Amount, AttributeType, type AvailableTransition, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, CompanyType, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, type EndOfSessionReport, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderStateEventPayload, type OrderStateWritable, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, Platform, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ResidualPaymentMethod, ResidualStatus, type ResolveTemplateResult, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, addAmounts, amountToString, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isConditionOperator, isFulfillmentState, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, multiplyAmount, normalizeMongoIdString, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, removeFragment, resolveFamily, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, signReportForDisplay, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, violatesFinancialInvariant };
|
package/dist/index.d.ts
CHANGED
|
@@ -434,6 +434,15 @@ interface FeesBreakdown {
|
|
|
434
434
|
refundedTaxableFees?: number;
|
|
435
435
|
refundedNonTaxableFees?: number;
|
|
436
436
|
}
|
|
437
|
+
interface ModifiersBreakdown {
|
|
438
|
+
grossTotal: number;
|
|
439
|
+
refundTotal: number;
|
|
440
|
+
netTotal: number;
|
|
441
|
+
taxableModifiers?: number;
|
|
442
|
+
nonTaxableModifiers?: number;
|
|
443
|
+
refundedTaxableModifiers?: number;
|
|
444
|
+
refundedNonTaxableModifiers?: number;
|
|
445
|
+
}
|
|
437
446
|
interface ProductDiscountBucket {
|
|
438
447
|
grossProductDiscounts: number;
|
|
439
448
|
refundedProductDiscounts: number;
|
|
@@ -456,6 +465,11 @@ interface FeesTuple {
|
|
|
456
465
|
refundedFees: number;
|
|
457
466
|
netFees: number;
|
|
458
467
|
}
|
|
468
|
+
interface ModifiersTuple {
|
|
469
|
+
grossModifiers: number;
|
|
470
|
+
refundedModifiers: number;
|
|
471
|
+
netModifiers: number;
|
|
472
|
+
}
|
|
459
473
|
interface DiscountsTuple {
|
|
460
474
|
grossDiscounts: number;
|
|
461
475
|
refundedDiscounts: number;
|
|
@@ -481,6 +495,7 @@ interface SalesSummary {
|
|
|
481
495
|
discounts: DiscountsTuple;
|
|
482
496
|
refundsItems: number;
|
|
483
497
|
fees: FeesTuple;
|
|
498
|
+
modifiers?: ModifiersTuple;
|
|
484
499
|
taxes?: TaxesTuple;
|
|
485
500
|
totalSales: number;
|
|
486
501
|
tips: TipsTuple;
|
|
@@ -542,6 +557,7 @@ interface SettlementBreakdown {
|
|
|
542
557
|
interface RefundsBreakdown {
|
|
543
558
|
itemsRefunded: number;
|
|
544
559
|
feesReversed: number;
|
|
560
|
+
modifiersReversed?: number;
|
|
545
561
|
discountsReversed: number;
|
|
546
562
|
taxRefunded: number;
|
|
547
563
|
totalRefunded: number;
|
|
@@ -597,6 +613,7 @@ interface EndOfSessionReport {
|
|
|
597
613
|
staffSales: StaffSales;
|
|
598
614
|
discountsBreakdown: DiscountsBreakdown;
|
|
599
615
|
feesBreakdown: FeesBreakdown;
|
|
616
|
+
modifiersBreakdown?: ModifiersBreakdown;
|
|
600
617
|
tipsBreakdown?: TipsBreakdown;
|
|
601
618
|
sessionNumber?: string;
|
|
602
619
|
stationName?: string;
|
|
@@ -1181,6 +1198,9 @@ interface ConfigUpdatedPayload {
|
|
|
1181
1198
|
}
|
|
1182
1199
|
type OrderStateEventPayload = StateTransitionCompletedPayload | StateTransitionBlockedPayload | ConfigUpdatedPayload;
|
|
1183
1200
|
|
|
1201
|
+
declare const ADYEN_ROLLOUT_COUNTRY_CODES: Set<string>;
|
|
1202
|
+
declare function isAdyenRolloutCountry(alpha2: string): boolean;
|
|
1203
|
+
|
|
1184
1204
|
interface CurrencyRate {
|
|
1185
1205
|
rate: number;
|
|
1186
1206
|
country: string;
|
|
@@ -1192,4 +1212,4 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
|
|
|
1192
1212
|
declare const OtherFixedRates: Record<string, CurrencyRate>;
|
|
1193
1213
|
declare const COUNTRY_CURRENCIES: Record<string, string>;
|
|
1194
1214
|
|
|
1195
|
-
export { type Amount, AttributeType, type AvailableTransition, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, CompanyType, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, type EndOfSessionReport, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderStateEventPayload, type OrderStateWritable, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, Platform, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ResidualPaymentMethod, ResidualStatus, type ResolveTemplateResult, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, addAmounts, amountToString, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, inferStatesFromLegacyStatus, isConditionOperator, isFulfillmentState, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, multiplyAmount, normalizeMongoIdString, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, removeFragment, resolveFamily, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, signReportForDisplay, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, violatesFinancialInvariant };
|
|
1215
|
+
export { ADYEN_ROLLOUT_COUNTRY_CODES, type Amount, AttributeType, type AvailableTransition, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, CompanyType, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, type EndOfSessionReport, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderStateEventPayload, type OrderStateWritable, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, Platform, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ResidualPaymentMethod, ResidualStatus, type ResolveTemplateResult, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, addAmounts, amountToString, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isConditionOperator, isFulfillmentState, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, multiplyAmount, normalizeMongoIdString, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, removeFragment, resolveFamily, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, signReportForDisplay, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, violatesFinancialInvariant };
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// index.ts
|
|
20
20
|
var index_exports = {};
|
|
21
21
|
__export(index_exports, {
|
|
22
|
+
ADYEN_ROLLOUT_COUNTRY_CODES: () => ADYEN_ROLLOUT_COUNTRY_CODES,
|
|
22
23
|
AttributeType: () => AttributeType,
|
|
23
24
|
CONDITION_OPERATORS: () => CONDITION_OPERATORS,
|
|
24
25
|
COUNTRY_CURRENCIES: () => COUNTRY_CURRENCIES,
|
|
@@ -135,6 +136,7 @@ __export(index_exports, {
|
|
|
135
136
|
getSettlementTotal: () => getSettlementTotal,
|
|
136
137
|
getTotalCollected: () => getTotalCollected,
|
|
137
138
|
inferStatesFromLegacyStatus: () => inferStatesFromLegacyStatus,
|
|
139
|
+
isAdyenRolloutCountry: () => isAdyenRolloutCountry,
|
|
138
140
|
isConditionOperator: () => isConditionOperator,
|
|
139
141
|
isFulfillmentState: () => isFulfillmentState,
|
|
140
142
|
isPaymentState: () => isPaymentState,
|
|
@@ -1413,6 +1415,8 @@ var REPORT_NEGATE_PATHS = /* @__PURE__ */ new Set([
|
|
|
1413
1415
|
// Fees breakdown — refunded magnitudes are money flowing back out
|
|
1414
1416
|
"feesBreakdown.productFee.refundedProductFees",
|
|
1415
1417
|
"feesBreakdown.cartFee.refundedCartFees",
|
|
1418
|
+
// Modifiers breakdown — refunded magnitudes are money flowing back out
|
|
1419
|
+
"modifiersBreakdown.refundTotal",
|
|
1416
1420
|
// Discounts breakdown — refunded magnitudes reverse discount reductions
|
|
1417
1421
|
"discountsBreakdown.productDiscounts.refundedProductDiscounts",
|
|
1418
1422
|
"discountsBreakdown.cartDiscounts.refundedCartDiscounts",
|
|
@@ -2925,8 +2929,15 @@ var ORDER_STATE_EVENTS = {
|
|
|
2925
2929
|
stateTransitionBlocked: "state-transition-blocked",
|
|
2926
2930
|
configUpdated: "config-updated"
|
|
2927
2931
|
};
|
|
2932
|
+
|
|
2933
|
+
// constants/adyen.constants.ts
|
|
2934
|
+
var ADYEN_ROLLOUT_COUNTRY_CODES = /* @__PURE__ */ new Set(["CA"]);
|
|
2935
|
+
function isAdyenRolloutCountry(alpha2) {
|
|
2936
|
+
return ADYEN_ROLLOUT_COUNTRY_CODES.has(alpha2);
|
|
2937
|
+
}
|
|
2928
2938
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2929
2939
|
0 && (module.exports = {
|
|
2940
|
+
ADYEN_ROLLOUT_COUNTRY_CODES,
|
|
2930
2941
|
AttributeType,
|
|
2931
2942
|
CONDITION_OPERATORS,
|
|
2932
2943
|
COUNTRY_CURRENCIES,
|
|
@@ -3043,6 +3054,7 @@ var ORDER_STATE_EVENTS = {
|
|
|
3043
3054
|
getSettlementTotal,
|
|
3044
3055
|
getTotalCollected,
|
|
3045
3056
|
inferStatesFromLegacyStatus,
|
|
3057
|
+
isAdyenRolloutCountry,
|
|
3046
3058
|
isConditionOperator,
|
|
3047
3059
|
isFulfillmentState,
|
|
3048
3060
|
isPaymentState,
|