@everfur/sdk 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/{Chat.d-D61LLPJh.d.ts → Chat.d-CoGJrK3t.d.ts} +1 -1
- package/dist/{Chat.d-IpxKa9gS.d.cts → Chat.d-JDtlG_EW.d.cts} +1 -1
- package/dist/{DepthViews.d-C8EsR8Gq.d.ts → DepthViews.d-CNQn-eEr.d.ts} +1 -1
- package/dist/{DepthViews.d-w2o4Nf7r.d.ts → DepthViews.d-D31VlFKU.d.ts} +1 -1
- package/dist/{DepthViews.d-CDIL4mPa.d.cts → DepthViews.d-XTv4s3ru.d.cts} +1 -1
- package/dist/{DepthViews.d-Q1nqdH8n.d.cts → DepthViews.d-zxM_xbP9.d.cts} +1 -1
- package/dist/{RecordsPage.d-BSjZOHu8.d.cts → RecordsPage.d-CSZHrtWJ.d.cts} +1 -1
- package/dist/{RecordsPage.d-DqhM_rCr.d.ts → RecordsPage.d-D_y-ZB3S.d.ts} +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/{attachments.d-BviU_Tja.d.cts → attachments.d-D74wbmQU.d.cts} +1 -1
- package/dist/{attachments.d-DZVfHHnY.d.ts → attachments.d-Dm6NUJTR.d.ts} +1 -1
- package/dist/{bookingCopy.d-5V3erfXD.d.ts → bookingCopy.d-DMmLKY5Q.d.ts} +2 -2
- package/dist/{bookingCopy.d-DlzUPsFE.d.cts → bookingCopy.d-iaYDPvPd.d.cts} +2 -2
- package/dist/{casesRepository.d-Dqg-KbpA.d.ts → casesRepository.d-CCJJQXnl.d.ts} +1 -1
- package/dist/{casesRepository.d-7Us2O-z8.d.cts → casesRepository.d-G2dahIKO.d.cts} +1 -1
- package/dist/chat/index.d.cts +10 -10
- package/dist/chat/index.d.ts +10 -10
- package/dist/chat/lite/index.d.cts +10 -10
- package/dist/chat/lite/index.d.ts +10 -10
- package/dist/{chatHandoffToken.d-TYcD8NIi.d.ts → chatHandoffToken.d-DVv9tl8h.d.ts} +5 -5
- package/dist/{chatHandoffToken.d-B9pjkEfl.d.cts → chatHandoffToken.d-xmnHrTA5.d.cts} +5 -5
- package/dist/{chatTypes.d-RnQ5R4zP.d.cts → chatTypes.d-CQC7GTdE.d.cts} +4 -4
- package/dist/{chatTypes.d-DPALEQoW.d.ts → chatTypes.d-hS1AilYl.d.ts} +4 -4
- package/dist/chunk-2NA7TPUA.js +5 -0
- package/dist/chunk-IJU5TV5N.js +12 -0
- package/dist/chunk-TFX6WMDN.js +30 -0
- package/dist/chunk-WZNPR5TY.js +34 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +6 -6
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +1 -1
- package/dist/{clinicBatch.d-C6MzLj3X.d.cts → clinicBatch.d-4PFwKJfw.d.cts} +2 -2
- package/dist/{clinicBatch.d-t9hkown2.d.ts → clinicBatch.d-BpP2NBb3.d.ts} +2 -2
- package/dist/{config.d-BnZkxI5a.d.ts → config.d-D9igq-vT.d.ts} +1 -1
- package/dist/{config.d-DoC-XaJ0.d.cts → config.d-cX5E6DAw.d.cts} +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/{context.d-BAh7C7T4.d.cts → context.d-BrRRNw9I.d.cts} +4 -4
- package/dist/{context.d-z2zIjKEb.d.ts → context.d-hPfsEsNf.d.ts} +4 -4
- package/dist/{copy.d-DLxgHsZZ.d.ts → copy.d-CDlirTR4.d.ts} +2 -2
- package/dist/{copy.d-BkX6G-Ws.d.cts → copy.d-DWjSkbrZ.d.cts} +2 -2
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +13 -13
- package/dist/core/index.d.ts +13 -13
- package/dist/core/index.js +1 -1
- package/dist/{depth.d-z2FlzY3x.d.ts → depth.d-CfBorxcQ.d.ts} +2 -2
- package/dist/{depth.d-aXddCjyh.d.cts → depth.d-KkrGx98U.d.cts} +2 -2
- package/dist/{entitlementRepository.d-CDCF8eFx.d.cts → entitlementRepository.d-BvnWpcQH.d.cts} +2 -2
- package/dist/{entitlementRepository.d-Cgmy4Opa.d.ts → entitlementRepository.d-DpQrIgW6.d.ts} +2 -2
- package/dist/{focus.d-q_sXGhLn.d.cts → focus.d-9loikWy8.d.cts} +2 -2
- package/dist/{focus.d-C2fd_5MW.d.ts → focus.d-CYwVLDvR.d.ts} +2 -2
- package/dist/health-plan/index.cjs +53 -37
- package/dist/health-plan/index.d.cts +9 -9
- package/dist/health-plan/index.d.ts +9 -9
- package/dist/health-plan/index.js +54 -38
- package/dist/{idempotency.d-Bqdyv_yn.d.cts → idempotency.d-CVKkUhY4.d.cts} +1 -1
- package/dist/{idempotency.d-DlAPAxD5.d.ts → idempotency.d-DGQ_xML5.d.ts} +1 -1
- package/dist/{identity.d-CooKscNj.d.cts → identity.d-Bnl5Z0MM.d.cts} +1 -1
- package/dist/{identity.d-BWZiaByn.d.ts → identity.d-DR5YwO6E.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/{introEvents.d-baVM016i.d.ts → introEvents.d-D_yL7lnE.d.ts} +1 -1
- package/dist/{introEvents.d-C8bDDiK6.d.cts → introEvents.d-JmPqEqMQ.d.cts} +1 -1
- package/dist/notifications/inbox/index.d.cts +4 -4
- package/dist/notifications/inbox/index.d.ts +4 -4
- package/dist/notifications/index.d.cts +7 -7
- package/dist/notifications/index.d.ts +7 -7
- package/dist/{optInView.d-D_D7fs6C.d.cts → optInView.d-BizcW_QG.d.cts} +2 -2
- package/dist/{optInView.d-C04aX0Hs.d.ts → optInView.d-CZvKlq-o.d.ts} +2 -2
- package/dist/{pets.d-oJ2OIY22.d.cts → pets.d-C4CWxQPh.d.cts} +1 -1
- package/dist/{pets.d-CkFNO-x-.d.ts → pets.d-uCzgFbGi.d.ts} +1 -1
- package/dist/{petsRepository.d-VWMyIeIJ.d.cts → petsRepository.d-DOcVv9bd.d.cts} +1 -1
- package/dist/{petsRepository.d-CKCi6rtp.d.ts → petsRepository.d-DRW7NkKm.d.ts} +1 -1
- package/dist/records/depth/index.d.cts +9 -9
- package/dist/records/depth/index.d.ts +9 -9
- package/dist/records/index.cjs +1 -1
- package/dist/records/index.d.cts +10 -10
- package/dist/records/index.d.ts +10 -10
- package/dist/records/index.js +1 -1
- package/dist/{requestFunnel.d-DVCytzTE.d.ts → requestFunnel.d-BYLycQMI.d.ts} +2 -2
- package/dist/{requestFunnel.d-By0-I8Cp.d.cts → requestFunnel.d-CQ0O8fMG.d.cts} +2 -2
- package/dist/{route.d-Ay-lRct1.d.ts → route.d-DFJ0gXj8.d.ts} +2 -2
- package/dist/{route.d-DQDX6QFn.d.cts → route.d-q9yndhFy.d.cts} +2 -2
- package/dist/{runtimeTypes.d-DUVNpR6g.d.cts → runtimeTypes.d-3LRuzxr7.d.cts} +4 -4
- package/dist/{runtimeTypes.d-C49Cgb9c.d.ts → runtimeTypes.d-BJHYj2MI.d.ts} +4 -4
- package/dist/{screenProps.d-BgxlmfG5.d.cts → screenProps.d-DfAmuKkr.d.cts} +1 -1
- package/dist/{screenProps.d-B_arD3Lh.d.ts → screenProps.d-tVzlXGaN.d.ts} +1 -1
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.d.cts +2 -2
- package/dist/server/events/index.d.ts +2 -2
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/shop/index.cjs +187 -145
- package/dist/shop/index.d.cts +3 -3
- package/dist/shop/index.d.ts +3 -3
- package/dist/shop/index.js +188 -146
- package/dist/tabs/index.d.cts +6 -6
- package/dist/tabs/index.d.ts +6 -6
- package/dist/televet/booking/index.d.cts +6 -6
- package/dist/televet/booking/index.d.ts +6 -6
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/rn/index.d.cts +7 -7
- package/dist/testing/rn/index.d.ts +7 -7
- package/dist/testing/web/index.d.cts +7 -7
- package/dist/testing/web/index.d.ts +7 -7
- package/dist/texting/index.d.cts +5 -5
- package/dist/texting/index.d.ts +5 -5
- package/dist/{threadOptions.d-Cbhjjb9_.d.ts → threadOptions.d-DfH26dy7.d.ts} +2 -2
- package/dist/{threadOptions.d-pZXzsd2d.d.cts → threadOptions.d-I6G3BdlP.d.cts} +2 -2
- package/dist/{timelineRows.d-BHxMeZzl.d.ts → timelineRows.d-CugnCOfZ.d.ts} +1 -1
- package/dist/{timelineRows.d-DlMs82N1.d.cts → timelineRows.d-uSfr2IP3.d.cts} +1 -1
- package/dist/{types.d-d3RdaeAA.d.cts → types.d-BOKzNuuF.d.cts} +87 -85
- package/dist/{types.d-d3RdaeAA.d.ts → types.d-BOKzNuuF.d.ts} +87 -85
- package/dist/ui/index.cjs +98 -46
- package/dist/ui/index.d.cts +4 -3
- package/dist/ui/index.d.ts +4 -3
- package/dist/ui/index.js +98 -46
- package/dist/{useHealthPlanSubscription.d-BoC7H85G.d.ts → useHealthPlanSubscription.d-CVVQIFpG.d.ts} +2 -2
- package/dist/{useHealthPlanSubscription.d-CZn06-lu.d.cts → useHealthPlanSubscription.d-DylPMm_m.d.cts} +2 -2
- package/dist/{useInboxUnread.d-vYpOXVRv.d.ts → useInboxUnread.d-DDoSII8D.d.ts} +1 -1
- package/dist/{useInboxUnread.d-DW0dpWdv.d.cts → useInboxUnread.d-Dq3CCAa3.d.cts} +1 -1
- package/dist/{usePresentation.d-CgvwGb2A.d.ts → usePresentation.d-CDNK4MDY.d.ts} +1 -1
- package/dist/{usePresentation.d-CyCEJ6nj.d.cts → usePresentation.d-CrobH0d_.d.cts} +1 -1
- package/dist/{useRecordsDepth.d-CbXhWbx7.d.ts → useRecordsDepth.d-BvBYIPii.d.ts} +1 -1
- package/dist/{useRecordsDepth.d-CcbL98FD.d.cts → useRecordsDepth.d-Cd5Vyb7D.d.cts} +1 -1
- package/dist/{useUnread.d-CfF2Cx-q.d.cts → useUnread.d-B4Yqcteg.d.cts} +3 -3
- package/dist/{useUnread.d-BsZKbLp9.d.ts → useUnread.d-ElAEfgl1.d.ts} +3 -3
- package/dist/{view.d-DdyOf0T0.d.ts → view.d-2RWoY9kd.d.ts} +3 -3
- package/dist/{view.d-CF3AP3T7.d.cts → view.d-utmOR2ee.d.cts} +3 -3
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/health-plan/index.cjs +43 -16
- package/dist/web/health-plan/index.d.cts +11 -11
- package/dist/web/health-plan/index.d.ts +11 -11
- package/dist/web/health-plan/index.js +32 -27
- package/dist/web/health-plan/styles.css +160 -1
- package/dist/web/inbox/index.d.cts +5 -5
- package/dist/web/inbox/index.d.ts +5 -5
- package/dist/web/index.cjs +1 -1
- package/dist/web/index.d.cts +23 -23
- package/dist/web/index.d.ts +23 -23
- package/dist/web/index.js +1 -1
- package/dist/web/intro/index.d.cts +6 -6
- package/dist/web/intro/index.d.ts +6 -6
- package/dist/web/notifications/index.d.cts +6 -6
- package/dist/web/notifications/index.d.ts +6 -6
- package/dist/web/records/depth/index.d.cts +9 -9
- package/dist/web/records/depth/index.d.ts +9 -9
- package/dist/web/records/index.d.cts +11 -11
- package/dist/web/records/index.d.ts +11 -11
- package/dist/web/records-sheet/index.cjs +1 -1
- package/dist/web/records-sheet/index.js +1 -1
- package/dist/web/shop/index.cjs +110 -88
- package/dist/web/shop/index.d.cts +3 -3
- package/dist/web/shop/index.d.ts +3 -3
- package/dist/web/shop/index.js +67 -81
- package/dist/web/televet/booking/index.d.cts +6 -6
- package/dist/web/televet/booking/index.d.ts +6 -6
- package/dist/web/texting/index.d.cts +5 -5
- package/dist/web/texting/index.d.ts +5 -5
- package/dist/web/ui/index.cjs +96 -57
- package/dist/web/ui/index.d.cts +4 -3
- package/dist/web/ui/index.d.ts +4 -3
- package/dist/web/ui/index.js +41 -46
- package/dist/web/ui/styles.css +481 -1
- package/package.json +5 -5
- package/dist/chunk-Y3Q4GW47.js +0 -31
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import { j as FetchLike } from './config.d-
|
|
2
|
+
import { j as FetchLike } from './config.d-cX5E6DAw.cjs';
|
|
3
3
|
import { y as OmsResult, i as OmsShopConfig, Q as OmsOfferPage, r as OmsOffer, n as OmsPrescription, D as OmsAddressEntry, k as OmsAddressDetail, O as OmsAddressInput, l as OmsPaymentMethod, _ as OmsPaymentSetup, G as OmsCardSetupLink, p as OmsCartLine, g as OmsQuote, I as OmsCheckout, K as OmsConfirmation, e as OmsOrderPage, b as OmsOrder, E as OmsCancelOutcome, Z as OmsPayOutcome, F as OmsCardActionLink, h as OmsReceipt, a9 as OmsReturn, H as OmsCase, a2 as OmsPlanPage, a as OmsBuyAgainItem, a0 as OmsPlanInput, f as OmsPlan, a3 as OmsPlanPatch, t as OmsPlanOperation, M as OmsCycleReview, L as OmsCycleDraft, j as OmsError } from './omsErrors.d-VF5tnr20.cjs';
|
|
4
4
|
|
|
5
5
|
/** The member's own Cognito id token, asked for on every request. Null (or a throw) means signed out. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import { j as FetchLike } from './config.d-
|
|
2
|
+
import { j as FetchLike } from './config.d-D9igq-vT.js';
|
|
3
3
|
import { y as OmsResult, i as OmsShopConfig, Q as OmsOfferPage, r as OmsOffer, n as OmsPrescription, D as OmsAddressEntry, k as OmsAddressDetail, O as OmsAddressInput, l as OmsPaymentMethod, _ as OmsPaymentSetup, G as OmsCardSetupLink, p as OmsCartLine, g as OmsQuote, I as OmsCheckout, K as OmsConfirmation, e as OmsOrderPage, b as OmsOrder, E as OmsCancelOutcome, Z as OmsPayOutcome, F as OmsCardActionLink, h as OmsReceipt, a9 as OmsReturn, H as OmsCase, a2 as OmsPlanPage, a as OmsBuyAgainItem, a0 as OmsPlanInput, f as OmsPlan, a3 as OmsPlanPatch, t as OmsPlanOperation, M as OmsCycleReview, L as OmsCycleDraft, j as OmsError } from './omsErrors.d-VF5tnr20.js';
|
|
4
4
|
|
|
5
5
|
/** The member's own Cognito id token, asked for on every request. Null (or a throw) means signed out. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
3
3
|
import { U as UserRef } from './ids.d-B2GAAifq.cjs';
|
|
4
|
-
import { T as TransportPort, d as EverfurRequest } from './config.d-
|
|
4
|
+
import { T as TransportPort, d as EverfurRequest } from './config.d-cX5E6DAw.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A minted session token with the expiry the minter knows. `expiresAt` is what `mintPartnerSession` returns
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
3
3
|
import { U as UserRef } from './ids.d-B2GAAifq.js';
|
|
4
|
-
import { T as TransportPort, d as EverfurRequest } from './config.d-
|
|
4
|
+
import { T as TransportPort, d as EverfurRequest } from './config.d-D9igq-vT.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A minted session token with the expiry the minter knows. `expiresAt` is what `mintPartnerSession` returns
|
package/dist/index.cjs
CHANGED
|
@@ -11,7 +11,7 @@ return Object.freeze({kind:"done",terminal:true,conversationId:fields.conversati
|
|
|
11
11
|
return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:fields.serverRequestId??null})}function analysisStartedFrame(requestId,lastEventId,serverRequestId=null){/* @__PURE__ */
|
|
12
12
|
return Object.freeze({kind:"analysisStarted",requestId:requestId,lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function analysisCompleteFrame(fields,serverRequestId=null){/* @__PURE__ */
|
|
13
13
|
return Object.freeze({kind:"analysisComplete",terminal:false,resultId:fields.resultId,analysisType:fields.analysisType,modelVersion:fields.modelVersion,confidence:fields.confidence,detections:/* @__PURE__ */Object.freeze([...fields.detections]),interpretation:fields.interpretation,lastEventId:fields.lastEventId,serverRequestId:serverRequestId})}function unknownFrame(raw,lastEventId,serverRequestId=null){/* @__PURE__ */
|
|
14
|
-
return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function mintFailedError(cause,refusal){let message=cause instanceof Error?cause.message:typeof cause=="string"?cause:null;return makeEverfurError("authRejected",{retryable:false,...refusal?.wireCode?{wireCode:refusal.wireCode}:{},...refusal?.requestId?{requestId:refusal.requestId}:{},...message?{wireMessage:message}:{},...cause!=null?{raw:cause}:{}})}function createIdentityProvider(userRef2,getToken,onMinted,onRejected){let cached=null,rejectionReported=false,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,rejectionReported=!1,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef2,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null},reportRejected(){revoked||rejectionReported||(rejectionReported=true,onRejected?.())}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch(cause){return ctx.identity.reportRejected?.(),err(mintFailedError(cause))}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch(cause){return ctx.identity.reportRejected?.(),err(mintFailedError(cause,{wireCode:wireCodeOf(first.error.raw),requestId:first.error.requestId}))}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?(ctx.identity.reportRejected?.(),err(refusedAfterRemintError(retry.error))):retry}function refusedAfterRemintError(refusal){let raw=refusal.raw,wireCode=wireCodeOf(raw);return makeEverfurError("authRejected",{retryable:false,...refusal.httpStatus!==void 0?{httpStatus:refusal.httpStatus}:{},...refusal.requestId?{requestId:refusal.requestId}:{},...wireCode?{wireCode:wireCode}:{},...refusal.reasonCode?{reasonCode:refusal.reasonCode}:{},...refusal.wireMessage?{wireMessage:refusal.wireMessage}:{},...raw!=null?{raw:raw}:{}})}function wireCodeOf(body){if(typeof body!="object"||body===null)return null;let b=body,code=(typeof b.error=="object"&&b.error!==null?b.error.code:void 0)??b.code;return typeof code=="string"&&code.length>0?code:null}var DAILY_QUOTA_WIRE_CODE="DAILY_QUOTA_EXCEEDED",THROTTLES=/* @__PURE__ */new Set(["THROTTLINGEXCEPTION","RATELIMITED","TOOMANYREQUESTS"]);function foldDailyQuotaWireCode(code,body){if(!THROTTLES.has(code.toUpperCase().replace(/[^A-Z0-9]/g,"")))return code;let b=body,limit=b?.daily_limit??b?.error?.daily_limit;return typeof limit=="number"&&Number.isFinite(limit)?DAILY_QUOTA_WIRE_CODE:code}function createFallbackUtf8Decoder(){let pending=[];return{decode(input,options){let stream=options?.stream===true,bytes=pending.length>0?pending.slice():[];if(input!==void 0)for(let i2=0;i2<input.length;i2+=1)bytes.push(input[i2]);pending=[];let out="",i=0;for(;i<bytes.length;){let b0=bytes[i];if(b0<128){out+=String.fromCharCode(b0),i+=1;continue}let need,lower=128,upper=191,cp;if(b0>=194&&b0<=223)need=1,cp=b0&31;else if(b0>=224&&b0<=239)need=2,cp=b0&15,b0===224&&(lower=160),b0===237&&(upper=159);else if(b0>=240&&b0<=244)need=3,cp=b0&7,b0===240&&(lower=144),b0===244&&(upper=143);else{out+="�",i+=1;continue}let j=1,valid=true;for(;j<=need&&!(i+j>=bytes.length);){let b=bytes[i+j],lo=j===1?lower:128,hi=j===1?upper:191;if(b<lo||b>hi){valid=false;break}cp=cp<<6|b&63,j+=1}if(!valid){out+="�",i+=j;continue}if(j<=need){stream?pending=bytes.slice(i):out+="�";break}out+=String.fromCodePoint(cp),i+=need+1}return out}}}function createUtf8Decoder(){let Native=globalThis.TextDecoder;return typeof Native=="function"?new Native("utf-8"):createFallbackUtf8Decoder()}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */zod.z.record(/* @__PURE__ */zod.z.string(),/* @__PURE__ */zod.z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=createUtf8Decoder(),buffer="",scanFrom=0,sawDelta=false;for await(let chunk of bytes){for(buffer+=decoder.decode(chunk,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line=rawLine.replace(/\s+$/,"");line.length===0||line.startsWith(":")||(line.startsWith("id:")?id=line.slice(3).trim():line.startsWith("data:")&&dataLines.push(line.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var SDK_VERSION="0.20.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
|
|
14
|
+
return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function mintFailedError(cause,refusal){let message=cause instanceof Error?cause.message:typeof cause=="string"?cause:null;return makeEverfurError("authRejected",{retryable:false,...refusal?.wireCode?{wireCode:refusal.wireCode}:{},...refusal?.requestId?{requestId:refusal.requestId}:{},...message?{wireMessage:message}:{},...cause!=null?{raw:cause}:{}})}function createIdentityProvider(userRef2,getToken,onMinted,onRejected){let cached=null,rejectionReported=false,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,rejectionReported=!1,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef2,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null},reportRejected(){revoked||rejectionReported||(rejectionReported=true,onRejected?.())}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch(cause){return ctx.identity.reportRejected?.(),err(mintFailedError(cause))}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch(cause){return ctx.identity.reportRejected?.(),err(mintFailedError(cause,{wireCode:wireCodeOf(first.error.raw),requestId:first.error.requestId}))}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?(ctx.identity.reportRejected?.(),err(refusedAfterRemintError(retry.error))):retry}function refusedAfterRemintError(refusal){let raw=refusal.raw,wireCode=wireCodeOf(raw);return makeEverfurError("authRejected",{retryable:false,...refusal.httpStatus!==void 0?{httpStatus:refusal.httpStatus}:{},...refusal.requestId?{requestId:refusal.requestId}:{},...wireCode?{wireCode:wireCode}:{},...refusal.reasonCode?{reasonCode:refusal.reasonCode}:{},...refusal.wireMessage?{wireMessage:refusal.wireMessage}:{},...raw!=null?{raw:raw}:{}})}function wireCodeOf(body){if(typeof body!="object"||body===null)return null;let b=body,code=(typeof b.error=="object"&&b.error!==null?b.error.code:void 0)??b.code;return typeof code=="string"&&code.length>0?code:null}var DAILY_QUOTA_WIRE_CODE="DAILY_QUOTA_EXCEEDED",THROTTLES=/* @__PURE__ */new Set(["THROTTLINGEXCEPTION","RATELIMITED","TOOMANYREQUESTS"]);function foldDailyQuotaWireCode(code,body){if(!THROTTLES.has(code.toUpperCase().replace(/[^A-Z0-9]/g,"")))return code;let b=body,limit=b?.daily_limit??b?.error?.daily_limit;return typeof limit=="number"&&Number.isFinite(limit)?DAILY_QUOTA_WIRE_CODE:code}function createFallbackUtf8Decoder(){let pending=[];return{decode(input,options){let stream=options?.stream===true,bytes=pending.length>0?pending.slice():[];if(input!==void 0)for(let i2=0;i2<input.length;i2+=1)bytes.push(input[i2]);pending=[];let out="",i=0;for(;i<bytes.length;){let b0=bytes[i];if(b0<128){out+=String.fromCharCode(b0),i+=1;continue}let need,lower=128,upper=191,cp;if(b0>=194&&b0<=223)need=1,cp=b0&31;else if(b0>=224&&b0<=239)need=2,cp=b0&15,b0===224&&(lower=160),b0===237&&(upper=159);else if(b0>=240&&b0<=244)need=3,cp=b0&7,b0===240&&(lower=144),b0===244&&(upper=143);else{out+="�",i+=1;continue}let j=1,valid=true;for(;j<=need&&!(i+j>=bytes.length);){let b=bytes[i+j],lo=j===1?lower:128,hi=j===1?upper:191;if(b<lo||b>hi){valid=false;break}cp=cp<<6|b&63,j+=1}if(!valid){out+="�",i+=j;continue}if(j<=need){stream?pending=bytes.slice(i):out+="�";break}out+=String.fromCodePoint(cp),i+=need+1}return out}}}function createUtf8Decoder(){let Native=globalThis.TextDecoder;return typeof Native=="function"?new Native("utf-8"):createFallbackUtf8Decoder()}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */zod.z.record(/* @__PURE__ */zod.z.string(),/* @__PURE__ */zod.z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=createUtf8Decoder(),buffer="",scanFrom=0,sawDelta=false;for await(let chunk of bytes){for(buffer+=decoder.decode(chunk,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line=rawLine.replace(/\s+$/,"");line.length===0||line.startsWith(":")||(line.startsWith("id:")?id=line.slice(3).trim():line.startsWith("data:")&&dataLines.push(line.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var SDK_VERSION="0.21.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
|
|
15
15
|
return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function checkPublishableKey(raw){let publishableKey=typeof raw=="string"?raw.trim():"";return publishableKey.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(publishableKey)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}function tryResolveClientConfig(config,options){let keyFailure=checkPublishableKey(config?.publishableKey);if(keyFailure!==null)/* @__PURE__ */
|
|
16
16
|
return Object.freeze({ok:false,failure:keyFailure});let publishableKey=config.publishableKey.trim(),baseUrl=tryResolveApiBaseUrl(config.apiBaseUrl);if(!baseUrl.ok)return baseUrl;let contractVersion=config.contractVersion?.trim()||DEFAULT_CONTRACT_VERSION;/* @__PURE__ */
|
|
17
17
|
return Object.freeze({ok:true,config:/* @__PURE__ */Object.freeze({publishableKey:publishableKey,apiBaseUrl:baseUrl.value,contractVersion:contractVersion,sdkVersion:SDK_VERSION,platform:options?.platform??SDK_PLATFORM,debug:config.debug===true})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
|
package/dist/index.d.cts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
export { B as Brand, a as ClientId, C as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as userRef } from './ids.d-B2GAAifq.cjs';
|
|
3
3
|
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as categoryFor, i as isRetryableCode, u as userFacingError } from './EverfurError.d-8NHtlgzA.cjs';
|
|
4
4
|
export { a as EverfurConfigError, E as EverfurResult, b as EverfurThrownError, i as isErr, c as isOk, u as unwrap } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
5
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from './config.d-
|
|
6
|
-
export { M as MintedToken, T as TokenProvider } from './identity.d-
|
|
7
|
-
export { E as EverfurClientEvent, a as EverfurEventHandler, L as LogLevel, b as LogRecord, c as LogSink, P as PrepareOptions, d as PrepareResult, e as PrepareStatus, S as SecureStorePort } from './runtimeTypes.d-
|
|
5
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from './config.d-cX5E6DAw.cjs';
|
|
6
|
+
export { M as MintedToken, T as TokenProvider } from './identity.d-Bnl5Z0MM.cjs';
|
|
7
|
+
export { E as EverfurClientEvent, a as EverfurEventHandler, L as LogLevel, b as LogRecord, c as LogSink, P as PrepareOptions, d as PrepareResult, e as PrepareStatus, S as SecureStorePort } from './runtimeTypes.d-3LRuzxr7.cjs';
|
|
8
8
|
export { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
9
9
|
export { E as EverfurFaceStyle, a as EverfurThemeAdjustment, f as face, h as headingFace, p as previewTheme, t as themeAdjustments } from './typeStyle.d-Ckdh_S-t.cjs';
|
|
10
10
|
import { C as CapabilityName, a as CapabilityDecision } from './resolve.d-BTC3b6FW.cjs';
|
|
@@ -15,19 +15,19 @@ export { C as CameraPort, a as CaptureOptions, M as MediaSource } from './Camera
|
|
|
15
15
|
export { F as FileHandle, b as FilePort, a as UploadPolicyWire, U as UploadTransport } from './ports.d-BX4f4UsB.cjs';
|
|
16
16
|
export { E as EverfurUnread, P as PresignedPolicy, U as UploadPort } from './unreadStore.d-w5x6lEpR.cjs';
|
|
17
17
|
export { R as RecordsDocumentPicker, a as RnRecordsUploadFetch, b as RnRecordsUploadTransportOptions, c as createRnRecordsUploadTransport } from './uploadTransport.d-CWL7CdWP.cjs';
|
|
18
|
-
export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, j as ChatMessage, h as ChatMessagePage, k as ChatMessageRole, l as ChatMessageSender, i as ChatRefreshOptions, m as ChatStatus, n as Citation, S as SendOptions } from './chatTypes.d-
|
|
19
|
-
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository.d-
|
|
18
|
+
export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, j as ChatMessage, h as ChatMessagePage, k as ChatMessageRole, l as ChatMessageSender, i as ChatRefreshOptions, m as ChatStatus, n as Citation, S as SendOptions } from './chatTypes.d-CQC7GTdE.cjs';
|
|
19
|
+
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository.d-G2dahIKO.cjs';
|
|
20
20
|
import { ReactNode } from 'react';
|
|
21
|
-
import { E as EverfurProviderProps } from './context.d-
|
|
22
|
-
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from './context.d-
|
|
21
|
+
import { E as EverfurProviderProps } from './context.d-BrRRNw9I.cjs';
|
|
22
|
+
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from './context.d-BrRRNw9I.cjs';
|
|
23
23
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
24
|
-
export { E as EverfurChat } from './Chat.d-
|
|
25
|
-
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatFollowUpPolicy, c as ChatSentiment, E as EverfurChatDraftStore, d as EverfurUnreadState, U as UrgencyDisplayLevel, e as UseChatAttachmentsOptions, f as UseChatAttachmentsState, g as UseEverfurChatState, h as UseEverfurPetsState, i as UseEverfurUnreadOptions, j as chatHandoffTokenFromUrl, u as useChatAttachments, k as useEverfurChat, l as useEverfurPets } from './chatHandoffToken.d-
|
|
26
|
-
export { E as EverfurChatAttachments, a as EverfurChatProps, b as EverfurDictationLoader, c as createAppStateLifecycle, r as registerEverfurDictation, u as useEverfurUnread } from './useUnread.d-
|
|
24
|
+
export { E as EverfurChat } from './Chat.d-JDtlG_EW.cjs';
|
|
25
|
+
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatFollowUpPolicy, c as ChatSentiment, E as EverfurChatDraftStore, d as EverfurUnreadState, U as UrgencyDisplayLevel, e as UseChatAttachmentsOptions, f as UseChatAttachmentsState, g as UseEverfurChatState, h as UseEverfurPetsState, i as UseEverfurUnreadOptions, j as chatHandoffTokenFromUrl, u as useChatAttachments, k as useEverfurChat, l as useEverfurPets } from './chatHandoffToken.d-xmnHrTA5.cjs';
|
|
26
|
+
export { E as EverfurChatAttachments, a as EverfurChatProps, b as EverfurDictationLoader, c as createAppStateLifecycle, r as registerEverfurDictation, u as useEverfurUnread } from './useUnread.d-B4Yqcteg.cjs';
|
|
27
27
|
export { E as EverfurChatAnswerCard, a as EverfurChatAnswerCards, b as EverfurChatAnswerContext, c as EverfurChatEmptyState, d as EverfurChatFollowUpAction, e as EverfurChatHistoryBar, f as EverfurChatHistorySheet, g as EverfurChatOpeningCard } from './threadOptions.d-bEAFkIsC.cjs';
|
|
28
28
|
export { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
|
|
29
|
-
export { P as PetProfileInput, a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from './petsRepository.d-
|
|
30
|
-
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments.d-
|
|
29
|
+
export { P as PetProfileInput, a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from './petsRepository.d-DOcVv9bd.cjs';
|
|
30
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments.d-D74wbmQU.cjs';
|
|
31
31
|
export { E as EverfurChatAnswerStyle, a as EverfurChatComposerPlaceholder, b as EverfurChatComposerStyle, c as EverfurChatHistoryBarSetting, d as EverfurChatHistoryStyle, e as EverfurChatSendButtonSetting, f as EverfurChatTopCardSetting, g as EverfurHealthPlanLayout, h as EverfurPresentation, i as EverfurPresentationInput, j as EverfurSafetyDisclaimerPlacement } from './presentation.d-Bs8xQ4gD.cjs';
|
|
32
32
|
export { E as EverfurStarterPrompt } from './quickPrompts.d-NM_81Jc1.cjs';
|
|
33
33
|
export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from './profile.d-CSs1wlXT.cjs';
|
|
@@ -36,7 +36,7 @@ import { E as EverfurThemeInput } from './branding.d-BFauULV6.cjs';
|
|
|
36
36
|
export { A as APPEARANCE_PRESETS, a as APPEARANCE_PRESET_NAMES, b as APPEARANCE_SIZE_RANGES, c as EverfurAppearance, d as EverfurAppearanceFont, e as EverfurAppearancePreset, f as EverfurAppearanceRules, g as EverfurAppearanceVariables, h as EverfurThemeFontFaceKey, i as EverfurThemeFontUrlsInput, j as EverfurThemeFontsInput, k as EverfurThemeSlotInput, l as EverfurThemeSlotsInput, m as expandAppearance } from './branding.d-BFauULV6.cjs';
|
|
37
37
|
export { E as EverfurColorTokens, a as EverfurFontFaceKey, b as EverfurFontFamilies, c as EverfurFontSource, d as EverfurFontWeight, e as EverfurLetterSpacingTokens, f as EverfurLineHeightTokens, g as EverfurMotionDurationTokens, h as EverfurMotionTokens, i as EverfurRadiusTokens, j as EverfurSpaceTokens, k as EverfurSpringToken, l as EverfurTextColorTokens, m as EverfurTheme, n as EverfurThemeMeta, o as EverfurThemeSlot, p as EverfurThemeSlotKey, q as EverfurThemeSlotName, r as EverfurThemeSlots, s as EverfurTypeSizeTokens, t as EverfurTypeTokens, u as EverfurWeightTokens, T as THEME_SLOT_KEYS, v as THEME_SLOT_KEYS_BY_SLOT, w as THEME_SLOT_NAMES, x as themeSlotKeysFor } from './tokens.d-BUVqme2D.cjs';
|
|
38
38
|
export { E as EverfurChatEmptyHeaderContext, a as EverfurChatTopCard } from './threadOptions.d-CW51PyVd.cjs';
|
|
39
|
-
import './requestFunnel.d-
|
|
39
|
+
import './requestFunnel.d-CQ0O8fMG.cjs';
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Wrap the tree ONCE, high. Mounting constructs the runtime (transport, identity, registry,
|
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
export { B as Brand, a as ClientId, C as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as userRef } from './ids.d-B2GAAifq.js';
|
|
3
3
|
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as categoryFor, i as isRetryableCode, u as userFacingError } from './EverfurError.d-8NHtlgzA.js';
|
|
4
4
|
export { a as EverfurConfigError, E as EverfurResult, b as EverfurThrownError, i as isErr, c as isOk, u as unwrap } from './EverfurResult.d-D_-254ZY.js';
|
|
5
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from './config.d-
|
|
6
|
-
export { M as MintedToken, T as TokenProvider } from './identity.d-
|
|
7
|
-
export { E as EverfurClientEvent, a as EverfurEventHandler, L as LogLevel, b as LogRecord, c as LogSink, P as PrepareOptions, d as PrepareResult, e as PrepareStatus, S as SecureStorePort } from './runtimeTypes.d-
|
|
5
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from './config.d-D9igq-vT.js';
|
|
6
|
+
export { M as MintedToken, T as TokenProvider } from './identity.d-DR5YwO6E.js';
|
|
7
|
+
export { E as EverfurClientEvent, a as EverfurEventHandler, L as LogLevel, b as LogRecord, c as LogSink, P as PrepareOptions, d as PrepareResult, e as PrepareStatus, S as SecureStorePort } from './runtimeTypes.d-BJHYj2MI.js';
|
|
8
8
|
export { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
|
|
9
9
|
export { E as EverfurFaceStyle, a as EverfurThemeAdjustment, f as face, h as headingFace, p as previewTheme, t as themeAdjustments } from './typeStyle.d-B9Jo5mDX.js';
|
|
10
10
|
import { C as CapabilityName, a as CapabilityDecision } from './resolve.d-BTC3b6FW.js';
|
|
@@ -15,19 +15,19 @@ export { C as CameraPort, a as CaptureOptions, M as MediaSource } from './Camera
|
|
|
15
15
|
export { F as FileHandle, b as FilePort, a as UploadPolicyWire, U as UploadTransport } from './ports.d-BX4f4UsB.js';
|
|
16
16
|
export { E as EverfurUnread, P as PresignedPolicy, U as UploadPort } from './unreadStore.d-gCsleb6l.js';
|
|
17
17
|
export { R as RecordsDocumentPicker, a as RnRecordsUploadFetch, b as RnRecordsUploadTransportOptions, c as createRnRecordsUploadTransport } from './uploadTransport.d-EGoUl7gX.js';
|
|
18
|
-
export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, j as ChatMessage, h as ChatMessagePage, k as ChatMessageRole, l as ChatMessageSender, i as ChatRefreshOptions, m as ChatStatus, n as Citation, S as SendOptions } from './chatTypes.d-
|
|
19
|
-
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository.d-
|
|
18
|
+
export { C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, g as ChatHistoryOptions, j as ChatMessage, h as ChatMessagePage, k as ChatMessageRole, l as ChatMessageSender, i as ChatRefreshOptions, m as ChatStatus, n as Citation, S as SendOptions } from './chatTypes.d-hS1AilYl.js';
|
|
19
|
+
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository.d-CCJJQXnl.js';
|
|
20
20
|
import { ReactNode } from 'react';
|
|
21
|
-
import { E as EverfurProviderProps } from './context.d-
|
|
22
|
-
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from './context.d-
|
|
21
|
+
import { E as EverfurProviderProps } from './context.d-hPfsEsNf.js';
|
|
22
|
+
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from './context.d-hPfsEsNf.js';
|
|
23
23
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
24
|
-
export { E as EverfurChat } from './Chat.d-
|
|
25
|
-
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatFollowUpPolicy, c as ChatSentiment, E as EverfurChatDraftStore, d as EverfurUnreadState, U as UrgencyDisplayLevel, e as UseChatAttachmentsOptions, f as UseChatAttachmentsState, g as UseEverfurChatState, h as UseEverfurPetsState, i as UseEverfurUnreadOptions, j as chatHandoffTokenFromUrl, u as useChatAttachments, k as useEverfurChat, l as useEverfurPets } from './chatHandoffToken.d-
|
|
26
|
-
export { E as EverfurChatAttachments, a as EverfurChatProps, b as EverfurDictationLoader, c as createAppStateLifecycle, r as registerEverfurDictation, u as useEverfurUnread } from './useUnread.d-
|
|
24
|
+
export { E as EverfurChat } from './Chat.d-CoGJrK3t.js';
|
|
25
|
+
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatFollowUpPolicy, c as ChatSentiment, E as EverfurChatDraftStore, d as EverfurUnreadState, U as UrgencyDisplayLevel, e as UseChatAttachmentsOptions, f as UseChatAttachmentsState, g as UseEverfurChatState, h as UseEverfurPetsState, i as UseEverfurUnreadOptions, j as chatHandoffTokenFromUrl, u as useChatAttachments, k as useEverfurChat, l as useEverfurPets } from './chatHandoffToken.d-DVv9tl8h.js';
|
|
26
|
+
export { E as EverfurChatAttachments, a as EverfurChatProps, b as EverfurDictationLoader, c as createAppStateLifecycle, r as registerEverfurDictation, u as useEverfurUnread } from './useUnread.d-ElAEfgl1.js';
|
|
27
27
|
export { E as EverfurChatAnswerCard, a as EverfurChatAnswerCards, b as EverfurChatAnswerContext, c as EverfurChatEmptyState, d as EverfurChatFollowUpAction, e as EverfurChatHistoryBar, f as EverfurChatHistorySheet, g as EverfurChatOpeningCard } from './threadOptions.d-U5YBUKM-.js';
|
|
28
28
|
export { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.js';
|
|
29
|
-
export { P as PetProfileInput, a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from './petsRepository.d-
|
|
30
|
-
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments.d-
|
|
29
|
+
export { P as PetProfileInput, a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from './petsRepository.d-DRW7NkKm.js';
|
|
30
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments.d-Dm6NUJTR.js';
|
|
31
31
|
export { E as EverfurChatAnswerStyle, a as EverfurChatComposerPlaceholder, b as EverfurChatComposerStyle, c as EverfurChatHistoryBarSetting, d as EverfurChatHistoryStyle, e as EverfurChatSendButtonSetting, f as EverfurChatTopCardSetting, g as EverfurHealthPlanLayout, h as EverfurPresentation, i as EverfurPresentationInput, j as EverfurSafetyDisclaimerPlacement } from './presentation.d-Bs8xQ4gD.js';
|
|
32
32
|
export { E as EverfurStarterPrompt } from './quickPrompts.d-NM_81Jc1.js';
|
|
33
33
|
export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from './profile.d-CSs1wlXT.js';
|
|
@@ -36,7 +36,7 @@ import { E as EverfurThemeInput } from './branding.d-DpNGEdDL.js';
|
|
|
36
36
|
export { A as APPEARANCE_PRESETS, a as APPEARANCE_PRESET_NAMES, b as APPEARANCE_SIZE_RANGES, c as EverfurAppearance, d as EverfurAppearanceFont, e as EverfurAppearancePreset, f as EverfurAppearanceRules, g as EverfurAppearanceVariables, h as EverfurThemeFontFaceKey, i as EverfurThemeFontUrlsInput, j as EverfurThemeFontsInput, k as EverfurThemeSlotInput, l as EverfurThemeSlotsInput, m as expandAppearance } from './branding.d-DpNGEdDL.js';
|
|
37
37
|
export { E as EverfurColorTokens, a as EverfurFontFaceKey, b as EverfurFontFamilies, c as EverfurFontSource, d as EverfurFontWeight, e as EverfurLetterSpacingTokens, f as EverfurLineHeightTokens, g as EverfurMotionDurationTokens, h as EverfurMotionTokens, i as EverfurRadiusTokens, j as EverfurSpaceTokens, k as EverfurSpringToken, l as EverfurTextColorTokens, m as EverfurTheme, n as EverfurThemeMeta, o as EverfurThemeSlot, p as EverfurThemeSlotKey, q as EverfurThemeSlotName, r as EverfurThemeSlots, s as EverfurTypeSizeTokens, t as EverfurTypeTokens, u as EverfurWeightTokens, T as THEME_SLOT_KEYS, v as THEME_SLOT_KEYS_BY_SLOT, w as THEME_SLOT_NAMES, x as themeSlotKeysFor } from './tokens.d-BUVqme2D.js';
|
|
38
38
|
export { E as EverfurChatEmptyHeaderContext, a as EverfurChatTopCard } from './threadOptions.d-CW51PyVd.js';
|
|
39
|
-
import './requestFunnel.d-
|
|
39
|
+
import './requestFunnel.d-BYLycQMI.js';
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Wrap the tree ONCE, high. Mounting constructs the runtime (transport, identity, registry,
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ return Object.freeze({kind:"done",terminal:true,conversationId:fields.conversati
|
|
|
11
11
|
return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:fields.serverRequestId??null})}function analysisStartedFrame(requestId,lastEventId,serverRequestId=null){/* @__PURE__ */
|
|
12
12
|
return Object.freeze({kind:"analysisStarted",requestId:requestId,lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function analysisCompleteFrame(fields,serverRequestId=null){/* @__PURE__ */
|
|
13
13
|
return Object.freeze({kind:"analysisComplete",terminal:false,resultId:fields.resultId,analysisType:fields.analysisType,modelVersion:fields.modelVersion,confidence:fields.confidence,detections:/* @__PURE__ */Object.freeze([...fields.detections]),interpretation:fields.interpretation,lastEventId:fields.lastEventId,serverRequestId:serverRequestId})}function unknownFrame(raw,lastEventId,serverRequestId=null){/* @__PURE__ */
|
|
14
|
-
return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function mintFailedError(cause,refusal){let message=cause instanceof Error?cause.message:typeof cause=="string"?cause:null;return makeEverfurError("authRejected",{retryable:false,...refusal?.wireCode?{wireCode:refusal.wireCode}:{},...refusal?.requestId?{requestId:refusal.requestId}:{},...message?{wireMessage:message}:{},...cause!=null?{raw:cause}:{}})}function createIdentityProvider(userRef2,getToken,onMinted,onRejected){let cached=null,rejectionReported=false,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,rejectionReported=!1,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef2,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null},reportRejected(){revoked||rejectionReported||(rejectionReported=true,onRejected?.())}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch(cause){return ctx.identity.reportRejected?.(),err(mintFailedError(cause))}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch(cause){return ctx.identity.reportRejected?.(),err(mintFailedError(cause,{wireCode:wireCodeOf(first.error.raw),requestId:first.error.requestId}))}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?(ctx.identity.reportRejected?.(),err(refusedAfterRemintError(retry.error))):retry}function refusedAfterRemintError(refusal){let raw=refusal.raw,wireCode=wireCodeOf(raw);return makeEverfurError("authRejected",{retryable:false,...refusal.httpStatus!==void 0?{httpStatus:refusal.httpStatus}:{},...refusal.requestId?{requestId:refusal.requestId}:{},...wireCode?{wireCode:wireCode}:{},...refusal.reasonCode?{reasonCode:refusal.reasonCode}:{},...refusal.wireMessage?{wireMessage:refusal.wireMessage}:{},...raw!=null?{raw:raw}:{}})}function wireCodeOf(body){if(typeof body!="object"||body===null)return null;let b=body,code=(typeof b.error=="object"&&b.error!==null?b.error.code:void 0)??b.code;return typeof code=="string"&&code.length>0?code:null}var DAILY_QUOTA_WIRE_CODE="DAILY_QUOTA_EXCEEDED",THROTTLES=/* @__PURE__ */new Set(["THROTTLINGEXCEPTION","RATELIMITED","TOOMANYREQUESTS"]);function foldDailyQuotaWireCode(code,body){if(!THROTTLES.has(code.toUpperCase().replace(/[^A-Z0-9]/g,"")))return code;let b=body,limit=b?.daily_limit??b?.error?.daily_limit;return typeof limit=="number"&&Number.isFinite(limit)?DAILY_QUOTA_WIRE_CODE:code}function createFallbackUtf8Decoder(){let pending=[];return{decode(input,options){let stream=options?.stream===true,bytes=pending.length>0?pending.slice():[];if(input!==void 0)for(let i2=0;i2<input.length;i2+=1)bytes.push(input[i2]);pending=[];let out="",i=0;for(;i<bytes.length;){let b0=bytes[i];if(b0<128){out+=String.fromCharCode(b0),i+=1;continue}let need,lower=128,upper=191,cp;if(b0>=194&&b0<=223)need=1,cp=b0&31;else if(b0>=224&&b0<=239)need=2,cp=b0&15,b0===224&&(lower=160),b0===237&&(upper=159);else if(b0>=240&&b0<=244)need=3,cp=b0&7,b0===240&&(lower=144),b0===244&&(upper=143);else{out+="�",i+=1;continue}let j=1,valid=true;for(;j<=need&&!(i+j>=bytes.length);){let b=bytes[i+j],lo=j===1?lower:128,hi=j===1?upper:191;if(b<lo||b>hi){valid=false;break}cp=cp<<6|b&63,j+=1}if(!valid){out+="�",i+=j;continue}if(j<=need){stream?pending=bytes.slice(i):out+="�";break}out+=String.fromCodePoint(cp),i+=need+1}return out}}}function createUtf8Decoder(){let Native=globalThis.TextDecoder;return typeof Native=="function"?new Native("utf-8"):createFallbackUtf8Decoder()}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */z.record(/* @__PURE__ */z.string(),/* @__PURE__ */z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=createUtf8Decoder(),buffer="",scanFrom=0,sawDelta=false;for await(let chunk of bytes){for(buffer+=decoder.decode(chunk,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line=rawLine.replace(/\s+$/,"");line.length===0||line.startsWith(":")||(line.startsWith("id:")?id=line.slice(3).trim():line.startsWith("data:")&&dataLines.push(line.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var SDK_VERSION="0.20.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
|
|
14
|
+
return Object.freeze({kind:"unknown",raw:{...raw},lastEventId:lastEventId,serverRequestId:serverRequestId,terminal:false})}function mintFailedError(cause,refusal){let message=cause instanceof Error?cause.message:typeof cause=="string"?cause:null;return makeEverfurError("authRejected",{retryable:false,...refusal?.wireCode?{wireCode:refusal.wireCode}:{},...refusal?.requestId?{requestId:refusal.requestId}:{},...message?{wireMessage:message}:{},...cause!=null?{raw:cause}:{}})}function createIdentityProvider(userRef2,getToken,onMinted,onRejected){let cached=null,rejectionReported=false,inFlight3=null,revoked=false,load=()=>inFlight3||(inFlight3=(async()=>{try{let minted=await getToken(),token=typeof minted=="string"?minted:minted?.token;if(typeof token!="string"||token.length===0)throw new EverfurConfigError("invalid-argument","TokenProvider returned an empty token");return cached=token,rejectionReported=!1,onMinted?.(typeof minted=="string"?null:expiryMs(minted.expiresAt)),token}finally{inFlight3=null}})(),inFlight3);return{userRef:userRef2,async currentToken(opts){if(revoked)throw new EverfurConfigError("not-initialized","This identity was cleared (sign-out); mint a new one.");return opts?.forceRefresh&&(cached=null),cached!==null?cached:load()},hasToken(){return!revoked&&cached!==null},clear(){revoked=true,cached=null},reportRejected(){revoked||rejectionReported||(rejectionReported=true,onRejected?.())}}}function expiryMs(value){if(value===void 0)return null;let ms=typeof value=="number"?value<1e11?value*1e3:value:new Date(value).getTime();return Number.isFinite(ms)?ms:null}function newSessionId(){let bytes=new Uint8Array(16),cryptoObj=globalThis.crypto;if(typeof cryptoObj?.getRandomValues=="function")cryptoObj.getRandomValues(bytes);else for(let i=0;i<bytes.length;i+=1)bytes[i]=Math.floor(Math.random()*256);bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;let hex=[];for(let i=0;i<bytes.length;i+=1)hex.push(bytes[i].toString(16).padStart(2,"0"));return hex.slice(0,4).join("")+"-"+hex.slice(4,6).join("")+"-"+hex.slice(6,8).join("")+"-"+hex.slice(8,10).join("")+"-"+hex.slice(10,16).join("")}function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch(cause){return ctx.identity.reportRejected?.(),err(mintFailedError(cause))}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch(cause){return ctx.identity.reportRejected?.(),err(mintFailedError(cause,{wireCode:wireCodeOf(first.error.raw),requestId:first.error.requestId}))}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?(ctx.identity.reportRejected?.(),err(refusedAfterRemintError(retry.error))):retry}function refusedAfterRemintError(refusal){let raw=refusal.raw,wireCode=wireCodeOf(raw);return makeEverfurError("authRejected",{retryable:false,...refusal.httpStatus!==void 0?{httpStatus:refusal.httpStatus}:{},...refusal.requestId?{requestId:refusal.requestId}:{},...wireCode?{wireCode:wireCode}:{},...refusal.reasonCode?{reasonCode:refusal.reasonCode}:{},...refusal.wireMessage?{wireMessage:refusal.wireMessage}:{},...raw!=null?{raw:raw}:{}})}function wireCodeOf(body){if(typeof body!="object"||body===null)return null;let b=body,code=(typeof b.error=="object"&&b.error!==null?b.error.code:void 0)??b.code;return typeof code=="string"&&code.length>0?code:null}var DAILY_QUOTA_WIRE_CODE="DAILY_QUOTA_EXCEEDED",THROTTLES=/* @__PURE__ */new Set(["THROTTLINGEXCEPTION","RATELIMITED","TOOMANYREQUESTS"]);function foldDailyQuotaWireCode(code,body){if(!THROTTLES.has(code.toUpperCase().replace(/[^A-Z0-9]/g,"")))return code;let b=body,limit=b?.daily_limit??b?.error?.daily_limit;return typeof limit=="number"&&Number.isFinite(limit)?DAILY_QUOTA_WIRE_CODE:code}function createFallbackUtf8Decoder(){let pending=[];return{decode(input,options){let stream=options?.stream===true,bytes=pending.length>0?pending.slice():[];if(input!==void 0)for(let i2=0;i2<input.length;i2+=1)bytes.push(input[i2]);pending=[];let out="",i=0;for(;i<bytes.length;){let b0=bytes[i];if(b0<128){out+=String.fromCharCode(b0),i+=1;continue}let need,lower=128,upper=191,cp;if(b0>=194&&b0<=223)need=1,cp=b0&31;else if(b0>=224&&b0<=239)need=2,cp=b0&15,b0===224&&(lower=160),b0===237&&(upper=159);else if(b0>=240&&b0<=244)need=3,cp=b0&7,b0===240&&(lower=144),b0===244&&(upper=143);else{out+="�",i+=1;continue}let j=1,valid=true;for(;j<=need&&!(i+j>=bytes.length);){let b=bytes[i+j],lo=j===1?lower:128,hi=j===1?upper:191;if(b<lo||b>hi){valid=false;break}cp=cp<<6|b&63,j+=1}if(!valid){out+="�",i+=j;continue}if(j<=need){stream?pending=bytes.slice(i):out+="�";break}out+=String.fromCodePoint(cp),i+=need+1}return out}}}function createUtf8Decoder(){let Native=globalThis.TextDecoder;return typeof Native=="function"?new Native("utf-8"):createFallbackUtf8Decoder()}var BLOCK_SEPARATOR=`\n\n`,MAX_PENDING_BLOCK_CHARS=1048576,wireObjectSchema=/* @__PURE__ */z.record(/* @__PURE__ */z.string(),/* @__PURE__ */z.unknown()),URGENCY_LEVELS=["emergency","schedule_soon","home_care"];async function*parseSse(bytes,serverRequestId=null){let resolvedRequestId=null,requestIdNow=()=>(resolvedRequestId!==null||(resolvedRequestId=typeof serverRequestId=="function"?serverRequestId():serverRequestId),resolvedRequestId),decoder=createUtf8Decoder(),buffer="",scanFrom=0,sawDelta=false;for await(let chunk of bytes){for(buffer+=decoder.decode(chunk,{stream:true});;){let sep=buffer.indexOf(BLOCK_SEPARATOR,scanFrom);if(sep===-1)break;let block=buffer.slice(0,sep);buffer=buffer.slice(sep+BLOCK_SEPARATOR.length),scanFrom=0;let frame=parseBlock(block,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}if(scanFrom=buffer.length>0?buffer.length-1:0,buffer.length>MAX_PENDING_BLOCK_CHARS){yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()});return}}if(buffer+=decoder.decode(),buffer.trim().length>0){let frame=parseBlock(buffer,requestIdNow());if(frame!==null&&(frame.kind==="delta"&&(sawDelta=true),yield frame,frame.terminal))return}yield errorFrame({code:sawDelta?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:requestIdNow()})}function parseBlock(block,serverRequestId){let id=null,dataLines=[];for(let rawLine of block.split(`\n`)){let line=rawLine.replace(/\s+$/,"");line.length===0||line.startsWith(":")||(line.startsWith("id:")?id=line.slice(3).trim():line.startsWith("data:")&&dataLines.push(line.slice(5).replace(/^ /,"")))}if(dataLines.length===0)return null;let decoded;try{decoded=JSON.parse(dataLines.join(`\n`))}catch{return null}if(typeof decoded!="object"||decoded===null||Array.isArray(decoded))return null;let parsed=wireObjectSchema.safeParse(decoded);return parsed.success?frameFromWire(parsed.data,id,serverRequestId):null}function frameFromWire(json,lastEventId,serverRequestId){let type=json.type,event=json.event;if(type==="error"||"error"in json)return errorFrame({code:asString(json.code)??"unknown",retryable:json.retryable===true,wireMessage:asString(json.error),synthesized:false,lastEventId:lastEventId,serverRequestId:serverRequestId});if(type==="done"||json.done===true)return doneFrame({conversationId:asString(json.conversation_id)??"",messageId:asString(json.message_id),title:asString(json.title),followUpQuestions:asStringList(json.follow_up_questions),citations:asMapList(json.citations),citationStatus:asString(json.citation_status),urgencyLevel:asUrgency(json.urgency_level),urgencyReason:asString(json.urgency_reason),urgencyProvided:urgencySlotProvided(json),resultId:asString(json.result_id),lastEventId:lastEventId},serverRequestId);if(type==="accepted"||json.status==="reasoning")return acceptedFrame(asString(json.stream_id),lastEventId,serverRequestId);if(type==="heartbeat"||json.heartbeat===true)return heartbeatFrame(lastEventId,serverRequestId);if(type==="text.delta"||"delta"in json||"token"in json){let delta=asString(json.delta)??asString(json.token)??"";return deltaFrame(delta,lastEventId,serverRequestId)}return event==="analysis_started"?analysisStartedFrame(asString(json.request_id),lastEventId,serverRequestId):event==="analysis_complete"?analysisCompleteFrame({resultId:asString(json.result_id),analysisType:asString(json.analysis_type),modelVersion:asString(json.model_version),confidence:asNumber(json.confidence),detections:asMapList(json.detections),interpretation:asString(json.interpretation),lastEventId:lastEventId},serverRequestId):unknownFrame(json,lastEventId,serverRequestId)}function asString(v){return typeof v=="string"?v:null}function asNumber(v){return typeof v=="number"&&Number.isFinite(v)?v:null}function asUrgency(v){return typeof v=="string"&&URGENCY_LEVELS.includes(v)?v:null}function urgencySlotProvided(json){if(!Object.prototype.hasOwnProperty.call(json,"urgency_level"))return false;let raw=json.urgency_level;return raw===null||asUrgency(raw)!==null}function asStringList(v){return Array.isArray(v)?v.map(e=>typeof e=="string"?e:String(e)):[]}function isPlainObject(v){return typeof v=="object"&&v!==null&&!Array.isArray(v)}function asMapList(v){return Array.isArray(v)?v.filter(isPlainObject):[]}var SDK_VERSION="0.21.0",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
|
|
15
15
|
return Object.freeze({ok:false,failure:/* @__PURE__ */Object.freeze({reason:reason,message:message})})}function checkPublishableKey(raw){let publishableKey=typeof raw=="string"?raw.trim():"";return publishableKey.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(publishableKey)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}function tryResolveClientConfig(config,options){let keyFailure=checkPublishableKey(config?.publishableKey);if(keyFailure!==null)/* @__PURE__ */
|
|
16
16
|
return Object.freeze({ok:false,failure:keyFailure});let publishableKey=config.publishableKey.trim(),baseUrl=tryResolveApiBaseUrl(config.apiBaseUrl);if(!baseUrl.ok)return baseUrl;let contractVersion=config.contractVersion?.trim()||DEFAULT_CONTRACT_VERSION;/* @__PURE__ */
|
|
17
17
|
return Object.freeze({ok:true,config:/* @__PURE__ */Object.freeze({publishableKey:publishableKey,apiBaseUrl:baseUrl.value,contractVersion:contractVersion,sdkVersion:SDK_VERSION,platform:options?.platform??SDK_PLATFORM,debug:config.debug===true})})}function tryResolveApiBaseUrl(apiBaseUrl){let explicit=apiBaseUrl?.trim(),candidate=explicit&&explicit.length>0?explicit:readEnv(ENV_API_BASE_URL);return candidate?normalizeBaseUrl(candidate):configFailure("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${ENV_API_BASE_URL}. The SDK never ships a hardcoded host.`)}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}function hostOf(authority){return authority.slice(authority.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}function isPrintableHost(host){return host.length===0||host.includes("@")?false:host.startsWith("[")&&host.endsWith("]")?true:!host.includes(":")}function canEchoOrigin(rawTrimmed,host){let schemeEnd=rawTrimmed.indexOf("://");return schemeEnd<0||rawTrimmed.slice(schemeEnd+3).includes("@")?false:isPrintableHost(host)}function safeOrigin(scheme,host){return`${scheme}://${host}`}function normalizeBaseUrl(raw){let trimmed=raw.trim(),match=ABSOLUTE_URL.exec(trimmed);if(match===null||match[2]===void 0||match[2].length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let scheme=(match[1]??"").toLowerCase(),host=hostOf(match[2]);if(host.length===0)return configFailure("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let shown=canEchoOrigin(trimmed,host)?`: ${safeOrigin(scheme,host)}`:"";if(scheme!=="https"){if(!(scheme==="http"&&isLoopbackHost(host)))return scheme==="http"?configFailure("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${shown}`):configFailure("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${shown}`)}let value=trimmed.endsWith("/")?trimmed.slice(0,-1):trimmed;/* @__PURE__ */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import { a as HealthPlanPetWords, H as HealthPlanPage } from './focus.d-
|
|
2
|
+
import { a as HealthPlanPetWords, H as HealthPlanPage } from './focus.d-CYwVLDvR.js';
|
|
3
3
|
import { P as PetRef } from './ids.d-B2GAAifq.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import { a as HealthPlanPetWords, H as HealthPlanPage } from './focus.d-
|
|
2
|
+
import { a as HealthPlanPetWords, H as HealthPlanPage } from './focus.d-9loikWy8.cjs';
|
|
3
3
|
import { P as PetRef } from './ids.d-B2GAAifq.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -4,12 +4,12 @@ import { StyleProp, ViewStyle } from 'react-native';
|
|
|
4
4
|
import { P as PetRef } from '../../ids.d-B2GAAifq.cjs';
|
|
5
5
|
export { B as Brand, C as ConversationId, R as RecordsRequestId, U as UserRef, _ as __brand } from '../../ids.d-B2GAAifq.cjs';
|
|
6
6
|
import { L as LifecyclePort } from '../../LifecyclePort.d-Cr1p33a7.cjs';
|
|
7
|
-
import { E as EverfurInboxOpenHandler, a as EverfurInboxCopy, U as UseEverfurInboxOptions, b as EverfurInboxState, c as UseEverfurInboxUnreadOptions, d as EverfurInboxUnread } from '../../useInboxUnread.d-
|
|
8
|
-
export { e as EverfurInboxClient, f as EverfurInboxItem, g as EverfurInboxOpen, h as EverfurInboxPage, i as EverfurInboxQuery, j as EverfurInboxSnapshot, k as EverfurInboxStatus, l as EverfurInboxTarget, I as InboxRuntime, m as createInboxClient, u as useEverfurInboxClient } from '../../useInboxUnread.d-
|
|
7
|
+
import { E as EverfurInboxOpenHandler, a as EverfurInboxCopy, U as UseEverfurInboxOptions, b as EverfurInboxState, c as UseEverfurInboxUnreadOptions, d as EverfurInboxUnread } from '../../useInboxUnread.d-Dq3CCAa3.cjs';
|
|
8
|
+
export { e as EverfurInboxClient, f as EverfurInboxItem, g as EverfurInboxOpen, h as EverfurInboxPage, i as EverfurInboxQuery, j as EverfurInboxSnapshot, k as EverfurInboxStatus, l as EverfurInboxTarget, I as InboxRuntime, m as createInboxClient, u as useEverfurInboxClient } from '../../useInboxUnread.d-Dq3CCAa3.cjs';
|
|
9
9
|
export { d as EverfurNotification, f as EverfurNotificationEventType, g as EverfurNotificationTarget, h as EverfurNotificationTargetKind } from '../../parse.d-DYsx1Q2V.cjs';
|
|
10
10
|
export { V as VetVisitIntent } from '../../visitIntent.d-D7_yVp1I.cjs';
|
|
11
|
-
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-
|
|
12
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d-
|
|
11
|
+
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-Bnl5Z0MM.cjs';
|
|
12
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d-cX5E6DAw.cjs';
|
|
13
13
|
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError.d-8NHtlgzA.cjs';
|
|
14
14
|
export { E as EverfurResult } from '../../EverfurResult.d-BFH-3s6E.cjs';
|
|
15
15
|
export { E as ErrorPolicyPort } from '../../ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
@@ -4,12 +4,12 @@ import { StyleProp, ViewStyle } from 'react-native';
|
|
|
4
4
|
import { P as PetRef } from '../../ids.d-B2GAAifq.js';
|
|
5
5
|
export { B as Brand, C as ConversationId, R as RecordsRequestId, U as UserRef, _ as __brand } from '../../ids.d-B2GAAifq.js';
|
|
6
6
|
import { L as LifecyclePort } from '../../LifecyclePort.d-Cr1p33a7.js';
|
|
7
|
-
import { E as EverfurInboxOpenHandler, a as EverfurInboxCopy, U as UseEverfurInboxOptions, b as EverfurInboxState, c as UseEverfurInboxUnreadOptions, d as EverfurInboxUnread } from '../../useInboxUnread.d-
|
|
8
|
-
export { e as EverfurInboxClient, f as EverfurInboxItem, g as EverfurInboxOpen, h as EverfurInboxPage, i as EverfurInboxQuery, j as EverfurInboxSnapshot, k as EverfurInboxStatus, l as EverfurInboxTarget, I as InboxRuntime, m as createInboxClient, u as useEverfurInboxClient } from '../../useInboxUnread.d-
|
|
7
|
+
import { E as EverfurInboxOpenHandler, a as EverfurInboxCopy, U as UseEverfurInboxOptions, b as EverfurInboxState, c as UseEverfurInboxUnreadOptions, d as EverfurInboxUnread } from '../../useInboxUnread.d-DDoSII8D.js';
|
|
8
|
+
export { e as EverfurInboxClient, f as EverfurInboxItem, g as EverfurInboxOpen, h as EverfurInboxPage, i as EverfurInboxQuery, j as EverfurInboxSnapshot, k as EverfurInboxStatus, l as EverfurInboxTarget, I as InboxRuntime, m as createInboxClient, u as useEverfurInboxClient } from '../../useInboxUnread.d-DDoSII8D.js';
|
|
9
9
|
export { d as EverfurNotification, f as EverfurNotificationEventType, g as EverfurNotificationTarget, h as EverfurNotificationTargetKind } from '../../parse.d-Do0sdAgm.js';
|
|
10
10
|
export { V as VetVisitIntent } from '../../visitIntent.d-D7_yVp1I.js';
|
|
11
|
-
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-
|
|
12
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d-
|
|
11
|
+
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-DR5YwO6E.js';
|
|
12
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d-D9igq-vT.js';
|
|
13
13
|
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError.d-8NHtlgzA.js';
|
|
14
14
|
export { E as EverfurResult } from '../../EverfurResult.d-D_-254ZY.js';
|
|
15
15
|
export { E as ErrorPolicyPort } from '../../ErrorPolicyPort.d-68yrE3BE.js';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import { E as EverfurNotificationsOptions, a as EverfurNotificationsState } from '../route.d-
|
|
3
|
-
export { D as DeviceLocale, b as DevicePlatform, c as EverfurInboxRequest, d as EverfurInboxRouter, e as EverfurNotificationRouteOutcome, f as EverfurNotificationRouterOptions, g as EverfurNotificationSurfaceRoute, h as EverfurNotificationsStatus, N as NOTIFICATIONS_REASON_MESSAGES, i as NO_INBOX_ROUTER, j as NotificationPreferences, k as NotificationPreferencesInput, l as NotificationsClient, m as NotificationsReasonCode, n as NotificationsRuntime, P as PushProvider, R as RegisterDeviceInput, o as RegisteredDevice, p as createEverfurInboxRouter, q as createNotificationsClient, r as explainNotificationsReason, s as readDeviceLocale, t as routeEverfurNotification, u as surfaceForNotification, v as useEverfurNotificationsClient } from '../route.d-
|
|
2
|
+
import { E as EverfurNotificationsOptions, a as EverfurNotificationsState } from '../route.d-q9yndhFy.cjs';
|
|
3
|
+
export { D as DeviceLocale, b as DevicePlatform, c as EverfurInboxRequest, d as EverfurInboxRouter, e as EverfurNotificationRouteOutcome, f as EverfurNotificationRouterOptions, g as EverfurNotificationSurfaceRoute, h as EverfurNotificationsStatus, N as NOTIFICATIONS_REASON_MESSAGES, i as NO_INBOX_ROUTER, j as NotificationPreferences, k as NotificationPreferencesInput, l as NotificationsClient, m as NotificationsReasonCode, n as NotificationsRuntime, P as PushProvider, R as RegisterDeviceInput, o as RegisteredDevice, p as createEverfurInboxRouter, q as createNotificationsClient, r as explainNotificationsReason, s as readDeviceLocale, t as routeEverfurNotification, u as surfaceForNotification, v as useEverfurNotificationsClient } from '../route.d-q9yndhFy.cjs';
|
|
4
4
|
export { E as EVERFUR_NOTIFICATION_EVENT_TYPES, a as EVERFUR_NOTIFICATION_TARGET_KINDS, b as EVERFUR_NOTIFICATION_VERSION, c as EverfurMedicationIntent, d as EverfurNotification, e as EverfurNotificationEventName, f as EverfurNotificationEventType, g as EverfurNotificationTarget, h as EverfurNotificationTargetKind, i as EverfurOrderIntent, j as EverfurVisitPushIntent, p as parseEverfurNotification } from '../parse.d-DYsx1Q2V.cjs';
|
|
5
|
-
export { a as ChatCheckinTarget } from '../chatTypes.d-
|
|
5
|
+
export { a as ChatCheckinTarget } from '../chatTypes.d-CQC7GTdE.cjs';
|
|
6
6
|
export { V as VetVisitIntent } from '../visitIntent.d-D7_yVp1I.cjs';
|
|
7
|
-
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-
|
|
8
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-
|
|
7
|
+
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-Bnl5Z0MM.cjs';
|
|
8
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-cX5E6DAw.cjs';
|
|
9
9
|
export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids.d-B2GAAifq.cjs';
|
|
10
10
|
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.cjs';
|
|
11
11
|
export { E as EverfurResult } from '../EverfurResult.d-BFH-3s6E.cjs';
|
|
12
12
|
export { E as ErrorPolicyPort } from '../ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
13
|
-
import '../casesRepository.d-
|
|
14
|
-
import '../requestFunnel.d-
|
|
13
|
+
import '../casesRepository.d-G2dahIKO.cjs';
|
|
14
|
+
import '../requestFunnel.d-CQ0O8fMG.cjs';
|
|
15
15
|
import '../TelemetryPort.d-BDNr00hu.cjs';
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import { E as EverfurNotificationsOptions, a as EverfurNotificationsState } from '../route.d-
|
|
3
|
-
export { D as DeviceLocale, b as DevicePlatform, c as EverfurInboxRequest, d as EverfurInboxRouter, e as EverfurNotificationRouteOutcome, f as EverfurNotificationRouterOptions, g as EverfurNotificationSurfaceRoute, h as EverfurNotificationsStatus, N as NOTIFICATIONS_REASON_MESSAGES, i as NO_INBOX_ROUTER, j as NotificationPreferences, k as NotificationPreferencesInput, l as NotificationsClient, m as NotificationsReasonCode, n as NotificationsRuntime, P as PushProvider, R as RegisterDeviceInput, o as RegisteredDevice, p as createEverfurInboxRouter, q as createNotificationsClient, r as explainNotificationsReason, s as readDeviceLocale, t as routeEverfurNotification, u as surfaceForNotification, v as useEverfurNotificationsClient } from '../route.d-
|
|
2
|
+
import { E as EverfurNotificationsOptions, a as EverfurNotificationsState } from '../route.d-DFJ0gXj8.js';
|
|
3
|
+
export { D as DeviceLocale, b as DevicePlatform, c as EverfurInboxRequest, d as EverfurInboxRouter, e as EverfurNotificationRouteOutcome, f as EverfurNotificationRouterOptions, g as EverfurNotificationSurfaceRoute, h as EverfurNotificationsStatus, N as NOTIFICATIONS_REASON_MESSAGES, i as NO_INBOX_ROUTER, j as NotificationPreferences, k as NotificationPreferencesInput, l as NotificationsClient, m as NotificationsReasonCode, n as NotificationsRuntime, P as PushProvider, R as RegisterDeviceInput, o as RegisteredDevice, p as createEverfurInboxRouter, q as createNotificationsClient, r as explainNotificationsReason, s as readDeviceLocale, t as routeEverfurNotification, u as surfaceForNotification, v as useEverfurNotificationsClient } from '../route.d-DFJ0gXj8.js';
|
|
4
4
|
export { E as EVERFUR_NOTIFICATION_EVENT_TYPES, a as EVERFUR_NOTIFICATION_TARGET_KINDS, b as EVERFUR_NOTIFICATION_VERSION, c as EverfurMedicationIntent, d as EverfurNotification, e as EverfurNotificationEventName, f as EverfurNotificationEventType, g as EverfurNotificationTarget, h as EverfurNotificationTargetKind, i as EverfurOrderIntent, j as EverfurVisitPushIntent, p as parseEverfurNotification } from '../parse.d-Do0sdAgm.js';
|
|
5
|
-
export { a as ChatCheckinTarget } from '../chatTypes.d-
|
|
5
|
+
export { a as ChatCheckinTarget } from '../chatTypes.d-hS1AilYl.js';
|
|
6
6
|
export { V as VetVisitIntent } from '../visitIntent.d-D7_yVp1I.js';
|
|
7
|
-
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-
|
|
8
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-
|
|
7
|
+
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-DR5YwO6E.js';
|
|
8
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-D9igq-vT.js';
|
|
9
9
|
export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids.d-B2GAAifq.js';
|
|
10
10
|
export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.js';
|
|
11
11
|
export { E as EverfurResult } from '../EverfurResult.d-D_-254ZY.js';
|
|
12
12
|
export { E as ErrorPolicyPort } from '../ErrorPolicyPort.d-68yrE3BE.js';
|
|
13
|
-
import '../casesRepository.d-
|
|
14
|
-
import '../requestFunnel.d-
|
|
13
|
+
import '../casesRepository.d-CCJJQXnl.js';
|
|
14
|
+
import '../requestFunnel.d-BYLycQMI.js';
|
|
15
15
|
import '../TelemetryPort.d-BDNr00hu.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
2
|
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
|
|
3
3
|
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
4
|
-
import { R as RequestFunnel } from './requestFunnel.d-
|
|
5
|
-
import { A as AuthContext } from './identity.d-
|
|
4
|
+
import { R as RequestFunnel } from './requestFunnel.d-CQ0O8fMG.cjs';
|
|
5
|
+
import { A as AuthContext } from './identity.d-Bnl5Z0MM.cjs';
|
|
6
6
|
import { P as PetRef, U as UserRef } from './ids.d-B2GAAifq.cjs';
|
|
7
7
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
2
|
import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
|
|
3
3
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
4
|
-
import { R as RequestFunnel } from './requestFunnel.d-
|
|
5
|
-
import { A as AuthContext } from './identity.d-
|
|
4
|
+
import { R as RequestFunnel } from './requestFunnel.d-BYLycQMI.js';
|
|
5
|
+
import { A as AuthContext } from './identity.d-DR5YwO6E.js';
|
|
6
6
|
import { P as PetRef, U as UserRef } from './ids.d-B2GAAifq.js';
|
|
7
7
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort.d-68yrE3BE.js';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
3
|
-
import { j as FetchLike } from './config.d-
|
|
3
|
+
import { j as FetchLike } from './config.d-cX5E6DAw.cjs';
|
|
4
4
|
import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile.d-CSs1wlXT.cjs';
|
|
5
5
|
|
|
6
6
|
/** How your backend reaches Everfur for pet writes. Build it once and reuse it. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
3
|
-
import { j as FetchLike } from './config.d-
|
|
3
|
+
import { j as FetchLike } from './config.d-D9igq-vT.js';
|
|
4
4
|
import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile.d-CSs1wlXT.js';
|
|
5
5
|
|
|
6
6
|
/** How your backend reaches Everfur for pet writes. Build it once and reuse it. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
|
|
3
|
-
import { A as AuthContext } from './identity.d-
|
|
3
|
+
import { A as AuthContext } from './identity.d-Bnl5Z0MM.cjs';
|
|
4
4
|
import { P as PetRef } from './ids.d-B2GAAifq.cjs';
|
|
5
5
|
import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile.d-CSs1wlXT.cjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
|
|
3
|
-
import { A as AuthContext } from './identity.d-
|
|
3
|
+
import { A as AuthContext } from './identity.d-DR5YwO6E.js';
|
|
4
4
|
import { P as PetRef } from './ids.d-B2GAAifq.js';
|
|
5
5
|
import { P as PetHealthProfileInput, a as PetHealthProfile } from './profile.d-CSs1wlXT.js';
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../DepthViews.d-
|
|
3
|
-
export { R as RecordsDepthStatus, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, a as useRecordsDepthRead } from '../../useRecordsDepth.d-
|
|
4
|
-
export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../timelineRows.d-
|
|
5
|
-
export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight, s as mapDocumentContributions, t as mapRecordDepth, u as mapRecordsTimeline } from '../../depth.d-
|
|
6
|
-
export { C as ClinicDraft, a as ClinicLocation, R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, d as RecordsUrlKind } from '../../screenProps.d-
|
|
2
|
+
export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../DepthViews.d-XTv4s3ru.cjs';
|
|
3
|
+
export { R as RecordsDepthStatus, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, a as useRecordsDepthRead } from '../../useRecordsDepth.d-Cd5Vyb7D.cjs';
|
|
4
|
+
export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../timelineRows.d-uSfr2IP3.cjs';
|
|
5
|
+
export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight, s as mapDocumentContributions, t as mapRecordDepth, u as mapRecordsTimeline } from '../../depth.d-KkrGx98U.cjs';
|
|
6
|
+
export { C as ClinicDraft, a as ClinicLocation, R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, d as RecordsUrlKind } from '../../screenProps.d-DfAmuKkr.cjs';
|
|
7
7
|
export { R as RecordsAskEntityRef, a as RecordsAskHandler } from '../../recordsAsk.d-C5CGSi3j.cjs';
|
|
8
8
|
export { R as RecordsClinic } from '../../clinicModels.d-BXgKZqDb.cjs';
|
|
9
9
|
export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../ids.d-B2GAAifq.cjs';
|
|
@@ -14,8 +14,8 @@ export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin } from '.
|
|
|
14
14
|
import 'react';
|
|
15
15
|
import 'react-native';
|
|
16
16
|
import '../../ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
17
|
-
import '../../requestFunnel.d-
|
|
18
|
-
import '../../config.d-
|
|
19
|
-
import '../../identity.d-
|
|
20
|
-
import '../../clinicBatch.d-
|
|
17
|
+
import '../../requestFunnel.d-CQ0O8fMG.cjs';
|
|
18
|
+
import '../../config.d-cX5E6DAw.cjs';
|
|
19
|
+
import '../../identity.d-Bnl5Z0MM.cjs';
|
|
20
|
+
import '../../clinicBatch.d-4PFwKJfw.cjs';
|
|
21
21
|
import '../../clinicRequestProps.d-DjzUdDFx.cjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../DepthViews.d-
|
|
3
|
-
export { R as RecordsDepthStatus, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, a as useRecordsDepthRead } from '../../useRecordsDepth.d-
|
|
4
|
-
export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../timelineRows.d-
|
|
5
|
-
export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight, s as mapDocumentContributions, t as mapRecordDepth, u as mapRecordsTimeline } from '../../depth.d-
|
|
6
|
-
export { C as ClinicDraft, a as ClinicLocation, R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, d as RecordsUrlKind } from '../../screenProps.d-
|
|
2
|
+
export { E as EverfurDocumentContributions, a as EverfurDocumentContributionsProps, b as EverfurRecordDepth, c as EverfurRecordsDepthProps, d as EverfurRecordsTimeline } from '../../DepthViews.d-D31VlFKU.js';
|
|
3
|
+
export { R as RecordsDepthStatus, U as UseRecordsDepthState, u as useEverfurRecordsDepthClient, a as useRecordsDepthRead } from '../../useRecordsDepth.d-BvBYIPii.js';
|
|
4
|
+
export { T as TimelineRow, a as TimelineRowKind, b as buildTimelineRows } from '../../timelineRows.d-CugnCOfZ.js';
|
|
5
|
+
export { R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, i as RecordLabMarker, j as RecordLabPoint, k as RecordPhysicalExam, l as RecordsDepthClient, m as RecordsRequestDocument, n as RecordsTimelineMedication, o as RecordsTimelineVaccine, p as RecordsTimelineView, q as RecordsTimelineVisit, r as RecordsTimelineWeight, s as mapDocumentContributions, t as mapRecordDepth, u as mapRecordsTimeline } from '../../depth.d-CfBorxcQ.js';
|
|
6
|
+
export { C as ClinicDraft, a as ClinicLocation, R as RecordsHostSeams, b as RecordsScreen, c as RecordsScreenBaseProps, d as RecordsUrlKind } from '../../screenProps.d-tVzlXGaN.js';
|
|
7
7
|
export { R as RecordsAskEntityRef, a as RecordsAskHandler } from '../../recordsAsk.d-C5CGSi3j.js';
|
|
8
8
|
export { R as RecordsClinic } from '../../clinicModels.d-CaS64-P-.js';
|
|
9
9
|
export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../ids.d-B2GAAifq.js';
|
|
@@ -14,8 +14,8 @@ export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin } from '.
|
|
|
14
14
|
import 'react';
|
|
15
15
|
import 'react-native';
|
|
16
16
|
import '../../ErrorPolicyPort.d-68yrE3BE.js';
|
|
17
|
-
import '../../requestFunnel.d-
|
|
18
|
-
import '../../config.d-
|
|
19
|
-
import '../../identity.d-
|
|
20
|
-
import '../../clinicBatch.d-
|
|
17
|
+
import '../../requestFunnel.d-BYLycQMI.js';
|
|
18
|
+
import '../../config.d-D9igq-vT.js';
|
|
19
|
+
import '../../identity.d-DR5YwO6E.js';
|
|
20
|
+
import '../../clinicBatch.d-BpP2NBb3.js';
|
|
21
21
|
import '../../clinicRequestProps.d-BuMuGoVZ.js';
|