@final-commerce/common 2.2.4-online.2 → 2.2.4-online.4
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 +10 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +84 -1
- package/dist/pos-types/index.d.ts +84 -1
- package/dist/pos-types/index.js.map +1 -1
- package/dist/pos-types/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -437,6 +437,15 @@ interface FeesBreakdown {
|
|
|
437
437
|
refundedTaxableFees?: number;
|
|
438
438
|
refundedNonTaxableFees?: number;
|
|
439
439
|
}
|
|
440
|
+
interface ModifiersBreakdown {
|
|
441
|
+
grossTotal: number;
|
|
442
|
+
refundTotal: number;
|
|
443
|
+
netTotal: number;
|
|
444
|
+
taxableModifiers?: number;
|
|
445
|
+
nonTaxableModifiers?: number;
|
|
446
|
+
refundedTaxableModifiers?: number;
|
|
447
|
+
refundedNonTaxableModifiers?: number;
|
|
448
|
+
}
|
|
440
449
|
interface ProductDiscountBucket {
|
|
441
450
|
grossProductDiscounts: number;
|
|
442
451
|
refundedProductDiscounts: number;
|
|
@@ -459,6 +468,11 @@ interface FeesTuple {
|
|
|
459
468
|
refundedFees: number;
|
|
460
469
|
netFees: number;
|
|
461
470
|
}
|
|
471
|
+
interface ModifiersTuple {
|
|
472
|
+
grossModifiers: number;
|
|
473
|
+
refundedModifiers: number;
|
|
474
|
+
netModifiers: number;
|
|
475
|
+
}
|
|
462
476
|
interface DiscountsTuple {
|
|
463
477
|
grossDiscounts: number;
|
|
464
478
|
refundedDiscounts: number;
|
|
@@ -484,6 +498,7 @@ interface SalesSummary {
|
|
|
484
498
|
discounts: DiscountsTuple;
|
|
485
499
|
refundsItems: number;
|
|
486
500
|
fees: FeesTuple;
|
|
501
|
+
modifiers?: ModifiersTuple;
|
|
487
502
|
taxes?: TaxesTuple;
|
|
488
503
|
totalSales: number;
|
|
489
504
|
tips: TipsTuple;
|
|
@@ -545,6 +560,7 @@ interface SettlementBreakdown {
|
|
|
545
560
|
interface RefundsBreakdown {
|
|
546
561
|
itemsRefunded: number;
|
|
547
562
|
feesReversed: number;
|
|
563
|
+
modifiersReversed?: number;
|
|
548
564
|
discountsReversed: number;
|
|
549
565
|
taxRefunded: number;
|
|
550
566
|
totalRefunded: number;
|
|
@@ -600,6 +616,7 @@ interface EndOfSessionReport {
|
|
|
600
616
|
staffSales: StaffSales;
|
|
601
617
|
discountsBreakdown: DiscountsBreakdown;
|
|
602
618
|
feesBreakdown: FeesBreakdown;
|
|
619
|
+
modifiersBreakdown?: ModifiersBreakdown;
|
|
603
620
|
tipsBreakdown?: TipsBreakdown;
|
|
604
621
|
sessionNumber?: string;
|
|
605
622
|
stationName?: string;
|
|
@@ -1186,6 +1203,9 @@ type OrderStateEventPayload = StateTransitionCompletedPayload | StateTransitionB
|
|
|
1186
1203
|
|
|
1187
1204
|
declare const ADYEN_ROLLOUT_COUNTRY_CODES: Set<string>;
|
|
1188
1205
|
declare function isAdyenRolloutCountry(alpha2: string): boolean;
|
|
1206
|
+
declare const AFFIRM_PRICE_PLANS: readonly ["core", "standard", "signature"];
|
|
1207
|
+
type AffirmPricePlan = (typeof AFFIRM_PRICE_PLANS)[number];
|
|
1208
|
+
declare function isAffirmPricePlan(value: unknown): value is AffirmPricePlan;
|
|
1189
1209
|
|
|
1190
1210
|
interface CurrencyRate {
|
|
1191
1211
|
rate: number;
|
|
@@ -1213,4 +1233,4 @@ declare enum ProcessorType {
|
|
|
1213
1233
|
ONLINE_PAYMENT = "OnlinePayment"
|
|
1214
1234
|
}
|
|
1215
1235
|
|
|
1216
|
-
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, 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, ProcessorType, 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 };
|
|
1236
|
+
export { ADYEN_ROLLOUT_COUNTRY_CODES, AFFIRM_PRICE_PLANS, type AffirmPricePlan, 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, ProcessorType, 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, isAffirmPricePlan, 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
|
@@ -437,6 +437,15 @@ interface FeesBreakdown {
|
|
|
437
437
|
refundedTaxableFees?: number;
|
|
438
438
|
refundedNonTaxableFees?: number;
|
|
439
439
|
}
|
|
440
|
+
interface ModifiersBreakdown {
|
|
441
|
+
grossTotal: number;
|
|
442
|
+
refundTotal: number;
|
|
443
|
+
netTotal: number;
|
|
444
|
+
taxableModifiers?: number;
|
|
445
|
+
nonTaxableModifiers?: number;
|
|
446
|
+
refundedTaxableModifiers?: number;
|
|
447
|
+
refundedNonTaxableModifiers?: number;
|
|
448
|
+
}
|
|
440
449
|
interface ProductDiscountBucket {
|
|
441
450
|
grossProductDiscounts: number;
|
|
442
451
|
refundedProductDiscounts: number;
|
|
@@ -459,6 +468,11 @@ interface FeesTuple {
|
|
|
459
468
|
refundedFees: number;
|
|
460
469
|
netFees: number;
|
|
461
470
|
}
|
|
471
|
+
interface ModifiersTuple {
|
|
472
|
+
grossModifiers: number;
|
|
473
|
+
refundedModifiers: number;
|
|
474
|
+
netModifiers: number;
|
|
475
|
+
}
|
|
462
476
|
interface DiscountsTuple {
|
|
463
477
|
grossDiscounts: number;
|
|
464
478
|
refundedDiscounts: number;
|
|
@@ -484,6 +498,7 @@ interface SalesSummary {
|
|
|
484
498
|
discounts: DiscountsTuple;
|
|
485
499
|
refundsItems: number;
|
|
486
500
|
fees: FeesTuple;
|
|
501
|
+
modifiers?: ModifiersTuple;
|
|
487
502
|
taxes?: TaxesTuple;
|
|
488
503
|
totalSales: number;
|
|
489
504
|
tips: TipsTuple;
|
|
@@ -545,6 +560,7 @@ interface SettlementBreakdown {
|
|
|
545
560
|
interface RefundsBreakdown {
|
|
546
561
|
itemsRefunded: number;
|
|
547
562
|
feesReversed: number;
|
|
563
|
+
modifiersReversed?: number;
|
|
548
564
|
discountsReversed: number;
|
|
549
565
|
taxRefunded: number;
|
|
550
566
|
totalRefunded: number;
|
|
@@ -600,6 +616,7 @@ interface EndOfSessionReport {
|
|
|
600
616
|
staffSales: StaffSales;
|
|
601
617
|
discountsBreakdown: DiscountsBreakdown;
|
|
602
618
|
feesBreakdown: FeesBreakdown;
|
|
619
|
+
modifiersBreakdown?: ModifiersBreakdown;
|
|
603
620
|
tipsBreakdown?: TipsBreakdown;
|
|
604
621
|
sessionNumber?: string;
|
|
605
622
|
stationName?: string;
|
|
@@ -1186,6 +1203,9 @@ type OrderStateEventPayload = StateTransitionCompletedPayload | StateTransitionB
|
|
|
1186
1203
|
|
|
1187
1204
|
declare const ADYEN_ROLLOUT_COUNTRY_CODES: Set<string>;
|
|
1188
1205
|
declare function isAdyenRolloutCountry(alpha2: string): boolean;
|
|
1206
|
+
declare const AFFIRM_PRICE_PLANS: readonly ["core", "standard", "signature"];
|
|
1207
|
+
type AffirmPricePlan = (typeof AFFIRM_PRICE_PLANS)[number];
|
|
1208
|
+
declare function isAffirmPricePlan(value: unknown): value is AffirmPricePlan;
|
|
1189
1209
|
|
|
1190
1210
|
interface CurrencyRate {
|
|
1191
1211
|
rate: number;
|
|
@@ -1213,4 +1233,4 @@ declare enum ProcessorType {
|
|
|
1213
1233
|
ONLINE_PAYMENT = "OnlinePayment"
|
|
1214
1234
|
}
|
|
1215
1235
|
|
|
1216
|
-
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, 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, ProcessorType, 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 };
|
|
1236
|
+
export { ADYEN_ROLLOUT_COUNTRY_CODES, AFFIRM_PRICE_PLANS, type AffirmPricePlan, 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, ProcessorType, 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, isAffirmPricePlan, 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
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var index_exports = {};
|
|
21
21
|
__export(index_exports, {
|
|
22
22
|
ADYEN_ROLLOUT_COUNTRY_CODES: () => ADYEN_ROLLOUT_COUNTRY_CODES,
|
|
23
|
+
AFFIRM_PRICE_PLANS: () => AFFIRM_PRICE_PLANS,
|
|
23
24
|
AttributeType: () => AttributeType,
|
|
24
25
|
CONDITION_OPERATORS: () => CONDITION_OPERATORS,
|
|
25
26
|
COUNTRY_CURRENCIES: () => COUNTRY_CURRENCIES,
|
|
@@ -138,6 +139,7 @@ __export(index_exports, {
|
|
|
138
139
|
getTotalCollected: () => getTotalCollected,
|
|
139
140
|
inferStatesFromLegacyStatus: () => inferStatesFromLegacyStatus,
|
|
140
141
|
isAdyenRolloutCountry: () => isAdyenRolloutCountry,
|
|
142
|
+
isAffirmPricePlan: () => isAffirmPricePlan,
|
|
141
143
|
isConditionOperator: () => isConditionOperator,
|
|
142
144
|
isFulfillmentState: () => isFulfillmentState,
|
|
143
145
|
isPaymentState: () => isPaymentState,
|
|
@@ -1419,6 +1421,8 @@ var REPORT_NEGATE_PATHS = /* @__PURE__ */ new Set([
|
|
|
1419
1421
|
// Fees breakdown — refunded magnitudes are money flowing back out
|
|
1420
1422
|
"feesBreakdown.productFee.refundedProductFees",
|
|
1421
1423
|
"feesBreakdown.cartFee.refundedCartFees",
|
|
1424
|
+
// Modifiers breakdown — refunded magnitudes are money flowing back out
|
|
1425
|
+
"modifiersBreakdown.refundTotal",
|
|
1422
1426
|
// Discounts breakdown — refunded magnitudes reverse discount reductions
|
|
1423
1427
|
"discountsBreakdown.productDiscounts.refundedProductDiscounts",
|
|
1424
1428
|
"discountsBreakdown.cartDiscounts.refundedCartDiscounts",
|
|
@@ -2937,6 +2941,10 @@ var ADYEN_ROLLOUT_COUNTRY_CODES = /* @__PURE__ */ new Set(["CA"]);
|
|
|
2937
2941
|
function isAdyenRolloutCountry(alpha2) {
|
|
2938
2942
|
return ADYEN_ROLLOUT_COUNTRY_CODES.has(alpha2);
|
|
2939
2943
|
}
|
|
2944
|
+
var AFFIRM_PRICE_PLANS = ["core", "standard", "signature"];
|
|
2945
|
+
function isAffirmPricePlan(value) {
|
|
2946
|
+
return typeof value === "string" && AFFIRM_PRICE_PLANS.includes(value);
|
|
2947
|
+
}
|
|
2940
2948
|
|
|
2941
2949
|
// pos-types/active/ProcessorType.ts
|
|
2942
2950
|
var ProcessorType = /* @__PURE__ */ ((ProcessorType2) => {
|
|
@@ -2957,6 +2965,7 @@ var ProcessorType = /* @__PURE__ */ ((ProcessorType2) => {
|
|
|
2957
2965
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2958
2966
|
0 && (module.exports = {
|
|
2959
2967
|
ADYEN_ROLLOUT_COUNTRY_CODES,
|
|
2968
|
+
AFFIRM_PRICE_PLANS,
|
|
2960
2969
|
AttributeType,
|
|
2961
2970
|
CONDITION_OPERATORS,
|
|
2962
2971
|
COUNTRY_CURRENCIES,
|
|
@@ -3075,6 +3084,7 @@ var ProcessorType = /* @__PURE__ */ ((ProcessorType2) => {
|
|
|
3075
3084
|
getTotalCollected,
|
|
3076
3085
|
inferStatesFromLegacyStatus,
|
|
3077
3086
|
isAdyenRolloutCountry,
|
|
3087
|
+
isAffirmPricePlan,
|
|
3078
3088
|
isConditionOperator,
|
|
3079
3089
|
isFulfillmentState,
|
|
3080
3090
|
isPaymentState,
|