@everfur/sdk 0.19.0 → 0.20.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.
Files changed (178) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/{Chat.d-BHovj6Ku.d.ts → Chat.d-D61LLPJh.d.ts} +1 -1
  3. package/dist/{Chat.d-BO-XtVYe.d.cts → Chat.d-IpxKa9gS.d.cts} +1 -1
  4. package/dist/{DepthViews.d-DKoZgF8l.d.ts → DepthViews.d-C8EsR8Gq.d.ts} +1 -1
  5. package/dist/{DepthViews.d-BwIkdmWZ.d.cts → DepthViews.d-CDIL4mPa.d.cts} +1 -1
  6. package/dist/{DepthViews.d-Bx85LeiP.d.cts → DepthViews.d-Q1nqdH8n.d.cts} +1 -1
  7. package/dist/{DepthViews.d-CBUunxP1.d.ts → DepthViews.d-w2o4Nf7r.d.ts} +1 -1
  8. package/dist/{RecordsPage.d-DRFp2LXH.d.cts → RecordsPage.d-BSjZOHu8.d.cts} +11 -5
  9. package/dist/{RecordsPage.d-CsvBhU0f.d.ts → RecordsPage.d-DqhM_rCr.d.ts} +11 -5
  10. package/dist/animations/index.d.cts +3 -3
  11. package/dist/animations/index.d.ts +3 -3
  12. package/dist/{attachments.d-DWUsHPf9.d.cts → attachments.d-BviU_Tja.d.cts} +1 -1
  13. package/dist/{attachments.d-DOZjCdkb.d.ts → attachments.d-DZVfHHnY.d.ts} +1 -1
  14. package/dist/{bookingCopy.d-BlMWlvgv.d.ts → bookingCopy.d-5V3erfXD.d.ts} +2 -2
  15. package/dist/{bookingCopy.d-tvO7y6MK.d.cts → bookingCopy.d-DlzUPsFE.d.cts} +2 -2
  16. package/dist/{casesRepository.d-sSo6oakf.d.cts → casesRepository.d-7Us2O-z8.d.cts} +1 -1
  17. package/dist/{casesRepository.d-C7qbrOL-.d.ts → casesRepository.d-Dqg-KbpA.d.ts} +1 -1
  18. package/dist/chat/index.d.cts +10 -10
  19. package/dist/chat/index.d.ts +10 -10
  20. package/dist/chat/lite/index.d.cts +10 -10
  21. package/dist/chat/lite/index.d.ts +10 -10
  22. package/dist/{chatHandoffToken.d-D6GUoBvs.d.cts → chatHandoffToken.d-B9pjkEfl.d.cts} +5 -5
  23. package/dist/{chatHandoffToken.d-C4tEyuCT.d.ts → chatHandoffToken.d-TYcD8NIi.d.ts} +5 -5
  24. package/dist/{chatTypes.d-BI4vidgu.d.ts → chatTypes.d-DPALEQoW.d.ts} +4 -4
  25. package/dist/{chatTypes.d-CSyw9em_.d.cts → chatTypes.d-RnQ5R4zP.d.cts} +4 -4
  26. package/dist/client/index.cjs +1 -1
  27. package/dist/client/index.d.cts +6 -6
  28. package/dist/client/index.d.ts +6 -6
  29. package/dist/client/index.js +1 -1
  30. package/dist/{clinicBatch.d-BxA_uGBb.d.cts → clinicBatch.d-C6MzLj3X.d.cts} +3 -3
  31. package/dist/{clinicBatch.d-T5oSAhY-.d.ts → clinicBatch.d-t9hkown2.d.ts} +3 -3
  32. package/dist/{clinicRequestProps.d-CjsMg_OD.d.ts → clinicRequestProps.d-BuMuGoVZ.d.ts} +1 -1
  33. package/dist/{clinicRequestProps.d-1dCtouGA.d.cts → clinicRequestProps.d-DjzUdDFx.d.cts} +1 -1
  34. package/dist/{config.d-N5Xzy53V.d.ts → config.d-BnZkxI5a.d.ts} +1 -1
  35. package/dist/{config.d-jCmrhM4a.d.cts → config.d-DoC-XaJ0.d.cts} +1 -1
  36. package/dist/consent/index.cjs +1 -1
  37. package/dist/consent/index.d.cts +5 -5
  38. package/dist/consent/index.d.ts +5 -5
  39. package/dist/consent/index.js +1 -1
  40. package/dist/{context.d-l4HkFJI8.d.cts → context.d-BAh7C7T4.d.cts} +4 -4
  41. package/dist/{context.d-BJEpEERH.d.ts → context.d-z2zIjKEb.d.ts} +4 -4
  42. package/dist/{copy.d-hS49oJ4w.d.cts → copy.d-BkX6G-Ws.d.cts} +2 -2
  43. package/dist/{copy.d-hFRaovog.d.ts → copy.d-DLxgHsZZ.d.ts} +2 -2
  44. package/dist/core/index.cjs +1 -1
  45. package/dist/core/index.d.cts +14 -14
  46. package/dist/core/index.d.ts +14 -14
  47. package/dist/core/index.js +1 -1
  48. package/dist/{depth.d-BYwddMNU.d.cts → depth.d-aXddCjyh.d.cts} +3 -3
  49. package/dist/{depth.d-C99_xup2.d.ts → depth.d-z2FlzY3x.d.ts} +3 -3
  50. package/dist/{entitlementRepository.d-CiU_QIPL.d.cts → entitlementRepository.d-CDCF8eFx.d.cts} +2 -2
  51. package/dist/{entitlementRepository.d-qZAlET7C.d.ts → entitlementRepository.d-Cgmy4Opa.d.ts} +2 -2
  52. package/dist/{focus.d-CG6KhDBK.d.ts → focus.d-C2fd_5MW.d.ts} +2 -2
  53. package/dist/{focus.d-RJMXplJc.d.cts → focus.d-q_sXGhLn.d.cts} +2 -2
  54. package/dist/health-plan/index.d.cts +10 -10
  55. package/dist/health-plan/index.d.ts +10 -10
  56. package/dist/{idempotency.d-DJyOZDPb.d.cts → idempotency.d-Bqdyv_yn.d.cts} +1 -1
  57. package/dist/{idempotency.d-D-ZWpO9p.d.ts → idempotency.d-DlAPAxD5.d.ts} +1 -1
  58. package/dist/{identity.d-DIOnFzXL.d.ts → identity.d-BWZiaByn.d.ts} +1 -1
  59. package/dist/{identity.d-CA7mW59I.d.cts → identity.d-CooKscNj.d.cts} +1 -1
  60. package/dist/index.cjs +1 -1
  61. package/dist/index.d.cts +13 -13
  62. package/dist/index.d.ts +13 -13
  63. package/dist/index.js +1 -1
  64. package/dist/{introEvents.d-7wNDMhEF.d.cts → introEvents.d-C8bDDiK6.d.cts} +1 -1
  65. package/dist/{introEvents.d-BjqfFgE1.d.ts → introEvents.d-baVM016i.d.ts} +1 -1
  66. package/dist/{models.d-BSqvbTE1.d.cts → models.d-BN53M9sU.d.cts} +52 -1
  67. package/dist/{models.d-DOwnr8fi.d.ts → models.d-Bhq9p6Wa.d.ts} +52 -1
  68. package/dist/notifications/inbox/index.d.cts +4 -4
  69. package/dist/notifications/inbox/index.d.ts +4 -4
  70. package/dist/notifications/index.d.cts +7 -7
  71. package/dist/notifications/index.d.ts +7 -7
  72. package/dist/{optInView.d-B5v4cDDW.d.ts → optInView.d-C04aX0Hs.d.ts} +2 -2
  73. package/dist/{optInView.d-BQhHPleh.d.cts → optInView.d-D_D7fs6C.d.cts} +2 -2
  74. package/dist/{pets.d-DVrOb-Bj.d.ts → pets.d-CkFNO-x-.d.ts} +1 -1
  75. package/dist/{pets.d-DRqMaP8A.d.cts → pets.d-oJ2OIY22.d.cts} +1 -1
  76. package/dist/{petsRepository.d-CpYWRWFq.d.ts → petsRepository.d-CKCi6rtp.d.ts} +1 -1
  77. package/dist/{petsRepository.d-tZADfKA1.d.cts → petsRepository.d-VWMyIeIJ.d.cts} +1 -1
  78. package/dist/records/depth/index.cjs +1 -1
  79. package/dist/records/depth/index.d.cts +11 -11
  80. package/dist/records/depth/index.d.ts +11 -11
  81. package/dist/records/depth/index.js +1 -1
  82. package/dist/records/index.cjs +16 -14
  83. package/dist/records/index.d.cts +47 -17
  84. package/dist/records/index.d.ts +47 -17
  85. package/dist/records/index.js +16 -14
  86. package/dist/{requestFunnel.d-C4abgvt9.d.cts → requestFunnel.d-By0-I8Cp.d.cts} +2 -2
  87. package/dist/{requestFunnel.d-B8OVGh0p.d.ts → requestFunnel.d-DVCytzTE.d.ts} +2 -2
  88. package/dist/{route.d-BAZqGLfl.d.ts → route.d-Ay-lRct1.d.ts} +2 -2
  89. package/dist/{route.d-CTf8h9vS.d.cts → route.d-DQDX6QFn.d.cts} +2 -2
  90. package/dist/{runtimeTypes.d-DrIz5e6L.d.ts → runtimeTypes.d-C49Cgb9c.d.ts} +4 -4
  91. package/dist/{runtimeTypes.d-DbaQKGLv.d.cts → runtimeTypes.d-DUVNpR6g.d.cts} +4 -4
  92. package/dist/{screenProps.d-BP8LAZWn.d.ts → screenProps.d-B_arD3Lh.d.ts} +2 -2
  93. package/dist/{screenProps.d-Di3wYGCn.d.cts → screenProps.d-BgxlmfG5.d.cts} +2 -2
  94. package/dist/server/events/index.cjs +1 -1
  95. package/dist/server/events/index.d.cts +2 -2
  96. package/dist/server/events/index.d.ts +2 -2
  97. package/dist/server/events/index.js +1 -1
  98. package/dist/server/index.cjs +1 -1
  99. package/dist/server/index.d.cts +3 -3
  100. package/dist/server/index.d.ts +3 -3
  101. package/dist/server/index.js +1 -1
  102. package/dist/{sheetSeam.d-BBuEIVsa.d.cts → sheetSeam.d-B9iQqG_I.d.cts} +2 -2
  103. package/dist/{sheetSeam.d-B09jf4YC.d.ts → sheetSeam.d-CtuKILqp.d.ts} +2 -2
  104. package/dist/shop/index.d.cts +3 -3
  105. package/dist/shop/index.d.ts +3 -3
  106. package/dist/tabs/index.cjs +1 -1
  107. package/dist/tabs/index.d.cts +8 -8
  108. package/dist/tabs/index.d.ts +8 -8
  109. package/dist/tabs/index.js +1 -1
  110. package/dist/televet/booking/index.d.cts +6 -6
  111. package/dist/televet/booking/index.d.ts +6 -6
  112. package/dist/testing/index.cjs +1 -1
  113. package/dist/testing/index.d.cts +1 -1
  114. package/dist/testing/index.d.ts +1 -1
  115. package/dist/testing/index.js +1 -1
  116. package/dist/testing/rn/index.d.cts +8 -8
  117. package/dist/testing/rn/index.d.ts +8 -8
  118. package/dist/testing/web/index.d.cts +9 -9
  119. package/dist/testing/web/index.d.ts +9 -9
  120. package/dist/texting/index.d.cts +5 -5
  121. package/dist/texting/index.d.ts +5 -5
  122. package/dist/{threadOptions.d-Cwmyu8pc.d.ts → threadOptions.d-Cbhjjb9_.d.ts} +2 -2
  123. package/dist/{threadOptions.d-REwBuXAY.d.cts → threadOptions.d-pZXzsd2d.d.cts} +2 -2
  124. package/dist/{timelineRows.d-CTlGQTB0.d.ts → timelineRows.d-BHxMeZzl.d.ts} +1 -1
  125. package/dist/{timelineRows.d-CongJG58.d.cts → timelineRows.d-DlMs82N1.d.cts} +1 -1
  126. package/dist/{useHealthPlanSubscription.d-BSo5kFT9.d.ts → useHealthPlanSubscription.d-BoC7H85G.d.ts} +2 -2
  127. package/dist/{useHealthPlanSubscription.d-Br7GKHTt.d.cts → useHealthPlanSubscription.d-CZn06-lu.d.cts} +2 -2
  128. package/dist/{useInboxUnread.d-pi6FNnK-.d.cts → useInboxUnread.d-DW0dpWdv.d.cts} +1 -1
  129. package/dist/{useInboxUnread.d-Blxu00eY.d.ts → useInboxUnread.d-vYpOXVRv.d.ts} +1 -1
  130. package/dist/{usePresentation.d-yd9Gh4GB.d.ts → usePresentation.d-CgvwGb2A.d.ts} +2 -2
  131. package/dist/{usePresentation.d-C6ci1s3j.d.cts → usePresentation.d-CyCEJ6nj.d.cts} +2 -2
  132. package/dist/{useRecords.d-BYNX01El.d.cts → useRecords.d-BMSW4aRD.d.cts} +46 -3
  133. package/dist/{useRecords.d-DWk61a4c.d.ts → useRecords.d-Cv1nhZrv.d.ts} +46 -3
  134. package/dist/{useRecordsDepth.d-C5snbNxR.d.ts → useRecordsDepth.d-CbXhWbx7.d.ts} +1 -1
  135. package/dist/{useRecordsDepth.d-BIDVPfx7.d.cts → useRecordsDepth.d-CcbL98FD.d.cts} +1 -1
  136. package/dist/{useUnread.d-w0dKMnx7.d.ts → useUnread.d-BsZKbLp9.d.ts} +3 -3
  137. package/dist/{useUnread.d-CORommFJ.d.cts → useUnread.d-CfF2Cx-q.d.cts} +3 -3
  138. package/dist/{view.d-DUhKppyl.d.cts → view.d-CF3AP3T7.d.cts} +5 -5
  139. package/dist/{view.d-CK2UN4qn.d.ts → view.d-DdyOf0T0.d.ts} +5 -5
  140. package/dist/web/consent/index.cjs +1 -1
  141. package/dist/web/consent/index.d.cts +5 -5
  142. package/dist/web/consent/index.d.ts +5 -5
  143. package/dist/web/consent/index.js +1 -1
  144. package/dist/web/health-plan/index.d.cts +12 -12
  145. package/dist/web/health-plan/index.d.ts +12 -12
  146. package/dist/web/inbox/index.cjs +1 -1
  147. package/dist/web/inbox/index.d.cts +5 -5
  148. package/dist/web/inbox/index.d.ts +5 -5
  149. package/dist/web/inbox/index.js +1 -1
  150. package/dist/web/index.cjs +1 -1
  151. package/dist/web/index.d.cts +27 -27
  152. package/dist/web/index.d.ts +27 -27
  153. package/dist/web/index.js +1 -1
  154. package/dist/web/intro/index.cjs +1 -1
  155. package/dist/web/intro/index.d.cts +8 -8
  156. package/dist/web/intro/index.d.ts +8 -8
  157. package/dist/web/intro/index.js +1 -1
  158. package/dist/web/notifications/index.d.cts +6 -6
  159. package/dist/web/notifications/index.d.ts +6 -6
  160. package/dist/web/records/depth/index.cjs +1 -1
  161. package/dist/web/records/depth/index.d.cts +11 -11
  162. package/dist/web/records/depth/index.d.ts +11 -11
  163. package/dist/web/records/depth/index.js +1 -1
  164. package/dist/web/records/index.cjs +15 -13
  165. package/dist/web/records/index.d.cts +43 -19
  166. package/dist/web/records/index.d.ts +43 -19
  167. package/dist/web/records/index.js +15 -13
  168. package/dist/web/records-sheet/index.cjs +1 -1
  169. package/dist/web/records-sheet/index.d.cts +4 -4
  170. package/dist/web/records-sheet/index.d.ts +4 -4
  171. package/dist/web/records-sheet/index.js +1 -1
  172. package/dist/web/shop/index.d.cts +3 -3
  173. package/dist/web/shop/index.d.ts +3 -3
  174. package/dist/web/televet/booking/index.d.cts +6 -6
  175. package/dist/web/televet/booking/index.d.ts +6 -6
  176. package/dist/web/texting/index.d.cts +5 -5
  177. package/dist/web/texting/index.d.ts +5 -5
  178. package/package.json +1 -1
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.19.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.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__ */
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-jCmrhM4a.cjs';
6
- export { M as MintedToken, T as TokenProvider } from './identity.d-CA7mW59I.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-DbaQKGLv.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-DoC-XaJ0.cjs';
6
+ export { M as MintedToken, T as TokenProvider } from './identity.d-CooKscNj.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-DUVNpR6g.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-CSyw9em_.cjs';
19
- export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository.d-sSo6oakf.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-RnQ5R4zP.cjs';
19
+ export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository.d-7Us2O-z8.cjs';
20
20
  import { ReactNode } from 'react';
21
- import { E as EverfurProviderProps } from './context.d-l4HkFJI8.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-l4HkFJI8.cjs';
21
+ import { E as EverfurProviderProps } from './context.d-BAh7C7T4.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-BAh7C7T4.cjs';
23
23
  import { StyleProp, ViewStyle } from 'react-native';
24
- export { E as EverfurChat } from './Chat.d-BO-XtVYe.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-D6GUoBvs.cjs';
26
- export { E as EverfurChatAttachments, a as EverfurChatProps, b as EverfurDictationLoader, c as createAppStateLifecycle, r as registerEverfurDictation, u as useEverfurUnread } from './useUnread.d-CORommFJ.cjs';
24
+ export { E as EverfurChat } from './Chat.d-IpxKa9gS.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-B9pjkEfl.cjs';
26
+ export { E as EverfurChatAttachments, a as EverfurChatProps, b as EverfurDictationLoader, c as createAppStateLifecycle, r as registerEverfurDictation, u as useEverfurUnread } from './useUnread.d-CfF2Cx-q.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-tZADfKA1.cjs';
30
- export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments.d-DWUsHPf9.cjs';
29
+ export { P as PetProfileInput, a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from './petsRepository.d-VWMyIeIJ.cjs';
30
+ export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments.d-BviU_Tja.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-C4abgvt9.cjs';
39
+ import './requestFunnel.d-By0-I8Cp.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-N5Xzy53V.js';
6
- export { M as MintedToken, T as TokenProvider } from './identity.d-DIOnFzXL.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-DrIz5e6L.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-BnZkxI5a.js';
6
+ export { M as MintedToken, T as TokenProvider } from './identity.d-BWZiaByn.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-C49Cgb9c.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-BI4vidgu.js';
19
- export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository.d-C7qbrOL-.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-DPALEQoW.js';
19
+ export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from './casesRepository.d-Dqg-KbpA.js';
20
20
  import { ReactNode } from 'react';
21
- import { E as EverfurProviderProps } from './context.d-BJEpEERH.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-BJEpEERH.js';
21
+ import { E as EverfurProviderProps } from './context.d-z2zIjKEb.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-z2zIjKEb.js';
23
23
  import { StyleProp, ViewStyle } from 'react-native';
24
- export { E as EverfurChat } from './Chat.d-BHovj6Ku.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-C4tEyuCT.js';
26
- export { E as EverfurChatAttachments, a as EverfurChatProps, b as EverfurDictationLoader, c as createAppStateLifecycle, r as registerEverfurDictation, u as useEverfurUnread } from './useUnread.d-w0dKMnx7.js';
24
+ export { E as EverfurChat } from './Chat.d-D61LLPJh.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-TYcD8NIi.js';
26
+ export { E as EverfurChatAttachments, a as EverfurChatProps, b as EverfurDictationLoader, c as createAppStateLifecycle, r as registerEverfurDictation, u as useEverfurUnread } from './useUnread.d-BsZKbLp9.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-CpYWRWFq.js';
30
- export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments.d-DOZjCdkb.js';
29
+ export { P as PetProfileInput, a as PetProfilePatch, R as RegisteredPet, W as WidgetPet, b as WidgetPetProfile } from './petsRepository.d-CKCi6rtp.js';
30
+ export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments.d-DZVfHHnY.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-B8OVGh0p.js';
39
+ import './requestFunnel.d-DVCytzTE.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.19.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.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__ */
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-RJMXplJc.cjs';
2
+ import { a as HealthPlanPetWords, H as HealthPlanPage } from './focus.d-q_sXGhLn.cjs';
3
3
  import { P as PetRef } from './ids.d-B2GAAifq.cjs';
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-CG6KhDBK.js';
2
+ import { a as HealthPlanPetWords, H as HealthPlanPage } from './focus.d-C2fd_5MW.js';
3
3
  import { P as PetRef } from './ids.d-B2GAAifq.js';
4
4
 
5
5
  /**
@@ -207,6 +207,57 @@ interface GrantConsentInput {
207
207
  readonly consentVersion: string;
208
208
  readonly idempotencyKey: string;
209
209
  }
210
+ /**
211
+ * What one records consent covers. `pet` (the default) is the original one-pet-per-decision path; `all_pets` is
212
+ * one decision for every pet the member has now, which a partner opts in to with consent text (and a new
213
+ * `consentVersion`) that says so. A pet added later is not covered by an all-pets grant; an all-pets withdrawal
214
+ * does cover it.
215
+ */
216
+ type RecordsConsentScope = 'all_pets' | 'pet';
217
+ /** The member-wide records consent, with the per-pet read-back the server (or the per-pet fallback) produced. */
218
+ interface MemberConsentState {
219
+ readonly scope: 'all_pets';
220
+ /** True only when no member-level withdrawal is on file and every current pet is granted. */
221
+ readonly granted: boolean;
222
+ /** The consent-text version of the member-level grant; null when there is none or it was withdrawn. */
223
+ readonly version: string | null;
224
+ readonly grantedAt: string | null;
225
+ /** Each current pet's own consent state, as the per-pet read returns it. */
226
+ readonly pets: readonly ConsentState[];
227
+ /**
228
+ * Only on the per-pet fallback of a grant: the pets the grant did not reach, each with its own error. When
229
+ * present, `granted` is false and the grant covered fewer pets than the member agreed to; ask them to retry.
230
+ */
231
+ readonly failed?: readonly RecordsConsentPetFailure[];
232
+ }
233
+ /** One pet the per-pet consent fallback could not record the decision for. */
234
+ interface RecordsConsentPetFailure {
235
+ readonly petRef: PetRef;
236
+ readonly error: EverfurError;
237
+ }
238
+ interface GrantConsentAllPetsInput {
239
+ readonly consentVersion: string;
240
+ readonly idempotencyKey: string;
241
+ /**
242
+ * Only for an older backend that does not serve the member-wide route: the member's pets, so the grant can
243
+ * be recorded pet by pet instead. `petRef` is always included. A failed or absent list grants `petRef` alone.
244
+ */
245
+ readonly petRef: PetRef;
246
+ readonly listPetRefs?: () => Promise<readonly PetRef[]>;
247
+ }
248
+ interface RevokeConsentAllPetsInput {
249
+ readonly petRef: PetRef;
250
+ /**
251
+ * As on the grant, for an older backend only. A failed (thrown) or absent list still withdraws `petRef`, then
252
+ * settles to an error: the withdrawal is reported as done only when every pet confirmed it.
253
+ */
254
+ readonly listPetRefs?: () => Promise<readonly PetRef[]>;
255
+ /**
256
+ * Called once for each pet whose consent was withdrawn, including when the overall result is an error because
257
+ * another pet's withdrawal failed, so every withdrawn pet's content can leave the screen.
258
+ */
259
+ readonly onRevoked?: (petRef: PetRef) => void;
260
+ }
210
261
  /**
211
262
  * Why a records read/write was refused. The coarse reason selects the recovery affordance:
212
263
  * `consent_required` -> consent CTA, `session_required` -> establish-session CTA, `entitlement` -> the
@@ -224,4 +275,4 @@ type RecordsDenialReason = 'consent_required' | 'session_required' | 'entitlemen
224
275
  /** Read the records denial reason off any settled error, defensively (null when absent). */
225
276
  declare function recordsDenialReasonOf(error: EverfurError | null): RecordsDenialReason | null;
226
277
 
227
- export { type CreateUploadRequestInput as C, type GrantConsentInput as G, type RecordDocumentMeta as R, type UploadedDocument as U, type RecordEntity as a, type RecordOrigin as b, type RecordForwardItem as c, type RecordsRequestView as d, type RecordsRequestGroupView as e, type RecordsView as f, type ConsentState as g, type RecordsDenialReason as h, type RecordsRequestStatus as i, type RecordsSimpleStatus as j, RECORDS_TERMINAL as k, type RecordIdentityField as l, type RecordSeries as m, type RecordSeriesPoint as n, isTerminalStatus as o, recordsDenialReasonOf as r };
278
+ export { type CreateUploadRequestInput as C, type GrantConsentInput as G, type MemberConsentState as M, type RecordDocumentMeta as R, type UploadedDocument as U, type RecordEntity as a, type RecordOrigin as b, type RecordsConsentScope as c, type RecordForwardItem as d, type RecordsRequestView as e, type RecordsRequestGroupView as f, type RecordsView as g, type ConsentState as h, type GrantConsentAllPetsInput as i, type RevokeConsentAllPetsInput as j, type RecordsDenialReason as k, type RecordsRequestStatus as l, type RecordsSimpleStatus as m, RECORDS_TERMINAL as n, type RecordIdentityField as o, type RecordSeries as p, type RecordSeriesPoint as q, type RecordsConsentPetFailure as r, isTerminalStatus as s, recordsDenialReasonOf as t };
@@ -207,6 +207,57 @@ interface GrantConsentInput {
207
207
  readonly consentVersion: string;
208
208
  readonly idempotencyKey: string;
209
209
  }
210
+ /**
211
+ * What one records consent covers. `pet` (the default) is the original one-pet-per-decision path; `all_pets` is
212
+ * one decision for every pet the member has now, which a partner opts in to with consent text (and a new
213
+ * `consentVersion`) that says so. A pet added later is not covered by an all-pets grant; an all-pets withdrawal
214
+ * does cover it.
215
+ */
216
+ type RecordsConsentScope = 'all_pets' | 'pet';
217
+ /** The member-wide records consent, with the per-pet read-back the server (or the per-pet fallback) produced. */
218
+ interface MemberConsentState {
219
+ readonly scope: 'all_pets';
220
+ /** True only when no member-level withdrawal is on file and every current pet is granted. */
221
+ readonly granted: boolean;
222
+ /** The consent-text version of the member-level grant; null when there is none or it was withdrawn. */
223
+ readonly version: string | null;
224
+ readonly grantedAt: string | null;
225
+ /** Each current pet's own consent state, as the per-pet read returns it. */
226
+ readonly pets: readonly ConsentState[];
227
+ /**
228
+ * Only on the per-pet fallback of a grant: the pets the grant did not reach, each with its own error. When
229
+ * present, `granted` is false and the grant covered fewer pets than the member agreed to; ask them to retry.
230
+ */
231
+ readonly failed?: readonly RecordsConsentPetFailure[];
232
+ }
233
+ /** One pet the per-pet consent fallback could not record the decision for. */
234
+ interface RecordsConsentPetFailure {
235
+ readonly petRef: PetRef;
236
+ readonly error: EverfurError;
237
+ }
238
+ interface GrantConsentAllPetsInput {
239
+ readonly consentVersion: string;
240
+ readonly idempotencyKey: string;
241
+ /**
242
+ * Only for an older backend that does not serve the member-wide route: the member's pets, so the grant can
243
+ * be recorded pet by pet instead. `petRef` is always included. A failed or absent list grants `petRef` alone.
244
+ */
245
+ readonly petRef: PetRef;
246
+ readonly listPetRefs?: () => Promise<readonly PetRef[]>;
247
+ }
248
+ interface RevokeConsentAllPetsInput {
249
+ readonly petRef: PetRef;
250
+ /**
251
+ * As on the grant, for an older backend only. A failed (thrown) or absent list still withdraws `petRef`, then
252
+ * settles to an error: the withdrawal is reported as done only when every pet confirmed it.
253
+ */
254
+ readonly listPetRefs?: () => Promise<readonly PetRef[]>;
255
+ /**
256
+ * Called once for each pet whose consent was withdrawn, including when the overall result is an error because
257
+ * another pet's withdrawal failed, so every withdrawn pet's content can leave the screen.
258
+ */
259
+ readonly onRevoked?: (petRef: PetRef) => void;
260
+ }
210
261
  /**
211
262
  * Why a records read/write was refused. The coarse reason selects the recovery affordance:
212
263
  * `consent_required` -> consent CTA, `session_required` -> establish-session CTA, `entitlement` -> the
@@ -224,4 +275,4 @@ type RecordsDenialReason = 'consent_required' | 'session_required' | 'entitlemen
224
275
  /** Read the records denial reason off any settled error, defensively (null when absent). */
225
276
  declare function recordsDenialReasonOf(error: EverfurError | null): RecordsDenialReason | null;
226
277
 
227
- export { type CreateUploadRequestInput as C, type GrantConsentInput as G, type RecordDocumentMeta as R, type UploadedDocument as U, type RecordEntity as a, type RecordOrigin as b, type RecordForwardItem as c, type RecordsRequestView as d, type RecordsRequestGroupView as e, type RecordsView as f, type ConsentState as g, type RecordsDenialReason as h, type RecordsRequestStatus as i, type RecordsSimpleStatus as j, RECORDS_TERMINAL as k, type RecordIdentityField as l, type RecordSeries as m, type RecordSeriesPoint as n, isTerminalStatus as o, recordsDenialReasonOf as r };
278
+ export { type CreateUploadRequestInput as C, type GrantConsentInput as G, type MemberConsentState as M, type RecordDocumentMeta as R, type UploadedDocument as U, type RecordEntity as a, type RecordOrigin as b, type RecordsConsentScope as c, type RecordForwardItem as d, type RecordsRequestView as e, type RecordsRequestGroupView as f, type RecordsView as g, type ConsentState as h, type GrantConsentAllPetsInput as i, type RevokeConsentAllPetsInput as j, type RecordsDenialReason as k, type RecordsRequestStatus as l, type RecordsSimpleStatus as m, RECORDS_TERMINAL as n, type RecordIdentityField as o, type RecordSeries as p, type RecordSeriesPoint as q, type RecordsConsentPetFailure as r, isTerminalStatus as s, recordsDenialReasonOf as t };
@@ -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-pi6FNnK-.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-pi6FNnK-.cjs';
7
+ import { E as EverfurInboxOpenHandler, a as EverfurInboxCopy, U as UseEverfurInboxOptions, b as EverfurInboxState, c as UseEverfurInboxUnreadOptions, d as EverfurInboxUnread } from '../../useInboxUnread.d-DW0dpWdv.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-DW0dpWdv.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-CA7mW59I.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-jCmrhM4a.cjs';
11
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-CooKscNj.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-DoC-XaJ0.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-Blxu00eY.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-Blxu00eY.js';
7
+ import { E as EverfurInboxOpenHandler, a as EverfurInboxCopy, U as UseEverfurInboxOptions, b as EverfurInboxState, c as UseEverfurInboxUnreadOptions, d as EverfurInboxUnread } from '../../useInboxUnread.d-vYpOXVRv.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-vYpOXVRv.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-DIOnFzXL.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-N5Xzy53V.js';
11
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-BWZiaByn.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-BnZkxI5a.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-CTf8h9vS.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-CTf8h9vS.cjs';
2
+ import { E as EverfurNotificationsOptions, a as EverfurNotificationsState } from '../route.d-DQDX6QFn.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-DQDX6QFn.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-CSyw9em_.cjs';
5
+ export { a as ChatCheckinTarget } from '../chatTypes.d-RnQ5R4zP.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-CA7mW59I.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-jCmrhM4a.cjs';
7
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-CooKscNj.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-DoC-XaJ0.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-sSo6oakf.cjs';
14
- import '../requestFunnel.d-C4abgvt9.cjs';
13
+ import '../casesRepository.d-7Us2O-z8.cjs';
14
+ import '../requestFunnel.d-By0-I8Cp.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-BAZqGLfl.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-BAZqGLfl.js';
2
+ import { E as EverfurNotificationsOptions, a as EverfurNotificationsState } from '../route.d-Ay-lRct1.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-Ay-lRct1.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-BI4vidgu.js';
5
+ export { a as ChatCheckinTarget } from '../chatTypes.d-DPALEQoW.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-DIOnFzXL.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-N5Xzy53V.js';
7
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-BWZiaByn.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-BnZkxI5a.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-C7qbrOL-.js';
14
- import '../requestFunnel.d-B8OVGh0p.js';
13
+ import '../casesRepository.d-Dqg-KbpA.js';
14
+ import '../requestFunnel.d-DVCytzTE.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.js';
3
3
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
4
- import { R as RequestFunnel } from './requestFunnel.d-B8OVGh0p.js';
5
- import { A as AuthContext } from './identity.d-DIOnFzXL.js';
4
+ import { R as RequestFunnel } from './requestFunnel.d-DVCytzTE.js';
5
+ import { A as AuthContext } from './identity.d-BWZiaByn.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,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-C4abgvt9.cjs';
5
- import { A as AuthContext } from './identity.d-CA7mW59I.cjs';
4
+ import { R as RequestFunnel } from './requestFunnel.d-By0-I8Cp.cjs';
5
+ import { A as AuthContext } from './identity.d-CooKscNj.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,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-N5Xzy53V.js';
3
+ import { j as FetchLike } from './config.d-BnZkxI5a.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 { j as FetchLike } from './config.d-jCmrhM4a.cjs';
3
+ import { j as FetchLike } from './config.d-DoC-XaJ0.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 { A as AuthContext } from './identity.d-DIOnFzXL.js';
3
+ import { A as AuthContext } from './identity.d-BWZiaByn.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,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-CA7mW59I.cjs';
3
+ import { A as AuthContext } from './identity.d-CooKscNj.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