@final-commerce/common 2.2.4-online.2 → 2.2.4-preprod.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +19 -18
- package/dist/index.d.ts +19 -18
- package/dist/index.js +2 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -19
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +85 -3
- package/dist/pos-types/index.d.ts +85 -3
- package/dist/pos-types/index.js +0 -1
- package/dist/pos-types/index.js.map +1 -1
- package/dist/pos-types/index.mjs +0 -1
- package/dist/pos-types/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -190,8 +190,7 @@ declare enum Platform {
|
|
|
190
190
|
declare enum OrderPlatform {
|
|
191
191
|
POS = "in-store",
|
|
192
192
|
WOO_COMMERCE = "woo-commerce",
|
|
193
|
-
PUBLIC_API = "public-api"
|
|
194
|
-
ONLINE_STORE = "online-store"
|
|
193
|
+
PUBLIC_API = "public-api"
|
|
195
194
|
}
|
|
196
195
|
declare enum CustomerPlatform {
|
|
197
196
|
POS = "in-store",
|
|
@@ -437,6 +436,15 @@ interface FeesBreakdown {
|
|
|
437
436
|
refundedTaxableFees?: number;
|
|
438
437
|
refundedNonTaxableFees?: number;
|
|
439
438
|
}
|
|
439
|
+
interface ModifiersBreakdown {
|
|
440
|
+
grossTotal: number;
|
|
441
|
+
refundTotal: number;
|
|
442
|
+
netTotal: number;
|
|
443
|
+
taxableModifiers?: number;
|
|
444
|
+
nonTaxableModifiers?: number;
|
|
445
|
+
refundedTaxableModifiers?: number;
|
|
446
|
+
refundedNonTaxableModifiers?: number;
|
|
447
|
+
}
|
|
440
448
|
interface ProductDiscountBucket {
|
|
441
449
|
grossProductDiscounts: number;
|
|
442
450
|
refundedProductDiscounts: number;
|
|
@@ -459,6 +467,11 @@ interface FeesTuple {
|
|
|
459
467
|
refundedFees: number;
|
|
460
468
|
netFees: number;
|
|
461
469
|
}
|
|
470
|
+
interface ModifiersTuple {
|
|
471
|
+
grossModifiers: number;
|
|
472
|
+
refundedModifiers: number;
|
|
473
|
+
netModifiers: number;
|
|
474
|
+
}
|
|
462
475
|
interface DiscountsTuple {
|
|
463
476
|
grossDiscounts: number;
|
|
464
477
|
refundedDiscounts: number;
|
|
@@ -484,6 +497,7 @@ interface SalesSummary {
|
|
|
484
497
|
discounts: DiscountsTuple;
|
|
485
498
|
refundsItems: number;
|
|
486
499
|
fees: FeesTuple;
|
|
500
|
+
modifiers?: ModifiersTuple;
|
|
487
501
|
taxes?: TaxesTuple;
|
|
488
502
|
totalSales: number;
|
|
489
503
|
tips: TipsTuple;
|
|
@@ -545,6 +559,7 @@ interface SettlementBreakdown {
|
|
|
545
559
|
interface RefundsBreakdown {
|
|
546
560
|
itemsRefunded: number;
|
|
547
561
|
feesReversed: number;
|
|
562
|
+
modifiersReversed?: number;
|
|
548
563
|
discountsReversed: number;
|
|
549
564
|
taxRefunded: number;
|
|
550
565
|
totalRefunded: number;
|
|
@@ -600,6 +615,7 @@ interface EndOfSessionReport {
|
|
|
600
615
|
staffSales: StaffSales;
|
|
601
616
|
discountsBreakdown: DiscountsBreakdown;
|
|
602
617
|
feesBreakdown: FeesBreakdown;
|
|
618
|
+
modifiersBreakdown?: ModifiersBreakdown;
|
|
603
619
|
tipsBreakdown?: TipsBreakdown;
|
|
604
620
|
sessionNumber?: string;
|
|
605
621
|
stationName?: string;
|
|
@@ -1198,19 +1214,4 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
|
|
|
1198
1214
|
declare const OtherFixedRates: Record<string, CurrencyRate>;
|
|
1199
1215
|
declare const COUNTRY_CURRENCIES: Record<string, string>;
|
|
1200
1216
|
|
|
1201
|
-
|
|
1202
|
-
FINAL_PAY = "Terminal",
|
|
1203
|
-
TAP_TO_PAY = "TapToPay",
|
|
1204
|
-
MOTO = "Moto",
|
|
1205
|
-
CLOUD = "Cloud",
|
|
1206
|
-
BLUETOOTH = "Bluetooth",
|
|
1207
|
-
CASH = "Cash",
|
|
1208
|
-
CUSTOM_PAY = "CustomPay",
|
|
1209
|
-
VENDARA = "Vendara",
|
|
1210
|
-
REDEEM = "Redeem",
|
|
1211
|
-
INTEGRATION = "Integration",
|
|
1212
|
-
PAYMENT_LINK = "PaymentLink",
|
|
1213
|
-
ONLINE_PAYMENT = "OnlinePayment"
|
|
1214
|
-
}
|
|
1215
|
-
|
|
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 };
|
|
1217
|
+
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
|
@@ -190,8 +190,7 @@ declare enum Platform {
|
|
|
190
190
|
declare enum OrderPlatform {
|
|
191
191
|
POS = "in-store",
|
|
192
192
|
WOO_COMMERCE = "woo-commerce",
|
|
193
|
-
PUBLIC_API = "public-api"
|
|
194
|
-
ONLINE_STORE = "online-store"
|
|
193
|
+
PUBLIC_API = "public-api"
|
|
195
194
|
}
|
|
196
195
|
declare enum CustomerPlatform {
|
|
197
196
|
POS = "in-store",
|
|
@@ -437,6 +436,15 @@ interface FeesBreakdown {
|
|
|
437
436
|
refundedTaxableFees?: number;
|
|
438
437
|
refundedNonTaxableFees?: number;
|
|
439
438
|
}
|
|
439
|
+
interface ModifiersBreakdown {
|
|
440
|
+
grossTotal: number;
|
|
441
|
+
refundTotal: number;
|
|
442
|
+
netTotal: number;
|
|
443
|
+
taxableModifiers?: number;
|
|
444
|
+
nonTaxableModifiers?: number;
|
|
445
|
+
refundedTaxableModifiers?: number;
|
|
446
|
+
refundedNonTaxableModifiers?: number;
|
|
447
|
+
}
|
|
440
448
|
interface ProductDiscountBucket {
|
|
441
449
|
grossProductDiscounts: number;
|
|
442
450
|
refundedProductDiscounts: number;
|
|
@@ -459,6 +467,11 @@ interface FeesTuple {
|
|
|
459
467
|
refundedFees: number;
|
|
460
468
|
netFees: number;
|
|
461
469
|
}
|
|
470
|
+
interface ModifiersTuple {
|
|
471
|
+
grossModifiers: number;
|
|
472
|
+
refundedModifiers: number;
|
|
473
|
+
netModifiers: number;
|
|
474
|
+
}
|
|
462
475
|
interface DiscountsTuple {
|
|
463
476
|
grossDiscounts: number;
|
|
464
477
|
refundedDiscounts: number;
|
|
@@ -484,6 +497,7 @@ interface SalesSummary {
|
|
|
484
497
|
discounts: DiscountsTuple;
|
|
485
498
|
refundsItems: number;
|
|
486
499
|
fees: FeesTuple;
|
|
500
|
+
modifiers?: ModifiersTuple;
|
|
487
501
|
taxes?: TaxesTuple;
|
|
488
502
|
totalSales: number;
|
|
489
503
|
tips: TipsTuple;
|
|
@@ -545,6 +559,7 @@ interface SettlementBreakdown {
|
|
|
545
559
|
interface RefundsBreakdown {
|
|
546
560
|
itemsRefunded: number;
|
|
547
561
|
feesReversed: number;
|
|
562
|
+
modifiersReversed?: number;
|
|
548
563
|
discountsReversed: number;
|
|
549
564
|
taxRefunded: number;
|
|
550
565
|
totalRefunded: number;
|
|
@@ -600,6 +615,7 @@ interface EndOfSessionReport {
|
|
|
600
615
|
staffSales: StaffSales;
|
|
601
616
|
discountsBreakdown: DiscountsBreakdown;
|
|
602
617
|
feesBreakdown: FeesBreakdown;
|
|
618
|
+
modifiersBreakdown?: ModifiersBreakdown;
|
|
603
619
|
tipsBreakdown?: TipsBreakdown;
|
|
604
620
|
sessionNumber?: string;
|
|
605
621
|
stationName?: string;
|
|
@@ -1198,19 +1214,4 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
|
|
|
1198
1214
|
declare const OtherFixedRates: Record<string, CurrencyRate>;
|
|
1199
1215
|
declare const COUNTRY_CURRENCIES: Record<string, string>;
|
|
1200
1216
|
|
|
1201
|
-
|
|
1202
|
-
FINAL_PAY = "Terminal",
|
|
1203
|
-
TAP_TO_PAY = "TapToPay",
|
|
1204
|
-
MOTO = "Moto",
|
|
1205
|
-
CLOUD = "Cloud",
|
|
1206
|
-
BLUETOOTH = "Bluetooth",
|
|
1207
|
-
CASH = "Cash",
|
|
1208
|
-
CUSTOM_PAY = "CustomPay",
|
|
1209
|
-
VENDARA = "Vendara",
|
|
1210
|
-
REDEEM = "Redeem",
|
|
1211
|
-
INTEGRATION = "Integration",
|
|
1212
|
-
PAYMENT_LINK = "PaymentLink",
|
|
1213
|
-
ONLINE_PAYMENT = "OnlinePayment"
|
|
1214
|
-
}
|
|
1215
|
-
|
|
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 };
|
|
1217
|
+
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
|
@@ -66,7 +66,6 @@ __export(index_exports, {
|
|
|
66
66
|
PricingLevel: () => PricingLevel,
|
|
67
67
|
PricingPlanEnum: () => PricingPlanEnum,
|
|
68
68
|
PricingRegionEnum: () => PricingRegionEnum,
|
|
69
|
-
ProcessorType: () => ProcessorType,
|
|
70
69
|
ProductStatus: () => ProductStatus,
|
|
71
70
|
ProductType: () => ProductType,
|
|
72
71
|
PublicationAvailability: () => PublicationAvailability,
|
|
@@ -373,7 +372,6 @@ var OrderPlatform = /* @__PURE__ */ ((OrderPlatform2) => {
|
|
|
373
372
|
OrderPlatform2["POS"] = "in-store";
|
|
374
373
|
OrderPlatform2["WOO_COMMERCE"] = "woo-commerce";
|
|
375
374
|
OrderPlatform2["PUBLIC_API"] = "public-api";
|
|
376
|
-
OrderPlatform2["ONLINE_STORE"] = "online-store";
|
|
377
375
|
return OrderPlatform2;
|
|
378
376
|
})(OrderPlatform || {});
|
|
379
377
|
var CustomerPlatform = /* @__PURE__ */ ((CustomerPlatform2) => {
|
|
@@ -1419,6 +1417,8 @@ var REPORT_NEGATE_PATHS = /* @__PURE__ */ new Set([
|
|
|
1419
1417
|
// Fees breakdown — refunded magnitudes are money flowing back out
|
|
1420
1418
|
"feesBreakdown.productFee.refundedProductFees",
|
|
1421
1419
|
"feesBreakdown.cartFee.refundedCartFees",
|
|
1420
|
+
// Modifiers breakdown — refunded magnitudes are money flowing back out
|
|
1421
|
+
"modifiersBreakdown.refundTotal",
|
|
1422
1422
|
// Discounts breakdown — refunded magnitudes reverse discount reductions
|
|
1423
1423
|
"discountsBreakdown.productDiscounts.refundedProductDiscounts",
|
|
1424
1424
|
"discountsBreakdown.cartDiscounts.refundedCartDiscounts",
|
|
@@ -2937,23 +2937,6 @@ var ADYEN_ROLLOUT_COUNTRY_CODES = /* @__PURE__ */ new Set(["CA"]);
|
|
|
2937
2937
|
function isAdyenRolloutCountry(alpha2) {
|
|
2938
2938
|
return ADYEN_ROLLOUT_COUNTRY_CODES.has(alpha2);
|
|
2939
2939
|
}
|
|
2940
|
-
|
|
2941
|
-
// pos-types/active/ProcessorType.ts
|
|
2942
|
-
var ProcessorType = /* @__PURE__ */ ((ProcessorType2) => {
|
|
2943
|
-
ProcessorType2["FINAL_PAY"] = "Terminal";
|
|
2944
|
-
ProcessorType2["TAP_TO_PAY"] = "TapToPay";
|
|
2945
|
-
ProcessorType2["MOTO"] = "Moto";
|
|
2946
|
-
ProcessorType2["CLOUD"] = "Cloud";
|
|
2947
|
-
ProcessorType2["BLUETOOTH"] = "Bluetooth";
|
|
2948
|
-
ProcessorType2["CASH"] = "Cash";
|
|
2949
|
-
ProcessorType2["CUSTOM_PAY"] = "CustomPay";
|
|
2950
|
-
ProcessorType2["VENDARA"] = "Vendara";
|
|
2951
|
-
ProcessorType2["REDEEM"] = "Redeem";
|
|
2952
|
-
ProcessorType2["INTEGRATION"] = "Integration";
|
|
2953
|
-
ProcessorType2["PAYMENT_LINK"] = "PaymentLink";
|
|
2954
|
-
ProcessorType2["ONLINE_PAYMENT"] = "OnlinePayment";
|
|
2955
|
-
return ProcessorType2;
|
|
2956
|
-
})(ProcessorType || {});
|
|
2957
2940
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2958
2941
|
0 && (module.exports = {
|
|
2959
2942
|
ADYEN_ROLLOUT_COUNTRY_CODES,
|
|
@@ -3003,7 +2986,6 @@ var ProcessorType = /* @__PURE__ */ ((ProcessorType2) => {
|
|
|
3003
2986
|
PricingLevel,
|
|
3004
2987
|
PricingPlanEnum,
|
|
3005
2988
|
PricingRegionEnum,
|
|
3006
|
-
ProcessorType,
|
|
3007
2989
|
ProductStatus,
|
|
3008
2990
|
ProductType,
|
|
3009
2991
|
PublicationAvailability,
|