@apextelemed/partner-core 0.2.0 → 0.3.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/api/index.d.ts +14 -1
- package/dist/api/index.js +2 -2
- package/dist/api/index.jsx +8 -2
- package/dist/chunk/{SNAV6DII.jsx → 6HLXYY4F.jsx} +26 -4
- package/dist/chunk/{FJZHH5T4.jsx → AAWNUGML.jsx} +310 -2
- package/dist/chunk/ACE7M2YA.jsx +1 -0
- package/dist/chunk/{MEWFN6IW.jsx → B63K5R7M.jsx} +32 -2
- package/dist/chunk/{EIXV4DCU.js → FBVNUFJM.js} +26 -6
- package/dist/chunk/FBVNUFJM.js.map +1 -0
- package/dist/chunk/JSHO46VZ.js +3 -0
- package/dist/chunk/JSHO46VZ.js.map +1 -0
- package/dist/chunk/{6TFBQECC.jsx → NP4CMOLW.jsx} +41 -1
- package/dist/chunk/{OEXSGX5F.js → QSSVQ5PR.js} +664 -329
- package/dist/chunk/QSSVQ5PR.js.map +1 -0
- package/dist/chunk/{KFJXIKD4.js → SE6JHCPZ.js} +32 -3
- package/dist/chunk/SE6JHCPZ.js.map +1 -0
- package/dist/chunk/{J6KNY37T.js → XMYPS7PT.js} +40 -3
- package/dist/chunk/XMYPS7PT.js.map +1 -0
- package/dist/flows/index.js +3 -3
- package/dist/flows/index.jsx +3 -3
- package/dist/index/index.d.ts +1 -1
- package/dist/index/index.js +5 -5
- package/dist/index/index.jsx +11 -5
- package/dist/pages/index.js +2 -2
- package/dist/pages/index.jsx +2 -2
- package/dist/testing/storage.d.ts +1 -1
- package/dist/testing/storage.d.ts.map +1 -1
- package/dist/testing/storage.js +1 -0
- package/dist/testing/storage.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk/AN3WPMEP.js +0 -3
- package/dist/chunk/AN3WPMEP.js.map +0 -1
- package/dist/chunk/EIXV4DCU.js.map +0 -1
- package/dist/chunk/J6KNY37T.js.map +0 -1
- package/dist/chunk/KFJXIKD4.js.map +0 -1
- package/dist/chunk/O3QK7YZR.jsx +0 -1
- package/dist/chunk/OEXSGX5F.js.map +0 -1
|
@@ -3209,7 +3209,36 @@ function useSurveyV2Flow(opts) {
|
|
|
3209
3209
|
onError: opts.onError
|
|
3210
3210
|
});
|
|
3211
3211
|
}
|
|
3212
|
+
var PRESCRIPTION_PHOTO_MAX_BYTES = 10 * 1024 * 1024;
|
|
3213
|
+
async function uploadPrescriptionPhoto(file) {
|
|
3214
|
+
const cfg = getConfig();
|
|
3215
|
+
if (!cfg.apexEmbedApiBase) {
|
|
3216
|
+
throw new Error("apex-partner-core: apexEmbedApiBase is not configured.");
|
|
3217
|
+
}
|
|
3218
|
+
if (file.size > PRESCRIPTION_PHOTO_MAX_BYTES) {
|
|
3219
|
+
throw new Error("That photo is larger than 10MB. Please retake it at a lower resolution.");
|
|
3220
|
+
}
|
|
3221
|
+
const formData = new FormData();
|
|
3222
|
+
formData.append("photo", file);
|
|
3223
|
+
const res = await fetch(`${cfg.apexEmbedApiBase}/surveys/prescription-photos`, {
|
|
3224
|
+
method: "POST",
|
|
3225
|
+
headers: {
|
|
3226
|
+
...cfg.apexPublishableKey ? { "x-apex-publishable-key": cfg.apexPublishableKey } : {},
|
|
3227
|
+
...cfg.tenantKey ? { "X-Tenant-Key": cfg.tenantKey } : {}
|
|
3228
|
+
},
|
|
3229
|
+
body: formData
|
|
3230
|
+
});
|
|
3231
|
+
let parsed = null;
|
|
3232
|
+
try {
|
|
3233
|
+
parsed = await res.json();
|
|
3234
|
+
} catch {
|
|
3235
|
+
}
|
|
3236
|
+
if (!res.ok || !parsed?.photoId) {
|
|
3237
|
+
throw new Error(parsed?.error || `Photo upload failed (HTTP ${res.status})`);
|
|
3238
|
+
}
|
|
3239
|
+
return { photoId: parsed.photoId };
|
|
3240
|
+
}
|
|
3212
3241
|
|
|
3213
|
-
export { LIVE_SUBSCRIPTION_STATUSES, TERMINAL_SUBSCRIPTION_STATUSES, US_STATES, US_STATE_OPTIONS, availableStateOptions, availableStates, buildRefillView, buildTrackerView, buildTrackingUrl, captureFunnelEmail, createFunnelTelemetry, emailGateAnswered, firstAddressError, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, hasErrors, hasStateRestrictions, isImageAttachment, isLive, isQuestionVisible, isReconcilable, markEmailGateAnswered, normalizeState, redeemResumeLink, resetResumeRedemption, resolveSurveyV2DrugIntent, stateAvailabilityNote, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCardTokenizer, useCartCheckoutFlow, useCheckoutFlow, useDashboardData, useMemberPortalData, useMessagesThread, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSurveyFlow, useSurveyV2Flow, useUpdatePaymentMethodFlow, validateAddress };
|
|
3214
|
-
//# sourceMappingURL=
|
|
3215
|
-
//# sourceMappingURL=
|
|
3242
|
+
export { LIVE_SUBSCRIPTION_STATUSES, TERMINAL_SUBSCRIPTION_STATUSES, US_STATES, US_STATE_OPTIONS, availableStateOptions, availableStates, buildRefillView, buildTrackerView, buildTrackingUrl, captureFunnelEmail, createFunnelTelemetry, emailGateAnswered, firstAddressError, formatCardNumber, formatConversationTime, formatCvv, formatEventDate, formatExpiry, formatMessageTime, formatRelativeTime, formatStageDate, hasErrors, hasStateRestrictions, isImageAttachment, isLive, isQuestionVisible, isReconcilable, markEmailGateAnswered, normalizeState, redeemResumeLink, resetResumeRedemption, resolveSurveyV2DrugIntent, stateAvailabilityNote, uploadPrescriptionPhoto, useAddressPair, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, useAffiliateStats, useCardTokenizer, useCartCheckoutFlow, useCheckoutFlow, useDashboardData, useMemberPortalData, useMessagesThread, useRegisterFlow, useSignupFlow, useSubscribeFlow, useSurveyFlow, useSurveyV2Flow, useUpdatePaymentMethodFlow, validateAddress };
|
|
3243
|
+
//# sourceMappingURL=SE6JHCPZ.js.map
|
|
3244
|
+
//# sourceMappingURL=SE6JHCPZ.js.map
|