@apextelemed/partner-core 0.6.4 → 0.8.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/README.md +2 -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/{cart-D4mVX_zx.d.ts → cart-o6DpAu5y.d.ts} +1 -0
- package/dist/chunk/{4ZSZHZQV.jsx → 2OOCTPLG.jsx} +2 -2
- package/dist/chunk/{MLXPHJLR.js → 4HOG2LES.js} +7 -3
- package/dist/chunk/4HOG2LES.js.map +1 -0
- package/dist/chunk/{5HNZ7SEM.jsx → 6UXFHBE2.jsx} +45 -219
- package/dist/chunk/{HXMLRDIJ.jsx → AW6DQGQR.jsx} +647 -122
- package/dist/chunk/{NSRQXBHK.js → EHKYRS2R.js} +25 -189
- package/dist/chunk/EHKYRS2R.js.map +1 -0
- package/dist/chunk/{YJEHCCLY.js → EXXI5Y7I.js} +4 -3
- package/dist/chunk/EXXI5Y7I.js.map +1 -0
- package/dist/chunk/{WLEIDQ5M.jsx → GL3OY7W5.jsx} +6 -2
- package/dist/chunk/{ZDBW3JDO.jsx → GNPMRN6O.jsx} +3348 -1428
- package/dist/chunk/{QTGJY3YQ.js → HEQMD3X4.js} +3 -3
- package/dist/chunk/{QTGJY3YQ.js.map → HEQMD3X4.js.map} +1 -1
- package/dist/chunk/{WUE4VQBA.js → HKXDH266.js} +520 -23
- package/dist/chunk/HKXDH266.js.map +1 -0
- package/dist/chunk/{MTCQREMZ.js → HYLIHVIE.js} +4176 -2111
- package/dist/chunk/HYLIHVIE.js.map +1 -0
- package/dist/chunk/{EVCGDF5D.jsx → JF2KCOOX.jsx} +18 -1
- package/dist/chunk/{NBB2VTQK.jsx → QAFLR3EN.jsx} +2 -2
- package/dist/chunk/{2OXI5TKO.jsx → RSMUKR4J.jsx} +3 -2
- package/dist/chunk/{BEDW4XUM.js → RUA3XYFO.js} +19 -3
- package/dist/chunk/RUA3XYFO.js.map +1 -0
- package/dist/chunk/{BVLA7ATM.js → ZOZBYBNI.js} +3 -3
- package/dist/chunk/{BVLA7ATM.js.map → ZOZBYBNI.js.map} +1 -1
- package/dist/{client-B6Kt7LWo.d.ts → client-ZnA3JEbd.d.ts} +91 -8
- package/dist/flows/index.d.ts +246 -13
- package/dist/flows/index.js +6 -6
- package/dist/flows/index.jsx +31 -13
- package/dist/index/index.d.ts +4 -4
- package/dist/index/index.js +8 -8
- package/dist/index/index.jsx +48 -16
- package/dist/pages/index.d.ts +41 -6
- package/dist/pages/index.js +5 -5
- package/dist/pages/index.jsx +19 -7
- package/dist/primitives/default/index.js +1 -1
- package/dist/primitives/default/index.jsx +1 -1
- package/dist/stores/index.d.ts +2 -2
- package/dist/stores/index.js +2 -2
- package/dist/stores/index.jsx +2 -2
- package/dist/testing/seam-suite.js +1 -1
- package/dist/theme/admin.css +406 -1
- package/dist/theme/member-portal.css +5 -5
- package/package.json +1 -1
- package/dist/chunk/BEDW4XUM.js.map +0 -1
- package/dist/chunk/MLXPHJLR.js.map +0 -1
- package/dist/chunk/MTCQREMZ.js.map +0 -1
- package/dist/chunk/NSRQXBHK.js.map +0 -1
- package/dist/chunk/WUE4VQBA.js.map +0 -1
- package/dist/chunk/YJEHCCLY.js.map +0 -1
package/dist/flows/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Accessor, Resource } from 'solid-js';
|
|
2
|
-
import { A as AddressVerifyResult,
|
|
3
|
-
import { C as CartItem } from '../cart-
|
|
2
|
+
import { A as AddressVerifyResult, aa as CheckoutAddress, a7 as CatalogAvailabilityResult, b8 as User, ao as DeliveryInfo, aN as RenewalStatus, aG as PendingRenewalSurvey, r as AdminLifecycleBucket, j as AdminCustomerOverview, E as AdminSubscriptionDetail, l as AdminCustomerRequest, a_ as SupportThreadCategory, a8 as CatalogProduct, O as AffiliateConversion, S as AffiliateDownlineMember, P as AffiliateDashboardLinks, R as AffiliateDashboardStats, aJ as PromoValidationResponse } from '../client-ZnA3JEbd.js';
|
|
3
|
+
import { C as CartItem } from '../cart-o6DpAu5y.js';
|
|
4
4
|
export { U as UseSurveyV2FlowOptions, u as useSurveyV2Flow } from '../surveyV2-BgQHK0GE.js';
|
|
5
5
|
import { EmbedEvent } from '@apextelemed/survey-solid';
|
|
6
6
|
export { SurveyV2Flow, SurveyV2Outcome } from '@apextelemed/survey-solid';
|
|
@@ -97,7 +97,7 @@ interface SurveyFlow {
|
|
|
97
97
|
declare function useSurveyFlow(options?: UseSurveyFlowOptions): SurveyFlow;
|
|
98
98
|
|
|
99
99
|
declare const US_STATES: readonly string[];
|
|
100
|
-
/** Options for a state `<Select>`,
|
|
100
|
+
/** Options for a state `<Select>`, labeled by full name. */
|
|
101
101
|
declare const US_STATE_OPTIONS: Array<{
|
|
102
102
|
value: string;
|
|
103
103
|
label: string;
|
|
@@ -203,6 +203,64 @@ interface AddressPair {
|
|
|
203
203
|
*/
|
|
204
204
|
declare function useAddressPair(options?: UseAddressPairOptions): AddressPair;
|
|
205
205
|
|
|
206
|
+
interface CatalogAvailabilityDecision {
|
|
207
|
+
/** Requested ids confirmed unavailable (available:false && checked:true),
|
|
208
|
+
* in the result's order. Always empty when `degraded`. */
|
|
209
|
+
unavailableIds: string[];
|
|
210
|
+
/** True only when at least one id is confirmed unavailable and the
|
|
211
|
+
* answer was NOT degraded — the one signal a caller should ever block on. */
|
|
212
|
+
blocking: boolean;
|
|
213
|
+
/** True when the backend fell back to fail-open because Apex was
|
|
214
|
+
* unreachable (every id answered `available: true`). Advisory: surfaces
|
|
215
|
+
* for telemetry/UI, never a reason to block. */
|
|
216
|
+
degraded: boolean;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Pure response → decision mapping, kept separate from the hook so it's
|
|
220
|
+
* unit-testable without Solid or a network mock. `null`/`undefined` (no
|
|
221
|
+
* result yet, or a request that errored) decides exactly like an empty,
|
|
222
|
+
* non-degraded result: nothing blocks.
|
|
223
|
+
*/
|
|
224
|
+
declare function deriveCatalogAvailabilityDecision(result: CatalogAvailabilityResult | null | undefined): CatalogAvailabilityDecision;
|
|
225
|
+
interface CatalogAvailabilityState {
|
|
226
|
+
/** True while a check is in flight (including the debounce window). */
|
|
227
|
+
loading: Accessor<boolean>;
|
|
228
|
+
/** True only when at least one requested id is confirmed unavailable in the
|
|
229
|
+
* current state and the answer wasn't degraded. The one flag a submit/pay
|
|
230
|
+
* guard should gate on. */
|
|
231
|
+
blocking: Accessor<boolean>;
|
|
232
|
+
/** True when the last check fell back to fail-open (Apex unreachable).
|
|
233
|
+
* Never gate blocking on this — it means the opposite. */
|
|
234
|
+
degraded: Accessor<boolean>;
|
|
235
|
+
/** Requested ids currently confirmed unavailable, in result order. */
|
|
236
|
+
unavailableIds: Accessor<string[]>;
|
|
237
|
+
/** Per-id lookup over `unavailableIds`. */
|
|
238
|
+
isUnavailable: (id: string) => boolean;
|
|
239
|
+
/** Resolves once no check is pending (debouncing or in flight). A submit
|
|
240
|
+
* handler awaits this before reading `blocking()`: otherwise a patient who
|
|
241
|
+
* changes state and clicks Pay inside the debounce window pays unchecked.
|
|
242
|
+
* Never rejects. */
|
|
243
|
+
settled: () => Promise<void>;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Debounced (~300ms) per-item availability check, re-run whenever `ids` or
|
|
247
|
+
* `state` change. Skips the call entirely when there are no ids or `state`
|
|
248
|
+
* isn't a 2-letter code — no point asking, and it keeps an empty cart or an
|
|
249
|
+
* unfinished address field from firing a request. Last request wins: a
|
|
250
|
+
* response for a superseded (ids, state) pair is dropped instead of
|
|
251
|
+
* clobbering a newer one. Any thrown error (network, timeout, a thrown
|
|
252
|
+
* ApiError) is treated as "not blocking" — this check is advisory and must
|
|
253
|
+
* never itself stop a checkout the backend would otherwise allow.
|
|
254
|
+
*/
|
|
255
|
+
declare function useCatalogAvailability(ids: Accessor<string[]>, state: Accessor<string | null | undefined>): CatalogAvailabilityState;
|
|
256
|
+
/**
|
|
257
|
+
* Standard copy for a line a patient can't have shipped to their chosen
|
|
258
|
+
* state: "<item> isn't available for delivery to <State>." `state` is a
|
|
259
|
+
* 2-letter code; rendered via address.ts's canonical full-name lookup so it
|
|
260
|
+
* reads the same as the rest of the address UI ("Arizona", not "AZ").
|
|
261
|
+
*/
|
|
262
|
+
declare function catalogUnavailableMessage(itemName: string, state: string): string;
|
|
263
|
+
|
|
206
264
|
interface RequestStatus {
|
|
207
265
|
status: 'pending' | 'approved' | 'denied' | 'new';
|
|
208
266
|
drugName?: string;
|
|
@@ -260,7 +318,7 @@ interface UseCheckoutFlowOptions {
|
|
|
260
318
|
* purchasable, so the card form is shown immediately after the survey instead
|
|
261
319
|
* of only after a prescriber approves. Off by default — the standard flow
|
|
262
320
|
* collects payment only on an `approved` request. When on, the backend's
|
|
263
|
-
* approved+paid
|
|
321
|
+
* approved+paid fulfillment gate still holds the order until a prescriber
|
|
264
322
|
* approves; this only moves WHEN the card is collected, not what ships.
|
|
265
323
|
*/
|
|
266
324
|
allowPendingPurchase?: boolean;
|
|
@@ -272,6 +330,12 @@ interface CheckoutFlow {
|
|
|
272
330
|
* <AddressFields address={flow.address} />. */
|
|
273
331
|
address: AddressPair;
|
|
274
332
|
pricing: Accessor<PricingBreakdown>;
|
|
333
|
+
/** Per-item deliverability for this request's drug in the current shipping
|
|
334
|
+
* state (a catalog item routed to a pharmacy that doesn't serve it). Per
|
|
335
|
+
* ITEM, on top of the tenant-level `unavailableStates` gating. Re-runs
|
|
336
|
+
* debounced on shipping-state changes; `submit()` refuses while
|
|
337
|
+
* `availability.blocking()` is true. */
|
|
338
|
+
availability: CatalogAvailabilityState;
|
|
275
339
|
hasPaymentMethod: Accessor<boolean>;
|
|
276
340
|
/** True once the card tokenizer is ready. Gate submission on this. */
|
|
277
341
|
tokenizerReady: Accessor<boolean>;
|
|
@@ -349,6 +413,13 @@ interface CartCheckoutFlow {
|
|
|
349
413
|
/** Subscription-flagged cart items excluded from this purchase, so pages can
|
|
350
414
|
* tell the customer those aren't part of the order. */
|
|
351
415
|
skippedSubscriptionItems: Accessor<CartItem[]>;
|
|
416
|
+
/** Per-item deliverability for the cart's lines in the current shipping
|
|
417
|
+
* state — a catalog item routed to a pharmacy that doesn't serve that
|
|
418
|
+
* state. Per ITEM, on top of (not instead of) the tenant-level
|
|
419
|
+
* `unavailableStates` gating the address dropdown already applies. Re-runs
|
|
420
|
+
* debounced whenever the cart or shipping state changes; `submit()` refuses
|
|
421
|
+
* while `availability.blocking()` is true. */
|
|
422
|
+
availability: CatalogAvailabilityState;
|
|
352
423
|
pricing: Accessor<CartCheckoutPricing>;
|
|
353
424
|
/** True once the card tokenizer is ready. Gate submission on this. */
|
|
354
425
|
tokenizerReady: Accessor<boolean>;
|
|
@@ -382,6 +453,11 @@ declare function useCartCheckoutFlow(): CartCheckoutFlow;
|
|
|
382
453
|
|
|
383
454
|
type SignupOutcome = {
|
|
384
455
|
kind: 'in_progress';
|
|
456
|
+
}
|
|
457
|
+
/** `requireCart` is on and the cart is empty — the site should send the
|
|
458
|
+
* visitor to its catalog before any step is shown. */
|
|
459
|
+
| {
|
|
460
|
+
kind: 'needs_cart';
|
|
385
461
|
} | {
|
|
386
462
|
kind: 'submitting';
|
|
387
463
|
}
|
|
@@ -399,6 +475,17 @@ interface UseSignupFlowOptions {
|
|
|
399
475
|
membershipIntervalDays?: number;
|
|
400
476
|
/** Label used when the cart is empty. Defaults to "Membership". */
|
|
401
477
|
membershipProductLabel?: string;
|
|
478
|
+
/**
|
|
479
|
+
* Refuse to start with an empty cart. The backend only accepts a cart-less
|
|
480
|
+
* signup for a membership tenant (deferred fulfillment with a configured
|
|
481
|
+
* membership product); every other tenant fans out one subscription per
|
|
482
|
+
* cart item and rejects an empty cart at submit — after the visitor has
|
|
483
|
+
* already filled in account, address and card. With this on, the flow
|
|
484
|
+
* reports `needs_cart` on mount (and again at submit, in case a peer tab
|
|
485
|
+
* emptied the shared cart) so the site can redirect to its catalog first.
|
|
486
|
+
* Default false, which keeps the membership-tenant behavior.
|
|
487
|
+
*/
|
|
488
|
+
requireCart?: boolean;
|
|
402
489
|
/**
|
|
403
490
|
* The verified savings member id to link to the new account (same payload
|
|
404
491
|
* field as the subscription-intake flow). Read at submit time; null/empty
|
|
@@ -553,11 +640,36 @@ type SubscribeOutcome = {
|
|
|
553
640
|
kind: 'completed';
|
|
554
641
|
};
|
|
555
642
|
interface UseSubscribeFlowOptions {
|
|
556
|
-
/**
|
|
643
|
+
/**
|
|
644
|
+
* @deprecated The amount shown and charged now comes from the backend's
|
|
645
|
+
* quote (`POST /subscriptions/preview`), which prices the cart exactly as
|
|
646
|
+
* the charge will. This value is only used as a last-resort estimate for a
|
|
647
|
+
* backend that predates the preview endpoint AND a cart with no prices.
|
|
648
|
+
*/
|
|
557
649
|
membershipAmountCents: number;
|
|
558
650
|
/** Billing interval in days. Default 30. */
|
|
559
651
|
membershipIntervalDays?: number;
|
|
560
652
|
}
|
|
653
|
+
/** What the page shows as "due today", and where the number came from. */
|
|
654
|
+
interface SubscribeQuote {
|
|
655
|
+
/** 'server': the backend's own quote — the number the card will be charged.
|
|
656
|
+
* 'estimate': computed from cart prices because the backend has no preview
|
|
657
|
+
* endpoint yet; correct for per-product tenants, which is every tenant
|
|
658
|
+
* without a membership product. */
|
|
659
|
+
source: 'server' | 'estimate';
|
|
660
|
+
model: 'membership' | 'per_product';
|
|
661
|
+
intervalDays: number;
|
|
662
|
+
lines: Array<{
|
|
663
|
+
productId: string;
|
|
664
|
+
productName: string;
|
|
665
|
+
dosage: string | null;
|
|
666
|
+
quantity: number;
|
|
667
|
+
amountCents: number;
|
|
668
|
+
}>;
|
|
669
|
+
subtotalCents: number;
|
|
670
|
+
discountCents: number;
|
|
671
|
+
totalCents: number;
|
|
672
|
+
}
|
|
561
673
|
interface SubscribeFlow {
|
|
562
674
|
outcome: Accessor<SubscribeOutcome>;
|
|
563
675
|
/** True once the card tokenizer is ready (config loaded; for AuthNet, Accept.js loaded too). Gate submission on this. */
|
|
@@ -571,6 +683,13 @@ interface SubscribeFlow {
|
|
|
571
683
|
acceptJsError: Accessor<string | null>;
|
|
572
684
|
error: Accessor<string | null>;
|
|
573
685
|
submitting: Accessor<boolean>;
|
|
686
|
+
/** The amount due today, server-quoted when the backend supports it. Null
|
|
687
|
+
* while it loads. */
|
|
688
|
+
quote: Accessor<SubscribeQuote | null>;
|
|
689
|
+
/** The backend refused to quote (e.g. this tenant needs a completed survey
|
|
690
|
+
* first). The same refusal the charge would give, surfaced before the
|
|
691
|
+
* customer types a card number. Submission is blocked while set. */
|
|
692
|
+
quoteError: Accessor<string | null>;
|
|
574
693
|
street: Accessor<string>;
|
|
575
694
|
setStreet: (v: string) => void;
|
|
576
695
|
city: Accessor<string>;
|
|
@@ -579,6 +698,18 @@ interface SubscribeFlow {
|
|
|
579
698
|
setState: (v: string) => void;
|
|
580
699
|
zip: Accessor<string>;
|
|
581
700
|
setZip: (v: string) => void;
|
|
701
|
+
/** Per-item deliverability for the cart's lines in the address state above
|
|
702
|
+
* — a catalog item routed to a pharmacy that doesn't serve it. Per ITEM,
|
|
703
|
+
* on top of the tenant-level `unavailableStates` gating `validate()`
|
|
704
|
+
* already applies. `submit()` refuses to charge while
|
|
705
|
+
* `availability.blocking()` is true. */
|
|
706
|
+
availability: CatalogAvailabilityState;
|
|
707
|
+
/** The state the Rx ships to, which is what `availability` checks. The-backend
|
|
708
|
+
* sends the profile address to Apex and falls back to the billing address only
|
|
709
|
+
* when the profile has none (the-backend `routes/subscriptions.ts`, create:
|
|
710
|
+
* `state: userRow.state || billingAddress?.state`), so editing the billing
|
|
711
|
+
* state here doesn't move the shipment. */
|
|
712
|
+
shipState: Accessor<string>;
|
|
582
713
|
cardNumber: Accessor<string>;
|
|
583
714
|
setCardNumber: (v: string) => void;
|
|
584
715
|
expiry: Accessor<string>;
|
|
@@ -635,7 +766,7 @@ interface DashboardData {
|
|
|
635
766
|
subscription: Resource<DashboardSubscription | null>;
|
|
636
767
|
rxStatus: Resource<DashboardRxStatus | null>;
|
|
637
768
|
rxList: Resource<DashboardRxListItem[]>;
|
|
638
|
-
/** Re-fetch the prescription list (e.g. after
|
|
769
|
+
/** Re-fetch the prescription list (e.g. after canceling a request). */
|
|
639
770
|
refetchRxList: () => void;
|
|
640
771
|
pendingSurveys: Resource<PendingRenewalSurvey[]>;
|
|
641
772
|
/** First name from profile or authStore, falling back to "Member". */
|
|
@@ -1079,7 +1210,7 @@ interface MessagesIntent {
|
|
|
1079
1210
|
/** Open this exact conversation/thread; wins over `channel`/`category`. */
|
|
1080
1211
|
threadId?: string;
|
|
1081
1212
|
}
|
|
1082
|
-
/**
|
|
1213
|
+
/** Normalized conversation. The backend passes Apex's record through verbatim
|
|
1083
1214
|
* (the-backend routes/messages.ts → apexMessaging.Conversation), which names
|
|
1084
1215
|
* three of these fields differently; `normalizeConversation` reconciles them so
|
|
1085
1216
|
* consumers only ever see this shape. Support threads are mapped onto the same
|
|
@@ -1099,7 +1230,7 @@ interface Conversation {
|
|
|
1099
1230
|
[key: string]: unknown;
|
|
1100
1231
|
}
|
|
1101
1232
|
/**
|
|
1102
|
-
* One attachment on a message,
|
|
1233
|
+
* One attachment on a message, normalized across sources.
|
|
1103
1234
|
*
|
|
1104
1235
|
* `url` present means the source handed us a directly-usable link (Apex's
|
|
1105
1236
|
* clinical messages do this). Absent means it must be exchanged for a
|
|
@@ -1212,12 +1343,17 @@ declare function useMessagesThread(options?: UseMessagesThreadOptions): Messages
|
|
|
1212
1343
|
* falling back to the product-level price. Returns null for free / unpriced products. */
|
|
1213
1344
|
declare function lowestPrice(product: CatalogProduct): number | null;
|
|
1214
1345
|
/**
|
|
1215
|
-
*
|
|
1216
|
-
* percent/fixed discount the backend applied at the product level.
|
|
1217
|
-
* the strikethrough lands on the displayed (lowest-tier) value.
|
|
1346
|
+
* Sale price for an arbitrary base price on a product, re-deriving the same
|
|
1347
|
+
* percent/fixed discount the backend applied at the product level.
|
|
1218
1348
|
*
|
|
1219
1349
|
* Returns null when no active sale, no discount, or insufficient data.
|
|
1220
1350
|
*/
|
|
1351
|
+
declare function salePriceForBase(product: CatalogProduct, basePrice: number | null): number | null;
|
|
1352
|
+
/**
|
|
1353
|
+
* Lowest sale price for a tiered product. Used so the strikethrough lands on
|
|
1354
|
+
* the displayed (lowest-tier) value — `salePriceForBase` applied to the
|
|
1355
|
+
* product's cheapest dose.
|
|
1356
|
+
*/
|
|
1221
1357
|
declare function lowestSalePrice(product: CatalogProduct, basePrice: number | null): number | null;
|
|
1222
1358
|
interface CatalogFlow {
|
|
1223
1359
|
products: Resource<CatalogProduct[]>;
|
|
@@ -1277,6 +1413,75 @@ interface UseMedicationSelectOptions {
|
|
|
1277
1413
|
*/
|
|
1278
1414
|
declare function useMedicationSelect(options?: UseMedicationSelectOptions): MedicationSelectFlow;
|
|
1279
1415
|
|
|
1416
|
+
/** Why a line was dropped from the cart. */
|
|
1417
|
+
type CartDropReason =
|
|
1418
|
+
/** No product with this id in the catalog — deleted, or no longer active. */
|
|
1419
|
+
'unavailable'
|
|
1420
|
+
/** In the catalog, but no price resolves for this dose (an unpriced stub).
|
|
1421
|
+
* Left in, it would submit as a $0 order: the backend snapshots
|
|
1422
|
+
* `Number(price ?? 0)`. A deliberate 0.00 is priced, and is kept. */
|
|
1423
|
+
| 'unpriced'
|
|
1424
|
+
/** In the catalog, but not linked to an Apex drug, so it cannot be
|
|
1425
|
+
* prescribed. Only ever reported when `requireApexDrug` is set. */
|
|
1426
|
+
| 'not_prescribable';
|
|
1427
|
+
interface DroppedCartLine {
|
|
1428
|
+
item: CartItem;
|
|
1429
|
+
reason: CartDropReason;
|
|
1430
|
+
}
|
|
1431
|
+
interface CartReconciliation {
|
|
1432
|
+
/** The cart as it should now be — survivors, with refreshed snapshots. */
|
|
1433
|
+
items: CartItem[];
|
|
1434
|
+
dropped: DroppedCartLine[];
|
|
1435
|
+
/** Survivors whose stored snapshot no longer matched the catalog. */
|
|
1436
|
+
refreshed: CartItem[];
|
|
1437
|
+
/** False when the catalog could not be read; the cart was left untouched. */
|
|
1438
|
+
checked: boolean;
|
|
1439
|
+
}
|
|
1440
|
+
interface ReconcileOptions {
|
|
1441
|
+
/**
|
|
1442
|
+
* Drop lines with no linked Apex drug. Set on the prescription path (the v2
|
|
1443
|
+
* survey), where every cart line becomes a prescription request and an
|
|
1444
|
+
* unlinked product is a guaranteed failure at submit time. Off by default:
|
|
1445
|
+
* a cart may legitimately hold non-Apex items on sites that also sell them.
|
|
1446
|
+
*/
|
|
1447
|
+
requireApexDrug?: boolean;
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* Pure reconciliation of cart lines against a catalog snapshot.
|
|
1451
|
+
*
|
|
1452
|
+
* Deliberately keeps a line whose *dose* is no longer offered: the backend
|
|
1453
|
+
* reconciles a requested dose against the drug's canonical Apex dosages at
|
|
1454
|
+
* request time, so it is not a dead line — it just re-prices here (the dose
|
|
1455
|
+
* overlay is gone, so the product's base price applies).
|
|
1456
|
+
*/
|
|
1457
|
+
declare function reconcileCartLines(items: CartItem[], products: CatalogProduct[], opts?: ReconcileOptions): CartReconciliation;
|
|
1458
|
+
/**
|
|
1459
|
+
* Reconcile the live cart against the catalog and write the result back.
|
|
1460
|
+
*
|
|
1461
|
+
* Fails OPEN in every direction: an empty cart short-circuits without a
|
|
1462
|
+
* request, and a catalog fetch that errors leaves the cart exactly as it was
|
|
1463
|
+
* (`checked: false`). Shopping must never break because this could not run —
|
|
1464
|
+
* the backend stays the authority on what is actually submittable.
|
|
1465
|
+
*/
|
|
1466
|
+
declare function reconcileCartAgainstCatalog(opts?: ReconcileOptions): Promise<CartReconciliation>;
|
|
1467
|
+
interface CartReconcileState {
|
|
1468
|
+
/** Lines removed because the catalog no longer offers them. */
|
|
1469
|
+
dropped: Accessor<DroppedCartLine[]>;
|
|
1470
|
+
/** Lines kept, with a snapshot refreshed from the catalog. */
|
|
1471
|
+
refreshed: Accessor<CartItem[]>;
|
|
1472
|
+
/** True while the catalog is being read. */
|
|
1473
|
+
pending: Accessor<boolean>;
|
|
1474
|
+
}
|
|
1475
|
+
/**
|
|
1476
|
+
* Reconcile the persisted cart against the catalog once, on mount.
|
|
1477
|
+
*
|
|
1478
|
+
* Mount it in the app shell (the layout that renders the cart drawer) so it
|
|
1479
|
+
* runs once per session, before the shopper can act on a stale line. Surface
|
|
1480
|
+
* `dropped` — a shopper whose item vanishes without a word will assume the
|
|
1481
|
+
* site lost it.
|
|
1482
|
+
*/
|
|
1483
|
+
declare function useCartReconcile(opts?: ReconcileOptions): CartReconcileState;
|
|
1484
|
+
|
|
1280
1485
|
interface AffiliateStatsFlow {
|
|
1281
1486
|
stats: Resource<AffiliateDashboardStats | null>;
|
|
1282
1487
|
refetch: () => void;
|
|
@@ -1319,6 +1524,28 @@ interface CategoryColorOpts {
|
|
|
1319
1524
|
palette?: readonly string[];
|
|
1320
1525
|
}
|
|
1321
1526
|
declare function categoryColor(id: string, opts?: CategoryColorOpts): string;
|
|
1527
|
+
/**
|
|
1528
|
+
* True when `value` can go straight into a CSS color property: a hex, a color
|
|
1529
|
+
* function (`rgb()`, `hsl()`, `oklch()`, …) or a bare `var(--x)`. A category's
|
|
1530
|
+
* `color` is a free admin-entered string, so anything else — a Tailwind class,
|
|
1531
|
+
* or text carrying `;` / `url(` — is not a style value.
|
|
1532
|
+
*/
|
|
1533
|
+
declare function isCssColorValue(value: string): boolean;
|
|
1534
|
+
/**
|
|
1535
|
+
* The color to use for a category: the admin-set `color` from the backend
|
|
1536
|
+
* when it is a CSS color value (see `isCssColorValue`), otherwise the
|
|
1537
|
+
* deterministic hash. Always returns something safe to put in a `style`
|
|
1538
|
+
* color property. Pass the same `opts` you would pass to `categoryColor` so
|
|
1539
|
+
* the fallback stays brand-aligned.
|
|
1540
|
+
*
|
|
1541
|
+
* A site that stores class names in `color` (e.g. `bg-emerald-500`) should read
|
|
1542
|
+
* `category.color` directly and apply it as a class; this falls back to the
|
|
1543
|
+
* hash for those.
|
|
1544
|
+
*/
|
|
1545
|
+
declare function resolveCategoryColor(category: {
|
|
1546
|
+
id: string;
|
|
1547
|
+
color?: string | null;
|
|
1548
|
+
}, opts?: CategoryColorOpts): string;
|
|
1322
1549
|
|
|
1323
1550
|
interface SurveyResult {
|
|
1324
1551
|
surveyResponseId: string;
|
|
@@ -1433,6 +1660,12 @@ interface SubscriptionIntakeFlow {
|
|
|
1433
1660
|
phone: Accessor<string>;
|
|
1434
1661
|
setPhone: (v: string) => void;
|
|
1435
1662
|
address: AddressPair;
|
|
1663
|
+
/** Per-item deliverability for `medication.productId` in the address's
|
|
1664
|
+
* shipping state — a catalog item routed to a pharmacy that doesn't serve
|
|
1665
|
+
* that state. Per ITEM, on top of the tenant-level `unavailableStates`
|
|
1666
|
+
* gating the address step already applies. `submit()` refuses to charge
|
|
1667
|
+
* while `availability.blocking()` is true. */
|
|
1668
|
+
availability: CatalogAvailabilityState;
|
|
1436
1669
|
cardNumber: Accessor<string>;
|
|
1437
1670
|
setCardNumber: (v: string) => void;
|
|
1438
1671
|
expiry: Accessor<string>;
|
|
@@ -1578,7 +1811,7 @@ interface ValidatedResumedPromo {
|
|
|
1578
1811
|
* or when the check itself fails — the cart is restored either way.
|
|
1579
1812
|
*
|
|
1580
1813
|
* Exported because a site with its own `CartSource` needs the same guarantee
|
|
1581
|
-
* without core's cart store: showing a discount checkout won't
|
|
1814
|
+
* without core's cart store: showing a discount checkout won't honor is worse
|
|
1582
1815
|
* than showing none.
|
|
1583
1816
|
*/
|
|
1584
1817
|
declare function validateResumedPromo(resumed: ResumedCart): Promise<ValidatedResumedPromo | null>;
|
|
@@ -1602,4 +1835,4 @@ declare function restoreCartFromLink(): Promise<ResumedCart | null>;
|
|
|
1602
1835
|
*/
|
|
1603
1836
|
declare function startCartCapture(opts?: CartCaptureOptions): () => void;
|
|
1604
1837
|
|
|
1605
|
-
export { type AccountSource, type AddressErrors, type AddressPair, type AddressValue, type AffiliateConversionsFlow, type AffiliateDownlineFlow, type AffiliateLinksFlow, type AffiliateStatsFlow, type AnswerValue, type AttentionAction, type AttentionActionKind, type AttentionItem, type CartCaptureOptions, type CartCheckoutFlow, type CartCheckoutOutcome, type CartCheckoutPricing, type CartSource, type CatalogFlow, CatalogProduct, type CategoryColorOpts, type CheckoutFlow, type CheckoutOutcome, type Conversation, DEFAULT_COLOR_PALETTE, type DashboardActivityItem, type DashboardData, type DashboardRxListItem, type DashboardRxStatus, type DashboardSubscription, type DrugResult, type FlatStep, type FulfillmentStage, type FunnelTelemetry, type JourneyState, type JourneyStep, type JourneyStepKey, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, LIFECYCLE_TONE, LIVE_SUBSCRIPTION_STATUSES, type MedicationPricing, type MedicationSelectFlow, type MemberPortalData, type MemberPortalRx, type MemberPortalSubscription, type MessagesChannel, type MessagesIntent, type MessagesThread, type PricingBreakdown, type ProductDetailFlow, type PromoPricing, type RefillEvent, type RefillView, type RegisterFlow, type RegisterOutcome, type RequestStatus, type RxRequestStatus, type Severity, type ShipmentInfo, type SignupFlow, type SignupOutcome, type StageState, type SubscribeFlow, type SubscribeOutcome, type SubscriptionIntakeFlow, type SubscriptionIntakeOutcome, type SurveyFlow, type SurveyOption, type SurveyOutcome, type SurveyQuestion, type SurveyResult, TERMINAL_SUBSCRIPTION_STATUSES, type ThreadMessage, type TimelineEvent, type TimelineKind, type Tone, type TrackerRequest, type TrackerRequestStatus, type TrackerSubscription, type TrackerSubscriptionStatus, type TrackerView, type TrackingUrlCarrier, US_STATES, US_STATE_OPTIONS, type UpdatePaymentMethodFlow, type UseAddressPairOptions, type UseCheckoutFlowOptions, type UseMedicationSelectOptions, type UseMessagesThreadOptions, type UseSignupFlowOptions, type UseSubscribeFlowOptions, type UseSubscriptionIntakeFlowOptions, type UseSurveyFlowOptions, type ValidateAddressOptions, type ValidatedResumedPromo, type VisibilityCondition, accountSource, availableStateOptions, availableStates, buildRefillView, buildTimeline, buildTrackerView, buildTrackingUrl, captureFunnelEmail, categoryColor, createFunnelTelemetry, deriveAttention, deriveJourney, emailGateAnswered, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, hasErrors, isLive, isQuestionVisible, isReconcilable, lifecycleReason, lowestPrice, lowestSalePrice, markEmailGateAnswered, normalizeState, primarySubscription, redeemResumeLink, resetResumeRedemption, restoreCartFromLink, startCartCapture, stateAvailabilityNote, toTrackerRequest, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCartCheckoutFlow, useCatalog, useCheckoutFlow, useDashboardData, useMedicationSelect, useMemberPortalData, useMessagesThread, useProductDetail, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSubscriptionIntakeFlow, useSurveyFlow, useUpdatePaymentMethodFlow, validateAddress, validateResumedPromo };
|
|
1838
|
+
export { type AccountSource, type AddressErrors, type AddressPair, type AddressValue, type AffiliateConversionsFlow, type AffiliateDownlineFlow, type AffiliateLinksFlow, type AffiliateStatsFlow, type AnswerValue, type AttentionAction, type AttentionActionKind, type AttentionItem, type CartCaptureOptions, type CartCheckoutFlow, type CartCheckoutOutcome, type CartCheckoutPricing, type CartDropReason, type CartReconcileState, type CartReconciliation, type CartSource, type CatalogAvailabilityDecision, type CatalogAvailabilityState, type CatalogFlow, CatalogProduct, type CategoryColorOpts, type CheckoutFlow, type CheckoutOutcome, type Conversation, DEFAULT_COLOR_PALETTE, type DashboardActivityItem, type DashboardData, type DashboardRxListItem, type DashboardRxStatus, type DashboardSubscription, type DroppedCartLine, type DrugResult, type FlatStep, type FulfillmentStage, type FunnelTelemetry, type JourneyState, type JourneyStep, type JourneyStepKey, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, LIFECYCLE_TONE, LIVE_SUBSCRIPTION_STATUSES, type MedicationPricing, type MedicationSelectFlow, type MemberPortalData, type MemberPortalRx, type MemberPortalSubscription, type MessagesChannel, type MessagesIntent, type MessagesThread, type PricingBreakdown, type ProductDetailFlow, type PromoPricing, type ReconcileOptions, type RefillEvent, type RefillView, type RegisterFlow, type RegisterOutcome, type RequestStatus, type RxRequestStatus, type Severity, type ShipmentInfo, type SignupFlow, type SignupOutcome, type StageState, type SubscribeFlow, type SubscribeOutcome, type SubscriptionIntakeFlow, type SubscriptionIntakeOutcome, type SurveyFlow, type SurveyOption, type SurveyOutcome, type SurveyQuestion, type SurveyResult, TERMINAL_SUBSCRIPTION_STATUSES, type ThreadMessage, type TimelineEvent, type TimelineKind, type Tone, type TrackerRequest, type TrackerRequestStatus, type TrackerSubscription, type TrackerSubscriptionStatus, type TrackerView, type TrackingUrlCarrier, US_STATES, US_STATE_OPTIONS, type UpdatePaymentMethodFlow, type UseAddressPairOptions, type UseCheckoutFlowOptions, type UseMedicationSelectOptions, type UseMessagesThreadOptions, type UseSignupFlowOptions, type UseSubscribeFlowOptions, type UseSubscriptionIntakeFlowOptions, type UseSurveyFlowOptions, type ValidateAddressOptions, type ValidatedResumedPromo, type VisibilityCondition, accountSource, availableStateOptions, availableStates, buildRefillView, buildTimeline, buildTrackerView, buildTrackingUrl, captureFunnelEmail, catalogUnavailableMessage, categoryColor, createFunnelTelemetry, deriveAttention, deriveCatalogAvailabilityDecision, deriveJourney, emailGateAnswered, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, hasErrors, isCssColorValue, isLive, isQuestionVisible, isReconcilable, lifecycleReason, lowestPrice, lowestSalePrice, markEmailGateAnswered, normalizeState, primarySubscription, reconcileCartAgainstCatalog, reconcileCartLines, redeemResumeLink, resetResumeRedemption, resolveCategoryColor, restoreCartFromLink, salePriceForBase, startCartCapture, stateAvailabilityNote, toTrackerRequest, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCartCheckoutFlow, useCartReconcile, useCatalog, useCatalogAvailability, useCheckoutFlow, useDashboardData, useMedicationSelect, useMemberPortalData, useMessagesThread, useProductDetail, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSubscriptionIntakeFlow, useSurveyFlow, useUpdatePaymentMethodFlow, validateAddress, validateResumedPromo };
|
package/dist/flows/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../chunk/
|
|
3
|
-
export { LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, LIFECYCLE_TONE, LIVE_SUBSCRIPTION_STATUSES, TERMINAL_SUBSCRIPTION_STATUSES, US_STATES, US_STATE_OPTIONS, accountSource, availableStateOptions, availableStates, buildRefillView, buildTimeline, buildTrackerView, buildTrackingUrl, captureFunnelEmail, createFunnelTelemetry, deriveAttention, deriveJourney, emailGateAnswered, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, hasErrors, isLive, isQuestionVisible, isReconcilable, lifecycleReason, markEmailGateAnswered, normalizeState, primarySubscription, redeemResumeLink, resetResumeRedemption, stateAvailabilityNote, toTrackerRequest, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCartCheckoutFlow, useCheckoutFlow, useDashboardData, useMemberPortalData, useMessagesThread, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSurveyFlow, useSurveyV2Flow, useUpdatePaymentMethodFlow, validateAddress } from '../chunk/
|
|
4
|
-
import '../chunk/
|
|
5
|
-
import '../chunk/
|
|
6
|
-
import '../chunk/
|
|
1
|
+
export { restoreCartFromLink, startCartCapture, useSubscriptionIntakeFlow, validateResumedPromo } from '../chunk/EHKYRS2R.js';
|
|
2
|
+
import '../chunk/ZOZBYBNI.js';
|
|
3
|
+
export { DEFAULT_COLOR_PALETTE, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, LIFECYCLE_TONE, LIVE_SUBSCRIPTION_STATUSES, TERMINAL_SUBSCRIPTION_STATUSES, US_STATES, US_STATE_OPTIONS, accountSource, availableStateOptions, availableStates, buildRefillView, buildTimeline, buildTrackerView, buildTrackingUrl, captureFunnelEmail, catalogUnavailableMessage, categoryColor, createFunnelTelemetry, deriveAttention, deriveCatalogAvailabilityDecision, deriveJourney, emailGateAnswered, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, hasErrors, isCssColorValue, isLive, isQuestionVisible, isReconcilable, lifecycleReason, lowestPrice, lowestSalePrice, markEmailGateAnswered, normalizeState, primarySubscription, reconcileCartAgainstCatalog, reconcileCartLines, redeemResumeLink, resetResumeRedemption, resolveCategoryColor, salePriceForBase, stateAvailabilityNote, toTrackerRequest, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCartCheckoutFlow, useCartReconcile, useCatalog, useCatalogAvailability, useCheckoutFlow, useDashboardData, useMedicationSelect, useMemberPortalData, useMessagesThread, useProductDetail, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSurveyFlow, useSurveyV2Flow, useUpdatePaymentMethodFlow, validateAddress } from '../chunk/HKXDH266.js';
|
|
4
|
+
import '../chunk/HEQMD3X4.js';
|
|
5
|
+
import '../chunk/4HOG2LES.js';
|
|
6
|
+
import '../chunk/RUA3XYFO.js';
|
|
7
7
|
import '../chunk/5XGPFYIJ.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/dist/flows/index.jsx
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
DEFAULT_COLOR_PALETTE,
|
|
3
|
-
categoryColor,
|
|
4
|
-
lowestPrice,
|
|
5
|
-
lowestSalePrice,
|
|
6
2
|
restoreCartFromLink,
|
|
7
3
|
startCartCapture,
|
|
8
|
-
useCatalog,
|
|
9
|
-
useMedicationSelect,
|
|
10
|
-
useProductDetail,
|
|
11
4
|
useSubscriptionIntakeFlow,
|
|
12
5
|
validateResumedPromo
|
|
13
|
-
} from "../chunk/
|
|
14
|
-
import "../chunk/
|
|
6
|
+
} from "../chunk/6UXFHBE2.jsx";
|
|
7
|
+
import "../chunk/2OOCTPLG.jsx";
|
|
15
8
|
import {
|
|
9
|
+
DEFAULT_COLOR_PALETTE,
|
|
16
10
|
LIFECYCLE_BUCKETS,
|
|
17
11
|
LIFECYCLE_LABEL,
|
|
18
12
|
LIFECYCLE_TONE,
|
|
@@ -28,8 +22,11 @@ import {
|
|
|
28
22
|
buildTrackerView,
|
|
29
23
|
buildTrackingUrl,
|
|
30
24
|
captureFunnelEmail,
|
|
25
|
+
catalogUnavailableMessage,
|
|
26
|
+
categoryColor,
|
|
31
27
|
createFunnelTelemetry,
|
|
32
28
|
deriveAttention,
|
|
29
|
+
deriveCatalogAvailabilityDecision,
|
|
33
30
|
deriveJourney,
|
|
34
31
|
emailGateAnswered,
|
|
35
32
|
formatCardNumber,
|
|
@@ -41,15 +38,22 @@ import {
|
|
|
41
38
|
formatRelativeTime,
|
|
42
39
|
formatStageDate,
|
|
43
40
|
hasErrors,
|
|
41
|
+
isCssColorValue,
|
|
44
42
|
isLive,
|
|
45
43
|
isQuestionVisible,
|
|
46
44
|
isReconcilable,
|
|
47
45
|
lifecycleReason,
|
|
46
|
+
lowestPrice,
|
|
47
|
+
lowestSalePrice,
|
|
48
48
|
markEmailGateAnswered,
|
|
49
49
|
normalizeState,
|
|
50
50
|
primarySubscription,
|
|
51
|
+
reconcileCartAgainstCatalog,
|
|
52
|
+
reconcileCartLines,
|
|
51
53
|
redeemResumeLink,
|
|
52
54
|
resetResumeRedemption,
|
|
55
|
+
resolveCategoryColor,
|
|
56
|
+
salePriceForBase,
|
|
53
57
|
stateAvailabilityNote,
|
|
54
58
|
toTrackerRequest,
|
|
55
59
|
useAddressPair,
|
|
@@ -58,10 +62,15 @@ import {
|
|
|
58
62
|
useAffiliateLinks,
|
|
59
63
|
useAffiliateStats,
|
|
60
64
|
useCartCheckoutFlow,
|
|
65
|
+
useCartReconcile,
|
|
66
|
+
useCatalog,
|
|
67
|
+
useCatalogAvailability,
|
|
61
68
|
useCheckoutFlow,
|
|
62
69
|
useDashboardData,
|
|
70
|
+
useMedicationSelect,
|
|
63
71
|
useMemberPortalData,
|
|
64
72
|
useMessagesThread,
|
|
73
|
+
useProductDetail,
|
|
65
74
|
useRegisterFlow,
|
|
66
75
|
useSignupFlow,
|
|
67
76
|
useSubscribeFlow,
|
|
@@ -69,10 +78,10 @@ import {
|
|
|
69
78
|
useSurveyV2Flow,
|
|
70
79
|
useUpdatePaymentMethodFlow,
|
|
71
80
|
validateAddress
|
|
72
|
-
} from "../chunk/
|
|
73
|
-
import "../chunk/
|
|
74
|
-
import "../chunk/
|
|
75
|
-
import "../chunk/
|
|
81
|
+
} from "../chunk/AW6DQGQR.jsx";
|
|
82
|
+
import "../chunk/QAFLR3EN.jsx";
|
|
83
|
+
import "../chunk/GL3OY7W5.jsx";
|
|
84
|
+
import "../chunk/JF2KCOOX.jsx";
|
|
76
85
|
import "../chunk/LDZIUFDM.jsx";
|
|
77
86
|
export {
|
|
78
87
|
DEFAULT_COLOR_PALETTE,
|
|
@@ -91,9 +100,11 @@ export {
|
|
|
91
100
|
buildTrackerView,
|
|
92
101
|
buildTrackingUrl,
|
|
93
102
|
captureFunnelEmail,
|
|
103
|
+
catalogUnavailableMessage,
|
|
94
104
|
categoryColor,
|
|
95
105
|
createFunnelTelemetry,
|
|
96
106
|
deriveAttention,
|
|
107
|
+
deriveCatalogAvailabilityDecision,
|
|
97
108
|
deriveJourney,
|
|
98
109
|
emailGateAnswered,
|
|
99
110
|
formatCardNumber,
|
|
@@ -105,6 +116,7 @@ export {
|
|
|
105
116
|
formatRelativeTime,
|
|
106
117
|
formatStageDate,
|
|
107
118
|
hasErrors,
|
|
119
|
+
isCssColorValue,
|
|
108
120
|
isLive,
|
|
109
121
|
isQuestionVisible,
|
|
110
122
|
isReconcilable,
|
|
@@ -114,9 +126,13 @@ export {
|
|
|
114
126
|
markEmailGateAnswered,
|
|
115
127
|
normalizeState,
|
|
116
128
|
primarySubscription,
|
|
129
|
+
reconcileCartAgainstCatalog,
|
|
130
|
+
reconcileCartLines,
|
|
117
131
|
redeemResumeLink,
|
|
118
132
|
resetResumeRedemption,
|
|
133
|
+
resolveCategoryColor,
|
|
119
134
|
restoreCartFromLink,
|
|
135
|
+
salePriceForBase,
|
|
120
136
|
startCartCapture,
|
|
121
137
|
stateAvailabilityNote,
|
|
122
138
|
toTrackerRequest,
|
|
@@ -126,7 +142,9 @@ export {
|
|
|
126
142
|
useAffiliateLinks,
|
|
127
143
|
useAffiliateStats,
|
|
128
144
|
useCartCheckoutFlow,
|
|
145
|
+
useCartReconcile,
|
|
129
146
|
useCatalog,
|
|
147
|
+
useCatalogAvailability,
|
|
130
148
|
useCheckoutFlow,
|
|
131
149
|
useDashboardData,
|
|
132
150
|
useMedicationSelect,
|
package/dist/index/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export { PortalConfig, configure, getConfig } from '../config/index.js';
|
|
2
2
|
export { BannerProps, BannerVariant, ButtonProps, ButtonSize, ButtonVariant, CardProps, CheckboxGroupProps, ChoiceOption, HeadingProps, Primitives, PrimitivesProvider, RadioGroupProps, SelectOption, SelectProps, SpinnerProps, Status, StatusPillProps, StepIndicatorProps, TextFieldProps, TextareaProps, usePrimitives } from '../primitives/index.js';
|
|
3
3
|
export { defaultPrimitives } from '../primitives/default/index.js';
|
|
4
|
-
export { A as AddressVerifyResult, a as AdminApexDrug, b as AdminBillingAttempt, c as AdminCategory, d as AdminCategoryInput, e as
|
|
4
|
+
export { A as AddressVerifyResult, a as AdminApexDrug, b as AdminBillingAttempt, c as AdminCategory, d as AdminCategoryInput, e as AdminCategoryUpdate, f as AdminCustomer, g as AdminCustomerFacts, h as AdminCustomerFunnel, i as AdminCustomerListParams, j as AdminCustomerOverview, k as AdminCustomerProfile, l as AdminCustomerRequest, m as AdminCustomerRow, n as AdminCustomerSupport, o as AdminCustomerSupportThread, p as AdminDashboardStats, q as AdminLifecycle, r as AdminLifecycleBucket, s as AdminListParams, t as AdminOrderSummary, u as AdminPayment, v as AdminPaymentDetail, w as AdminProduct, x as AdminPromoCode, y as AdminPromoCodeInput, z as AdminRefundResult, B as AdminSale, C as AdminSaleInput, D as AdminSubscription, E as AdminSubscriptionDetail, F as AdminSubscriptionPatch, G as AdminSubscriptionWriteResult, H as AdminSupportCustomer, I as AdminSupportStats, J as AdminSupportThread, K as AdminWebhookEvent, L as Affiliate, M as AffiliateAuthTokens, N as AffiliateClickRecord, O as AffiliateConversion, P as AffiliateDashboardLinks, Q as AffiliateDashboardProfile, R as AffiliateDashboardStats, S as AffiliateDownlineMember, T as AffiliateEarningsBreakdown, U as AffiliatePaymentMethod, V as AffiliateProgram, W as AffiliateRegisterInput, X as AffiliateRegisterResponse, Y as AffiliateSession, Z as AffiliateStatsResponse, _ as AffiliateStatus, $ as AffiliateTrackResponse, a0 as ApiError, a1 as ApiResponse, a2 as AttributionMethod, a3 as AuthTokens, a4 as BillingReminderSettings, a5 as CatalogAvailabilityItem, a6 as CatalogAvailabilityReason, a7 as CatalogAvailabilityResult, a8 as CatalogProduct, a9 as CategoryMetadata, aa as CheckoutAddress, ab as CheckoutPayload, ac as CheckoutResult, ad as CommissionConfig, ae as CommissionStatus, af as CompleteSurveyPayload, ag as CreateAffiliatePayload, ah as CreateAffiliateProgramPayload, ai as CreateOrderPayload, aj as CreateRequestPayload, ak as CreateSubscriptionPayload, al as CustomTemplate, am as CustomTemplateInput, an as CustomerDiscountConfig, ao as DeliveryInfo, ap as DiscountType, aq as EmailNotificationSettings, ar as EmailTemplatesMap, as as LoginPayload, at as MemberPrescriptionRequest, au as MemberSurveyMode, av as MemberSurveyResponseSummary, aw as MemberSurveyTranscript, ax as MemberSurveyTranscriptItem, ay as MemberSurveyTranscriptSection, az as MembersMeResponse, aA as Order, aB as OrderItemInput, aC as PaginationParams, aD as PaymentCallbackPayload, aE as PaymentInitiatePayload, aF as PaymentType, aG as PendingRenewalSurvey, aH as Placeholder, aI as ProductSaleSummary, aJ as PromoValidationResponse, aK as PublicCategory, aL as RegisterAndSubscribePayload, aM as RegisterPayload, aN as RenewalStatus, aO as SUPPORT_ATTACHMENT_MAX_BYTES, aP as SUPPORT_ATTACHMENT_MIME_TYPES, aQ as SelectDrugPayload, aR as SendMessagePayload, aS as SendToPharmacyPayload, aT as SubscriptionPreview, aU as SubscriptionPreviewLine, aV as SubscriptionPreviewPayload, aW as SupportAttachment, aX as SupportMessage, aY as SupportRealtimeToken, aZ as SupportThread, a_ as SupportThreadCategory, a$ as SupportThreadStatus, b0 as SurveySubmitPayload, b1 as TemplatePlaceholdersMap, b2 as TemplateText, b3 as TokenTrackName, b4 as UpdateAffiliatePayload, b5 as UpdateAffiliateProgramPayload, b6 as UpdatePaymentMethodPayload, b7 as UpdateProfilePayload, b8 as User, b9 as addressesApi, ba as adminAffiliatesApi, bb as adminApi, bc as affiliateAuthStorageKey, bd as affiliatePortalApi, be as apexApi, bf as apiFetch, bg as authApi, bh as authStorageKey, bi as catalogApi, bj as clearAffiliateTokens, bk as clearTokens, bl as getAffiliateTokens, bm as getTokens, bn as membersApi, bo as messagesApi, bp as newIdempotencyKey, bq as onTokensCleared, br as ordersApi, bs as paymentsApi, bt as productsApi, bu as promoCodesApi, bv as setAffiliateTokens, bw as setTokens, bx as subscriptionsApi, by as supportApi, bz as usersApi } from '../client-ZnA3JEbd.js';
|
|
5
5
|
export { EmbedApiError as ApexV2ApiError, EmbedApiClient, EmbedApiClientOptions, EmbedApiError, EmbedEvent, EmbedEventType, FetchLike, PatientInfo, V2Answer, V2ComposedSurvey, V2DrugResult, V2QualificationResult, V2Question, V2QuestionOption, V2Section, V2Step, V2SubmitResult, V2VisibilityCondition, createEmbedApiClient, disqualificationReasonText, disqualifiedDrugIds, qualifiedDrugIds } from '@apextelemed/survey-core';
|
|
6
6
|
export { captureAffiliateRef, capturePromoCode, clearAffiliateRef, clearPromoCode, readAffiliateRef, readPromoCode } from '../api/index.js';
|
|
7
7
|
export { C as CartCaptureConfig, a as CartSnapshotLine, F as FunnelConfig, b as FunnelDraftPayload, R as ResumedCart, c as ResumedCartLine, d as ResumedDraft, e as adoptCartId, f as adoptFunnelSessionId, g as captureAuthHeader, h as cartId, i as fetchCartConfig, j as fetchFunnelConfig, k as fetchResumedCart, l as fetchResumedDraft, m as funnelSessionId, p as peekFunnelSessionId, n as postCartSnapshot, o as postFunnelEvent, r as readCartToken, q as readResumeToken, s as resetCartConfigCache, t as resetCartId, u as resetFunnelConfigCache, v as saveFunnelDraft, w as stripCartToken, x as stripResumeToken } from '../cart-BwUwSzWh.js';
|
|
8
8
|
export { MedicationSelection, affiliateAuthStore, authStore, medicationStore } from '../stores/index.js';
|
|
9
|
-
export { A as AppliedPromoCode, C as CartItem, c as cartStore } from '../cart-
|
|
9
|
+
export { A as AppliedPromoCode, C as CartItem, c as cartStore } from '../cart-o6DpAu5y.js';
|
|
10
10
|
import { AddressPair } from '../flows/index.js';
|
|
11
|
-
export { AccountSource, AddressErrors, AddressValue, AffiliateConversionsFlow, AffiliateDownlineFlow, AffiliateLinksFlow, AffiliateStatsFlow, AnswerValue, AttentionAction, AttentionActionKind, AttentionItem, CartCaptureOptions, CartCheckoutFlow, CartCheckoutOutcome, CartCheckoutPricing, CartSource, CatalogFlow, CategoryColorOpts, CheckoutFlow, CheckoutOutcome, Conversation, DEFAULT_COLOR_PALETTE, DashboardActivityItem, DashboardData, DashboardRxListItem, DashboardRxStatus, DashboardSubscription, DrugResult, FlatStep, FulfillmentStage, FunnelTelemetry, JourneyState, JourneyStep, JourneyStepKey, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, LIFECYCLE_TONE, LIVE_SUBSCRIPTION_STATUSES, MedicationPricing, MedicationSelectFlow, MemberPortalData, MemberPortalRx, MemberPortalSubscription, MessagesChannel, MessagesIntent, MessagesThread, PricingBreakdown, ProductDetailFlow, PromoPricing, RefillEvent, RefillView, RegisterFlow, RegisterOutcome, RequestStatus, RxRequestStatus, Severity, ShipmentInfo, SignupFlow, SignupOutcome, StageState, SubscribeFlow, SubscribeOutcome, SubscriptionIntakeFlow, SubscriptionIntakeOutcome, SurveyFlow, SurveyOption, SurveyOutcome, SurveyQuestion, SurveyResult, TERMINAL_SUBSCRIPTION_STATUSES, ThreadMessage, TimelineEvent, TimelineKind, Tone, TrackerRequest, TrackerRequestStatus, TrackerSubscription, TrackerSubscriptionStatus, TrackerView, TrackingUrlCarrier, US_STATES, US_STATE_OPTIONS, UpdatePaymentMethodFlow, UseAddressPairOptions, UseCheckoutFlowOptions, UseMedicationSelectOptions, UseMessagesThreadOptions, UseSignupFlowOptions, UseSubscribeFlowOptions, UseSubscriptionIntakeFlowOptions, UseSurveyFlowOptions, ValidateAddressOptions, ValidatedResumedPromo, VisibilityCondition, accountSource, availableStateOptions, availableStates, buildRefillView, buildTimeline, buildTrackerView, buildTrackingUrl, captureFunnelEmail, categoryColor, createFunnelTelemetry, deriveAttention, deriveJourney, emailGateAnswered, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, hasErrors, isLive, isQuestionVisible, isReconcilable, lifecycleReason, lowestPrice, lowestSalePrice, markEmailGateAnswered, normalizeState, primarySubscription, redeemResumeLink, resetResumeRedemption, restoreCartFromLink, startCartCapture, stateAvailabilityNote, toTrackerRequest, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCartCheckoutFlow, useCatalog, useCheckoutFlow, useDashboardData, useMedicationSelect, useMemberPortalData, useMessagesThread, useProductDetail, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSubscriptionIntakeFlow, useSurveyFlow, useUpdatePaymentMethodFlow, validateAddress, validateResumedPromo } from '../flows/index.js';
|
|
11
|
+
export { AccountSource, AddressErrors, AddressValue, AffiliateConversionsFlow, AffiliateDownlineFlow, AffiliateLinksFlow, AffiliateStatsFlow, AnswerValue, AttentionAction, AttentionActionKind, AttentionItem, CartCaptureOptions, CartCheckoutFlow, CartCheckoutOutcome, CartCheckoutPricing, CartDropReason, CartReconcileState, CartReconciliation, CartSource, CatalogAvailabilityDecision, CatalogAvailabilityState, CatalogFlow, CategoryColorOpts, CheckoutFlow, CheckoutOutcome, Conversation, DEFAULT_COLOR_PALETTE, DashboardActivityItem, DashboardData, DashboardRxListItem, DashboardRxStatus, DashboardSubscription, DroppedCartLine, DrugResult, FlatStep, FulfillmentStage, FunnelTelemetry, JourneyState, JourneyStep, JourneyStepKey, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, LIFECYCLE_TONE, LIVE_SUBSCRIPTION_STATUSES, MedicationPricing, MedicationSelectFlow, MemberPortalData, MemberPortalRx, MemberPortalSubscription, MessagesChannel, MessagesIntent, MessagesThread, PricingBreakdown, ProductDetailFlow, PromoPricing, ReconcileOptions, RefillEvent, RefillView, RegisterFlow, RegisterOutcome, RequestStatus, RxRequestStatus, Severity, ShipmentInfo, SignupFlow, SignupOutcome, StageState, SubscribeFlow, SubscribeOutcome, SubscriptionIntakeFlow, SubscriptionIntakeOutcome, SurveyFlow, SurveyOption, SurveyOutcome, SurveyQuestion, SurveyResult, TERMINAL_SUBSCRIPTION_STATUSES, ThreadMessage, TimelineEvent, TimelineKind, Tone, TrackerRequest, TrackerRequestStatus, TrackerSubscription, TrackerSubscriptionStatus, TrackerView, TrackingUrlCarrier, US_STATES, US_STATE_OPTIONS, UpdatePaymentMethodFlow, UseAddressPairOptions, UseCheckoutFlowOptions, UseMedicationSelectOptions, UseMessagesThreadOptions, UseSignupFlowOptions, UseSubscribeFlowOptions, UseSubscriptionIntakeFlowOptions, UseSurveyFlowOptions, ValidateAddressOptions, ValidatedResumedPromo, VisibilityCondition, accountSource, availableStateOptions, availableStates, buildRefillView, buildTimeline, buildTrackerView, buildTrackingUrl, captureFunnelEmail, catalogUnavailableMessage, categoryColor, createFunnelTelemetry, deriveAttention, deriveCatalogAvailabilityDecision, deriveJourney, emailGateAnswered, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, hasErrors, isCssColorValue, isLive, isQuestionVisible, isReconcilable, lifecycleReason, lowestPrice, lowestSalePrice, markEmailGateAnswered, normalizeState, primarySubscription, reconcileCartAgainstCatalog, reconcileCartLines, redeemResumeLink, resetResumeRedemption, resolveCategoryColor, restoreCartFromLink, salePriceForBase, startCartCapture, stateAvailabilityNote, toTrackerRequest, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCartCheckoutFlow, useCartReconcile, useCatalog, useCatalogAvailability, useCheckoutFlow, useDashboardData, useMedicationSelect, useMemberPortalData, useMessagesThread, useProductDetail, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSubscriptionIntakeFlow, useSurveyFlow, useUpdatePaymentMethodFlow, validateAddress, validateResumedPromo } from '../flows/index.js';
|
|
12
12
|
export { U as UseSurveyV2FlowOptions, u as useSurveyV2Flow } from '../surveyV2-BgQHK0GE.js';
|
|
13
|
-
export { AdminAuthAdapter, AdminDashboard, AdminDashboardProps, AdminTab, AdminTabGroup, AdminToast, AffiliateAuthAdapter, AffiliateForgotPassword, AffiliateForgotPasswordProps, AffiliateLogin, AffiliateLoginProps, AffiliatePortal, AffiliatePortalProps, AffiliatePortalTab, AffiliateRegister, AffiliateRegisterProps, AffiliateResetPassword, AffiliateResetPasswordProps, AffiliateSubTab, AffiliatesProps, CartCheckoutPage, CartCheckoutPageProps, CheckoutPage, CheckoutPageProps, EmailTemplates, ForgotPasswordPage, ForgotPasswordPageProps, LegalLink, MedicationGuideContent, MedicationGuideResolver, MemberAuthAdapter, MemberPortal, MemberPortalBrand, MemberPortalProps, MemberPortalRoutes, PatientDashboardPreview, PatientDashboardPreviewProps, RegisterPage, RegisterPageProps, ResetPasswordPage, ResetPasswordPageProps, SignupPage, SignupPageProps, SubscribePage, SubscribePageProps, SurveyPage, SurveyPageProps, SurveyV2Page, SurveyV2PageProps, UpdatePaymentMethod, UpdatePaymentMethodProps } from '../pages/index.js';
|
|
13
|
+
export { ADMIN_TAB_SEGMENTS, AFFILIATE_SUB_TAB_SEGMENTS, AdminAuthAdapter, AdminDashboard, AdminDashboardProps, AdminTab, AdminTabGroup, AdminToast, AffiliateAuthAdapter, AffiliateForgotPassword, AffiliateForgotPasswordProps, AffiliateLogin, AffiliateLoginProps, AffiliatePortal, AffiliatePortalProps, AffiliatePortalTab, AffiliateRegister, AffiliateRegisterProps, AffiliateResetPassword, AffiliateResetPasswordProps, AffiliateSubTab, AffiliatesProps, CartCheckoutPage, CartCheckoutPageProps, CheckoutPage, CheckoutPageProps, EmailTemplates, ForgotPasswordPage, ForgotPasswordPageProps, LegalLink, MedicationGuideContent, MedicationGuideResolver, MemberAuthAdapter, MemberPortal, MemberPortalBrand, MemberPortalProps, MemberPortalRoutes, PatientDashboardPreview, PatientDashboardPreviewProps, RegisterPage, RegisterPageProps, ResetPasswordPage, ResetPasswordPageProps, SignupPage, SignupPageProps, SubscribePage, SubscribePageProps, SurveyPage, SurveyPageProps, SurveyV2Page, SurveyV2PageProps, UpdatePaymentMethod, UpdatePaymentMethodProps, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath } from '../pages/index.js';
|
|
14
14
|
import { JSX } from 'solid-js';
|
|
15
15
|
export { SurveyV2Flow, SurveyV2Outcome } from '@apextelemed/survey-solid';
|
|
16
16
|
|