@apextelemed/partner-core 0.10.0-dev.22 → 0.10.0-dev.23
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/README.md +21 -2
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +3 -3
- package/dist/api/index.jsx +5 -3
- package/dist/chunk/{NSEWFPUP.js → 7MCMXXYQ.js} +50 -3
- package/dist/chunk/7MCMXXYQ.js.map +1 -0
- package/dist/chunk/{TYXWVNC3.js → BNH4UOGN.js} +55 -12
- package/dist/chunk/BNH4UOGN.js.map +1 -0
- package/dist/chunk/{ET3GPUTR.jsx → CLNLTAG7.jsx} +59 -12
- package/dist/chunk/{BALHOD46.jsx → EZG74SQL.jsx} +49 -1
- package/dist/chunk/{DHVOZQQ2.js → FA4D2S5A.js} +3 -3
- package/dist/chunk/{DHVOZQQ2.js.map → FA4D2S5A.js.map} +1 -1
- package/dist/chunk/{OA3A3PUC.jsx → FM3JH2ZD.jsx} +1638 -860
- package/dist/chunk/{L2ZMGXWR.js → JKUWPGEW.js} +31 -6
- package/dist/chunk/JKUWPGEW.js.map +1 -0
- package/dist/chunk/{JL7B6RHG.js → M2LV5JQD.js} +3 -3
- package/dist/chunk/{JL7B6RHG.js.map → M2LV5JQD.js.map} +1 -1
- package/dist/chunk/{CYGHTTCA.js → NHNMRJL6.js} +1715 -905
- package/dist/chunk/NHNMRJL6.js.map +1 -0
- package/dist/chunk/{DBW2RWHV.jsx → RRKAKQ77.jsx} +2 -2
- package/dist/chunk/{QIBVNW2V.jsx → VF7FTWCG.jsx} +2 -2
- package/dist/chunk/{75F4YFYC.jsx → VG35MW6B.jsx} +33 -4
- package/dist/chunk/{ZW2HBOS5.jsx → XW4PEQPI.jsx} +2 -2
- package/dist/chunk/{4CTTOSOW.js → XZXPLS3K.js} +3 -3
- package/dist/chunk/{4CTTOSOW.js.map → XZXPLS3K.js.map} +1 -1
- package/dist/{client-CDpCqI4d.d.ts → client-DsIvVM5a.d.ts} +143 -1
- package/dist/flows/index.d.ts +213 -141
- package/dist/flows/index.js +6 -6
- package/dist/flows/index.jsx +16 -6
- package/dist/index/index.d.ts +2 -2
- package/dist/index/index.js +7 -7
- package/dist/index/index.jsx +19 -7
- package/dist/pages/index.d.ts +2 -2
- package/dist/pages/index.js +5 -5
- package/dist/pages/index.jsx +5 -5
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +2 -2
- package/dist/stores/index.jsx +2 -2
- package/package.json +1 -1
- package/dist/chunk/CYGHTTCA.js.map +0 -1
- package/dist/chunk/L2ZMGXWR.js.map +0 -1
- package/dist/chunk/NSEWFPUP.js.map +0 -1
- package/dist/chunk/TYXWVNC3.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { fetchFunnelConfig, postFunnelEvent, readResumeToken, fetchResumedDraft, stripResumeToken, adoptFunnelSessionId, saveFunnelDraft } from './
|
|
2
|
-
import { cart_default, medication_default, auth_default, affiliateAuth_default } from './
|
|
3
|
-
import { newIdempotencyKey, apexApi, usersApi, addressesApi, catalogApi, paymentsApi, subscriptionsApi, membersApi, supportApi, productsApi, affiliatePortalApi, adminApi, adminCatalogApi, ApiError, ordersApi, messagesApi, authApi } from './
|
|
1
|
+
import { fetchFunnelConfig, postFunnelEvent, readResumeToken, fetchResumedDraft, stripResumeToken, adoptFunnelSessionId, saveFunnelDraft } from './M2LV5JQD.js';
|
|
2
|
+
import { cart_default, medication_default, auth_default, affiliateAuth_default } from './FA4D2S5A.js';
|
|
3
|
+
import { newIdempotencyKey, apexApi, usersApi, addressesApi, catalogApi, paymentsApi, subscriptionsApi, membersApi, supportApi, productsApi, affiliatePortalApi, adminApi, adminCatalogApi, ApiError, ordersApi, messagesApi, authApi } from './7MCMXXYQ.js';
|
|
4
4
|
import { getConfig } from './5XGPFYIJ.js';
|
|
5
5
|
import { createSignal, onMount, createEffect, on, onCleanup, createResource, createMemo } from 'solid-js';
|
|
6
6
|
import { useSurveyV2Flow as useSurveyV2Flow$1 } from '@apextelemed/survey-solid';
|
|
@@ -4471,6 +4471,31 @@ async function uploadPrescriptionPhoto(file) {
|
|
|
4471
4471
|
}
|
|
4472
4472
|
return { photoId: parsed.photoId };
|
|
4473
4473
|
}
|
|
4474
|
+
|
|
4475
|
+
// src/flows/offers.ts
|
|
4476
|
+
function bestOfferDiscount(offers, cart) {
|
|
4477
|
+
if (!offers || cart.baseCents <= 0) return null;
|
|
4478
|
+
let best = null;
|
|
4479
|
+
for (const offer of offers) {
|
|
4480
|
+
const scoped = offer.productIds ?? [];
|
|
4481
|
+
if (scoped.length > 0 && !scoped.some((id) => cart.productIds.includes(id))) continue;
|
|
4482
|
+
const raw = offer.discountType === "percent" ? Math.round(cart.baseCents * offer.discountValueCents / 100) : offer.discountValueCents;
|
|
4483
|
+
const discountCents = Math.min(cart.baseCents, raw);
|
|
4484
|
+
if (discountCents > 0 && (!best || discountCents > best.discountCents)) best = { offer, discountCents };
|
|
4485
|
+
}
|
|
4486
|
+
return best;
|
|
4487
|
+
}
|
|
4488
|
+
function offerBeatsPromo(offerDiscountCents, promoDiscountCents) {
|
|
4489
|
+
return offerDiscountCents > promoDiscountCents;
|
|
4490
|
+
}
|
|
4491
|
+
function offerDurationText(o) {
|
|
4492
|
+
if (o.recurringIndefinite) return "every month";
|
|
4493
|
+
const further = o.recurringCharges ?? 0;
|
|
4494
|
+
return further > 0 ? `your first ${further + 1} charges` : "your first charge";
|
|
4495
|
+
}
|
|
4496
|
+
function offerSummaryText(o) {
|
|
4497
|
+
return `${o.amountText} off ${offerDurationText(o)}`;
|
|
4498
|
+
}
|
|
4474
4499
|
var messageOf = (err, fallback) => err instanceof Error && err.message ? err.message : fallback;
|
|
4475
4500
|
function classifyCatalogError(err) {
|
|
4476
4501
|
const e = err ?? {};
|
|
@@ -5165,6 +5190,6 @@ async function createCatalogProduct(input) {
|
|
|
5165
5190
|
};
|
|
5166
5191
|
}
|
|
5167
5192
|
|
|
5168
|
-
export { ACCOUNT_SOURCE_LABEL, DEFAULT_COLOR_PALETTE, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, LIFECYCLE_TONE, LIVE_SUBSCRIPTION_STATUSES, ORPHAN_REASON, READINESS_LABEL, SUPPORT_CATEGORIES, TERMINAL_SUBSCRIPTION_STATUSES, US_STATES, US_STATE_OPTIONS, accountSource, addCatalogItemAsProduct, applyPriceDrafts, availableStateOptions, availableStates, buildFulfillmentRows, buildMatrixView, buildRefillView, buildStrengthRows, buildTimeline, buildTrackerView, buildTrackingUrl, captureFunnelEmail, catalogUnavailableMessage, categoryColor, categoryLabel, classifyCatalogError, createCatalogProduct, createFunnelTelemetry, deriveAttention, deriveCatalogAvailabilityDecision, deriveJourney, emailGateAnswered, findStoredDosePrice, firstAddressError, fmtDay, formatCalendarDate, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, groupDrugsByPharmacy, hasErrors, hasStateRestrictions, intakeEvidence, invalidDraftKeys, isCatalogItemId, isCssColorValue, isImageAttachment, isLive, isQuestionVisible, isReconcilable, lifecycleReason, lowestPrice, lowestSalePrice, markEmailGateAnswered, moveInOrder, normalizeState, normalizeStates, orphanKey, primarySubscription, readinessStatus, reconcileCartAgainstCatalog, reconcileCartLines, redeemResumeLink, removeStoredDosePrice, resetResumeRedemption, resolveCategoryColor, resolveStrengthPrices, resolveSurveyV2DrugIntent, salePriceForBase, skuBindingModeFor, stateAvailabilityNote, subscribeToSupportTopic, toTrackerRequest, uploadPrescriptionPhoto, upsertDosePrice, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCardTokenizer, useCartCheckoutFlow, useCartReconcile, useCatalog, useCatalogAvailability, useCheckoutFlow, useDashboardData, useMedicationSelect, useMemberPortalData, useMessagesThread, useProductCatalogEditor, useProductDetail, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSurveyFlow, useSurveyV2Flow, useUpdatePaymentMethodFlow, validateAddress };
|
|
5169
|
-
//# sourceMappingURL=
|
|
5170
|
-
//# sourceMappingURL=
|
|
5193
|
+
export { ACCOUNT_SOURCE_LABEL, DEFAULT_COLOR_PALETTE, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, LIFECYCLE_TONE, LIVE_SUBSCRIPTION_STATUSES, ORPHAN_REASON, READINESS_LABEL, SUPPORT_CATEGORIES, TERMINAL_SUBSCRIPTION_STATUSES, US_STATES, US_STATE_OPTIONS, accountSource, addCatalogItemAsProduct, applyPriceDrafts, availableStateOptions, availableStates, bestOfferDiscount, buildFulfillmentRows, buildMatrixView, buildRefillView, buildStrengthRows, buildTimeline, buildTrackerView, buildTrackingUrl, captureFunnelEmail, catalogUnavailableMessage, categoryColor, categoryLabel, classifyCatalogError, createCatalogProduct, createFunnelTelemetry, deriveAttention, deriveCatalogAvailabilityDecision, deriveJourney, emailGateAnswered, findStoredDosePrice, firstAddressError, fmtDay, formatCalendarDate, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, groupDrugsByPharmacy, hasErrors, hasStateRestrictions, intakeEvidence, invalidDraftKeys, isCatalogItemId, isCssColorValue, isImageAttachment, isLive, isQuestionVisible, isReconcilable, lifecycleReason, lowestPrice, lowestSalePrice, markEmailGateAnswered, moveInOrder, normalizeState, normalizeStates, offerBeatsPromo, offerDurationText, offerSummaryText, orphanKey, primarySubscription, readinessStatus, reconcileCartAgainstCatalog, reconcileCartLines, redeemResumeLink, removeStoredDosePrice, resetResumeRedemption, resolveCategoryColor, resolveStrengthPrices, resolveSurveyV2DrugIntent, salePriceForBase, skuBindingModeFor, stateAvailabilityNote, subscribeToSupportTopic, toTrackerRequest, uploadPrescriptionPhoto, upsertDosePrice, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCardTokenizer, useCartCheckoutFlow, useCartReconcile, useCatalog, useCatalogAvailability, useCheckoutFlow, useDashboardData, useMedicationSelect, useMemberPortalData, useMessagesThread, useProductCatalogEditor, useProductDetail, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSurveyFlow, useSurveyV2Flow, useUpdatePaymentMethodFlow, validateAddress };
|
|
5194
|
+
//# sourceMappingURL=JKUWPGEW.js.map
|
|
5195
|
+
//# sourceMappingURL=JKUWPGEW.js.map
|