@openlup/platform 0.17.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +143 -0
- package/README.md +299 -6
- package/dist/catalog/activeSkuSelection.d.ts +2 -0
- package/dist/catalog/activeSkuSelection.js +20 -0
- package/dist/catalog/adminBindings.d.ts +72 -0
- package/dist/catalog/adminBindings.js +1 -0
- package/dist/catalog/adminBundleHandler.d.ts +26 -0
- package/dist/catalog/adminBundleHandler.js +111 -0
- package/dist/catalog/adminBundleReadHandler.d.ts +21 -0
- package/dist/catalog/adminBundleReadHandler.js +185 -0
- package/dist/catalog/adminBundleWritePort.d.ts +85 -0
- package/dist/catalog/adminBundleWritePort.js +1 -0
- package/dist/catalog/bundleAvailability.d.ts +63 -0
- package/dist/catalog/bundleAvailability.js +78 -0
- package/dist/catalog/bundleAvailabilityService.d.ts +65 -0
- package/dist/catalog/bundleAvailabilityService.js +89 -0
- package/dist/catalog/bundleBindings.d.ts +33 -0
- package/dist/catalog/bundleBindings.js +1 -0
- package/dist/catalog/bundleCatalogQueries.d.ts +28 -0
- package/dist/catalog/bundleCatalogQueries.js +84 -0
- package/dist/catalog/bundleCatalogReadPort.d.ts +173 -0
- package/dist/catalog/bundleCatalogReadPort.js +36 -0
- package/dist/catalog/bundleCatalogStore.d.ts +5 -0
- package/dist/catalog/bundleCatalogStore.js +156 -0
- package/dist/catalog/bundlePriceSelection.d.ts +13 -0
- package/dist/catalog/bundlePriceSelection.js +26 -0
- package/dist/catalog/bundleRuleCodes.d.ts +41 -0
- package/dist/catalog/bundleRuleCodes.js +110 -0
- package/dist/catalog/bundleRules.d.ts +69 -0
- package/dist/catalog/bundleRules.js +102 -0
- package/dist/catalog/catalogDraftStore.d.ts +4 -0
- package/dist/catalog/catalogDraftStore.js +63 -0
- package/dist/catalog/catalogSkuEnvelope.d.ts +7 -0
- package/dist/catalog/catalogSkuEnvelope.js +142 -0
- package/dist/catalog/catalogSkuEnvelopeMapper.d.ts +38 -0
- package/dist/catalog/catalogSkuEnvelopeMapper.js +88 -0
- package/dist/catalog/contracts/bundleAdmin.d.ts +143 -0
- package/dist/catalog/contracts/bundleAdmin.js +1 -0
- package/dist/catalog/contracts/bundleAvailability.d.ts +61 -0
- package/dist/catalog/contracts/bundleAvailability.js +1 -0
- package/dist/catalog/contracts/bundleRead.d.ts +241 -0
- package/dist/catalog/contracts/bundleRead.js +1 -0
- package/dist/catalog/contracts/draft.d.ts +79 -0
- package/dist/catalog/contracts/draft.js +47 -0
- package/dist/catalog/contracts/foundation.d.ts +78 -0
- package/dist/catalog/contracts/foundation.js +53 -0
- package/dist/catalog/contracts/index.d.ts +14 -0
- package/dist/catalog/contracts/index.js +6 -0
- package/dist/catalog/contracts/lifecycle.d.ts +77 -0
- package/dist/catalog/contracts/lifecycle.js +1 -0
- package/dist/catalog/contracts/productMediaContracts.d.ts +77 -0
- package/dist/catalog/contracts/productMediaContracts.js +149 -0
- package/dist/catalog/contracts/productTypes.d.ts +54 -0
- package/dist/catalog/contracts/productTypes.js +16 -0
- package/dist/catalog/contracts/resolveProductMedia.d.ts +3 -0
- package/dist/catalog/contracts/resolveProductMedia.js +78 -0
- package/dist/catalog/contracts/sellable.d.ts +23 -0
- package/dist/catalog/contracts/sellable.js +1 -0
- package/dist/catalog/draftHandler.d.ts +25 -0
- package/dist/catalog/draftHandler.js +118 -0
- package/dist/catalog/draftPorts.d.ts +18 -0
- package/dist/catalog/draftPorts.js +8 -0
- package/dist/catalog/draftSchemas.d.ts +423 -0
- package/dist/catalog/draftSchemas.js +89 -0
- package/dist/catalog/draftValidation.d.ts +21 -0
- package/dist/catalog/draftValidation.js +125 -0
- package/dist/catalog/effectiveBundleCatalogQueries.d.ts +8 -0
- package/dist/catalog/effectiveBundleCatalogQueries.js +79 -0
- package/dist/catalog/effectiveBundleCatalogStore.d.ts +4 -0
- package/dist/catalog/effectiveBundleCatalogStore.js +156 -0
- package/dist/catalog/foundationSchemas.d.ts +98 -0
- package/dist/catalog/foundationSchemas.js +110 -0
- package/dist/catalog/index.d.ts +44 -0
- package/dist/catalog/index.js +26 -0
- package/dist/catalog/mediaSourcePack.d.ts +51 -0
- package/dist/catalog/mediaSourcePack.js +247 -0
- package/dist/catalog/productTypeSchemas.d.ts +46 -0
- package/dist/catalog/productTypeSchemas.js +72 -0
- package/dist/catalog/publicationPorts.d.ts +42 -0
- package/dist/catalog/publicationPorts.js +1 -0
- package/dist/catalog/readPorts.d.ts +51 -0
- package/dist/catalog/readPorts.js +1 -0
- package/dist/catalog/referenceCatalogHandler.d.ts +7 -0
- package/dist/catalog/referenceCatalogHandler.js +27 -0
- package/dist/catalog/resolvedSkuProjection.d.ts +88 -0
- package/dist/catalog/resolvedSkuProjection.js +60 -0
- package/dist/catalog/sellableBundleHandler.d.ts +46 -0
- package/dist/catalog/sellableBundleHandler.js +84 -0
- package/dist/catalog/sellableSchemas.d.ts +46 -0
- package/dist/catalog/sellableSchemas.js +27 -0
- package/dist/catalog/sql.d.ts +46 -0
- package/dist/catalog/sql.js +13 -0
- package/dist/catalog/validation.d.ts +2 -0
- package/dist/catalog/validation.js +3 -0
- package/dist/communications/contracts/index.d.ts +1 -0
- package/dist/communications/contracts/marketingSync.d.ts +194 -0
- package/dist/communications/contracts/marketingSync.js +1 -0
- package/dist/communications/index.d.ts +1 -0
- package/dist/communications/klaviyo/consentPush.d.ts +51 -0
- package/dist/communications/klaviyo/consentPush.js +19 -0
- package/dist/communications/klaviyo/index.d.ts +110 -0
- package/dist/communications/klaviyo/index.js +860 -0
- package/dist/communications/newsletterIntegrationContracts.d.ts +3 -3
- package/dist/communications/resend/index.d.ts +40 -0
- package/dist/communications/resend/index.js +310 -0
- package/dist/composition/catalogContribution.d.ts +18 -0
- package/dist/composition/catalogContribution.js +21 -0
- package/dist/composition/index.d.ts +3 -0
- package/dist/composition/index.js +3 -0
- package/dist/composition/inventoryContribution.d.ts +16 -0
- package/dist/composition/inventoryContribution.js +17 -0
- package/dist/composition/shippingContribution.d.ts +16 -0
- package/dist/composition/shippingContribution.js +17 -0
- package/dist/identity/customerContracts.d.ts +2 -2
- package/dist/inventory/adminInventory.d.ts +13 -0
- package/dist/inventory/adminInventory.js +214 -0
- package/dist/inventory/bindings.d.ts +35 -0
- package/dist/inventory/bindings.js +45 -0
- package/dist/inventory/contracts/forecast.d.ts +86 -0
- package/dist/inventory/contracts/forecast.js +1 -0
- package/dist/inventory/contracts/index.d.ts +4 -0
- package/dist/inventory/contracts/index.js +1 -0
- package/dist/inventory/contracts/inventory.d.ts +157 -0
- package/dist/inventory/contracts/inventory.js +1 -0
- package/dist/inventory/contracts/newPurchaseStock.d.ts +20 -0
- package/dist/inventory/contracts/newPurchaseStock.js +1 -0
- package/dist/inventory/contracts/reservation.d.ts +18 -0
- package/dist/inventory/contracts/reservation.js +1 -0
- package/dist/inventory/forecast.d.ts +24 -0
- package/dist/inventory/forecast.js +200 -0
- package/dist/inventory/index.d.ts +14 -0
- package/dist/inventory/index.js +11 -0
- package/dist/inventory/inventoryHandlers.d.ts +53 -0
- package/dist/inventory/inventoryHandlers.js +151 -0
- package/dist/inventory/newPurchaseStockAvailability.d.ts +47 -0
- package/dist/inventory/newPurchaseStockAvailability.js +75 -0
- package/dist/inventory/ports.d.ts +21 -0
- package/dist/inventory/ports.js +16 -0
- package/dist/inventory/renewalReservation.d.ts +27 -0
- package/dist/inventory/renewalReservation.js +61 -0
- package/dist/inventory/reservationPolicy.d.ts +6 -0
- package/dist/inventory/reservationPolicy.js +19 -0
- package/dist/inventory/schemas.d.ts +137 -0
- package/dist/inventory/schemas.js +112 -0
- package/dist/inventory/sql.d.ts +14 -0
- package/dist/inventory/sql.js +5 -0
- package/dist/inventory/subscriptionForecastCalculation.d.ts +4 -0
- package/dist/inventory/subscriptionForecastCalculation.js +133 -0
- package/dist/pricing/acquisitionFinancialPolicy.d.ts +26 -0
- package/dist/pricing/acquisitionFinancialPolicy.js +1 -0
- package/dist/pricing/acquisitionOfferPricing.d.ts +27 -0
- package/dist/pricing/acquisitionOfferPricing.js +25 -0
- package/dist/pricing/acquisitionOfferPricingHandler.d.ts +20 -0
- package/dist/pricing/acquisitionOfferPricingHandler.js +105 -0
- package/dist/pricing/acquisitionOfferPricingSchemas.d.ts +31 -0
- package/dist/pricing/acquisitionOfferPricingSchemas.js +33 -0
- package/dist/pricing/acquisitionQuoteBinding.d.ts +12 -0
- package/dist/pricing/acquisitionQuoteBinding.js +12 -0
- package/dist/pricing/acquisitionReadiness.d.ts +31 -0
- package/dist/pricing/acquisitionReadiness.js +117 -0
- package/dist/pricing/acquisitionTerms.d.ts +19 -0
- package/dist/pricing/acquisitionTerms.js +126 -0
- package/dist/pricing/acquisitionTermsSchemas.d.ts +59 -0
- package/dist/pricing/acquisitionTermsSchemas.js +42 -0
- package/dist/pricing/catalogFactsProvenance.d.ts +33 -0
- package/dist/pricing/catalogFactsProvenance.js +64 -0
- package/dist/pricing/catalogFactsSchemas.d.ts +45 -0
- package/dist/pricing/catalogFactsSchemas.js +58 -0
- package/dist/pricing/commerceOfferPricing.d.ts +25 -0
- package/dist/pricing/commerceOfferPricing.js +139 -0
- package/dist/pricing/commerceOfferPricingCache.d.ts +10 -0
- package/dist/pricing/commerceOfferPricingCache.js +44 -0
- package/dist/pricing/commerceOfferPricingHandler.d.ts +21 -0
- package/dist/pricing/commerceOfferPricingHandler.js +78 -0
- package/dist/pricing/commercePriceAuthority.d.ts +28 -0
- package/dist/pricing/commercePriceAuthority.js +140 -0
- package/dist/pricing/commercePricingPolicyErrors.d.ts +40 -0
- package/dist/pricing/commercePricingPolicyErrors.js +67 -0
- package/dist/pricing/commerceQuoteBatchHandler.d.ts +37 -0
- package/dist/pricing/commerceQuoteBatchHandler.js +83 -0
- package/dist/pricing/commerceQuoteCatalogReadPort.d.ts +27 -0
- package/dist/pricing/commerceQuoteCatalogReadPort.js +8 -0
- package/dist/pricing/commerceQuoteHandler.d.ts +35 -0
- package/dist/pricing/commerceQuoteHandler.js +122 -0
- package/dist/pricing/commerceQuoteSnapshotExpect.d.ts +9 -0
- package/dist/pricing/commerceQuoteSnapshotExpect.js +22 -0
- package/dist/pricing/contracts/acquisitionTerms.d.ts +32 -0
- package/dist/pricing/contracts/acquisitionTerms.js +2 -0
- package/dist/pricing/contracts/authority.d.ts +27 -0
- package/dist/pricing/contracts/authority.js +1 -0
- package/dist/pricing/contracts/evidence.d.ts +33 -0
- package/dist/pricing/contracts/evidence.js +1 -0
- package/dist/pricing/contracts/index.d.ts +17 -0
- package/dist/pricing/contracts/index.js +7 -0
- package/dist/pricing/contracts/money.d.ts +27 -0
- package/dist/pricing/contracts/money.js +1 -0
- package/dist/pricing/contracts/offer.d.ts +52 -0
- package/dist/pricing/contracts/offer.js +4 -0
- package/dist/pricing/contracts/offerPolicy.d.ts +16 -0
- package/dist/pricing/contracts/offerPolicy.js +5 -0
- package/dist/pricing/contracts/policy.d.ts +22 -0
- package/dist/pricing/contracts/policy.js +3 -0
- package/dist/pricing/contracts/provenance.d.ts +24 -0
- package/dist/pricing/contracts/provenance.js +2 -0
- package/dist/pricing/contracts/quote.d.ts +94 -0
- package/dist/pricing/contracts/quote.js +1 -0
- package/dist/pricing/dbBackedCommerceQuoteHelpers.d.ts +78 -0
- package/dist/pricing/dbBackedCommerceQuoteHelpers.js +146 -0
- package/dist/pricing/dbBackedCommerceQuotePort.d.ts +74 -0
- package/dist/pricing/dbBackedCommerceQuotePort.js +223 -0
- package/dist/pricing/dbBackedCommerceQuoteSnapshotVerifier.d.ts +4 -0
- package/dist/pricing/dbBackedCommerceQuoteSnapshotVerifier.js +25 -0
- package/dist/pricing/index.d.ts +52 -0
- package/dist/pricing/index.js +36 -0
- package/dist/pricing/offerPolicyReadiness.d.ts +21 -0
- package/dist/pricing/offerPolicyReadiness.js +79 -0
- package/dist/pricing/offerPolicySchemas.d.ts +25 -0
- package/dist/pricing/offerPolicySchemas.js +15 -0
- package/dist/pricing/offerPricingSchemas.d.ts +315 -0
- package/dist/pricing/offerPricingSchemas.js +65 -0
- package/dist/pricing/ports.d.ts +13 -0
- package/dist/pricing/ports.js +9 -0
- package/dist/pricing/pricingPolicyToken.d.ts +39 -0
- package/dist/pricing/pricingPolicyToken.js +84 -0
- package/dist/pricing/quoteAcquisitionTerms.d.ts +2 -0
- package/dist/pricing/quoteAcquisitionTerms.js +4 -0
- package/dist/pricing/quoteCodeRejectionDetails.d.ts +20 -0
- package/dist/pricing/quoteCodeRejectionDetails.js +22 -0
- package/dist/pricing/quotePorts.d.ts +30 -0
- package/dist/pricing/quotePorts.js +20 -0
- package/dist/pricing/quotePrimitives.d.ts +13 -0
- package/dist/pricing/quotePrimitives.js +18 -0
- package/dist/pricing/quotePromotionEvidence.d.ts +39 -0
- package/dist/pricing/quotePromotionEvidence.js +73 -0
- package/dist/pricing/quoteSchemas.d.ts +1176 -0
- package/dist/pricing/quoteSchemas.js +196 -0
- package/dist/pricing/quoteShippingPromotions.d.ts +20 -0
- package/dist/pricing/quoteShippingPromotions.js +1 -0
- package/dist/pricing/subscriptionPricePolicy.d.ts +52 -0
- package/dist/pricing/subscriptionPricePolicy.js +96 -0
- package/dist/pricing/taxProfileGuard.d.ts +2 -0
- package/dist/pricing/taxProfileGuard.js +24 -0
- package/dist/pricing/validation.d.ts +2 -0
- package/dist/pricing/validation.js +3 -0
- package/dist/promotions/adminBindings.d.ts +72 -0
- package/dist/promotions/adminBindings.js +1 -0
- package/dist/promotions/adminPromotionCodesContracts.d.ts +498 -0
- package/dist/promotions/adminPromotionCodesContracts.js +211 -0
- package/dist/promotions/adminPromotionCodesDataPort.d.ts +47 -0
- package/dist/promotions/adminPromotionCodesDataPort.js +1 -0
- package/dist/promotions/adminPromotionCodesHandler.d.ts +14 -0
- package/dist/promotions/adminPromotionCodesHandler.js +194 -0
- package/dist/promotions/adminPromotionsContracts.d.ts +235 -0
- package/dist/promotions/adminPromotionsContracts.js +99 -0
- package/dist/promotions/adminPromotionsDataPort.d.ts +42 -0
- package/dist/promotions/adminPromotionsDataPort.js +1 -0
- package/dist/promotions/adminPromotionsHandler.d.ts +16 -0
- package/dist/promotions/adminPromotionsHandler.js +47 -0
- package/dist/promotions/commerceQuoteReadPreparation.d.ts +3 -0
- package/dist/promotions/commerceQuoteReadPreparation.js +27 -0
- package/dist/promotions/contracts/index.d.ts +387 -0
- package/dist/promotions/contracts/index.js +1 -0
- package/dist/promotions/index.d.ts +25 -0
- package/dist/promotions/index.js +22 -0
- package/dist/promotions/promoDataPort.d.ts +47 -0
- package/dist/promotions/promoDataPort.js +14 -0
- package/dist/promotions/promotionAcceptanceTelemetry.d.ts +29 -0
- package/dist/promotions/promotionAcceptanceTelemetry.js +45 -0
- package/dist/promotions/promotionBenefitDefinition.d.ts +37 -0
- package/dist/promotions/promotionBenefitDefinition.js +33 -0
- package/dist/promotions/promotionClaimSweepPort.d.ts +14 -0
- package/dist/promotions/promotionClaimSweepPort.js +8 -0
- package/dist/promotions/promotionClaims.d.ts +5 -0
- package/dist/promotions/promotionClaims.js +57 -0
- package/dist/promotions/promotionCodePreview.d.ts +11 -0
- package/dist/promotions/promotionCodePreview.js +154 -0
- package/dist/promotions/promotionCodeQuotePort.d.ts +25 -0
- package/dist/promotions/promotionCodeQuotePort.js +1 -0
- package/dist/promotions/promotionQuoteAcceptance.d.ts +70 -0
- package/dist/promotions/promotionQuoteAcceptance.js +202 -0
- package/dist/promotions/promotionQuoteBinding.d.ts +73 -0
- package/dist/promotions/promotionQuoteBinding.js +87 -0
- package/dist/promotions/quoteAcquisitionBinding.d.ts +6 -0
- package/dist/promotions/quoteAcquisitionBinding.js +1 -0
- package/dist/promotions/quoteAutomaticPromotions.d.ts +26 -0
- package/dist/promotions/quoteAutomaticPromotions.js +60 -0
- package/dist/promotions/quotePromoDiscounts.d.ts +36 -0
- package/dist/promotions/quotePromoDiscounts.js +146 -0
- package/dist/promotions/quotePromotionCodeAdjustments.d.ts +27 -0
- package/dist/promotions/quotePromotionCodeAdjustments.js +223 -0
- package/dist/promotions/quotePromotionV2.d.ts +30 -0
- package/dist/promotions/quotePromotionV2.js +186 -0
- package/dist/promotions/quoteShippingPolicy.d.ts +23 -0
- package/dist/promotions/quoteShippingPolicy.js +47 -0
- package/dist/promotions/sql.d.ts +14 -0
- package/dist/promotions/sql.js +5 -0
- package/dist/promotions/validation.d.ts +2 -0
- package/dist/promotions/validation.js +3 -0
- package/dist/shipping/addressCanonLookupHandler.d.ts +7 -0
- package/dist/shipping/addressCanonLookupHandler.js +105 -0
- package/dist/shipping/addressCanonical.d.ts +2 -0
- package/dist/shipping/addressCanonical.js +26 -0
- package/dist/shipping/addressPorts.d.ts +39 -0
- package/dist/shipping/addressPorts.js +1 -0
- package/dist/shipping/addressSchemas.d.ts +30 -0
- package/dist/shipping/addressSchemas.js +1 -0
- package/dist/shipping/adminShippingRateHandler.d.ts +4 -0
- package/dist/shipping/adminShippingRateHandler.js +64 -0
- package/dist/shipping/bindings.d.ts +57 -0
- package/dist/shipping/bindings.js +46 -0
- package/dist/shipping/contracts/address.d.ts +144 -0
- package/dist/shipping/contracts/address.js +1 -0
- package/dist/shipping/contracts/delivery.d.ts +110 -0
- package/dist/shipping/contracts/delivery.js +1 -0
- package/dist/shipping/contracts/index.d.ts +4 -0
- package/dist/shipping/contracts/index.js +1 -0
- package/dist/shipping/contracts/shippingRate.d.ts +11 -0
- package/dist/shipping/contracts/shippingRate.js +1 -0
- package/dist/shipping/contracts/threshold.d.ts +22 -0
- package/dist/shipping/contracts/threshold.js +1 -0
- package/dist/shipping/customerAddressesHandler.d.ts +5 -0
- package/dist/shipping/customerAddressesHandler.js +80 -0
- package/dist/shipping/customerSelfServiceAddressModels.d.ts +27 -0
- package/dist/shipping/customerSelfServiceAddressModels.js +101 -0
- package/dist/shipping/deliverySelectionHandler.d.ts +10 -0
- package/dist/shipping/deliverySelectionHandler.js +77 -0
- package/dist/shipping/deliverySelectionPort.d.ts +8 -0
- package/dist/shipping/deliverySelectionPort.js +1 -0
- package/dist/shipping/deliverySelectionSummary.d.ts +2 -0
- package/dist/shipping/deliverySelectionSummary.js +53 -0
- package/dist/shipping/handlerSchemas.d.ts +21 -0
- package/dist/shipping/handlerSchemas.js +1 -0
- package/dist/shipping/index.d.ts +20 -0
- package/dist/shipping/index.js +10 -0
- package/dist/shipping/pickupPointSearchPort.d.ts +4 -0
- package/dist/shipping/pickupPointSearchPort.js +1 -0
- package/dist/shipping/readDeliverySelectionEvidence.d.ts +2 -0
- package/dist/shipping/readDeliverySelectionEvidence.js +44 -0
- package/dist/shipping/shippingRatePorts.d.ts +52 -0
- package/dist/shipping/shippingRatePorts.js +1 -0
- package/dist/shipping/thresholdPolicy.d.ts +42 -0
- package/dist/shipping/thresholdPolicy.js +60 -0
- package/package.json +62 -2
- package/release-gates.json +263 -53
- package/sql/20260807140000_read_parity_catalog.sql +94 -0
- package/sql/20260810120000_storefront_catalog_attributes.sql +51 -0
- package/sql/20260812140000_sellable_bundle_catalog.sql +124 -0
- package/sql/20260812210000_bundle_operator_write_boundary.sql +567 -0
- package/sql/20260814000000_fulfillment_stock_evidence.sql +239 -0
- package/sql/20260815120000_automatic_subscription_renewal.sql +1083 -0
- package/sql/20260817180000_promotion_claim_lifecycle.sql +591 -0
- package/sql/20260817180100_promotion_claim_lifecycle_validation.sql +23 -0
- package/sql/20260827220000_catalog_document_revision_foundation.sql +226 -0
- package/sql/20260827220001_catalog_document_revision_foundation_validate.sql +10 -0
- package/sql/20260908100000_catalog_draft_foundation.sql +217 -0
- package/src/catalog/activeSkuSelection.ts +20 -0
- package/src/catalog/adminBindings.ts +59 -0
- package/src/catalog/adminBundleHandler.ts +165 -0
- package/src/catalog/adminBundleReadHandler.ts +263 -0
- package/src/catalog/adminBundleWritePort.ts +102 -0
- package/src/catalog/bundleAvailability.ts +129 -0
- package/src/catalog/bundleAvailabilityService.ts +171 -0
- package/src/catalog/bundleBindings.ts +29 -0
- package/src/catalog/bundleCatalogQueries.ts +98 -0
- package/src/catalog/bundleCatalogReadPort.ts +181 -0
- package/src/catalog/bundleCatalogStore.ts +274 -0
- package/src/catalog/bundlePriceSelection.ts +25 -0
- package/src/catalog/bundleRuleCodes.ts +134 -0
- package/src/catalog/bundleRules.ts +153 -0
- package/src/catalog/catalogDraftStore.ts +71 -0
- package/src/catalog/catalogSkuEnvelope.ts +214 -0
- package/src/catalog/catalogSkuEnvelopeMapper.ts +160 -0
- package/src/catalog/contracts/bundleAdmin.ts +20 -0
- package/src/catalog/contracts/bundleAvailability.ts +5 -0
- package/src/catalog/contracts/bundleRead.ts +13 -0
- package/src/catalog/contracts/draft.ts +69 -0
- package/src/catalog/contracts/foundation.ts +104 -0
- package/src/catalog/contracts/index.ts +14 -0
- package/src/catalog/contracts/lifecycle.ts +74 -0
- package/src/catalog/contracts/productMediaContracts.ts +170 -0
- package/src/catalog/contracts/productTypes.ts +35 -0
- package/src/catalog/contracts/resolveProductMedia.ts +85 -0
- package/src/catalog/contracts/sellable.ts +12 -0
- package/src/catalog/draftHandler.ts +105 -0
- package/src/catalog/draftPorts.ts +18 -0
- package/src/catalog/draftSchemas.ts +88 -0
- package/src/catalog/draftValidation.ts +100 -0
- package/src/catalog/effectiveBundleCatalogQueries.ts +80 -0
- package/src/catalog/effectiveBundleCatalogStore.ts +208 -0
- package/src/catalog/foundationSchemas.ts +123 -0
- package/src/catalog/index.ts +44 -0
- package/src/catalog/mediaSourcePack.ts +219 -0
- package/src/catalog/productTypeSchemas.ts +70 -0
- package/src/catalog/publicationPorts.ts +44 -0
- package/src/catalog/readPorts.ts +61 -0
- package/src/catalog/referenceCatalogHandler.ts +39 -0
- package/src/catalog/resolvedSkuProjection.ts +76 -0
- package/src/catalog/sellableBundleHandler.ts +133 -0
- package/src/catalog/sellableSchemas.ts +33 -0
- package/src/catalog/sql.ts +14 -0
- package/src/catalog/validation.ts +3 -0
- package/src/communications/contracts/index.ts +1 -0
- package/src/communications/contracts/marketingSync.ts +109 -0
- package/src/communications/index.ts +1 -0
- package/src/communications/klaviyo/consentPush.ts +19 -0
- package/src/communications/klaviyo/index.ts +649 -0
- package/src/communications/resend/index.ts +350 -0
- package/src/composition/catalogContribution.ts +32 -0
- package/src/composition/index.ts +3 -0
- package/src/composition/inventoryContribution.ts +24 -0
- package/src/composition/shippingContribution.ts +24 -0
- package/src/inventory/adminInventory.ts +251 -0
- package/src/inventory/bindings.ts +61 -0
- package/src/inventory/contracts/forecast.ts +96 -0
- package/src/inventory/contracts/index.ts +18 -0
- package/src/inventory/contracts/inventory.ts +14 -0
- package/src/inventory/contracts/newPurchaseStock.ts +23 -0
- package/src/inventory/contracts/reservation.ts +20 -0
- package/src/inventory/forecast.ts +239 -0
- package/src/inventory/index.ts +22 -0
- package/src/inventory/inventoryHandlers.ts +215 -0
- package/src/inventory/newPurchaseStockAvailability.ts +120 -0
- package/src/inventory/ports.ts +46 -0
- package/src/inventory/renewalReservation.ts +88 -0
- package/src/inventory/reservationPolicy.ts +27 -0
- package/src/inventory/schemas.ts +128 -0
- package/src/inventory/sql.ts +5 -0
- package/src/inventory/subscriptionForecastCalculation.ts +157 -0
- package/src/pricing/acquisitionFinancialPolicy.ts +26 -0
- package/src/pricing/acquisitionOfferPricing.ts +38 -0
- package/src/pricing/acquisitionOfferPricingHandler.ts +157 -0
- package/src/pricing/acquisitionOfferPricingSchemas.ts +35 -0
- package/src/pricing/acquisitionQuoteBinding.ts +12 -0
- package/src/pricing/acquisitionReadiness.ts +148 -0
- package/src/pricing/acquisitionTerms.ts +125 -0
- package/src/pricing/acquisitionTermsSchemas.ts +52 -0
- package/src/pricing/catalogFactsProvenance.ts +102 -0
- package/src/pricing/catalogFactsSchemas.ts +69 -0
- package/src/pricing/commerceOfferPricing.ts +224 -0
- package/src/pricing/commerceOfferPricingCache.ts +53 -0
- package/src/pricing/commerceOfferPricingHandler.ts +137 -0
- package/src/pricing/commercePriceAuthority.ts +169 -0
- package/src/pricing/commercePricingPolicyErrors.ts +88 -0
- package/src/pricing/commerceQuoteBatchHandler.ts +129 -0
- package/src/pricing/commerceQuoteCatalogReadPort.ts +42 -0
- package/src/pricing/commerceQuoteHandler.ts +199 -0
- package/src/pricing/commerceQuoteSnapshotExpect.ts +48 -0
- package/src/pricing/contracts/acquisitionTerms.ts +26 -0
- package/src/pricing/contracts/authority.ts +44 -0
- package/src/pricing/contracts/evidence.ts +25 -0
- package/src/pricing/contracts/index.ts +17 -0
- package/src/pricing/contracts/money.ts +32 -0
- package/src/pricing/contracts/offer.ts +42 -0
- package/src/pricing/contracts/offerPolicy.ts +17 -0
- package/src/pricing/contracts/policy.ts +26 -0
- package/src/pricing/contracts/provenance.ts +19 -0
- package/src/pricing/contracts/quote.ts +106 -0
- package/src/pricing/dbBackedCommerceQuoteHelpers.ts +256 -0
- package/src/pricing/dbBackedCommerceQuotePort.ts +280 -0
- package/src/pricing/dbBackedCommerceQuoteSnapshotVerifier.ts +49 -0
- package/src/pricing/index.ts +53 -0
- package/src/pricing/offerPolicyReadiness.ts +110 -0
- package/src/pricing/offerPolicySchemas.ts +23 -0
- package/src/pricing/offerPricingSchemas.ts +92 -0
- package/src/pricing/ports.ts +17 -0
- package/src/pricing/pricingPolicyToken.ts +119 -0
- package/src/pricing/quoteAcquisitionTerms.ts +10 -0
- package/src/pricing/quoteCodeRejectionDetails.ts +23 -0
- package/src/pricing/quotePorts.ts +58 -0
- package/src/pricing/quotePrimitives.ts +21 -0
- package/src/pricing/quotePromotionEvidence.ts +82 -0
- package/src/pricing/quoteSchemas.ts +230 -0
- package/src/pricing/quoteShippingPromotions.ts +21 -0
- package/src/pricing/subscriptionPricePolicy.ts +113 -0
- package/src/pricing/taxProfileGuard.ts +33 -0
- package/src/pricing/validation.ts +3 -0
- package/src/promotions/adminBindings.ts +53 -0
- package/src/promotions/adminPromotionCodesContracts.ts +244 -0
- package/src/promotions/adminPromotionCodesDataPort.ts +56 -0
- package/src/promotions/adminPromotionCodesHandler.ts +254 -0
- package/src/promotions/adminPromotionsContracts.ts +121 -0
- package/src/promotions/adminPromotionsDataPort.ts +48 -0
- package/src/promotions/adminPromotionsHandler.ts +72 -0
- package/src/promotions/commerceQuoteReadPreparation.ts +29 -0
- package/src/promotions/contracts/index.ts +387 -0
- package/src/promotions/index.ts +25 -0
- package/src/promotions/promoDataPort.ts +65 -0
- package/src/promotions/promotionAcceptanceTelemetry.ts +73 -0
- package/src/promotions/promotionBenefitDefinition.ts +48 -0
- package/src/promotions/promotionClaimSweepPort.ts +23 -0
- package/src/promotions/promotionClaims.ts +70 -0
- package/src/promotions/promotionCodePreview.ts +183 -0
- package/src/promotions/promotionCodeQuotePort.ts +35 -0
- package/src/promotions/promotionQuoteAcceptance.ts +291 -0
- package/src/promotions/promotionQuoteBinding.ts +163 -0
- package/src/promotions/quoteAcquisitionBinding.ts +7 -0
- package/src/promotions/quoteAutomaticPromotions.ts +84 -0
- package/src/promotions/quotePromoDiscounts.ts +194 -0
- package/src/promotions/quotePromotionCodeAdjustments.ts +277 -0
- package/src/promotions/quotePromotionV2.ts +239 -0
- package/src/promotions/quoteShippingPolicy.ts +61 -0
- package/src/promotions/sql.ts +5 -0
- package/src/promotions/validation.ts +3 -0
- package/src/shipping/addressCanonLookupHandler.ts +114 -0
- package/src/shipping/addressCanonical.ts +31 -0
- package/src/shipping/addressPorts.ts +48 -0
- package/src/shipping/addressSchemas.ts +28 -0
- package/src/shipping/adminShippingRateHandler.ts +72 -0
- package/src/shipping/bindings.ts +74 -0
- package/src/shipping/contracts/address.ts +71 -0
- package/src/shipping/contracts/delivery.ts +114 -0
- package/src/shipping/contracts/index.ts +19 -0
- package/src/shipping/contracts/shippingRate.ts +7 -0
- package/src/shipping/contracts/threshold.ts +22 -0
- package/src/shipping/customerAddressesHandler.ts +100 -0
- package/src/shipping/customerSelfServiceAddressModels.ts +124 -0
- package/src/shipping/deliverySelectionHandler.ts +94 -0
- package/src/shipping/deliverySelectionPort.ts +10 -0
- package/src/shipping/deliverySelectionSummary.ts +56 -0
- package/src/shipping/handlerSchemas.ts +19 -0
- package/src/shipping/index.ts +26 -0
- package/src/shipping/pickupPointSearchPort.ts +8 -0
- package/src/shipping/readDeliverySelectionEvidence.ts +51 -0
- package/src/shipping/shippingRatePorts.ts +36 -0
- package/src/shipping/thresholdPolicy.ts +65 -0
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
/** Promotion-owned preview DTOs. Validation and secrets belong to the server entry. */
|
|
2
|
+
export type PromotionCodeBenefit = {
|
|
3
|
+
lane: "product";
|
|
4
|
+
kind: "target_percentage";
|
|
5
|
+
valueBps: number;
|
|
6
|
+
} | {
|
|
7
|
+
lane: "product";
|
|
8
|
+
kind: "fixed_amount";
|
|
9
|
+
valueMinor: number;
|
|
10
|
+
} | {
|
|
11
|
+
lane: "shipping";
|
|
12
|
+
kind: "fixed_amount";
|
|
13
|
+
valueMinor: number;
|
|
14
|
+
} | {
|
|
15
|
+
lane: "product";
|
|
16
|
+
kind: "percentage";
|
|
17
|
+
valueBps: number;
|
|
18
|
+
} | {
|
|
19
|
+
lane: "shipping";
|
|
20
|
+
kind: "percentage";
|
|
21
|
+
valueBps: number;
|
|
22
|
+
} | {
|
|
23
|
+
lane: "shipping";
|
|
24
|
+
kind: "free_shipping";
|
|
25
|
+
} | {
|
|
26
|
+
lane: "product" | "shipping";
|
|
27
|
+
kind: "percentage" | "fixed_amount";
|
|
28
|
+
validationState: "unsupported_legacy_value";
|
|
29
|
+
};
|
|
30
|
+
export interface PromotionCodePreviewRequest {
|
|
31
|
+
benefits: PromotionCodeBenefit[];
|
|
32
|
+
scopes: Array<"one_time" | "subscription_initial">;
|
|
33
|
+
promotionEngineVersion: "promotion-engine.v1" | "promotion-engine.v2";
|
|
34
|
+
minimumReferenceMinor: number;
|
|
35
|
+
context: {
|
|
36
|
+
referenceProductMinor: number;
|
|
37
|
+
oneTimeProductMinor: number;
|
|
38
|
+
subscriptionProductMinor: number;
|
|
39
|
+
shippingMinor: number;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export interface PromotionCodePreviewResponse {
|
|
43
|
+
contractVersion: "commerce.v0";
|
|
44
|
+
promotionEngineVersion: "promotion-engine.v1" | "promotion-engine.v2";
|
|
45
|
+
previewProof: string;
|
|
46
|
+
results: Array<{
|
|
47
|
+
scope: "one_time" | "subscription_initial";
|
|
48
|
+
productPayableMinor: number;
|
|
49
|
+
shippingPayableMinor: number;
|
|
50
|
+
effectiveProductDiscountBps: number;
|
|
51
|
+
winner: "code" | "automatic";
|
|
52
|
+
floorApplied: boolean;
|
|
53
|
+
adjustments: Array<{
|
|
54
|
+
lane: "product" | "shipping";
|
|
55
|
+
kind: "target_percentage" | "percentage" | "fixed_amount" | "free_shipping";
|
|
56
|
+
amountOffMinor: number;
|
|
57
|
+
beforeMinor: number;
|
|
58
|
+
afterMinor: number;
|
|
59
|
+
}>;
|
|
60
|
+
}>;
|
|
61
|
+
}
|
|
62
|
+
/** Admin DTOs are schema outputs; validation remains in the server entry. */
|
|
63
|
+
/** Promotion admin output DTOs. Validation and host policy belong to the server entry. */
|
|
64
|
+
export type AdminPromotion = {
|
|
65
|
+
id: string;
|
|
66
|
+
code: string | null;
|
|
67
|
+
name: string;
|
|
68
|
+
triggerType: "coupon_code" | "automatic" | "referral";
|
|
69
|
+
discountType: "percentage" | "fixed_amount" | "free_shipping";
|
|
70
|
+
semanticBenefit: {
|
|
71
|
+
kind: "target_percentage";
|
|
72
|
+
valueBps: number;
|
|
73
|
+
reference: "catalog_list_price";
|
|
74
|
+
unitTargets: {
|
|
75
|
+
variantId: string;
|
|
76
|
+
sku: string | null;
|
|
77
|
+
referenceMinor: number;
|
|
78
|
+
targetMinor: number;
|
|
79
|
+
currency: string;
|
|
80
|
+
}[];
|
|
81
|
+
} | {
|
|
82
|
+
kind: "percentage";
|
|
83
|
+
valuePercent: number;
|
|
84
|
+
} | {
|
|
85
|
+
kind: "fixed_amount";
|
|
86
|
+
valueMinor: number;
|
|
87
|
+
currency: string;
|
|
88
|
+
} | {
|
|
89
|
+
kind: "free_shipping";
|
|
90
|
+
} | {
|
|
91
|
+
kind: "unavailable";
|
|
92
|
+
reason: "system_managed_metadata_incomplete";
|
|
93
|
+
};
|
|
94
|
+
systemManaged: boolean;
|
|
95
|
+
readOnly: boolean;
|
|
96
|
+
v2Mirror: {
|
|
97
|
+
id: string;
|
|
98
|
+
status: "draft" | "active" | "paused" | "archived";
|
|
99
|
+
} | null;
|
|
100
|
+
appliesToKind: "order_total" | "line_with_variant" | "line_with_category";
|
|
101
|
+
stackingRule: "exclusive" | "stackable_with_any" | "stackable_with_loyalty";
|
|
102
|
+
eligibility: Record<string, unknown>;
|
|
103
|
+
validFrom: string;
|
|
104
|
+
validTo: string | null;
|
|
105
|
+
status: "draft" | "active" | "paused" | "archived";
|
|
106
|
+
regionAvailability: string[];
|
|
107
|
+
redemptionLimitGlobal: number | null;
|
|
108
|
+
redemptionLimitPerCustomer: number | null;
|
|
109
|
+
};
|
|
110
|
+
export type AdminPromotionV2Mirror = {
|
|
111
|
+
id: string;
|
|
112
|
+
status: "draft" | "active" | "paused" | "archived";
|
|
113
|
+
};
|
|
114
|
+
export type AdminPromotionSemanticBenefit = {
|
|
115
|
+
kind: "target_percentage";
|
|
116
|
+
valueBps: number;
|
|
117
|
+
reference: "catalog_list_price";
|
|
118
|
+
unitTargets: {
|
|
119
|
+
variantId: string;
|
|
120
|
+
sku: string | null;
|
|
121
|
+
referenceMinor: number;
|
|
122
|
+
targetMinor: number;
|
|
123
|
+
currency: string;
|
|
124
|
+
}[];
|
|
125
|
+
} | {
|
|
126
|
+
kind: "percentage";
|
|
127
|
+
valuePercent: number;
|
|
128
|
+
} | {
|
|
129
|
+
kind: "fixed_amount";
|
|
130
|
+
valueMinor: number;
|
|
131
|
+
currency: string;
|
|
132
|
+
} | {
|
|
133
|
+
kind: "free_shipping";
|
|
134
|
+
} | {
|
|
135
|
+
kind: "unavailable";
|
|
136
|
+
reason: "system_managed_metadata_incomplete";
|
|
137
|
+
};
|
|
138
|
+
export interface AdminPromotionsListResponse {
|
|
139
|
+
contractVersion: "commerce.v0";
|
|
140
|
+
promotions: AdminPromotion[];
|
|
141
|
+
}
|
|
142
|
+
export type AdminPromotionUpdatePayload = {
|
|
143
|
+
name?: string | undefined;
|
|
144
|
+
discountValue?: number | undefined;
|
|
145
|
+
stackingRule?: "exclusive" | "stackable_with_any" | "stackable_with_loyalty" | undefined;
|
|
146
|
+
status?: "draft" | "active" | "paused" | "archived" | undefined;
|
|
147
|
+
eligibility?: Record<string, unknown> | undefined;
|
|
148
|
+
validFrom?: string | undefined;
|
|
149
|
+
validTo?: string | null | undefined;
|
|
150
|
+
redemptionLimitGlobal?: number | null | undefined;
|
|
151
|
+
redemptionLimitPerCustomer?: number | null | undefined;
|
|
152
|
+
};
|
|
153
|
+
export interface AdminPromotionUpdateRequest {
|
|
154
|
+
id: string;
|
|
155
|
+
updates: AdminPromotionUpdatePayload;
|
|
156
|
+
}
|
|
157
|
+
export type AdminPromotionUpdateResponse = {
|
|
158
|
+
contractVersion: "commerce.v0";
|
|
159
|
+
updated: true;
|
|
160
|
+
id: string;
|
|
161
|
+
};
|
|
162
|
+
export type PromotionCodeCreateRequest = {
|
|
163
|
+
name: string;
|
|
164
|
+
description: string | null;
|
|
165
|
+
code: {
|
|
166
|
+
kind: "automatic";
|
|
167
|
+
} | {
|
|
168
|
+
kind: "manual";
|
|
169
|
+
value: string;
|
|
170
|
+
};
|
|
171
|
+
benefits: ({
|
|
172
|
+
lane: "product";
|
|
173
|
+
kind: "target_percentage";
|
|
174
|
+
valueBps: number;
|
|
175
|
+
} | {
|
|
176
|
+
lane: "product";
|
|
177
|
+
kind: "fixed_amount";
|
|
178
|
+
valueMinor: number;
|
|
179
|
+
} | {
|
|
180
|
+
lane: "shipping";
|
|
181
|
+
kind: "percentage";
|
|
182
|
+
valueBps: number;
|
|
183
|
+
} | {
|
|
184
|
+
lane: "shipping";
|
|
185
|
+
kind: "fixed_amount";
|
|
186
|
+
valueMinor: number;
|
|
187
|
+
} | {
|
|
188
|
+
lane: "shipping";
|
|
189
|
+
kind: "free_shipping";
|
|
190
|
+
})[];
|
|
191
|
+
scopes: ("one_time" | "subscription_initial")[];
|
|
192
|
+
validFrom: string;
|
|
193
|
+
validTo: string | null;
|
|
194
|
+
minimumReferenceMinor: number;
|
|
195
|
+
redemptionLimitGlobal: number | null;
|
|
196
|
+
redemptionLimitPerCustomer: number | null;
|
|
197
|
+
status: "draft" | "active";
|
|
198
|
+
idempotencyKey: string;
|
|
199
|
+
previewContext?: {
|
|
200
|
+
referenceProductMinor: number;
|
|
201
|
+
oneTimeProductMinor: number;
|
|
202
|
+
subscriptionProductMinor: number;
|
|
203
|
+
shippingMinor: number;
|
|
204
|
+
} | undefined;
|
|
205
|
+
previewProof?: string | undefined;
|
|
206
|
+
};
|
|
207
|
+
export type PromotionCodeCreateResponse = {
|
|
208
|
+
contractVersion: "commerce.v0";
|
|
209
|
+
id: string;
|
|
210
|
+
code: string;
|
|
211
|
+
status: "draft" | "active" | "paused" | "archived";
|
|
212
|
+
revision: number;
|
|
213
|
+
idempotent: boolean;
|
|
214
|
+
};
|
|
215
|
+
export type PromotionCodeUpdateRequest = {
|
|
216
|
+
id: string;
|
|
217
|
+
expectedRevision: number;
|
|
218
|
+
updates: {
|
|
219
|
+
status?: "draft" | "active" | "paused" | "archived" | undefined;
|
|
220
|
+
validFrom?: string | undefined;
|
|
221
|
+
validTo?: string | null | undefined;
|
|
222
|
+
redemptionLimitGlobal?: number | null | undefined;
|
|
223
|
+
redemptionLimitPerCustomer?: number | null | undefined;
|
|
224
|
+
};
|
|
225
|
+
idempotencyKey: string;
|
|
226
|
+
previewContext?: {
|
|
227
|
+
referenceProductMinor: number;
|
|
228
|
+
oneTimeProductMinor: number;
|
|
229
|
+
subscriptionProductMinor: number;
|
|
230
|
+
shippingMinor: number;
|
|
231
|
+
} | undefined;
|
|
232
|
+
previewProof?: string | undefined;
|
|
233
|
+
};
|
|
234
|
+
export type PromotionCodeUpdateResponse = {
|
|
235
|
+
contractVersion: "commerce.v0";
|
|
236
|
+
id: string;
|
|
237
|
+
status: "draft" | "active" | "paused" | "archived";
|
|
238
|
+
revision: number;
|
|
239
|
+
idempotent: boolean;
|
|
240
|
+
};
|
|
241
|
+
export type PromotionCodesListRequest = {
|
|
242
|
+
status: "draft" | "active" | "paused" | "archived" | "scheduled" | "expired" | "expired_or_archived" | "all";
|
|
243
|
+
scope: "shipping" | "one_time" | "subscription_initial" | "all" | "both";
|
|
244
|
+
limit: number;
|
|
245
|
+
q?: string | undefined;
|
|
246
|
+
cursor?: string | undefined;
|
|
247
|
+
};
|
|
248
|
+
export type PromotionCodeSummary = {
|
|
249
|
+
id: string;
|
|
250
|
+
code: string;
|
|
251
|
+
name: string;
|
|
252
|
+
description: string | null;
|
|
253
|
+
benefits: ({
|
|
254
|
+
lane: "product";
|
|
255
|
+
kind: "target_percentage";
|
|
256
|
+
valueBps: number;
|
|
257
|
+
} | {
|
|
258
|
+
lane: "product";
|
|
259
|
+
kind: "fixed_amount";
|
|
260
|
+
valueMinor: number;
|
|
261
|
+
} | {
|
|
262
|
+
lane: "shipping";
|
|
263
|
+
kind: "percentage";
|
|
264
|
+
valueBps: number;
|
|
265
|
+
} | {
|
|
266
|
+
lane: "shipping";
|
|
267
|
+
kind: "fixed_amount";
|
|
268
|
+
valueMinor: number;
|
|
269
|
+
} | {
|
|
270
|
+
lane: "shipping";
|
|
271
|
+
kind: "free_shipping";
|
|
272
|
+
} | {
|
|
273
|
+
lane: "product";
|
|
274
|
+
kind: "percentage";
|
|
275
|
+
valueBps: number;
|
|
276
|
+
} | {
|
|
277
|
+
lane: "shipping";
|
|
278
|
+
kind: "percentage";
|
|
279
|
+
valueBps: number;
|
|
280
|
+
} | {
|
|
281
|
+
lane: "product";
|
|
282
|
+
kind: "fixed_amount";
|
|
283
|
+
valueMinor: number;
|
|
284
|
+
} | {
|
|
285
|
+
lane: "shipping";
|
|
286
|
+
kind: "fixed_amount";
|
|
287
|
+
valueMinor: number;
|
|
288
|
+
} | {
|
|
289
|
+
lane: "product" | "shipping";
|
|
290
|
+
kind: "percentage" | "fixed_amount";
|
|
291
|
+
validationState: "unsupported_legacy_value";
|
|
292
|
+
})[];
|
|
293
|
+
promotionEngineVersion: "promotion-engine.v1" | "promotion-engine.v2";
|
|
294
|
+
scopes: ("one_time" | "subscription_initial")[];
|
|
295
|
+
status: "draft" | "active" | "paused" | "archived";
|
|
296
|
+
effectiveStatus: "draft" | "active" | "paused" | "archived" | "scheduled" | "expired";
|
|
297
|
+
validFrom: string;
|
|
298
|
+
validTo: string | null;
|
|
299
|
+
minimumReferenceMinor: number;
|
|
300
|
+
redemptionLimitGlobal: number | null;
|
|
301
|
+
redemptionLimitPerCustomer: number | null;
|
|
302
|
+
redeemedCount: number;
|
|
303
|
+
reservedCount: number;
|
|
304
|
+
remainingCount: number | null;
|
|
305
|
+
createdAt: string;
|
|
306
|
+
revision: number;
|
|
307
|
+
};
|
|
308
|
+
export type PromotionCodesListResponse = {
|
|
309
|
+
contractVersion: "commerce.v0";
|
|
310
|
+
codes: {
|
|
311
|
+
id: string;
|
|
312
|
+
code: string;
|
|
313
|
+
name: string;
|
|
314
|
+
description: string | null;
|
|
315
|
+
benefits: ({
|
|
316
|
+
lane: "product";
|
|
317
|
+
kind: "target_percentage";
|
|
318
|
+
valueBps: number;
|
|
319
|
+
} | {
|
|
320
|
+
lane: "product";
|
|
321
|
+
kind: "fixed_amount";
|
|
322
|
+
valueMinor: number;
|
|
323
|
+
} | {
|
|
324
|
+
lane: "shipping";
|
|
325
|
+
kind: "percentage";
|
|
326
|
+
valueBps: number;
|
|
327
|
+
} | {
|
|
328
|
+
lane: "shipping";
|
|
329
|
+
kind: "fixed_amount";
|
|
330
|
+
valueMinor: number;
|
|
331
|
+
} | {
|
|
332
|
+
lane: "shipping";
|
|
333
|
+
kind: "free_shipping";
|
|
334
|
+
} | {
|
|
335
|
+
lane: "product";
|
|
336
|
+
kind: "percentage";
|
|
337
|
+
valueBps: number;
|
|
338
|
+
} | {
|
|
339
|
+
lane: "shipping";
|
|
340
|
+
kind: "percentage";
|
|
341
|
+
valueBps: number;
|
|
342
|
+
} | {
|
|
343
|
+
lane: "product";
|
|
344
|
+
kind: "fixed_amount";
|
|
345
|
+
valueMinor: number;
|
|
346
|
+
} | {
|
|
347
|
+
lane: "shipping";
|
|
348
|
+
kind: "fixed_amount";
|
|
349
|
+
valueMinor: number;
|
|
350
|
+
} | {
|
|
351
|
+
lane: "product" | "shipping";
|
|
352
|
+
kind: "percentage" | "fixed_amount";
|
|
353
|
+
validationState: "unsupported_legacy_value";
|
|
354
|
+
})[];
|
|
355
|
+
promotionEngineVersion: "promotion-engine.v1" | "promotion-engine.v2";
|
|
356
|
+
scopes: ("one_time" | "subscription_initial")[];
|
|
357
|
+
status: "draft" | "active" | "paused" | "archived";
|
|
358
|
+
effectiveStatus: "draft" | "active" | "paused" | "archived" | "scheduled" | "expired";
|
|
359
|
+
validFrom: string;
|
|
360
|
+
validTo: string | null;
|
|
361
|
+
minimumReferenceMinor: number;
|
|
362
|
+
redemptionLimitGlobal: number | null;
|
|
363
|
+
redemptionLimitPerCustomer: number | null;
|
|
364
|
+
redeemedCount: number;
|
|
365
|
+
reservedCount: number;
|
|
366
|
+
remainingCount: number | null;
|
|
367
|
+
createdAt: string;
|
|
368
|
+
revision: number;
|
|
369
|
+
}[];
|
|
370
|
+
nextCursor: string | null;
|
|
371
|
+
capabilities: {
|
|
372
|
+
mutationsEnabled: boolean;
|
|
373
|
+
};
|
|
374
|
+
legacyCompatibility: {
|
|
375
|
+
ready: boolean;
|
|
376
|
+
unprojectedCount: number;
|
|
377
|
+
collisionGroupCount: number;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
export type PromotionStatus = "draft" | "active" | "paused" | "archived";
|
|
381
|
+
export interface AdminSubscriptionBandEntry {
|
|
382
|
+
variantId: string;
|
|
383
|
+
sku: string | null;
|
|
384
|
+
oneTimeMinor: number;
|
|
385
|
+
subscriptionMinor: number;
|
|
386
|
+
percent: number;
|
|
387
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from "./quotePromotionV2.js";
|
|
2
|
+
export * from "./quoteAutomaticPromotions.js";
|
|
3
|
+
export * from "./quotePromoDiscounts.js";
|
|
4
|
+
export * from "./quotePromotionCodeAdjustments.js";
|
|
5
|
+
export * from "./promotionBenefitDefinition.js";
|
|
6
|
+
export * from "./promoDataPort.js";
|
|
7
|
+
export * from "./promotionCodeQuotePort.js";
|
|
8
|
+
export * from "./promotionCodePreview.js";
|
|
9
|
+
export * from "./promotionQuoteBinding.js";
|
|
10
|
+
export * from "./promotionQuoteAcceptance.js";
|
|
11
|
+
export * from "./promotionAcceptanceTelemetry.js";
|
|
12
|
+
export * from "./adminBindings.js";
|
|
13
|
+
export * from "./adminPromotionsContracts.js";
|
|
14
|
+
export * from "./adminPromotionCodesContracts.js";
|
|
15
|
+
export * from "./adminPromotionsHandler.js";
|
|
16
|
+
export * from "./adminPromotionCodesHandler.js";
|
|
17
|
+
export * from "./adminPromotionsDataPort.js";
|
|
18
|
+
export * from "./adminPromotionCodesDataPort.js";
|
|
19
|
+
export * from "./promotionClaimSweepPort.js";
|
|
20
|
+
export * from "./promotionClaims.js";
|
|
21
|
+
export * from "./sql.js";
|
|
22
|
+
export type { PromotionStatus, AdminPromotion, AdminPromotionV2Mirror, AdminPromotionSemanticBenefit, AdminPromotionsListResponse, AdminPromotionUpdatePayload, AdminPromotionUpdateRequest, AdminPromotionUpdateResponse } from "./contracts/index.js";
|
|
23
|
+
export type { QuoteAcquisitionBinding } from "./quoteAcquisitionBinding.js";
|
|
24
|
+
export { createQuoteShippingPromotions } from "./quoteShippingPolicy.js";
|
|
25
|
+
export type { QuoteShippingPromotionsDeps } from "./quoteShippingPolicy.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from "./quotePromotionV2.js";
|
|
2
|
+
export * from "./quoteAutomaticPromotions.js";
|
|
3
|
+
export * from "./quotePromoDiscounts.js";
|
|
4
|
+
export * from "./quotePromotionCodeAdjustments.js";
|
|
5
|
+
export * from "./promotionBenefitDefinition.js";
|
|
6
|
+
export * from "./promoDataPort.js";
|
|
7
|
+
export * from "./promotionCodeQuotePort.js";
|
|
8
|
+
export * from "./promotionCodePreview.js";
|
|
9
|
+
export * from "./promotionQuoteBinding.js";
|
|
10
|
+
export * from "./promotionQuoteAcceptance.js";
|
|
11
|
+
export * from "./promotionAcceptanceTelemetry.js";
|
|
12
|
+
export * from "./adminBindings.js";
|
|
13
|
+
export * from "./adminPromotionsContracts.js";
|
|
14
|
+
export * from "./adminPromotionCodesContracts.js";
|
|
15
|
+
export * from "./adminPromotionsHandler.js";
|
|
16
|
+
export * from "./adminPromotionCodesHandler.js";
|
|
17
|
+
export * from "./adminPromotionsDataPort.js";
|
|
18
|
+
export * from "./adminPromotionCodesDataPort.js";
|
|
19
|
+
export * from "./promotionClaimSweepPort.js";
|
|
20
|
+
export * from "./promotionClaims.js";
|
|
21
|
+
export * from "./sql.js";
|
|
22
|
+
export { createQuoteShippingPromotions } from "./quoteShippingPolicy.js";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { PromotionRow } from "@openlup/core/promo";
|
|
2
|
+
/**
|
|
3
|
+
* Read-only data access for promo evaluation in the commerce quote.
|
|
4
|
+
*
|
|
5
|
+
* Deliberately thin: `listActivePromotions` returns the active candidate rows and
|
|
6
|
+
* leaves ALL eligibility filtering (region, validity window, first_purchase,
|
|
7
|
+
* cart_mode, coupon-code match, stacking) to the pure `evaluatePromos` evaluator —
|
|
8
|
+
* the single source of truth shared by preview and finalize. `countPaidOrders`
|
|
9
|
+
* supplies the server-authoritative `client_orders_count` used for `first_purchase`
|
|
10
|
+
* eligibility; it is resolved from the authenticated clientId (never the client
|
|
11
|
+
* request body), so a discount cannot be forged by spoofing the count.
|
|
12
|
+
*/
|
|
13
|
+
export interface PromotionRedemptionCount {
|
|
14
|
+
global: number;
|
|
15
|
+
perCustomer: number;
|
|
16
|
+
}
|
|
17
|
+
/** Paid-order counts split by order mode, for per-mode "first order" eligibility. */
|
|
18
|
+
export interface PaidOrdersByMode {
|
|
19
|
+
/** Paid `one_time` (bundle) orders. */
|
|
20
|
+
oneTime: number;
|
|
21
|
+
/** Paid `subscription_cycle` orders (initial activation + every renewal). */
|
|
22
|
+
subscription: number;
|
|
23
|
+
}
|
|
24
|
+
export interface CommercePromoDataPort {
|
|
25
|
+
listActivePromotions(): Promise<PromotionRow[]>;
|
|
26
|
+
countPaidOrders(clientId: string): Promise<number>;
|
|
27
|
+
/**
|
|
28
|
+
* Paid-order counts split by `commerce_orders.mode`. Drives `first_subscription_purchase`
|
|
29
|
+
* (subscription===0) and `first_onetime_purchase` (oneTime===0) independently, so a
|
|
30
|
+
* prior bundle never blocks a first subscription and vice versa. Server-authoritative
|
|
31
|
+
* (resolved from the clientId, never client input).
|
|
32
|
+
*/
|
|
33
|
+
countPaidOrdersByMode(clientId: string): Promise<PaidOrdersByMode>;
|
|
34
|
+
/**
|
|
35
|
+
* Per-promotion redemption counts (global + this client's), keyed by promotion id,
|
|
36
|
+
* for the quote's cap pre-filter. `clientId` null ⇒ perCustomer is 0 (an anonymous
|
|
37
|
+
* preview cannot resolve a per-customer cap; checkout re-evaluates with the real client).
|
|
38
|
+
*/
|
|
39
|
+
redemptionCounts(clientId: string | null): Promise<Map<string, PromotionRedemptionCount>>;
|
|
40
|
+
/**
|
|
41
|
+
* True when this device's first-party visitor id already has a PAID first-order redemption. Denies
|
|
42
|
+
* first-order promos to a device that has already completed and paid a first order, even
|
|
43
|
+
* under a fresh email/client. `null`/empty visitorId ⇒ false (no guard).
|
|
44
|
+
*/
|
|
45
|
+
deviceFirstOrderRedeemed(visitorId: string | null): Promise<boolean>;
|
|
46
|
+
}
|
|
47
|
+
export declare function promotionRedemptionMap(value: unknown): Map<string, PromotionRedemptionCount>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function promotionRedemptionMap(value) {
|
|
2
|
+
const rows = Array.isArray(value) ? value : [];
|
|
3
|
+
const map = new Map();
|
|
4
|
+
for (const row of rows) {
|
|
5
|
+
const id = typeof row.promotion_id === "string" ? row.promotion_id : null;
|
|
6
|
+
if (!id)
|
|
7
|
+
continue;
|
|
8
|
+
map.set(id, {
|
|
9
|
+
global: Number(row.global_count ?? 0),
|
|
10
|
+
perCustomer: Number(row.per_customer_count ?? 0),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return map;
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { PromotionPurchaseScope } from "@openlup/core/promo";
|
|
2
|
+
import type { PromotionQuoteMismatchField } from "./promotionQuoteBinding.js";
|
|
3
|
+
export declare const PROMOTION_ACCEPTANCE_STAGES: readonly ["quote_issue", "quote_honor", "checkout_verify"];
|
|
4
|
+
export declare const PROMOTION_ACCEPTANCE_OUTCOMES: readonly ["issued", "accepted", "rejected", "skipped"];
|
|
5
|
+
export declare const PROMOTION_ACCEPTANCE_REASONS: readonly ["issued", "accepted", "no_v2_adjustment", "secret_unavailable", "malformed", "unknown_key", "signature_invalid", "not_yet_valid", "expired", "ttl_invalid", "request_mismatch", "code_mismatch", "quote_mismatch", "total_mismatch", "currency_mismatch", "no_v2_adjustment_in_quote"];
|
|
6
|
+
export declare const PROMOTION_ACCEPTANCE_KEY_SLOTS: readonly ["current", "previous", "none"];
|
|
7
|
+
export declare const PROMOTION_ACCEPTANCE_EXPIRY_BUCKETS: readonly ["expired", "lt_1h", "1_24h", "24_72h", "none"];
|
|
8
|
+
export type PromotionAcceptanceTelemetry = {
|
|
9
|
+
stage: (typeof PROMOTION_ACCEPTANCE_STAGES)[number];
|
|
10
|
+
outcome: (typeof PROMOTION_ACCEPTANCE_OUTCOMES)[number];
|
|
11
|
+
reason: (typeof PROMOTION_ACCEPTANCE_REASONS)[number];
|
|
12
|
+
keySlot: (typeof PROMOTION_ACCEPTANCE_KEY_SLOTS)[number];
|
|
13
|
+
purchaseScope: PromotionPurchaseScope;
|
|
14
|
+
expiryBucket: (typeof PROMOTION_ACCEPTANCE_EXPIRY_BUCKETS)[number];
|
|
15
|
+
promotionEngineVersion: "promotion-engine.v2";
|
|
16
|
+
/**
|
|
17
|
+
* Only a `quote_mismatch` carries one: which section of the bound money
|
|
18
|
+
* projection diverged, so the next divergence names its field in the log
|
|
19
|
+
* drain without a redeploy. `other` = the token predates section bindings.
|
|
20
|
+
*/
|
|
21
|
+
mismatchField?: PromotionQuoteMismatchField;
|
|
22
|
+
};
|
|
23
|
+
export type PromotionAcceptanceRecorder = (event: {
|
|
24
|
+
name: "commerce_promotion_acceptance_outcome";
|
|
25
|
+
domain: "commerce";
|
|
26
|
+
surface: "public" | "hidden";
|
|
27
|
+
details: PromotionAcceptanceTelemetry;
|
|
28
|
+
}) => void;
|
|
29
|
+
export declare function recordPromotionAcceptanceOutcome(details: PromotionAcceptanceTelemetry, surface: "public" | "hidden", recorder: PromotionAcceptanceRecorder): void;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export const PROMOTION_ACCEPTANCE_STAGES = [
|
|
2
|
+
"quote_issue",
|
|
3
|
+
"quote_honor",
|
|
4
|
+
"checkout_verify",
|
|
5
|
+
];
|
|
6
|
+
export const PROMOTION_ACCEPTANCE_OUTCOMES = ["issued", "accepted", "rejected", "skipped"];
|
|
7
|
+
export const PROMOTION_ACCEPTANCE_REASONS = [
|
|
8
|
+
"issued",
|
|
9
|
+
"accepted",
|
|
10
|
+
"no_v2_adjustment",
|
|
11
|
+
"secret_unavailable",
|
|
12
|
+
"malformed",
|
|
13
|
+
"unknown_key",
|
|
14
|
+
"signature_invalid",
|
|
15
|
+
"not_yet_valid",
|
|
16
|
+
"expired",
|
|
17
|
+
"ttl_invalid",
|
|
18
|
+
"request_mismatch",
|
|
19
|
+
"code_mismatch",
|
|
20
|
+
"quote_mismatch",
|
|
21
|
+
"total_mismatch",
|
|
22
|
+
"currency_mismatch",
|
|
23
|
+
"no_v2_adjustment_in_quote",
|
|
24
|
+
];
|
|
25
|
+
export const PROMOTION_ACCEPTANCE_KEY_SLOTS = ["current", "previous", "none"];
|
|
26
|
+
export const PROMOTION_ACCEPTANCE_EXPIRY_BUCKETS = [
|
|
27
|
+
"expired",
|
|
28
|
+
"lt_1h",
|
|
29
|
+
"1_24h",
|
|
30
|
+
"24_72h",
|
|
31
|
+
"none",
|
|
32
|
+
];
|
|
33
|
+
export function recordPromotionAcceptanceOutcome(details, surface, recorder) {
|
|
34
|
+
try {
|
|
35
|
+
recorder({
|
|
36
|
+
name: "commerce_promotion_acceptance_outcome",
|
|
37
|
+
domain: "commerce",
|
|
38
|
+
surface,
|
|
39
|
+
details,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
// Telemetry is passive evidence. It must never change quote/checkout truth.
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type PromotionBenefitDefinition = {
|
|
2
|
+
kind: "legacy_percentage";
|
|
3
|
+
percentage: number;
|
|
4
|
+
} | {
|
|
5
|
+
kind: "legacy_fixed_amount";
|
|
6
|
+
amount: number;
|
|
7
|
+
} | {
|
|
8
|
+
kind: "legacy_free_shipping";
|
|
9
|
+
} | {
|
|
10
|
+
kind: "target_percentage";
|
|
11
|
+
lane: "product";
|
|
12
|
+
valueBps: number;
|
|
13
|
+
} | {
|
|
14
|
+
kind: "percentage";
|
|
15
|
+
lane: "shipping";
|
|
16
|
+
valueBps: number;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "fixed_amount";
|
|
19
|
+
lane: "product" | "shipping";
|
|
20
|
+
valueMinor: number;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "free_shipping";
|
|
23
|
+
lane: "shipping";
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Explicit dual-read boundary. Legacy rows only use legacy columns; v2 rows
|
|
27
|
+
* only use explicit v2 benefit columns. There is intentionally no inference.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolvePromotionBenefitDefinition(row: {
|
|
30
|
+
promotion_engine_version?: unknown;
|
|
31
|
+
discount_type: unknown;
|
|
32
|
+
discount_value: unknown;
|
|
33
|
+
benefit_lane?: unknown;
|
|
34
|
+
benefit_kind?: unknown;
|
|
35
|
+
benefit_value_bps?: unknown;
|
|
36
|
+
benefit_value_minor?: unknown;
|
|
37
|
+
}): PromotionBenefitDefinition;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explicit dual-read boundary. Legacy rows only use legacy columns; v2 rows
|
|
3
|
+
* only use explicit v2 benefit columns. There is intentionally no inference.
|
|
4
|
+
*/
|
|
5
|
+
export function resolvePromotionBenefitDefinition(row) {
|
|
6
|
+
if (row.promotion_engine_version !== "promotion-engine.v2") {
|
|
7
|
+
const value = finite(row.discount_value);
|
|
8
|
+
if (row.discount_type === "percentage" && value > 0 && value < 100)
|
|
9
|
+
return { kind: "legacy_percentage", percentage: value };
|
|
10
|
+
if (row.discount_type === "fixed_amount" && value > 0)
|
|
11
|
+
return { kind: "legacy_fixed_amount", amount: value };
|
|
12
|
+
if (row.discount_type === "free_shipping")
|
|
13
|
+
return { kind: "legacy_free_shipping" };
|
|
14
|
+
throw new Error("promotion_v1_benefit_invalid");
|
|
15
|
+
}
|
|
16
|
+
const lane = row.benefit_lane;
|
|
17
|
+
const kind = row.benefit_kind;
|
|
18
|
+
if (lane === "product" && kind === "target_percentage" && safeBps(row.benefit_value_bps)) {
|
|
19
|
+
return { kind, lane, valueBps: row.benefit_value_bps };
|
|
20
|
+
}
|
|
21
|
+
if (lane === "shipping" && kind === "percentage" && safeBps(row.benefit_value_bps)) {
|
|
22
|
+
return { kind, lane, valueBps: row.benefit_value_bps };
|
|
23
|
+
}
|
|
24
|
+
if ((lane === "product" || lane === "shipping") && kind === "fixed_amount" && positiveInt(row.benefit_value_minor)) {
|
|
25
|
+
return { kind, lane, valueMinor: row.benefit_value_minor };
|
|
26
|
+
}
|
|
27
|
+
if (lane === "shipping" && kind === "free_shipping")
|
|
28
|
+
return { kind, lane };
|
|
29
|
+
throw new Error("promotion_v2_benefit_invalid");
|
|
30
|
+
}
|
|
31
|
+
function finite(value) { return typeof value === "number" && Number.isFinite(value) ? value : Number.NaN; }
|
|
32
|
+
function safeBps(value) { return Number.isInteger(value) && Number(value) > 0 && Number(value) < 10_000; }
|
|
33
|
+
function positiveInt(value) { return Number.isInteger(value) && Number(value) > 0; }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface PromotionClaimSweepCounts {
|
|
2
|
+
checked: number;
|
|
3
|
+
cancelled: number;
|
|
4
|
+
skipped: number;
|
|
5
|
+
}
|
|
6
|
+
export interface PromotionClaimSweepPort {
|
|
7
|
+
sweep(input: {
|
|
8
|
+
now: string;
|
|
9
|
+
limit: number;
|
|
10
|
+
claimLeaseMinutes: number;
|
|
11
|
+
graceMinutes: number;
|
|
12
|
+
}): Promise<PromotionClaimSweepCounts>;
|
|
13
|
+
}
|
|
14
|
+
export declare function parsePromotionClaimSweepCounts(value: unknown): PromotionClaimSweepCounts;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function parsePromotionClaimSweepCounts(value) {
|
|
2
|
+
const result = value;
|
|
3
|
+
if (!result || !Number.isInteger(result.checked) || !Number.isInteger(result.cancelled)
|
|
4
|
+
|| !Number.isInteger(result.skipped)) {
|
|
5
|
+
throw new Error("promotion_claim_sweep_invalid_response");
|
|
6
|
+
}
|
|
7
|
+
return result;
|
|
8
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CommercePromoDataPort } from "./promoDataPort.js";
|
|
2
|
+
import { type PromotionClaimSweepPort } from "./promotionClaimSweepPort.js";
|
|
3
|
+
import type { PgQueryExecutor } from "../data/index.js";
|
|
4
|
+
export declare function createPostgresCommercePromoDataPort(executor: PgQueryExecutor): CommercePromoDataPort;
|
|
5
|
+
export declare function createPostgresPromotionClaimSweepPort(executor: PgQueryExecutor): PromotionClaimSweepPort;
|