@fire-spark/core 0.42.3 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +13 -1
- package/dist/index.js +42 -13
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -2660,6 +2660,7 @@ declare const findNodeById: (workflow: OrderFulfillmentWorkflow, nodeId: string)
|
|
|
2660
2660
|
status: "failed" | "no_connection" | "offline_skipped" | "opted_out" | "sent";
|
|
2661
2661
|
template_id?: string | undefined;
|
|
2662
2662
|
locale?: string | undefined;
|
|
2663
|
+
message_id?: string | null | undefined;
|
|
2663
2664
|
resend_id?: string | null | undefined;
|
|
2664
2665
|
attempts?: number | undefined;
|
|
2665
2666
|
short_code?: string | null | undefined;
|
|
@@ -2758,6 +2759,7 @@ declare const findStartNode: (workflow: OrderFulfillmentWorkflow) => {
|
|
|
2758
2759
|
status: "failed" | "no_connection" | "offline_skipped" | "opted_out" | "sent";
|
|
2759
2760
|
template_id?: string | undefined;
|
|
2760
2761
|
locale?: string | undefined;
|
|
2762
|
+
message_id?: string | null | undefined;
|
|
2761
2763
|
resend_id?: string | null | undefined;
|
|
2762
2764
|
attempts?: number | undefined;
|
|
2763
2765
|
short_code?: string | null | undefined;
|
|
@@ -3211,6 +3213,7 @@ declare const findMappedStatusNode: (workflow: OrderFulfillmentWorkflow, status:
|
|
|
3211
3213
|
status: "failed" | "no_connection" | "offline_skipped" | "opted_out" | "sent";
|
|
3212
3214
|
template_id?: string | undefined;
|
|
3213
3215
|
locale?: string | undefined;
|
|
3216
|
+
message_id?: string | null | undefined;
|
|
3214
3217
|
resend_id?: string | null | undefined;
|
|
3215
3218
|
attempts?: number | undefined;
|
|
3216
3219
|
short_code?: string | null | undefined;
|
|
@@ -3437,6 +3440,7 @@ declare const resolveFailureTerminalEdge: (input: {
|
|
|
3437
3440
|
status: "failed" | "no_connection" | "offline_skipped" | "opted_out" | "sent";
|
|
3438
3441
|
template_id?: string | undefined;
|
|
3439
3442
|
locale?: string | undefined;
|
|
3443
|
+
message_id?: string | null | undefined;
|
|
3440
3444
|
resend_id?: string | null | undefined;
|
|
3441
3445
|
attempts?: number | undefined;
|
|
3442
3446
|
short_code?: string | null | undefined;
|
|
@@ -3553,6 +3557,7 @@ declare const sittingWorkflowNode: (workflow: OrderFulfillmentWorkflow, currentN
|
|
|
3553
3557
|
status: "failed" | "no_connection" | "offline_skipped" | "opted_out" | "sent";
|
|
3554
3558
|
template_id?: string | undefined;
|
|
3555
3559
|
locale?: string | undefined;
|
|
3560
|
+
message_id?: string | null | undefined;
|
|
3556
3561
|
resend_id?: string | null | undefined;
|
|
3557
3562
|
attempts?: number | undefined;
|
|
3558
3563
|
short_code?: string | null | undefined;
|
|
@@ -3694,6 +3699,7 @@ declare const enterWorkflowNode: (input: {
|
|
|
3694
3699
|
status: "failed" | "no_connection" | "offline_skipped" | "opted_out" | "sent";
|
|
3695
3700
|
template_id?: string | undefined;
|
|
3696
3701
|
locale?: string | undefined;
|
|
3702
|
+
message_id?: string | null | undefined;
|
|
3697
3703
|
resend_id?: string | null | undefined;
|
|
3698
3704
|
attempts?: number | undefined;
|
|
3699
3705
|
short_code?: string | null | undefined;
|
|
@@ -4247,6 +4253,12 @@ declare const DEFAULT_LOCALE = "en";
|
|
|
4247
4253
|
declare const normalizeLocaleKey: (raw: string) => string;
|
|
4248
4254
|
declare const findLocaleKey: (value: Record<string, string>, locale: string) => string | undefined;
|
|
4249
4255
|
declare const pickMultiLanguageText: (value: Record<string, string> | string | null | undefined, locale?: string, fallback?: string) => string;
|
|
4256
|
+
/**
|
|
4257
|
+
* Resolves a localized text map (or legacy plain string) with fallback chain:
|
|
4258
|
+
* exact `locale` -> base language -> `merchantLocale` (exact -> base) ->
|
|
4259
|
+
* first non-empty entry -> `fallback`.
|
|
4260
|
+
*/
|
|
4261
|
+
declare const pickLocalizedText: (value: Record<string, string> | string | null | undefined, locale?: string, merchantLocale?: string, fallback?: string) => string;
|
|
4250
4262
|
//#endregion
|
|
4251
4263
|
//#region src/hpke/hpke.d.ts
|
|
4252
4264
|
/**
|
|
@@ -4299,4 +4311,4 @@ declare const hpkeSeal: (input: HpkeSealInput) => Promise<{
|
|
|
4299
4311
|
/** Opens a sealed message; throws when anything was altered. */
|
|
4300
4312
|
declare const hpkeOpen: (input: HpkeOpenInput) => Promise<Uint8Array<ArrayBuffer>>;
|
|
4301
4313
|
//#endregion
|
|
4302
|
-
export { type AdvanceAndEnterConfig, type AdvanceAndEnterResult, type ApplyRedeemInput, type AuthConfigureOptions, type BuildRouteHttpInput, type BuildScheduleSlotsConfig, CALLBACK_MISSING_LOCAL_URL, CANONICAL_MAX_DEPTH, CANONICAL_MAX_EXPONENT, CARD_BRANDS, CUSTOMER_INFO_PLACEHOLDERS, type CallbackMissingLocalUrlDetails, type CanonicalInput, type CanonicalizationError, type CanonicalizationErrorCode, type CardBrand, type CardBrandSpec, type CardCvcError, type CardExpiry, type CardExpiryError, type CardNumberError, type CardPreviewSlot, type CardholderNameError, type CmsBlockScope, type CmsVisibilityBlock, type CmsVisibilityContext, type CmsVisibilityRules, type CreateOrderOptions, type CreateSessionOptions, type CustomizationPath, type CustomizationSession, DEFAULT_LOCALE, DEFAULT_MAX_INCOMPLETE_MINUTES, DEFAULT_MAX_SNAPSHOT_AGE_MS, DEFAULT_RECOMMENDATION_TYPES, DEFAULT_ROUTE_COOLDOWN_MS, DEFAULT_WEBHOOK_TIMEOUT_S, DelegatedSessionExpiredError, type DeunaCallbackUrls, type DeunaOrderStatus, type DeviceSecretStorage, type DeviceSecretsConfigureOptions, type DeviceSecretsPayload, type DeviceSecretsStore, type DispatchWebhooksConfig, type EngineCallbackRun, type EngineCallbackRunError, type EngineExecutionContext, type EngineFlagReviewInput, type EngineFulfillmentPatch, type EngineOrder, type EngineOrderChangedEvent, type EngineOrderFulfillment, type EngineOrderStatus, type EngineOrderStatusPatch, type EngineScope, type EngineStepLog, type EngineStepLogEntry, type EngineStepsLogs, type EngineWebhookEnvelope, type EngineWebhookFailureEvent, type EngineWebhookNodeRun, type EngineWebhookTarget, type EnterAndPauseResult, type EnterRunResult, type ExchangeOptions, FULFILLMENT_WORKFLOW_TERMINAL_STATUSES, type FailedCharge, type FinalizePlaceOrderConfig, type FiresparkOrigin, type FlatMenuCategory, type FulfillmentEligibilityInput, type FulfillmentExecutionPort, type FulfillmentPorts, type FulfillmentRunStatus, type FulfillmentStepName, type FulfillmentStoragePort, type FulfillmentTerminalOrderStatus, type GenOrderIdOptions, type GetCmsBlockOptions, type GroupDisplayType, HPKE_ALG, type HpkeAead, type HpkeEnvelope, type HpkeOpenInput, type HpkePrivateJwk, type HpkePublicJwk, type HpkeSealInput, ID_HASH_FORMATS, type IdBuilder, type IdHashFormat, type InvokeCallbackAttemptConfig, type InvokeCallbackAttemptResult, type ListMenusStreamOptions, type ListPaymentsOptions, type LocalDeviceCredentials, type LocalRouteProbeResult, type LocalServerConfig, type LocalServerHealthResult, LosslessNumber, type LosslessNumberLike, MAX_MAX_INCOMPLETE_MINUTES, MAX_SUPPORTED_WORKFLOW_SCHEMA_VERSION, MIN_MAX_INCOMPLETE_MINUTES, MODE_HINT_HEADER, type MarkRouteDownInput, type Menu, type MenuCategoryNode, type MenuLookup, type MilestoneSteps, type MilestoneTrackItem, type ModifierControlType, type ModifierCtx, type ModifierGroupCtx, type NestedMenuCategory, OFFLINE_NO_LOCAL_URL, ORIGIN_HEADER, Order, OrderAuthPinnedError, type OrderCancelInput, type OrderCancelOptions, type OrderCancelResult, type OrderCancelType, type OrderCustomerSource, type OrderDeviceCredential, type OrderDraft, type OrderIssue, type OrderIssueCode, type OrderLineDiff, type OrderLineIssue, type OrderLineIssueCode, OrderNotOpenError, OrderPaymentRequiredError, type OrderRouteKind, type OrderRouteStatus, OrderRouteUnavailableError, type OrderRoutes, type OrderScope, OrderSyncPendingError, OrderSyncRejectedError, OrderValidationError, type OrderValidationResult, type OriginListener, type OriginState, type PauseForAdvanceConfig, type PayIntentOptions, type PayIntentResult, type PayOptions, type PaymentCardBrand, type PaymentEligibilityInput, type PaymentProgressEvent, type PaymentProgressListener, type PaymentRunOptions, type PaymentSessionOptions, type PendingWebhooks, PickupNameIssue, type PinnedFetchFactory, type PinnedFetchOptions, type PosOrderHttpOptions, type PricingModifier, type ProbeLocalRouteHealthOptions, type ProcessStateNodeCallbackJob, type ProcessStateNodeConfig, type ProcessStateNodeResult, type Product, type ProductCtx, type QuantitiesByPath, RESERVED_FULFILLMENT_STATUSES, type RecommendationType, RecurringDateCron, type RedeemPaymentRow, type RemoveRedeemInput, type ReorderOrderOptions, type ResetOptions, type ResolveRouteEligibilityInput, type ResolvedPaymentEligibility, type ResumeFromAdvanceConfig, type ReversalOutcome, type ReverseAllOptions, type RouteEligibility, type RouteEligibilityDetail, type RouteEligibilityFlags, type RouteEligibilityReason, type RouteFailureClassification, type RouteFailureKind, type RouteHealthEvent, type RouteHealthListener, type RouteHealthSnapshot, type RouteTenderCandidate, RulesEngine, type RunNodeCallbacksResult, SCHEDULED_AT_ERROR_CODES, SCHEDULED_ORDER_MAX_HORIZON_HOURS, SCHEDULED_ORDER_MAX_HORIZON_MINUTES, SCHEDULED_ORDER_MIN_LEAD_MINUTES, SCHEDULED_ORDER_SLOT_MINUTES, SCHEDULED_STATUS, SDK_PAYMENT_ELIGIBILITY_CEILINGS, STATE_ALGO, STATE_HASH_PREFIX, type ScheduleSlot, type ScheduleSlotCart, type ScheduleSlotCartLine, type ScheduleWindow, type ScheduledSuccessorConfig, type SdkPaymentEligibility, type SelectionStatus, type SelectionsByPath, type SerializedError, type ServiceHttpOptions, type SimpleTenderPayment, type Snapshot, type StateGoldenRootVector, type StateGoldenVector, type StateGoldenVectors, type StateManifest, type StateManifestSection, type StateRootInput, type StateScope, type StateVectorFailure, type StepOutcome, type StorefrontAccessToken, type StorefrontErrorDetails, StorefrontHttpError, type SwitchCustomerArg, type SwitchCustomerIdToken, type SwitchCustomerOptions, type SwitchCustomerResult, TLS_FINGERPRINT_RESPONSE_HEADER, TLS_PIN_HEADER, type TestLocalServerHealthOptions, TlsFingerprintMismatchError, TokenExchangeError, type TrackWorkflow, type ValidateOptions, type ValidateOrderAgainstMenuInput, type Variant, type VariantGroup, type VariantGroupCtx, type VariantOptionCtx, type VariantSelection, type VerifyWebhookSignatureInput, type VisitedState, WORKFLOW_SCHEMA_VERSION, WORKFLOW_TIMEOUT, WorkflowSchemaVersionError, type WorkflowTimeoutDetails, addLines, advanceAndEnter, appendEngineStepLog, appendNodeLog, applyCmsVisibility, applyFees, applyManualAdvanceNote, assertSupportedWorkflowSchemaVersion, auth, autoEnterSuccessTerminal, base64UrlDecode, base64UrlEncode, beginEngineStepLog, buildCustomerSnapshot, buildEngineCallbackError, buildEngineCallbackRun, buildRouteHttpOptions, buildRulesEngineFromOrder, buildScheduleSlots, buildWorkflowTimeoutDetails, callbackIdsFromNode, canEnterJoin, canPauseNow, cancelTypeOf, canonicalNumber, canonicalString, canonicalize, canonicalizeJson, capRedeems, cappedRedeems, cardBrandSpec, cardDigits, cardNumberGaps, cardNumberMaxLength, cardPreviewGroups, caretAfterDigits, certFingerprintsMatch, certMatchesAnyPin, classifyRouteFailure, clearDeviceSecrets, clearEdgeTaken, clearNodeVisit, cmsVisibilityNeedsTimezone, collectCheckoutIssues, collectOrderLineDiffs, completeEngineStepLog, computeOrderExpiresAt, computeStartingPrice, configureDeviceSecrets, configureLocalTlsPinning, countCartProducts, coveredAmount, createCanonicalizationError, createDeunaWidgetApi, createDeviceSecretsStore, createNodePinnedFetch, createSession, currentNodes, cvcMaxLength, defaultConditionError, defaultIsPaymentCaptured, defaultOutgoingEdge, defaultWebhookEventsForStatus, defaultWebhookRetryDelayMs, detectCardBrand, dispatchOrderWebhooks, dispatchPendingWebhooks, engineHmacSha256Hex, engineOrderStatusForFailedRun, engineWebhookDeliveryId, engineWebhookRunsForEnteredNodes, engineWebhookStatusKey, engineWebhookTransitionStates, enterAndPause, enterWorkflowNode, executeAdvance, executeScheduledWake, executeStart, failActiveEngineStepLog, finalizePlaceOrder, findFirstState, findLocaleKey, findMappedStatusNode, findNodeById, findShippingFeeLine, findStartNode, fitRedeems, flattenMenuCategories, flushLogs, formatCardNumber, formatCvc, formatExpiry, formatLocalServerUrl, formatRecurringDateCronSummary, fromOrderLines, fulfillmentStatusesEqual, genId, genOrderId, getLocalTlsPinning, getLogContext, getOrigin, getRouteHealth, getScheduleWindow, getSecret, hasInFlightPayment, hasLocalTlsPinning, hasSmartRouting, hpkeOpen, hpkeSeal, incomingEdges, indexMenu, indexOutgoingBySource, injectingMetadataFromCallback, invokeCallbackAttempt, isCanonicalizationError, isCardNumberComplete, isCardNumberDefinitelyInvalid, isCheckoutFieldFilled, isCustomerInfoFieldFilled, isCustomerInfoPlaceholder, isCustomerInfoValueValid, isCvcComplete, isDelegatedSessionExpiredError, isDeliveryFee, isDeviceCharged, isDeviceNotLinked, isExpiredFulfillment, isExpiryComplete, isGenId, isInterruptTerminalStatus, isKioskUnauthorized, isLocalOrderUnknown, isMilestoneStepDone, isNodeRuntime, isOnSchedule, isOrderNotOpenError, isOrderPaymentRequiredError, isOrderRouteUnavailableError, isOrderValidationError, isPosDeviceNotLinked, isPosUnauthorized, isRealPaymentMethod, isReservedFulfillmentStatus, isRouteCircuitOpen, isScheduleSlot, isScheduledAtError, isShippingFeeLine, isStateHash, isStorefrontNotFound, isSupportedWorkflowSchemaVersion, isTerminalFulfillmentStatus, isTerminalMappedStatus, isTlsFingerprintMismatchError, isVariantBase, linePayableTotal, listMenusStream, listSecretKeys, localizePosError, log, logError, luhnCheck, markEdgeTaken, markNodeEntered, markNodeExited, markNodeSkipped, markNodesAdvance, markNodesReady, markRouteDown, markRouteHealthy, matchAbsoluteDateOperator, matchBooleanOperator, matchCurrencyOperator, matchEnumOperator, matchNumberOperator, matchRecurringDateOperator, matchRelativeDateOperator, matchStringOperator, matchingPrimaryOutgoing, milestoneSteps, milestoneTrack, nestMenuCategories, nextCurrentNodeIds, normalizeCardholderName, normalizeCertFingerprint, normalizeCustomerPhone, normalizeFulfillmentStatus, normalizeLocaleKey, normalizeMaxIncompleteMinutes, normalizePickupName, normalizeStateScope, onOriginChange, onRouteHealth, orderFactsFromOrder, orderFieldsFromNode, orderPayableTotal, orderRedeemedTotal, orderRedeems, orderStatusForFulfillmentStatus, outgoingEdges, parseExpiry, parseLosslessJson, pathKindForTargetNode, pauseForAdvance, paymentMatchesClientConditions, pendingWebhooksOf, pickAdvanceTarget, pickMultiLanguageText, placeCartLines, probeLocalRouteHealth, processStateNode, rebuildOrderLinesWithFees, rebuildRootGroups, recomputeTotals, redeemedTotal, redeemsForPayment, redemptionCap, redemptionSteps, remainingAmount, removeLine, replaceLine, resolveAdvanceEdge, resolveAdvanceEdges, resolveCallbackFailTerminal, resolveCheckout, resolveFailureTerminalEdge, resolveLocalPins, resolveLocalRouteUrl, resolveModifierImageUrl, resolveOrderRouteEligibility, resolvePaymentEligibility, resolveSchedulePrepMinutes, resolveSdkPaymentEligibilityCeiling, resolveSuccessTerminalEdges, resolveWebhookTargetUrl, resumeFromAdvance, reversePayment, reversedWhenCaptured, roundFeeAmount, runIsTerminal, runNodeCallbacks, runPaymentAttempt, runStateGoldenVectors, scheduledInstant, scheduledSuccessorStatus, selectMatchingFees, selectablePayments, serializeError, services, setLineQuantity, settleEnter, sha256Hex, sha256HexOfString, sittingWorkflowNode, stateRootHash, stateScopeKey, stateSectionHash, stateSectionHashOfJson, storefrontJson, stripFeeLines, stubUnsupportedFeeAmount, summarizeRecurringDateCron, syncDeviceSecrets, testLocalServerHealth, toOrderLines, toPaymentCardBrand, unusedOutgoing, utf8Encode, validateCardNumber, validateCardholderName, validateCvc, validateExpiry, validateOrderAgainstMenu, validatePickupName, verifyLocalRoutePin, verifyWebhookSignature, visitedStates, warnNoEdge, workflowSchemaVersionOf };
|
|
4314
|
+
export { type AdvanceAndEnterConfig, type AdvanceAndEnterResult, type ApplyRedeemInput, type AuthConfigureOptions, type BuildRouteHttpInput, type BuildScheduleSlotsConfig, CALLBACK_MISSING_LOCAL_URL, CANONICAL_MAX_DEPTH, CANONICAL_MAX_EXPONENT, CARD_BRANDS, CUSTOMER_INFO_PLACEHOLDERS, type CallbackMissingLocalUrlDetails, type CanonicalInput, type CanonicalizationError, type CanonicalizationErrorCode, type CardBrand, type CardBrandSpec, type CardCvcError, type CardExpiry, type CardExpiryError, type CardNumberError, type CardPreviewSlot, type CardholderNameError, type CmsBlockScope, type CmsVisibilityBlock, type CmsVisibilityContext, type CmsVisibilityRules, type CreateOrderOptions, type CreateSessionOptions, type CustomizationPath, type CustomizationSession, DEFAULT_LOCALE, DEFAULT_MAX_INCOMPLETE_MINUTES, DEFAULT_MAX_SNAPSHOT_AGE_MS, DEFAULT_RECOMMENDATION_TYPES, DEFAULT_ROUTE_COOLDOWN_MS, DEFAULT_WEBHOOK_TIMEOUT_S, DelegatedSessionExpiredError, type DeunaCallbackUrls, type DeunaOrderStatus, type DeviceSecretStorage, type DeviceSecretsConfigureOptions, type DeviceSecretsPayload, type DeviceSecretsStore, type DispatchWebhooksConfig, type EngineCallbackRun, type EngineCallbackRunError, type EngineExecutionContext, type EngineFlagReviewInput, type EngineFulfillmentPatch, type EngineOrder, type EngineOrderChangedEvent, type EngineOrderFulfillment, type EngineOrderStatus, type EngineOrderStatusPatch, type EngineScope, type EngineStepLog, type EngineStepLogEntry, type EngineStepsLogs, type EngineWebhookEnvelope, type EngineWebhookFailureEvent, type EngineWebhookNodeRun, type EngineWebhookTarget, type EnterAndPauseResult, type EnterRunResult, type ExchangeOptions, FULFILLMENT_WORKFLOW_TERMINAL_STATUSES, type FailedCharge, type FinalizePlaceOrderConfig, type FiresparkOrigin, type FlatMenuCategory, type FulfillmentEligibilityInput, type FulfillmentExecutionPort, type FulfillmentPorts, type FulfillmentRunStatus, type FulfillmentStepName, type FulfillmentStoragePort, type FulfillmentTerminalOrderStatus, type GenOrderIdOptions, type GetCmsBlockOptions, type GroupDisplayType, HPKE_ALG, type HpkeAead, type HpkeEnvelope, type HpkeOpenInput, type HpkePrivateJwk, type HpkePublicJwk, type HpkeSealInput, ID_HASH_FORMATS, type IdBuilder, type IdHashFormat, type InvokeCallbackAttemptConfig, type InvokeCallbackAttemptResult, type ListMenusStreamOptions, type ListPaymentsOptions, type LocalDeviceCredentials, type LocalRouteProbeResult, type LocalServerConfig, type LocalServerHealthResult, LosslessNumber, type LosslessNumberLike, MAX_MAX_INCOMPLETE_MINUTES, MAX_SUPPORTED_WORKFLOW_SCHEMA_VERSION, MIN_MAX_INCOMPLETE_MINUTES, MODE_HINT_HEADER, type MarkRouteDownInput, type Menu, type MenuCategoryNode, type MenuLookup, type MilestoneSteps, type MilestoneTrackItem, type ModifierControlType, type ModifierCtx, type ModifierGroupCtx, type NestedMenuCategory, OFFLINE_NO_LOCAL_URL, ORIGIN_HEADER, Order, OrderAuthPinnedError, type OrderCancelInput, type OrderCancelOptions, type OrderCancelResult, type OrderCancelType, type OrderCustomerSource, type OrderDeviceCredential, type OrderDraft, type OrderIssue, type OrderIssueCode, type OrderLineDiff, type OrderLineIssue, type OrderLineIssueCode, OrderNotOpenError, OrderPaymentRequiredError, type OrderRouteKind, type OrderRouteStatus, OrderRouteUnavailableError, type OrderRoutes, type OrderScope, OrderSyncPendingError, OrderSyncRejectedError, OrderValidationError, type OrderValidationResult, type OriginListener, type OriginState, type PauseForAdvanceConfig, type PayIntentOptions, type PayIntentResult, type PayOptions, type PaymentCardBrand, type PaymentEligibilityInput, type PaymentProgressEvent, type PaymentProgressListener, type PaymentRunOptions, type PaymentSessionOptions, type PendingWebhooks, PickupNameIssue, type PinnedFetchFactory, type PinnedFetchOptions, type PosOrderHttpOptions, type PricingModifier, type ProbeLocalRouteHealthOptions, type ProcessStateNodeCallbackJob, type ProcessStateNodeConfig, type ProcessStateNodeResult, type Product, type ProductCtx, type QuantitiesByPath, RESERVED_FULFILLMENT_STATUSES, type RecommendationType, RecurringDateCron, type RedeemPaymentRow, type RemoveRedeemInput, type ReorderOrderOptions, type ResetOptions, type ResolveRouteEligibilityInput, type ResolvedPaymentEligibility, type ResumeFromAdvanceConfig, type ReversalOutcome, type ReverseAllOptions, type RouteEligibility, type RouteEligibilityDetail, type RouteEligibilityFlags, type RouteEligibilityReason, type RouteFailureClassification, type RouteFailureKind, type RouteHealthEvent, type RouteHealthListener, type RouteHealthSnapshot, type RouteTenderCandidate, RulesEngine, type RunNodeCallbacksResult, SCHEDULED_AT_ERROR_CODES, SCHEDULED_ORDER_MAX_HORIZON_HOURS, SCHEDULED_ORDER_MAX_HORIZON_MINUTES, SCHEDULED_ORDER_MIN_LEAD_MINUTES, SCHEDULED_ORDER_SLOT_MINUTES, SCHEDULED_STATUS, SDK_PAYMENT_ELIGIBILITY_CEILINGS, STATE_ALGO, STATE_HASH_PREFIX, type ScheduleSlot, type ScheduleSlotCart, type ScheduleSlotCartLine, type ScheduleWindow, type ScheduledSuccessorConfig, type SdkPaymentEligibility, type SelectionStatus, type SelectionsByPath, type SerializedError, type ServiceHttpOptions, type SimpleTenderPayment, type Snapshot, type StateGoldenRootVector, type StateGoldenVector, type StateGoldenVectors, type StateManifest, type StateManifestSection, type StateRootInput, type StateScope, type StateVectorFailure, type StepOutcome, type StorefrontAccessToken, type StorefrontErrorDetails, StorefrontHttpError, type SwitchCustomerArg, type SwitchCustomerIdToken, type SwitchCustomerOptions, type SwitchCustomerResult, TLS_FINGERPRINT_RESPONSE_HEADER, TLS_PIN_HEADER, type TestLocalServerHealthOptions, TlsFingerprintMismatchError, TokenExchangeError, type TrackWorkflow, type ValidateOptions, type ValidateOrderAgainstMenuInput, type Variant, type VariantGroup, type VariantGroupCtx, type VariantOptionCtx, type VariantSelection, type VerifyWebhookSignatureInput, type VisitedState, WORKFLOW_SCHEMA_VERSION, WORKFLOW_TIMEOUT, WorkflowSchemaVersionError, type WorkflowTimeoutDetails, addLines, advanceAndEnter, appendEngineStepLog, appendNodeLog, applyCmsVisibility, applyFees, applyManualAdvanceNote, assertSupportedWorkflowSchemaVersion, auth, autoEnterSuccessTerminal, base64UrlDecode, base64UrlEncode, beginEngineStepLog, buildCustomerSnapshot, buildEngineCallbackError, buildEngineCallbackRun, buildRouteHttpOptions, buildRulesEngineFromOrder, buildScheduleSlots, buildWorkflowTimeoutDetails, callbackIdsFromNode, canEnterJoin, canPauseNow, cancelTypeOf, canonicalNumber, canonicalString, canonicalize, canonicalizeJson, capRedeems, cappedRedeems, cardBrandSpec, cardDigits, cardNumberGaps, cardNumberMaxLength, cardPreviewGroups, caretAfterDigits, certFingerprintsMatch, certMatchesAnyPin, classifyRouteFailure, clearDeviceSecrets, clearEdgeTaken, clearNodeVisit, cmsVisibilityNeedsTimezone, collectCheckoutIssues, collectOrderLineDiffs, completeEngineStepLog, computeOrderExpiresAt, computeStartingPrice, configureDeviceSecrets, configureLocalTlsPinning, countCartProducts, coveredAmount, createCanonicalizationError, createDeunaWidgetApi, createDeviceSecretsStore, createNodePinnedFetch, createSession, currentNodes, cvcMaxLength, defaultConditionError, defaultIsPaymentCaptured, defaultOutgoingEdge, defaultWebhookEventsForStatus, defaultWebhookRetryDelayMs, detectCardBrand, dispatchOrderWebhooks, dispatchPendingWebhooks, engineHmacSha256Hex, engineOrderStatusForFailedRun, engineWebhookDeliveryId, engineWebhookRunsForEnteredNodes, engineWebhookStatusKey, engineWebhookTransitionStates, enterAndPause, enterWorkflowNode, executeAdvance, executeScheduledWake, executeStart, failActiveEngineStepLog, finalizePlaceOrder, findFirstState, findLocaleKey, findMappedStatusNode, findNodeById, findShippingFeeLine, findStartNode, fitRedeems, flattenMenuCategories, flushLogs, formatCardNumber, formatCvc, formatExpiry, formatLocalServerUrl, formatRecurringDateCronSummary, fromOrderLines, fulfillmentStatusesEqual, genId, genOrderId, getLocalTlsPinning, getLogContext, getOrigin, getRouteHealth, getScheduleWindow, getSecret, hasInFlightPayment, hasLocalTlsPinning, hasSmartRouting, hpkeOpen, hpkeSeal, incomingEdges, indexMenu, indexOutgoingBySource, injectingMetadataFromCallback, invokeCallbackAttempt, isCanonicalizationError, isCardNumberComplete, isCardNumberDefinitelyInvalid, isCheckoutFieldFilled, isCustomerInfoFieldFilled, isCustomerInfoPlaceholder, isCustomerInfoValueValid, isCvcComplete, isDelegatedSessionExpiredError, isDeliveryFee, isDeviceCharged, isDeviceNotLinked, isExpiredFulfillment, isExpiryComplete, isGenId, isInterruptTerminalStatus, isKioskUnauthorized, isLocalOrderUnknown, isMilestoneStepDone, isNodeRuntime, isOnSchedule, isOrderNotOpenError, isOrderPaymentRequiredError, isOrderRouteUnavailableError, isOrderValidationError, isPosDeviceNotLinked, isPosUnauthorized, isRealPaymentMethod, isReservedFulfillmentStatus, isRouteCircuitOpen, isScheduleSlot, isScheduledAtError, isShippingFeeLine, isStateHash, isStorefrontNotFound, isSupportedWorkflowSchemaVersion, isTerminalFulfillmentStatus, isTerminalMappedStatus, isTlsFingerprintMismatchError, isVariantBase, linePayableTotal, listMenusStream, listSecretKeys, localizePosError, log, logError, luhnCheck, markEdgeTaken, markNodeEntered, markNodeExited, markNodeSkipped, markNodesAdvance, markNodesReady, markRouteDown, markRouteHealthy, matchAbsoluteDateOperator, matchBooleanOperator, matchCurrencyOperator, matchEnumOperator, matchNumberOperator, matchRecurringDateOperator, matchRelativeDateOperator, matchStringOperator, matchingPrimaryOutgoing, milestoneSteps, milestoneTrack, nestMenuCategories, nextCurrentNodeIds, normalizeCardholderName, normalizeCertFingerprint, normalizeCustomerPhone, normalizeFulfillmentStatus, normalizeLocaleKey, normalizeMaxIncompleteMinutes, normalizePickupName, normalizeStateScope, onOriginChange, onRouteHealth, orderFactsFromOrder, orderFieldsFromNode, orderPayableTotal, orderRedeemedTotal, orderRedeems, orderStatusForFulfillmentStatus, outgoingEdges, parseExpiry, parseLosslessJson, pathKindForTargetNode, pauseForAdvance, paymentMatchesClientConditions, pendingWebhooksOf, pickAdvanceTarget, pickLocalizedText, pickMultiLanguageText, placeCartLines, probeLocalRouteHealth, processStateNode, rebuildOrderLinesWithFees, rebuildRootGroups, recomputeTotals, redeemedTotal, redeemsForPayment, redemptionCap, redemptionSteps, remainingAmount, removeLine, replaceLine, resolveAdvanceEdge, resolveAdvanceEdges, resolveCallbackFailTerminal, resolveCheckout, resolveFailureTerminalEdge, resolveLocalPins, resolveLocalRouteUrl, resolveModifierImageUrl, resolveOrderRouteEligibility, resolvePaymentEligibility, resolveSchedulePrepMinutes, resolveSdkPaymentEligibilityCeiling, resolveSuccessTerminalEdges, resolveWebhookTargetUrl, resumeFromAdvance, reversePayment, reversedWhenCaptured, roundFeeAmount, runIsTerminal, runNodeCallbacks, runPaymentAttempt, runStateGoldenVectors, scheduledInstant, scheduledSuccessorStatus, selectMatchingFees, selectablePayments, serializeError, services, setLineQuantity, settleEnter, sha256Hex, sha256HexOfString, sittingWorkflowNode, stateRootHash, stateScopeKey, stateSectionHash, stateSectionHashOfJson, storefrontJson, stripFeeLines, stubUnsupportedFeeAmount, summarizeRecurringDateCron, syncDeviceSecrets, testLocalServerHealth, toOrderLines, toPaymentCardBrand, unusedOutgoing, utf8Encode, validateCardNumber, validateCardholderName, validateCvc, validateExpiry, validateOrderAgainstMenu, validatePickupName, verifyLocalRoutePin, verifyWebhookSignature, visitedStates, warnNoEdge, workflowSchemaVersionOf };
|
package/dist/index.js
CHANGED
|
@@ -2626,6 +2626,8 @@ const getPosLogDevice = () => {
|
|
|
2626
2626
|
};
|
|
2627
2627
|
//#endregion
|
|
2628
2628
|
//#region src/services/http.ts
|
|
2629
|
+
const SDK_VERSION_HEADER = "X-Firespark-Sdk-Version";
|
|
2630
|
+
const SDK_PROTOCOL_VERSION = "0.43.0";
|
|
2629
2631
|
var StorefrontHttpError = class extends Error {
|
|
2630
2632
|
status;
|
|
2631
2633
|
/** `details.code` when present, else the top-level `code`. */
|
|
@@ -2702,6 +2704,7 @@ const storefrontRequest = async (path, init = {}, options = {}) => {
|
|
|
2702
2704
|
return withAuthRetry(options, (accessToken) => {
|
|
2703
2705
|
const headers = new Headers(init.headers);
|
|
2704
2706
|
headers.set("Authorization", `Bearer ${accessToken}`);
|
|
2707
|
+
if (!headers.has("X-Firespark-Sdk-Version")) headers.set(SDK_VERSION_HEADER, SDK_PROTOCOL_VERSION);
|
|
2705
2708
|
if (init.body && !headers.has("Content-Type")) headers.set("Content-Type", "application/json");
|
|
2706
2709
|
const signal = options.signal ?? init.signal;
|
|
2707
2710
|
const req = {
|
|
@@ -5400,6 +5403,7 @@ const posBases = (options) => {
|
|
|
5400
5403
|
const posFetch = async (path, init, options) => {
|
|
5401
5404
|
const fetchImpl = options?.fetchImpl ?? fetch;
|
|
5402
5405
|
const headers = new Headers(init.headers);
|
|
5406
|
+
if (!headers.has("X-Firespark-Sdk-Version")) headers.set(SDK_VERSION_HEADER, SDK_PROTOCOL_VERSION);
|
|
5403
5407
|
if (init.body && !headers.has("Content-Type")) headers.set("Content-Type", "application/json");
|
|
5404
5408
|
const signal = options?.signal ?? init.signal;
|
|
5405
5409
|
const req = {
|
|
@@ -7385,23 +7389,48 @@ const languageOf = (locale) => {
|
|
|
7385
7389
|
const firstNonEmpty = (value) => {
|
|
7386
7390
|
return Object.values(value).find((text) => text.trim());
|
|
7387
7391
|
};
|
|
7392
|
+
const matchLocale = (value, locale) => {
|
|
7393
|
+
const exactKey = findLocaleKey(value, locale);
|
|
7394
|
+
const exact = exactKey ? value[exactKey] : void 0;
|
|
7395
|
+
if (exact?.trim()) return exact.trim();
|
|
7396
|
+
const lang = languageOf(locale);
|
|
7397
|
+
if (lang) {
|
|
7398
|
+
const baseKey = findLocaleKey(value, lang);
|
|
7399
|
+
const baseText = baseKey ? value[baseKey] : void 0;
|
|
7400
|
+
if (baseText?.trim()) return baseText.trim();
|
|
7401
|
+
const siblingKey = Object.keys(value).find((key) => {
|
|
7402
|
+
return languageOf(key) === lang && Boolean(value[key]?.trim());
|
|
7403
|
+
});
|
|
7404
|
+
const siblingText = siblingKey ? value[siblingKey] : void 0;
|
|
7405
|
+
if (siblingText?.trim()) return siblingText.trim();
|
|
7406
|
+
}
|
|
7407
|
+
};
|
|
7388
7408
|
const pickMultiLanguageText = (value, locale, fallback = "") => {
|
|
7389
7409
|
if (value == null) return fallback;
|
|
7390
7410
|
if (typeof value === "string") return value || fallback;
|
|
7391
7411
|
if (locale) {
|
|
7392
|
-
const
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7412
|
+
const hit = matchLocale(value, locale);
|
|
7413
|
+
if (hit) return hit;
|
|
7414
|
+
}
|
|
7415
|
+
return firstNonEmpty(value)?.trim() ?? fallback;
|
|
7416
|
+
};
|
|
7417
|
+
/**
|
|
7418
|
+
* Resolves a localized text map (or legacy plain string) with fallback chain:
|
|
7419
|
+
* exact `locale` -> base language -> `merchantLocale` (exact -> base) ->
|
|
7420
|
+
* first non-empty entry -> `fallback`.
|
|
7421
|
+
*/
|
|
7422
|
+
const pickLocalizedText = (value, locale, merchantLocale, fallback = "") => {
|
|
7423
|
+
if (value == null) return fallback;
|
|
7424
|
+
if (typeof value === "string") return value.trim() || fallback;
|
|
7425
|
+
if (locale) {
|
|
7426
|
+
const hit = matchLocale(value, locale);
|
|
7427
|
+
if (hit) return hit;
|
|
7428
|
+
}
|
|
7429
|
+
if (merchantLocale) {
|
|
7430
|
+
const hit = matchLocale(value, merchantLocale);
|
|
7431
|
+
if (hit) return hit;
|
|
7403
7432
|
}
|
|
7404
|
-
return firstNonEmpty(value) ?? fallback;
|
|
7433
|
+
return firstNonEmpty(value)?.trim() ?? fallback;
|
|
7405
7434
|
};
|
|
7406
7435
|
//#endregion
|
|
7407
7436
|
//#region src/order/fees.ts
|
|
@@ -17947,4 +17976,4 @@ const hpkeOpen = async (input) => {
|
|
|
17947
17976
|
return new Uint8Array(opened);
|
|
17948
17977
|
};
|
|
17949
17978
|
//#endregion
|
|
17950
|
-
export { CALLBACK_MISSING_LOCAL_URL, CANONICAL_MAX_DEPTH, CANONICAL_MAX_EXPONENT, CARD_BRANDS, CUSTOMER_INFO_PLACEHOLDERS, DEFAULT_LOCALE, DEFAULT_MAX_INCOMPLETE_MINUTES, DEFAULT_MAX_SNAPSHOT_AGE_MS, DEFAULT_RECOMMENDATION_TYPES, DEFAULT_ROUTE_COOLDOWN_MS, DEFAULT_WEBHOOK_TIMEOUT_S, DelegatedSessionExpiredError, FULFILLMENT_WORKFLOW_TERMINAL_STATUSES, HPKE_ALG, ID_HASH_FORMATS, LosslessNumber, MAX_MAX_INCOMPLETE_MINUTES, MAX_SUPPORTED_WORKFLOW_SCHEMA_VERSION, MIN_MAX_INCOMPLETE_MINUTES, MODE_HINT_HEADER, OFFLINE_NO_LOCAL_URL, ORIGIN_HEADER, Order, OrderAuthPinnedError, OrderNotOpenError, OrderPaymentRequiredError, OrderRouteUnavailableError, OrderSyncPendingError, OrderSyncRejectedError, OrderValidationError, RESERVED_FULFILLMENT_STATUSES, RecurringDateCron, RulesEngine, SCHEDULED_AT_ERROR_CODES, SCHEDULED_ORDER_MAX_HORIZON_HOURS, SCHEDULED_ORDER_MAX_HORIZON_MINUTES, SCHEDULED_ORDER_MIN_LEAD_MINUTES, SCHEDULED_ORDER_SLOT_MINUTES, SCHEDULED_STATUS, SDK_PAYMENT_ELIGIBILITY_CEILINGS, STATE_ALGO, STATE_HASH_PREFIX, StorefrontHttpError, TLS_FINGERPRINT_RESPONSE_HEADER, TLS_PIN_HEADER, TlsFingerprintMismatchError, TokenExchangeError, WORKFLOW_SCHEMA_VERSION, WORKFLOW_TIMEOUT, WorkflowSchemaVersionError, addLines, advanceAndEnter, appendEngineStepLog, appendNodeLog, applyCmsVisibility, applyFees, applyManualAdvanceNote, assertSupportedWorkflowSchemaVersion, auth, autoEnterSuccessTerminal, base64UrlDecode, base64UrlEncode, beginEngineStepLog, buildCustomerSnapshot, buildEngineCallbackError, buildEngineCallbackRun, buildRouteHttpOptions, buildRulesEngineFromOrder, buildScheduleSlots, buildWorkflowTimeoutDetails, callbackIdsFromNode, canEnterJoin, canPauseNow, cancelTypeOf, canonicalNumber, canonicalString, canonicalize, canonicalizeJson, capRedeems, cappedRedeems, cardBrandSpec, cardDigits, cardNumberGaps, cardNumberMaxLength, cardPreviewGroups, caretAfterDigits, certFingerprintsMatch, certMatchesAnyPin, classifyRouteFailure, clearDeviceSecrets, clearEdgeTaken, clearNodeVisit, cmsVisibilityNeedsTimezone, collectCheckoutIssues, collectOrderLineDiffs, completeEngineStepLog, computeOrderExpiresAt, computeStartingPrice, configureDeviceSecrets, configureLocalTlsPinning, countCartProducts, coveredAmount, createCanonicalizationError, createDeunaWidgetApi, createDeviceSecretsStore, createNodePinnedFetch, createSession, currentNodes, cvcMaxLength, defaultConditionError, defaultIsPaymentCaptured, defaultOutgoingEdge, defaultWebhookEventsForStatus, defaultWebhookRetryDelayMs, detectCardBrand, dispatchOrderWebhooks, dispatchPendingWebhooks, engineHmacSha256Hex, engineOrderStatusForFailedRun, engineWebhookDeliveryId, engineWebhookRunsForEnteredNodes, engineWebhookStatusKey, engineWebhookTransitionStates, enterAndPause, enterWorkflowNode, executeAdvance, executeScheduledWake, executeStart, failActiveEngineStepLog, finalizePlaceOrder, findFirstState, findLocaleKey, findMappedStatusNode, findNodeById, findShippingFeeLine, findStartNode, fitRedeems, flattenMenuCategories, flushLogs, formatCardNumber, formatCvc, formatExpiry, formatLocalServerUrl, formatRecurringDateCronSummary, fromOrderLines, fulfillmentStatusesEqual, genId, genOrderId, getLocalTlsPinning, getLogContext, getOrigin, getRouteHealth, getScheduleWindow, getSecret, hasInFlightPayment, hasLocalTlsPinning, hasSmartRouting, hpkeOpen, hpkeSeal, incomingEdges, indexMenu, indexOutgoingBySource, injectingMetadataFromCallback, invokeCallbackAttempt, isCanonicalizationError, isCardNumberComplete, isCardNumberDefinitelyInvalid, isCheckoutFieldFilled, isCustomerInfoFieldFilled, isCustomerInfoPlaceholder, isCustomerInfoValueValid, isCvcComplete, isDelegatedSessionExpiredError, isDeliveryFee, isDeviceCharged, isDeviceNotLinked, isExpiredFulfillment, isExpiryComplete, isGenId, isInterruptTerminalStatus, isKioskUnauthorized, isLocalOrderUnknown, isMilestoneStepDone, isNodeRuntime, isOnSchedule, isOrderNotOpenError, isOrderPaymentRequiredError, isOrderRouteUnavailableError, isOrderValidationError, isPosDeviceNotLinked, isPosUnauthorized, isRealPaymentMethod, isReservedFulfillmentStatus, isRouteCircuitOpen, isScheduleSlot, isScheduledAtError, isShippingFeeLine, isStateHash, isStorefrontNotFound, isSupportedWorkflowSchemaVersion, isTerminalFulfillmentStatus, isTerminalMappedStatus, isTlsFingerprintMismatchError, isVariantBase, linePayableTotal, listMenusStream, listSecretKeys, localizePosError, log, logError, luhnCheck, markEdgeTaken, markNodeEntered, markNodeExited, markNodeSkipped, markNodesAdvance, markNodesReady, markRouteDown, markRouteHealthy, matchAbsoluteDateOperator, matchBooleanOperator, matchCurrencyOperator, matchEnumOperator, matchNumberOperator, matchRecurringDateOperator, matchRelativeDateOperator, matchStringOperator, matchingPrimaryOutgoing, milestoneSteps, milestoneTrack, nestMenuCategories, nextCurrentNodeIds, normalizeCardholderName, normalizeCertFingerprint, normalizeCustomerPhone, normalizeFulfillmentStatus, normalizeLocaleKey, normalizeMaxIncompleteMinutes, normalizePickupName, normalizeStateScope, onOriginChange, onRouteHealth, orderFactsFromOrder, orderFieldsFromNode, orderPayableTotal, orderRedeemedTotal, orderRedeems, orderStatusForFulfillmentStatus, outgoingEdges, parseExpiry, parseLosslessJson, pathKindForTargetNode, pauseForAdvance, paymentMatchesClientConditions, pendingWebhooksOf, pickAdvanceTarget, pickMultiLanguageText, placeCartLines, probeLocalRouteHealth, processStateNode, rebuildOrderLinesWithFees, rebuildRootGroups, recomputeTotals, redeemedTotal, redeemsForPayment, redemptionCap, redemptionSteps, remainingAmount, removeLine, replaceLine, resolveAdvanceEdge, resolveAdvanceEdges, resolveCallbackFailTerminal, resolveCheckout, resolveFailureTerminalEdge, resolveLocalPins, resolveLocalRouteUrl, resolveModifierImageUrl, resolveOrderRouteEligibility, resolvePaymentEligibility, resolveSchedulePrepMinutes, resolveSdkPaymentEligibilityCeiling, resolveSuccessTerminalEdges, resolveWebhookTargetUrl, resumeFromAdvance, reversePayment, reversedWhenCaptured, roundFeeAmount, runIsTerminal, runNodeCallbacks, runPaymentAttempt, runStateGoldenVectors, scheduledInstant, scheduledSuccessorStatus, selectMatchingFees, selectablePayments, serializeError, services, setLineQuantity, settleEnter, sha256Hex, sha256HexOfString, sittingWorkflowNode, stateRootHash, stateScopeKey, stateSectionHash, stateSectionHashOfJson, storefrontJson, stripFeeLines, stubUnsupportedFeeAmount, summarizeRecurringDateCron, syncDeviceSecrets, testLocalServerHealth, toOrderLines, toPaymentCardBrand, unusedOutgoing, utf8Encode, validateCardNumber, validateCardholderName, validateCvc, validateExpiry, validateOrderAgainstMenu, validatePickupName, verifyLocalRoutePin, verifyWebhookSignature, visitedStates, warnNoEdge, workflowSchemaVersionOf };
|
|
17979
|
+
export { CALLBACK_MISSING_LOCAL_URL, CANONICAL_MAX_DEPTH, CANONICAL_MAX_EXPONENT, CARD_BRANDS, CUSTOMER_INFO_PLACEHOLDERS, DEFAULT_LOCALE, DEFAULT_MAX_INCOMPLETE_MINUTES, DEFAULT_MAX_SNAPSHOT_AGE_MS, DEFAULT_RECOMMENDATION_TYPES, DEFAULT_ROUTE_COOLDOWN_MS, DEFAULT_WEBHOOK_TIMEOUT_S, DelegatedSessionExpiredError, FULFILLMENT_WORKFLOW_TERMINAL_STATUSES, HPKE_ALG, ID_HASH_FORMATS, LosslessNumber, MAX_MAX_INCOMPLETE_MINUTES, MAX_SUPPORTED_WORKFLOW_SCHEMA_VERSION, MIN_MAX_INCOMPLETE_MINUTES, MODE_HINT_HEADER, OFFLINE_NO_LOCAL_URL, ORIGIN_HEADER, Order, OrderAuthPinnedError, OrderNotOpenError, OrderPaymentRequiredError, OrderRouteUnavailableError, OrderSyncPendingError, OrderSyncRejectedError, OrderValidationError, RESERVED_FULFILLMENT_STATUSES, RecurringDateCron, RulesEngine, SCHEDULED_AT_ERROR_CODES, SCHEDULED_ORDER_MAX_HORIZON_HOURS, SCHEDULED_ORDER_MAX_HORIZON_MINUTES, SCHEDULED_ORDER_MIN_LEAD_MINUTES, SCHEDULED_ORDER_SLOT_MINUTES, SCHEDULED_STATUS, SDK_PAYMENT_ELIGIBILITY_CEILINGS, STATE_ALGO, STATE_HASH_PREFIX, StorefrontHttpError, TLS_FINGERPRINT_RESPONSE_HEADER, TLS_PIN_HEADER, TlsFingerprintMismatchError, TokenExchangeError, WORKFLOW_SCHEMA_VERSION, WORKFLOW_TIMEOUT, WorkflowSchemaVersionError, addLines, advanceAndEnter, appendEngineStepLog, appendNodeLog, applyCmsVisibility, applyFees, applyManualAdvanceNote, assertSupportedWorkflowSchemaVersion, auth, autoEnterSuccessTerminal, base64UrlDecode, base64UrlEncode, beginEngineStepLog, buildCustomerSnapshot, buildEngineCallbackError, buildEngineCallbackRun, buildRouteHttpOptions, buildRulesEngineFromOrder, buildScheduleSlots, buildWorkflowTimeoutDetails, callbackIdsFromNode, canEnterJoin, canPauseNow, cancelTypeOf, canonicalNumber, canonicalString, canonicalize, canonicalizeJson, capRedeems, cappedRedeems, cardBrandSpec, cardDigits, cardNumberGaps, cardNumberMaxLength, cardPreviewGroups, caretAfterDigits, certFingerprintsMatch, certMatchesAnyPin, classifyRouteFailure, clearDeviceSecrets, clearEdgeTaken, clearNodeVisit, cmsVisibilityNeedsTimezone, collectCheckoutIssues, collectOrderLineDiffs, completeEngineStepLog, computeOrderExpiresAt, computeStartingPrice, configureDeviceSecrets, configureLocalTlsPinning, countCartProducts, coveredAmount, createCanonicalizationError, createDeunaWidgetApi, createDeviceSecretsStore, createNodePinnedFetch, createSession, currentNodes, cvcMaxLength, defaultConditionError, defaultIsPaymentCaptured, defaultOutgoingEdge, defaultWebhookEventsForStatus, defaultWebhookRetryDelayMs, detectCardBrand, dispatchOrderWebhooks, dispatchPendingWebhooks, engineHmacSha256Hex, engineOrderStatusForFailedRun, engineWebhookDeliveryId, engineWebhookRunsForEnteredNodes, engineWebhookStatusKey, engineWebhookTransitionStates, enterAndPause, enterWorkflowNode, executeAdvance, executeScheduledWake, executeStart, failActiveEngineStepLog, finalizePlaceOrder, findFirstState, findLocaleKey, findMappedStatusNode, findNodeById, findShippingFeeLine, findStartNode, fitRedeems, flattenMenuCategories, flushLogs, formatCardNumber, formatCvc, formatExpiry, formatLocalServerUrl, formatRecurringDateCronSummary, fromOrderLines, fulfillmentStatusesEqual, genId, genOrderId, getLocalTlsPinning, getLogContext, getOrigin, getRouteHealth, getScheduleWindow, getSecret, hasInFlightPayment, hasLocalTlsPinning, hasSmartRouting, hpkeOpen, hpkeSeal, incomingEdges, indexMenu, indexOutgoingBySource, injectingMetadataFromCallback, invokeCallbackAttempt, isCanonicalizationError, isCardNumberComplete, isCardNumberDefinitelyInvalid, isCheckoutFieldFilled, isCustomerInfoFieldFilled, isCustomerInfoPlaceholder, isCustomerInfoValueValid, isCvcComplete, isDelegatedSessionExpiredError, isDeliveryFee, isDeviceCharged, isDeviceNotLinked, isExpiredFulfillment, isExpiryComplete, isGenId, isInterruptTerminalStatus, isKioskUnauthorized, isLocalOrderUnknown, isMilestoneStepDone, isNodeRuntime, isOnSchedule, isOrderNotOpenError, isOrderPaymentRequiredError, isOrderRouteUnavailableError, isOrderValidationError, isPosDeviceNotLinked, isPosUnauthorized, isRealPaymentMethod, isReservedFulfillmentStatus, isRouteCircuitOpen, isScheduleSlot, isScheduledAtError, isShippingFeeLine, isStateHash, isStorefrontNotFound, isSupportedWorkflowSchemaVersion, isTerminalFulfillmentStatus, isTerminalMappedStatus, isTlsFingerprintMismatchError, isVariantBase, linePayableTotal, listMenusStream, listSecretKeys, localizePosError, log, logError, luhnCheck, markEdgeTaken, markNodeEntered, markNodeExited, markNodeSkipped, markNodesAdvance, markNodesReady, markRouteDown, markRouteHealthy, matchAbsoluteDateOperator, matchBooleanOperator, matchCurrencyOperator, matchEnumOperator, matchNumberOperator, matchRecurringDateOperator, matchRelativeDateOperator, matchStringOperator, matchingPrimaryOutgoing, milestoneSteps, milestoneTrack, nestMenuCategories, nextCurrentNodeIds, normalizeCardholderName, normalizeCertFingerprint, normalizeCustomerPhone, normalizeFulfillmentStatus, normalizeLocaleKey, normalizeMaxIncompleteMinutes, normalizePickupName, normalizeStateScope, onOriginChange, onRouteHealth, orderFactsFromOrder, orderFieldsFromNode, orderPayableTotal, orderRedeemedTotal, orderRedeems, orderStatusForFulfillmentStatus, outgoingEdges, parseExpiry, parseLosslessJson, pathKindForTargetNode, pauseForAdvance, paymentMatchesClientConditions, pendingWebhooksOf, pickAdvanceTarget, pickLocalizedText, pickMultiLanguageText, placeCartLines, probeLocalRouteHealth, processStateNode, rebuildOrderLinesWithFees, rebuildRootGroups, recomputeTotals, redeemedTotal, redeemsForPayment, redemptionCap, redemptionSteps, remainingAmount, removeLine, replaceLine, resolveAdvanceEdge, resolveAdvanceEdges, resolveCallbackFailTerminal, resolveCheckout, resolveFailureTerminalEdge, resolveLocalPins, resolveLocalRouteUrl, resolveModifierImageUrl, resolveOrderRouteEligibility, resolvePaymentEligibility, resolveSchedulePrepMinutes, resolveSdkPaymentEligibilityCeiling, resolveSuccessTerminalEdges, resolveWebhookTargetUrl, resumeFromAdvance, reversePayment, reversedWhenCaptured, roundFeeAmount, runIsTerminal, runNodeCallbacks, runPaymentAttempt, runStateGoldenVectors, scheduledInstant, scheduledSuccessorStatus, selectMatchingFees, selectablePayments, serializeError, services, setLineQuantity, settleEnter, sha256Hex, sha256HexOfString, sittingWorkflowNode, stateRootHash, stateScopeKey, stateSectionHash, stateSectionHashOfJson, storefrontJson, stripFeeLines, stubUnsupportedFeeAmount, summarizeRecurringDateCron, syncDeviceSecrets, testLocalServerHealth, toOrderLines, toPaymentCardBrand, unusedOutgoing, utf8Encode, validateCardNumber, validateCardholderName, validateCvc, validateExpiry, validateOrderAgainstMenu, validatePickupName, verifyLocalRoutePin, verifyWebhookSignature, visitedStates, warnNoEdge, workflowSchemaVersionOf };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fire-spark/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "Fire Spark headless SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"big.js": "6.2.1",
|
|
21
21
|
"dayjs": "1.11.9",
|
|
22
22
|
"@types/big.js": "6.2.2",
|
|
23
|
-
"@fire-spark/payments": "^0.
|
|
24
|
-
"@fire-spark/types": "^0.
|
|
23
|
+
"@fire-spark/payments": "^0.43.0",
|
|
24
|
+
"@fire-spark/types": "^0.43.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"tsdown": "^0.22.14",
|