@everfur/sdk 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/README.md +1 -1
- package/dist/{Chat-DbHkTbqz.d.cts → Chat-B7oN62ww.d.cts} +3 -3
- package/dist/{Chat-BoVmqEeF.d.ts → Chat-Cugs9Dsl.d.ts} +3 -3
- package/dist/{DepthViews-yO1H371y.d.ts → DepthViews-C6qFJ3fV.d.ts} +1 -1
- package/dist/{DepthViews-Chyp69Ue.d.cts → DepthViews-CUNmy99u.d.cts} +1 -1
- package/dist/{DepthViews-BzwflaJ3.d.ts → DepthViews-CiYBIBEZ.d.ts} +1 -1
- package/dist/{DepthViews-DK7EJ6Hp.d.cts → DepthViews-GxV7wSzT.d.cts} +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/{attachments-Dcb19rMP.d.ts → attachments-20X7Vuip.d.ts} +2 -2
- package/dist/{attachments-B7TrtyfH.d.cts → attachments-CkaPnIUw.d.cts} +2 -2
- package/dist/{attachments-BmMrn9tU.d.ts → attachments-DN2cNGwe.d.ts} +5 -5
- package/dist/{attachments-Dnpqk1Gl.d.cts → attachments-HXFmzk-D.d.cts} +5 -5
- package/dist/{bookingCopy-DR0-SmqH.d.ts → bookingCopy-B5igVNE0.d.ts} +2 -2
- package/dist/{bookingCopy-C153FHEC.d.cts → bookingCopy-pJpizqgz.d.cts} +2 -2
- package/dist/{callCopy-DHjem0R-.d.cts → callCopy-Bw6oZT54.d.cts} +7 -2
- package/dist/{callCopy-DHjem0R-.d.ts → callCopy-Bw6oZT54.d.ts} +7 -2
- package/dist/{casesRepository-DC9lEQez.d.cts → casesRepository-DFoK5N1O.d.cts} +1 -1
- package/dist/{casesRepository-BXdwCWQF.d.ts → casesRepository-qAkKKgji.d.ts} +1 -1
- package/dist/chat/index.d.cts +9 -9
- package/dist/chat/index.d.ts +9 -9
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +6 -6
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +1 -1
- package/dist/{config-DdK2czhD.d.ts → config-BB7e52FP.d.ts} +1 -1
- package/dist/{config-BRyNmzhx.d.cts → config-u6rK4mKt.d.cts} +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/{context-jaONuHXM.d.cts → context-BZ1k4qE3.d.cts} +5 -5
- package/dist/{context-_EyjBNKI.d.ts → context-CJYmubjx.d.ts} +5 -5
- package/dist/{copy-BJpRsqK-.d.ts → copy-CtfctY-J.d.ts} +2 -2
- package/dist/{copy-D8iSBQE6.d.cts → copy-DCO_lUXd.d.cts} +2 -2
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +12 -12
- package/dist/core/index.d.ts +12 -12
- package/dist/core/index.js +1 -1
- package/dist/{depth-DJ1KGMww.d.cts → depth-C_ym3qyi.d.cts} +2 -2
- package/dist/{depth-bKpg3L9r.d.ts → depth-_vMRMm4x.d.ts} +2 -2
- package/dist/{entitlementRepository-4x_tBE73.d.cts → entitlementRepository-DA04yM54.d.cts} +2 -2
- package/dist/{entitlementRepository-CojBLazH.d.ts → entitlementRepository-tSY9WWad.d.ts} +2 -2
- package/dist/{identity-CmxZ4GR0.d.cts → identity-CUynm8S2.d.cts} +1 -1
- package/dist/{identity-A8fVB518.d.ts → identity-D5uywCtp.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +1 -1
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/{pets-DjBlY7yg.d.cts → pets-BrdkpNJH.d.cts} +1 -1
- package/dist/{pets-e5RjSP6O.d.ts → pets-mnbN0kZG.d.ts} +1 -1
- package/dist/{petsRepository-DkQ2fwZY.d.cts → petsRepository-CQgzEFyz.d.cts} +1 -1
- package/dist/{petsRepository-CQh8paML.d.ts → petsRepository-RGI_xPK1.d.ts} +1 -1
- package/dist/{ports-CzVBbI_A.d.ts → ports-Cu_Wc5Aw.d.ts} +4 -4
- package/dist/{ports-2voZkqty.d.cts → ports-DibY-h60.d.cts} +4 -4
- package/dist/records/depth/index.cjs +6 -4
- package/dist/records/depth/index.d.cts +7 -7
- package/dist/records/depth/index.d.ts +7 -7
- package/dist/records/depth/index.js +6 -4
- package/dist/records/index.cjs +19 -17
- package/dist/records/index.d.cts +9 -9
- package/dist/records/index.d.ts +9 -9
- package/dist/records/index.js +19 -17
- package/dist/{requestFunnel-CQ42Kf9G.d.ts → requestFunnel-BkSFsLKh.d.ts} +2 -2
- package/dist/{requestFunnel-CA0ANsWj.d.cts → requestFunnel-nmhlEdbM.d.cts} +2 -2
- package/dist/{runtimeTypes-C0tI7s-V.d.ts → runtimeTypes-CU2xVmiQ.d.ts} +4 -4
- package/dist/{runtimeTypes-BxtQXaYi.d.cts → runtimeTypes-CWG1Cm4N.d.cts} +4 -4
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.d.cts +2 -2
- package/dist/server/events/index.d.ts +2 -2
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/televet/booking/index.cjs +1 -1
- package/dist/televet/booking/index.d.cts +6 -6
- package/dist/televet/booking/index.d.ts +6 -6
- package/dist/televet/booking/index.js +1 -1
- package/dist/televet/call/index.cjs +3 -5
- package/dist/televet/call/index.d.cts +1 -1
- package/dist/televet/call/index.d.ts +1 -1
- package/dist/televet/call/index.js +3 -5
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/rn/index.d.cts +7 -7
- package/dist/testing/rn/index.d.ts +7 -7
- package/dist/testing/web/index.d.cts +7 -7
- package/dist/testing/web/index.d.ts +7 -7
- package/dist/{timelineRows-WFv_3EOi.d.cts → timelineRows-CYF_I5Aq.d.cts} +1 -1
- package/dist/{timelineRows-GSpzKLla.d.ts → timelineRows-PWRoTntZ.d.ts} +1 -1
- package/dist/{useRecordsDepth-BL5Pf3oK.d.cts → useRecordsDepth-Cg4cc4bQ.d.cts} +1 -1
- package/dist/{useRecordsDepth-BQF0Zynl.d.ts → useRecordsDepth-eS9BJv_a.d.ts} +1 -1
- package/dist/{view-D3kOelPL.d.cts → view-D4UOm-yo.d.cts} +8 -2
- package/dist/{view-rgB1iqWO.d.ts → view-n_oSGiiT.d.ts} +8 -2
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/index.cjs +1 -1
- package/dist/web/index.d.cts +14 -14
- package/dist/web/index.d.ts +14 -14
- package/dist/web/index.js +1 -1
- package/dist/web/notifications/index.d.cts +3 -3
- package/dist/web/notifications/index.d.ts +3 -3
- package/dist/web/records/depth/index.cjs +5 -4
- package/dist/web/records/depth/index.d.cts +7 -7
- package/dist/web/records/depth/index.d.ts +7 -7
- package/dist/web/records/depth/index.js +6 -5
- package/dist/web/records/index.cjs +10 -9
- package/dist/web/records/index.d.cts +9 -9
- package/dist/web/records/index.d.ts +9 -9
- package/dist/web/records/index.js +10 -9
- package/dist/web/televet/booking/index.cjs +1 -1
- package/dist/web/televet/booking/index.d.cts +6 -6
- package/dist/web/televet/booking/index.d.ts +6 -6
- package/dist/web/televet/booking/index.js +1 -1
- package/dist/web/televet/call/index.cjs +3 -5
- package/dist/web/televet/call/index.d.cts +1 -1
- package/dist/web/televet/call/index.d.ts +1 -1
- package/dist/web/televet/call/index.js +3 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,48 @@ changes that has not been earned by any production integration yet.
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.9.2] - 2026-10-04
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **The records screens no longer say a clinic was emailed on a test account (web and React Native).** A test
|
|
18
|
+
account (a sandbox tenant, entitlements `livemode: false`) never emails a clinic, yet the request rail read
|
|
19
|
+
`Clinic notified` with `A secure request went to {email}.`, and the consent step for a clinic added by email
|
|
20
|
+
read `We'll email this clinic directly...`. On a test account every records screen now draws one line under
|
|
21
|
+
its header, `Test account: clinics are never contacted. Use records test mode to move a request forward.`; rail
|
|
22
|
+
step 2 reads `Clinic not contacted` with `This is a test account, so no email went to {email}.`; and the consent
|
|
23
|
+
note reads `This is a test account, so this clinic will not be emailed.` A live tenant, and a verdict with no
|
|
24
|
+
`livemode`, read exactly as before. The check is the visit simulator's (`livemode === false`, the server's
|
|
25
|
+
value). `buildRequestTimeline` takes a new optional `sandbox` flag for the rail words. Owner-approved wording
|
|
26
|
+
(2026-10-04, rows O1 to O4).
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- **Owner-approved copy (2026-10-04).** The in-app vet call strings (`VET_CALL_COPY`, rows Q1 to Q19), the chat's
|
|
31
|
+
unnamed-vet label `Your vet` (L1) and the partner docs slots (R1 to R4) are approved as written, with these
|
|
32
|
+
changes:
|
|
33
|
+
- the vet call lobby no longer shows `Usually under a minute` (Q10): a timing promise nothing measures.
|
|
34
|
+
`VET_CALL_COPY.lobbySubtitle` stays on the public type so this release is not breaking, but it is now an
|
|
35
|
+
empty string marked `@deprecated` that no SDK surface draws. A host that read it should drop the line too;
|
|
36
|
+
- `VET_CALL_COPY.lobbyPrepLabel` is `While you wait` (Q11), sentence case. The React Native label still draws
|
|
37
|
+
it in capitals through its style; the web tips heading draws it as written;
|
|
38
|
+
- the web clinic picker's spoken result count reads `Showing {n} clinics`, or `Showing 1 clinic` (M1), in
|
|
39
|
+
place of a draft slot;
|
|
40
|
+
- the partner demo apps' records consent text is `This is an Everfur demo app. Tap Allow to let it show your
|
|
41
|
+
pet's medical records from Everfur here.` (N1).
|
|
42
|
+
|
|
43
|
+
### Deprecated
|
|
44
|
+
|
|
45
|
+
- **`VET_CALL_COPY.lobbySubtitle`** (`@everfur/sdk/televet/call` and `@everfur/sdk/web/televet/call`). Its value is
|
|
46
|
+
now `''` and nothing in the SDK renders it; it is kept only so code written against `^0.9.0` still compiles.
|
|
47
|
+
Stop reading it. It may be removed in a later minor release.
|
|
48
|
+
|
|
49
|
+
### Documentation
|
|
50
|
+
|
|
51
|
+
- 00-QUICKSTART opens with the sandbox sentence (R1). 10-TESTING names the console action, "Create a test
|
|
52
|
+
account" (R2), and quotes the live/test switch and its test banner (R3). 15-EVENTS-AND-WEBHOOKS opens with the
|
|
53
|
+
approved line (R4); the rest of that chapter's prose is still marked as awaiting approval.
|
|
54
|
+
|
|
13
55
|
## [0.9.1] - 2026-10-04
|
|
14
56
|
|
|
15
57
|
### Added
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ features without shipping an app update.
|
|
|
10
10
|
a blank screen, and cannot be force-enabled client-side.
|
|
11
11
|
- The app never holds a secret. See [The security model](#the-security-model).
|
|
12
12
|
|
|
13
|
-
> `0.9.
|
|
13
|
+
> `0.9.2`, MIT licensed, public on npm. Requires React Native `>=0.74` (or React `>=18` with `react-dom`
|
|
14
14
|
> for the web entry), and Node `>=18` on the backend that mints sessions.
|
|
15
15
|
|
|
16
16
|
<!-- DRAFT COPY slot PD1-2 (owner): the README's invitation to get started (self-serve sandbox sign-up), in the owner's words. The factual paragraph below stands without it. -->
|
|
@@ -2,9 +2,9 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import { P as PetRef, C as ConversationId } from './ids-B2GAAifq.cjs';
|
|
4
4
|
import { F as FileHandle } from './ports-BN6RHF9W.cjs';
|
|
5
|
-
import { a as ChatCheckinTarget } from './ports-
|
|
6
|
-
import { W as WidgetPet, P as PetProfileInput } from './petsRepository-
|
|
7
|
-
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from './attachments-
|
|
5
|
+
import { a as ChatCheckinTarget } from './ports-DibY-h60.cjs';
|
|
6
|
+
import { W as WidgetPet, P as PetProfileInput } from './petsRepository-CQgzEFyz.cjs';
|
|
7
|
+
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from './attachments-HXFmzk-D.cjs';
|
|
8
8
|
|
|
9
9
|
/** Where a picked image comes from: the host's photo library, or its camera. */
|
|
10
10
|
type AttachmentSource = 'photo' | 'camera';
|
|
@@ -2,9 +2,9 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import { P as PetRef, C as ConversationId } from './ids-B2GAAifq.js';
|
|
4
4
|
import { F as FileHandle } from './ports-BN6RHF9W.js';
|
|
5
|
-
import { a as ChatCheckinTarget } from './ports-
|
|
6
|
-
import { W as WidgetPet, P as PetProfileInput } from './petsRepository-
|
|
7
|
-
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from './attachments-
|
|
5
|
+
import { a as ChatCheckinTarget } from './ports-Cu_Wc5Aw.js';
|
|
6
|
+
import { W as WidgetPet, P as PetProfileInput } from './petsRepository-RGI_xPK1.js';
|
|
7
|
+
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from './attachments-DN2cNGwe.js';
|
|
8
8
|
|
|
9
9
|
/** Where a picked image comes from: the host's photo library, or its camera. */
|
|
10
10
|
type AttachmentSource = 'photo' | 'camera';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { f as RecordsScreenBaseProps } from './useRecordsDepth-
|
|
2
|
+
import { f as RecordsScreenBaseProps } from './useRecordsDepth-eS9BJv_a.js';
|
|
3
3
|
|
|
4
4
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
5
5
|
readonly style?: CSSProperties;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { f as RecordsScreenBaseProps } from './useRecordsDepth-
|
|
3
|
+
import { f as RecordsScreenBaseProps } from './useRecordsDepth-Cg4cc4bQ.cjs';
|
|
4
4
|
|
|
5
5
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
6
6
|
readonly style?: StyleProp<ViewStyle>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { f as RecordsScreenBaseProps } from './useRecordsDepth-
|
|
3
|
+
import { f as RecordsScreenBaseProps } from './useRecordsDepth-eS9BJv_a.js';
|
|
4
4
|
|
|
5
5
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
6
6
|
readonly style?: StyleProp<ViewStyle>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { f as RecordsScreenBaseProps } from './useRecordsDepth-
|
|
2
|
+
import { f as RecordsScreenBaseProps } from './useRecordsDepth-Cg4cc4bQ.cjs';
|
|
3
3
|
|
|
4
4
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
5
5
|
readonly style?: CSSProperties;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import { E as EverfurResult } from '../EverfurResult-COlXj1wq.cjs';
|
|
4
|
-
import { A as AuthContext } from '../identity-
|
|
5
|
-
export { I as IdentityProvider, n as newSessionId } from '../identity-
|
|
4
|
+
import { A as AuthContext } from '../identity-CUynm8S2.cjs';
|
|
5
|
+
export { I as IdentityProvider, n as newSessionId } from '../identity-CUynm8S2.cjs';
|
|
6
6
|
import { P as PetRef } from '../ids-B2GAAifq.cjs';
|
|
7
7
|
export { B as Brand, U as UserRef, _ as __brand } from '../ids-B2GAAifq.cjs';
|
|
8
8
|
import { z } from 'zod';
|
|
@@ -13,7 +13,7 @@ import { E as EverfurError } from '../EverfurError-DeBqRpQV.cjs';
|
|
|
13
13
|
export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError-DeBqRpQV.cjs';
|
|
14
14
|
import { D as DisabledLevel, a as CapabilityDecision } from '../resolve-D4Ywz5OS.cjs';
|
|
15
15
|
export { b as CapabilityDisabled, C as CapabilityName } from '../resolve-D4Ywz5OS.cjs';
|
|
16
|
-
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-
|
|
16
|
+
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-u6rK4mKt.cjs';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* The full /state payload. `degraded` + `cache_epoch` + `cache_key` are additive fields an older backend
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import { E as EverfurResult } from '../EverfurResult-ClPTS0P2.js';
|
|
4
|
-
import { A as AuthContext } from '../identity-
|
|
5
|
-
export { I as IdentityProvider, n as newSessionId } from '../identity-
|
|
4
|
+
import { A as AuthContext } from '../identity-D5uywCtp.js';
|
|
5
|
+
export { I as IdentityProvider, n as newSessionId } from '../identity-D5uywCtp.js';
|
|
6
6
|
import { P as PetRef } from '../ids-B2GAAifq.js';
|
|
7
7
|
export { B as Brand, U as UserRef, _ as __brand } from '../ids-B2GAAifq.js';
|
|
8
8
|
import { z } from 'zod';
|
|
@@ -13,7 +13,7 @@ import { E as EverfurError } from '../EverfurError-DeBqRpQV.js';
|
|
|
13
13
|
export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError-DeBqRpQV.js';
|
|
14
14
|
import { D as DisabledLevel, a as CapabilityDecision } from '../resolve-D4Ywz5OS.js';
|
|
15
15
|
export { b as CapabilityDisabled, C as CapabilityName } from '../resolve-D4Ywz5OS.js';
|
|
16
|
-
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-
|
|
16
|
+
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-BB7e52FP.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* The full /state payload. `degraded` + `cache_epoch` + `cache_key` are additive fields an older backend
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.js';
|
|
2
|
-
import { R as RequestFunnel } from './requestFunnel-
|
|
2
|
+
import { R as RequestFunnel } from './requestFunnel-BkSFsLKh.js';
|
|
3
3
|
import { F as FileHandle, U as UploadTransport, a as UploadPolicyWire } from './ports-BN6RHF9W.js';
|
|
4
|
-
import { R as ReadableStore, T as Timers } from './ports-
|
|
4
|
+
import { R as ReadableStore, T as Timers } from './ports-Cu_Wc5Aw.js';
|
|
5
5
|
|
|
6
6
|
/** The image MIME types the chat accepts (the server's `CHAT_ATTACHMENT` rule, plus the `image/jpg` alias). */
|
|
7
7
|
declare const ATTACHMENT_MIME_TYPES: readonly string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.cjs';
|
|
2
|
-
import { R as RequestFunnel } from './requestFunnel-
|
|
2
|
+
import { R as RequestFunnel } from './requestFunnel-nmhlEdbM.cjs';
|
|
3
3
|
import { F as FileHandle, U as UploadTransport, a as UploadPolicyWire } from './ports-BN6RHF9W.cjs';
|
|
4
|
-
import { R as ReadableStore, T as Timers } from './ports-
|
|
4
|
+
import { R as ReadableStore, T as Timers } from './ports-DibY-h60.cjs';
|
|
5
5
|
|
|
6
6
|
/** The image MIME types the chat accepts (the server's `CHAT_ATTACHMENT` rule, plus the `image/jpg` alias). */
|
|
7
7
|
declare const ATTACHMENT_MIME_TYPES: readonly string[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.js';
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult-ClPTS0P2.js';
|
|
3
3
|
import { C as ConversationId, P as PetRef, b as ResponseId } from './ids-B2GAAifq.js';
|
|
4
|
-
import { f as ChatFeedbackType, l as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-
|
|
5
|
-
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-
|
|
6
|
-
import { i as UrgencyLevel } from './config-
|
|
7
|
-
import { W as WidgetPet } from './petsRepository-
|
|
4
|
+
import { f as ChatFeedbackType, l as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-Cu_Wc5Aw.js';
|
|
5
|
+
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-qAkKKgji.js';
|
|
6
|
+
import { i as UrgencyLevel } from './config-BB7e52FP.js';
|
|
7
|
+
import { W as WidgetPet } from './petsRepository-RGI_xPK1.js';
|
|
8
8
|
import { U as UploadTransport, F as FileHandle } from './ports-BN6RHF9W.js';
|
|
9
|
-
import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-
|
|
9
|
+
import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-20X7Vuip.js';
|
|
10
10
|
|
|
11
11
|
/** The three thumbs. `'neutral'` is the app's rotated thumbs-down glyph. */
|
|
12
12
|
type ChatSentiment = 'up' | 'neutral' | 'down';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.cjs';
|
|
2
2
|
import { E as EverfurResult } from './EverfurResult-COlXj1wq.cjs';
|
|
3
3
|
import { C as ConversationId, P as PetRef, b as ResponseId } from './ids-B2GAAifq.cjs';
|
|
4
|
-
import { f as ChatFeedbackType, l as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-
|
|
5
|
-
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-
|
|
6
|
-
import { i as UrgencyLevel } from './config-
|
|
7
|
-
import { W as WidgetPet } from './petsRepository-
|
|
4
|
+
import { f as ChatFeedbackType, l as ChatStatus, i as ChatMessage, c as ChatConversationListOptions, d as ChatConversationPage, g as ChatHistoryOptions, h as ChatMessagePage, a as ChatCheckinTarget, e as ChatFeedbackReceipt } from './ports-DibY-h60.cjs';
|
|
5
|
+
import { C as CheckinAnswer, a as CheckinOutcome } from './casesRepository-DFoK5N1O.cjs';
|
|
6
|
+
import { i as UrgencyLevel } from './config-u6rK4mKt.cjs';
|
|
7
|
+
import { W as WidgetPet } from './petsRepository-CQgzEFyz.cjs';
|
|
8
8
|
import { U as UploadTransport, F as FileHandle } from './ports-BN6RHF9W.cjs';
|
|
9
|
-
import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-
|
|
9
|
+
import { c as AttachmentQueue, d as AttachmentState, A as AttachmentError, b as AttachmentOutcome } from './attachments-CkaPnIUw.cjs';
|
|
10
10
|
|
|
11
11
|
/** The three thumbs. `'neutral'` is the app's rotated thumbs-down glyph. */
|
|
12
12
|
type ChatSentiment = 'up' | 'neutral' | 'down';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as TelevetStatePolicy, k as TelevetBookingEntitlement, l as TelevetCancellationPolicy, m as TelevetClinician, c as TelevetSlot, n as TelevetSlotHold, j as TelevetBookingBody, T as TelevetConsult, b as TelevetCancelReceipt, p as TelevetTriageVerdict, h as ConsultStatus } from './televetGlobal-CnjrfhT4.js';
|
|
2
2
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.js';
|
|
3
3
|
import { E as EverfurResult } from './EverfurResult-ClPTS0P2.js';
|
|
4
|
-
import { R as RequestFunnel } from './requestFunnel-
|
|
5
|
-
import { A as AuthContext } from './identity-
|
|
4
|
+
import { R as RequestFunnel } from './requestFunnel-BkSFsLKh.js';
|
|
5
|
+
import { A as AuthContext } from './identity-D5uywCtp.js';
|
|
6
6
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort-C3nNSS_j.js';
|
|
7
7
|
import { T as TelemetryPort } from './TelemetryPort-BDNr00hu.js';
|
|
8
8
|
import { b as VetCallCredential, c as VetCallJoinRefusal } from './callRoom-B92eH_ij.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as TelevetStatePolicy, k as TelevetBookingEntitlement, l as TelevetCancellationPolicy, m as TelevetClinician, c as TelevetSlot, n as TelevetSlotHold, j as TelevetBookingBody, T as TelevetConsult, b as TelevetCancelReceipt, p as TelevetTriageVerdict, h as ConsultStatus } from './televetGlobal-C5dTUACe.cjs';
|
|
2
2
|
import { E as EverfurError } from './EverfurError-DeBqRpQV.cjs';
|
|
3
3
|
import { E as EverfurResult } from './EverfurResult-COlXj1wq.cjs';
|
|
4
|
-
import { R as RequestFunnel } from './requestFunnel-
|
|
5
|
-
import { A as AuthContext } from './identity-
|
|
4
|
+
import { R as RequestFunnel } from './requestFunnel-nmhlEdbM.cjs';
|
|
5
|
+
import { A as AuthContext } from './identity-CUynm8S2.cjs';
|
|
6
6
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort-10s3HJCt.cjs';
|
|
7
7
|
import { T as TelemetryPort } from './TelemetryPort-BDNr00hu.cjs';
|
|
8
8
|
import { b as VetCallCredential, c as VetCallJoinRefusal } from './callRoom-BhIdadyV.cjs';
|
|
@@ -22,8 +22,13 @@ declare const VET_CALL_COPY: Readonly<{
|
|
|
22
22
|
speakerOnCta: "Speaker on";
|
|
23
23
|
/** The lobby: the member is in the room and the clinician is not. */
|
|
24
24
|
lobbyTitleNoName: "Your vet is joining";
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Since 0.9.2. Always an empty string, and no SDK surface draws it. The owner dropped
|
|
27
|
+
* "Usually under a minute" (2026-10-04, Q10): a timing promise nothing measures. Kept only so a host that
|
|
28
|
+
* read it still builds on `^0.9.0`; drop the line from your lobby. It may be removed in a later minor release.
|
|
29
|
+
*/
|
|
30
|
+
lobbySubtitle: "";
|
|
31
|
+
lobbyPrepLabel: "While you wait";
|
|
27
32
|
lobbyPrepNoPet: "Have your pet nearby and somewhere well lit.";
|
|
28
33
|
/** `{name}` is DATA from the consult, never a key. Absent, `lobbyTitleNoName` is used instead. */
|
|
29
34
|
lobbyTitle: (clinicianName: string | null | undefined) => string;
|
|
@@ -22,8 +22,13 @@ declare const VET_CALL_COPY: Readonly<{
|
|
|
22
22
|
speakerOnCta: "Speaker on";
|
|
23
23
|
/** The lobby: the member is in the room and the clinician is not. */
|
|
24
24
|
lobbyTitleNoName: "Your vet is joining";
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Since 0.9.2. Always an empty string, and no SDK surface draws it. The owner dropped
|
|
27
|
+
* "Usually under a minute" (2026-10-04, Q10): a timing promise nothing measures. Kept only so a host that
|
|
28
|
+
* read it still builds on `^0.9.0`; drop the line from your lobby. It may be removed in a later minor release.
|
|
29
|
+
*/
|
|
30
|
+
lobbySubtitle: "";
|
|
31
|
+
lobbyPrepLabel: "While you wait";
|
|
27
32
|
lobbyPrepNoPet: "Have your pet nearby and somewhere well lit.";
|
|
28
33
|
/** `{name}` is DATA from the consult, never a key. Absent, `lobbyTitleNoName` is used instead. */
|
|
29
34
|
lobbyTitle: (clinicianName: string | null | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EverfurResult } from './EverfurResult-COlXj1wq.cjs';
|
|
2
|
-
import { A as AuthContext } from './identity-
|
|
2
|
+
import { A as AuthContext } from './identity-CUynm8S2.cjs';
|
|
3
3
|
import { P as PetRef } from './ids-B2GAAifq.cjs';
|
|
4
4
|
|
|
5
5
|
/** The owner's answer to a check-in, the wire values of the consumer `CheckinResponse` enum. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as EverfurResult } from './EverfurResult-ClPTS0P2.js';
|
|
2
|
-
import { A as AuthContext } from './identity-
|
|
2
|
+
import { A as AuthContext } from './identity-D5uywCtp.js';
|
|
3
3
|
import { P as PetRef } from './ids-B2GAAifq.js';
|
|
4
4
|
|
|
5
5
|
/** The owner's answer to a check-in, the wire values of the consumer `CheckinResponse` enum. */
|
package/dist/chat/index.d.cts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-
|
|
2
|
-
export { A as AttachmentSource, E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps, R as RenderVetAction } from '../Chat-
|
|
1
|
+
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-HXFmzk-D.cjs';
|
|
2
|
+
export { A as AttachmentSource, E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps, R as RenderVetAction } from '../Chat-B7oN62ww.cjs';
|
|
3
3
|
import { U as UploadTransport } from '../ports-BN6RHF9W.cjs';
|
|
4
|
-
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, h as ChatMessagePage } from '../ports-
|
|
5
|
-
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-
|
|
6
|
-
export { P as EverfurChatPet, W as WidgetPet } from '../petsRepository-
|
|
7
|
-
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-
|
|
4
|
+
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, h as ChatMessagePage } from '../ports-DibY-h60.cjs';
|
|
5
|
+
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-DFoK5N1O.cjs';
|
|
6
|
+
export { P as EverfurChatPet, W as WidgetPet } from '../petsRepository-CQgzEFyz.cjs';
|
|
7
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-CkaPnIUw.cjs';
|
|
8
8
|
import '../EverfurError-DeBqRpQV.cjs';
|
|
9
9
|
import '../EverfurResult-COlXj1wq.cjs';
|
|
10
10
|
import '../ids-B2GAAifq.cjs';
|
|
11
|
-
import '../config-
|
|
11
|
+
import '../config-u6rK4mKt.cjs';
|
|
12
12
|
import 'react';
|
|
13
13
|
import 'react-native';
|
|
14
|
-
import '../identity-
|
|
15
|
-
import '../requestFunnel-
|
|
14
|
+
import '../identity-CUynm8S2.cjs';
|
|
15
|
+
import '../requestFunnel-nmhlEdbM.cjs';
|
|
16
16
|
import '../ErrorPolicyPort-10s3HJCt.cjs';
|
|
17
17
|
import '../TelemetryPort-BDNr00hu.cjs';
|
|
18
18
|
import '../profile-CSs1wlXT.cjs';
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-
|
|
2
|
-
export { A as AttachmentSource, E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps, R as RenderVetAction } from '../Chat-
|
|
1
|
+
export { C as ChatFeedbackReason, a as ChatFeedbackReasonOption, b as ChatSentiment, E as EverfurChatDraftStore, L as LifecyclePort, U as UrgencyDisplayLevel, c as UseChatAttachmentsOptions, d as UseChatAttachmentsState, e as UseEverfurChatState, f as UseEverfurPetsState, u as useChatAttachments, g as useEverfurChat, h as useEverfurPets } from '../attachments-DN2cNGwe.js';
|
|
2
|
+
export { A as AttachmentSource, E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps, R as RenderVetAction } from '../Chat-Cugs9Dsl.js';
|
|
3
3
|
import { U as UploadTransport } from '../ports-BN6RHF9W.js';
|
|
4
|
-
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, h as ChatMessagePage } from '../ports-
|
|
5
|
-
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-
|
|
6
|
-
export { P as EverfurChatPet, W as WidgetPet } from '../petsRepository-
|
|
7
|
-
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-
|
|
4
|
+
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, h as ChatMessagePage } from '../ports-Cu_Wc5Aw.js';
|
|
5
|
+
export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-qAkKKgji.js';
|
|
6
|
+
export { P as EverfurChatPet, W as WidgetPet } from '../petsRepository-RGI_xPK1.js';
|
|
7
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from '../attachments-20X7Vuip.js';
|
|
8
8
|
import '../EverfurError-DeBqRpQV.js';
|
|
9
9
|
import '../EverfurResult-ClPTS0P2.js';
|
|
10
10
|
import '../ids-B2GAAifq.js';
|
|
11
|
-
import '../config-
|
|
11
|
+
import '../config-BB7e52FP.js';
|
|
12
12
|
import 'react';
|
|
13
13
|
import 'react-native';
|
|
14
|
-
import '../identity-
|
|
15
|
-
import '../requestFunnel-
|
|
14
|
+
import '../identity-D5uywCtp.js';
|
|
15
|
+
import '../requestFunnel-BkSFsLKh.js';
|
|
16
16
|
import '../ErrorPolicyPort-C3nNSS_j.js';
|
|
17
17
|
import '../TelemetryPort-BDNr00hu.js';
|
|
18
18
|
import '../profile-CSs1wlXT.js';
|
package/dist/client/index.cjs
CHANGED
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
/* @__PURE__ */Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
88
88
|
/* @__PURE__ */Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(row=>row.wireCode));var NORMALIZED_FOLD=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict"}),CONTRACT_ERROR_ROWS=/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(generated=>/* @__PURE__ */Object.freeze({wireCode:generated.wireCode,envelope:generated.envelope,retryable:generated.retryable,normalized:NORMALIZED_FOLD[generated.wireCode]}))),BY_KEY=new Map(CONTRACT_ERROR_ROWS.map(r=>[r.envelope+r.wireCode.toUpperCase(),r])),ENVELOPE_LOOKUP_ORDER=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(CONTRACT_ERROR_ROWS.map(r=>r.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(wireCode,envelope){if(typeof wireCode!="string")return;let key=wireCode.trim().toUpperCase();if(key.length!==0)for(let candidate of[envelope??"http_envelope",...ENVELOPE_LOOKUP_ORDER]){let row=BY_KEY.get(candidate+key);if(row)return row}}function contractDocUrl(entry){return entry.envelope==="sse_frame"?`/errors#sse-${entry.wireCode}`:entry.envelope==="oauth_error"?`/errors#oauth-${entry.wireCode}`:`/errors#${entry.wireCode}`}var DOC_SITE_ORIGIN=null;function publishedDocUrl(entry){return null}var EVERFUR_ERROR_CODES=/* @__PURE__ */Object.freeze(["authExpired","authRejected","sessionRequired","accessDenied","paymentRequired","quotaExceeded","rateLimited","validationFailed","sdkUpdateRequired","conflict","idempotencyConflict","idempotencyInFlight","conversationNotFound","petNotFound","resourceNotFound","streamTimeout","mediaUploadFailed","moderationBlocked","upstreamLlmTimeout","internalError","notImplemented","serviceUnavailable","streamIncomplete","identitySignatureRequired","runtimeDisposed","unknown"]),EVERFUR_ERROR_CATEGORIES=/* @__PURE__ */Object.freeze(["authentication","authorization","entitlement","rateLimit","invalidRequest","notFound","conflict","connection","server","media","policy","unknown"]),CATEGORY_OF=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(code){return CATEGORY_OF[code]}function fromWire(wire){let contractRow=contractErrorFor(wire);if(contractRow)return contractRow.normalized;let upper=(wire??"").trim().toUpperCase(),canonical=upper.replace(/[^A-Z0-9]/g,"");if(canonical==="AUTHREJECTED")return"authRejected";if(upper.startsWith("AUTH"))return"authExpired";switch(canonical){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}function fromHttpStatus(status){return status===401?"authExpired":status===403?"accessDenied":status===404?"conversationNotFound":status===409?"idempotencyConflict":status===421?"unknown":status===429?"rateLimited":status===400||status===422?"unknown":status>=500?"internalError":"unknown"}var AUTO_RETRYABLE_CODES=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(code){return AUTO_RETRYABLE_CODES.has(code)}var RETRYABLE_CONTRACT_CODES=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(code){return isAutoRetryable(code)||RETRYABLE_CONTRACT_CODES.has(code)}function shouldRetry(code,frameRetryable=false){return frameRetryable||isAutoRetryable(code)}var BACKOFF_BASE_MS=500,BACKOFF_CAP_MS=8e3,MAX_RETRY_ATTEMPTS=4;function backoffDelayMs(attempt,rng=Math.random){let bounded=Math.max(0,attempt),ceiling=Math.min(BACKOFF_BASE_MS*2**bounded,BACKOFF_CAP_MS);return Math.floor(rng()*ceiling)}function canRecreateOnNotFound(code){return code==="conversationNotFound"}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ACCESS_DENIED_COPY,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:VALIDATION_FAILED_COPY,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."});function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),error={code:code,category:categoryFor(code),retryable:opts?.retryable??isRetryableCode(code),displayMessage:userFacingError(code)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}function ok(value,warning){/* @__PURE__ */
|
|
89
89
|
return Object.freeze(warning===void 0?{ok:true,value:value}:{ok:true,value:value,warning:warning})}function err(error){/* @__PURE__ */
|
|
90
|
-
return Object.freeze({ok:false,error:error})}function isOk(r){return r.ok}function isErr(r){return!r.ok}var EverfurThrownError=class _EverfurThrownError extends Error{constructor(error){super(`${error.code}: ${error.displayMessage}`),this.name="EverfurThrownError",this.error=error,this.code=error.code,this.category=error.category,Object.setPrototypeOf(this,_EverfurThrownError.prototype)}};function unwrap(r){if(r.ok)return r.value;throw new EverfurThrownError(r.error)}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.9.
|
|
90
|
+
return Object.freeze({ok:false,error:error})}function isOk(r){return r.ok}function isErr(r){return!r.ok}var EverfurThrownError=class _EverfurThrownError extends Error{constructor(error){super(`${error.code}: ${error.displayMessage}`),this.name="EverfurThrownError",this.error=error,this.code=error.code,this.category=error.category,Object.setPrototypeOf(this,_EverfurThrownError.prototype)}};function unwrap(r){if(r.ok)return r.value;throw new EverfurThrownError(r.error)}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.9.2",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
|
|
91
91
|
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__ */
|
|
92
92
|
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__ */
|
|
93
93
|
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 resolveClientConfig(config,options){let outcome=tryResolveClientConfig(config,options);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.config}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 resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;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/client/index.d.cts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { b as EverfurErrorCode } from '../EverfurError-DeBqRpQV.cjs';
|
|
2
2
|
export { A as AUTO_RETRYABLE_CODES, B as BACKOFF_BASE_MS, d as BACKOFF_CAP_MS, e as EVERFUR_ERROR_CATEGORIES, f as EVERFUR_ERROR_CODES, E as EverfurError, a as EverfurErrorCategory, M as MAX_RETRY_ATTEMPTS, g as MakeEverfurErrorOptions, R as RETRYABLE_CONTRACT_CODES, h as backoffDelayMs, j as canRecreateOnNotFound, c as categoryFor, k as fromHttpStatus, l as fromWire, m as isAutoRetryable, i as isRetryableCode, n as makeEverfurError, s as shouldRetry, u as userFacingError } from '../EverfurError-DeBqRpQV.cjs';
|
|
3
3
|
export { a as EverfurConfigError, E as EverfurResult, b as EverfurThrownError, e as err, i as isErr, c as isOk, o as ok, u as unwrap } from '../EverfurResult-COlXj1wq.cjs';
|
|
4
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, k as ClientConfigFailureReason, l as ClientConfigOutcome, m as DEFAULT_CONTRACT_VERSION, D as DeltaFrame, c as DoneFrame, n as EMPTY_FRAME_ARRAYS, o as ENV_API_BASE_URL, E as ErrorFrame, p as EventSourceFactory, q as EventSourceInit, r as EventSourceLike, s as EventSourceMessage, t as EverfurConfig, d as EverfurRequest, e as EverfurRequestBase, u as FetchInit, j as FetchLike, v as FetchResponseLike, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, R as RawResponse, w as ReadableStreamLike, x as ResolveClientConfigOptions, y as ResolvedClientConfig, S as SDK_PLATFORM, z as SDK_VERSION, G as SdkPlatform, I as ServerRequestIdSource, J as TransportDeps, T as TransportPort, U as UnknownFrame, i as UrgencyLevel, K as acceptedFrame, L as analysisCompleteFrame, N as analysisStartedFrame, O as assertNever, P as bufferedTextByteSource, Q as buildBaseHeaders, V as checkPublishableKey, W as createHttpTransport, X as deltaFrame, Y as doneFrame, Z as errorFrame, _ as errorFromResponse, $ as eventSourceByteSource, a0 as eventSourceRequestId, a1 as fetchByteSource, a2 as getGlobalFetch, a3 as heartbeatFrame, a4 as networkError, a5 as parseSse, a6 as requestIdOf, a7 as requestJson, a8 as requestRaw, a9 as resolveApiBaseUrl, aa as resolveClientConfig, ab as tryResolveApiBaseUrl, ac as tryResolveClientConfig, ad as unknownFrame } from '../config-
|
|
4
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, k as ClientConfigFailureReason, l as ClientConfigOutcome, m as DEFAULT_CONTRACT_VERSION, D as DeltaFrame, c as DoneFrame, n as EMPTY_FRAME_ARRAYS, o as ENV_API_BASE_URL, E as ErrorFrame, p as EventSourceFactory, q as EventSourceInit, r as EventSourceLike, s as EventSourceMessage, t as EverfurConfig, d as EverfurRequest, e as EverfurRequestBase, u as FetchInit, j as FetchLike, v as FetchResponseLike, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, R as RawResponse, w as ReadableStreamLike, x as ResolveClientConfigOptions, y as ResolvedClientConfig, S as SDK_PLATFORM, z as SDK_VERSION, G as SdkPlatform, I as ServerRequestIdSource, J as TransportDeps, T as TransportPort, U as UnknownFrame, i as UrgencyLevel, K as acceptedFrame, L as analysisCompleteFrame, N as analysisStartedFrame, O as assertNever, P as bufferedTextByteSource, Q as buildBaseHeaders, V as checkPublishableKey, W as createHttpTransport, X as deltaFrame, Y as doneFrame, Z as errorFrame, _ as errorFromResponse, $ as eventSourceByteSource, a0 as eventSourceRequestId, a1 as fetchByteSource, a2 as getGlobalFetch, a3 as heartbeatFrame, a4 as networkError, a5 as parseSse, a6 as requestIdOf, a7 as requestJson, a8 as requestRaw, a9 as resolveApiBaseUrl, aa as resolveClientConfig, ab as tryResolveApiBaseUrl, ac as tryResolveClientConfig, ad as unknownFrame } from '../config-u6rK4mKt.cjs';
|
|
5
5
|
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, d as unsafeClientId, e as unsafeConversationId, f as unsafeDocumentId, g as unsafeJobId, h as unsafePetRef, i as unsafeRecordsRequestId, j as unsafeResponseId, k as unsafeUserRef, u as userRef } from '../ids-B2GAAifq.cjs';
|
|
6
|
-
export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, M as MintedToken, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-
|
|
6
|
+
export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, M as MintedToken, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-CUynm8S2.cjs';
|
|
7
7
|
export { a as CapabilityDecision, b as CapabilityDisabled, C as CapabilityName, c as DecideOptions, D as DisabledLevel, E as EntitlementDecision, L as LevelGrant, R as ResolvedEntitlements, d as decideCapability, e as deniedDecisionsFor, r as requires, f as resolveEntitlements } from '../resolve-D4Ywz5OS.cjs';
|
|
8
|
-
export { E as ENTITLEMENTS_PATH, a as EntitlementResolution, F as FetchEntitlementsArgs, f as fetchEntitlements } from '../entitlementRepository-
|
|
8
|
+
export { E as ENTITLEMENTS_PATH, a as EntitlementResolution, F as FetchEntitlementsArgs, f as fetchEntitlements } from '../entitlementRepository-DA04yM54.cjs';
|
|
9
9
|
import { m as EverfurTheme } from '../tokens-DLj8OnLH.cjs';
|
|
10
10
|
export { D as DEFAULT_MAX_FONT_SCALE, w as EASING_CURVES, x as EVERFUR_DARK, y as EVERFUR_LIGHT, E as EverfurColorTokens, z as EverfurEasingCurve, 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, A as EverfurTextScaleTier, n as EverfurThemeMeta, o as EverfurThemeSlot, p as EverfurThemeSlotKey, q as EverfurThemeSlotName, r as EverfurThemeSlots, s as EverfurTypeSizeTokens, t as EverfurTypeTokens, u as EverfurWeightTokens, S as SLOT_MIN_BORDER_CONTRAST, B as SLOT_MIN_CONTRAST, C as SYSTEM_FONT_FAMILY, F as SYSTEM_MONO_FAMILY, G as SlotGrounds, H as SlotSurrounds, I as TEXT_SCALE_TIER_CAPS, T as THEME_SLOT_KEYS, v as THEME_SLOT_NAMES, J as cssCubicBezier, K as deepFreeze, L as guardSlotContrast, M as mergeThemeSlots, N as parseThemeSlots } from '../tokens-DLj8OnLH.cjs';
|
|
11
11
|
export { E as EverfurFaceStyle, a as EverfurThemeAdjustment, R as ResolveThemeInput, T as TEXT_SCALE_FLOOR, f as face, h as headingFace, p as previewTheme, r as resolveTheme, t as themeAdjustments, w as withServerBranding } from '../typeStyle-DJedEu14.cjs';
|
|
12
12
|
export { A as APPEARANCE_PRESETS, a as APPEARANCE_PRESET_NAMES, b as APPEARANCE_SIZE_RANGES, C as ClientBranding, c as EverfurAppearance, d as EverfurAppearanceFont, e as EverfurAppearancePreset, f as EverfurAppearanceRules, g as EverfurAppearanceVariables, h as EverfurThemeFontFaceKey, i as EverfurThemeFontUrlsInput, j as EverfurThemeFontsInput, E as EverfurThemeInput, k as EverfurThemeSlotInput, l as EverfurThemeSlotsInput, L as LOCKABLE_THEME_FIELDS, n as LockableThemeField, M as MAX_FONT_SCALE_CEILING, R as RadiusScale, o as SLOT_LOCK_PREFIX, p as SlotLockName, S as SurfaceStyle, T as THEME_SCHEMA_VERSIONS, q as ThemeLockName, m as expandAppearance, r as hardenBrandAssetUrl, s as hardenHttpsUrl, t as isEmptyBranding, u as isKnownBrandingSchema, v as lockedFieldsOf, w as parseClientBranding, x as parsePx } from '../branding-BCfwLj0h.cjs';
|
|
13
|
-
export { F as FunnelSendOptions, R as RequestFunnel, a as RequestFunnelDeps, c as createRequestFunnel } from '../requestFunnel-
|
|
14
|
-
export { c as PET_AGE_YEARS_MAX, d as PET_BREED_MAX, e as PET_NAME_MAX, f as PET_SPECIES_MAX, g as PET_WEIGHT_KG_MAX, P as PetProfileInput, a as PetProfilePatch, h as PetsRepository, R as RegisteredPet, W as WidgetPet, i as createPetsRepository, w as widgetPetFromWire } from '../petsRepository-
|
|
15
|
-
export { b as CHECKIN_ANSWERS, c as CasesRepository, C as CheckinAnswer, a as CheckinOutcome, W as WatchCase, d as createCasesRepository } from '../casesRepository-
|
|
13
|
+
export { F as FunnelSendOptions, R as RequestFunnel, a as RequestFunnelDeps, c as createRequestFunnel } from '../requestFunnel-nmhlEdbM.cjs';
|
|
14
|
+
export { c as PET_AGE_YEARS_MAX, d as PET_BREED_MAX, e as PET_NAME_MAX, f as PET_SPECIES_MAX, g as PET_WEIGHT_KG_MAX, P as PetProfileInput, a as PetProfilePatch, h as PetsRepository, R as RegisteredPet, W as WidgetPet, i as createPetsRepository, w as widgetPetFromWire } from '../petsRepository-CQgzEFyz.cjs';
|
|
15
|
+
export { b as CHECKIN_ANSWERS, c as CasesRepository, C as CheckinAnswer, a as CheckinOutcome, W as WatchCase, d as createCasesRepository } from '../casesRepository-DFoK5N1O.cjs';
|
|
16
16
|
import '../ErrorPolicyPort-10s3HJCt.cjs';
|
|
17
17
|
import '../profile-CSs1wlXT.cjs';
|
|
18
18
|
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { b as EverfurErrorCode } from '../EverfurError-DeBqRpQV.js';
|
|
2
2
|
export { A as AUTO_RETRYABLE_CODES, B as BACKOFF_BASE_MS, d as BACKOFF_CAP_MS, e as EVERFUR_ERROR_CATEGORIES, f as EVERFUR_ERROR_CODES, E as EverfurError, a as EverfurErrorCategory, M as MAX_RETRY_ATTEMPTS, g as MakeEverfurErrorOptions, R as RETRYABLE_CONTRACT_CODES, h as backoffDelayMs, j as canRecreateOnNotFound, c as categoryFor, k as fromHttpStatus, l as fromWire, m as isAutoRetryable, i as isRetryableCode, n as makeEverfurError, s as shouldRetry, u as userFacingError } from '../EverfurError-DeBqRpQV.js';
|
|
3
3
|
export { a as EverfurConfigError, E as EverfurResult, b as EverfurThrownError, e as err, i as isErr, c as isOk, o as ok, u as unwrap } from '../EverfurResult-ClPTS0P2.js';
|
|
4
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, k as ClientConfigFailureReason, l as ClientConfigOutcome, m as DEFAULT_CONTRACT_VERSION, D as DeltaFrame, c as DoneFrame, n as EMPTY_FRAME_ARRAYS, o as ENV_API_BASE_URL, E as ErrorFrame, p as EventSourceFactory, q as EventSourceInit, r as EventSourceLike, s as EventSourceMessage, t as EverfurConfig, d as EverfurRequest, e as EverfurRequestBase, u as FetchInit, j as FetchLike, v as FetchResponseLike, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, R as RawResponse, w as ReadableStreamLike, x as ResolveClientConfigOptions, y as ResolvedClientConfig, S as SDK_PLATFORM, z as SDK_VERSION, G as SdkPlatform, I as ServerRequestIdSource, J as TransportDeps, T as TransportPort, U as UnknownFrame, i as UrgencyLevel, K as acceptedFrame, L as analysisCompleteFrame, N as analysisStartedFrame, O as assertNever, P as bufferedTextByteSource, Q as buildBaseHeaders, V as checkPublishableKey, W as createHttpTransport, X as deltaFrame, Y as doneFrame, Z as errorFrame, _ as errorFromResponse, $ as eventSourceByteSource, a0 as eventSourceRequestId, a1 as fetchByteSource, a2 as getGlobalFetch, a3 as heartbeatFrame, a4 as networkError, a5 as parseSse, a6 as requestIdOf, a7 as requestJson, a8 as requestRaw, a9 as resolveApiBaseUrl, aa as resolveClientConfig, ab as tryResolveApiBaseUrl, ac as tryResolveClientConfig, ad as unknownFrame } from '../config-
|
|
4
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, k as ClientConfigFailureReason, l as ClientConfigOutcome, m as DEFAULT_CONTRACT_VERSION, D as DeltaFrame, c as DoneFrame, n as EMPTY_FRAME_ARRAYS, o as ENV_API_BASE_URL, E as ErrorFrame, p as EventSourceFactory, q as EventSourceInit, r as EventSourceLike, s as EventSourceMessage, t as EverfurConfig, d as EverfurRequest, e as EverfurRequestBase, u as FetchInit, j as FetchLike, v as FetchResponseLike, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, R as RawResponse, w as ReadableStreamLike, x as ResolveClientConfigOptions, y as ResolvedClientConfig, S as SDK_PLATFORM, z as SDK_VERSION, G as SdkPlatform, I as ServerRequestIdSource, J as TransportDeps, T as TransportPort, U as UnknownFrame, i as UrgencyLevel, K as acceptedFrame, L as analysisCompleteFrame, N as analysisStartedFrame, O as assertNever, P as bufferedTextByteSource, Q as buildBaseHeaders, V as checkPublishableKey, W as createHttpTransport, X as deltaFrame, Y as doneFrame, Z as errorFrame, _ as errorFromResponse, $ as eventSourceByteSource, a0 as eventSourceRequestId, a1 as fetchByteSource, a2 as getGlobalFetch, a3 as heartbeatFrame, a4 as networkError, a5 as parseSse, a6 as requestIdOf, a7 as requestJson, a8 as requestRaw, a9 as resolveApiBaseUrl, aa as resolveClientConfig, ab as tryResolveApiBaseUrl, ac as tryResolveClientConfig, ad as unknownFrame } from '../config-BB7e52FP.js';
|
|
5
5
|
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, d as unsafeClientId, e as unsafeConversationId, f as unsafeDocumentId, g as unsafeJobId, h as unsafePetRef, i as unsafeRecordsRequestId, j as unsafeResponseId, k as unsafeUserRef, u as userRef } from '../ids-B2GAAifq.js';
|
|
6
|
-
export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, M as MintedToken, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-
|
|
6
|
+
export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, M as MintedToken, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-D5uywCtp.js';
|
|
7
7
|
export { a as CapabilityDecision, b as CapabilityDisabled, C as CapabilityName, c as DecideOptions, D as DisabledLevel, E as EntitlementDecision, L as LevelGrant, R as ResolvedEntitlements, d as decideCapability, e as deniedDecisionsFor, r as requires, f as resolveEntitlements } from '../resolve-D4Ywz5OS.js';
|
|
8
|
-
export { E as ENTITLEMENTS_PATH, a as EntitlementResolution, F as FetchEntitlementsArgs, f as fetchEntitlements } from '../entitlementRepository-
|
|
8
|
+
export { E as ENTITLEMENTS_PATH, a as EntitlementResolution, F as FetchEntitlementsArgs, f as fetchEntitlements } from '../entitlementRepository-tSY9WWad.js';
|
|
9
9
|
import { m as EverfurTheme } from '../tokens-DLj8OnLH.js';
|
|
10
10
|
export { D as DEFAULT_MAX_FONT_SCALE, w as EASING_CURVES, x as EVERFUR_DARK, y as EVERFUR_LIGHT, E as EverfurColorTokens, z as EverfurEasingCurve, 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, A as EverfurTextScaleTier, n as EverfurThemeMeta, o as EverfurThemeSlot, p as EverfurThemeSlotKey, q as EverfurThemeSlotName, r as EverfurThemeSlots, s as EverfurTypeSizeTokens, t as EverfurTypeTokens, u as EverfurWeightTokens, S as SLOT_MIN_BORDER_CONTRAST, B as SLOT_MIN_CONTRAST, C as SYSTEM_FONT_FAMILY, F as SYSTEM_MONO_FAMILY, G as SlotGrounds, H as SlotSurrounds, I as TEXT_SCALE_TIER_CAPS, T as THEME_SLOT_KEYS, v as THEME_SLOT_NAMES, J as cssCubicBezier, K as deepFreeze, L as guardSlotContrast, M as mergeThemeSlots, N as parseThemeSlots } from '../tokens-DLj8OnLH.js';
|
|
11
11
|
export { E as EverfurFaceStyle, a as EverfurThemeAdjustment, R as ResolveThemeInput, T as TEXT_SCALE_FLOOR, f as face, h as headingFace, p as previewTheme, r as resolveTheme, t as themeAdjustments, w as withServerBranding } from '../typeStyle-BxVyF71R.js';
|
|
12
12
|
export { A as APPEARANCE_PRESETS, a as APPEARANCE_PRESET_NAMES, b as APPEARANCE_SIZE_RANGES, C as ClientBranding, c as EverfurAppearance, d as EverfurAppearanceFont, e as EverfurAppearancePreset, f as EverfurAppearanceRules, g as EverfurAppearanceVariables, h as EverfurThemeFontFaceKey, i as EverfurThemeFontUrlsInput, j as EverfurThemeFontsInput, E as EverfurThemeInput, k as EverfurThemeSlotInput, l as EverfurThemeSlotsInput, L as LOCKABLE_THEME_FIELDS, n as LockableThemeField, M as MAX_FONT_SCALE_CEILING, R as RadiusScale, o as SLOT_LOCK_PREFIX, p as SlotLockName, S as SurfaceStyle, T as THEME_SCHEMA_VERSIONS, q as ThemeLockName, m as expandAppearance, r as hardenBrandAssetUrl, s as hardenHttpsUrl, t as isEmptyBranding, u as isKnownBrandingSchema, v as lockedFieldsOf, w as parseClientBranding, x as parsePx } from '../branding-DJf4h12Q.js';
|
|
13
|
-
export { F as FunnelSendOptions, R as RequestFunnel, a as RequestFunnelDeps, c as createRequestFunnel } from '../requestFunnel-
|
|
14
|
-
export { c as PET_AGE_YEARS_MAX, d as PET_BREED_MAX, e as PET_NAME_MAX, f as PET_SPECIES_MAX, g as PET_WEIGHT_KG_MAX, P as PetProfileInput, a as PetProfilePatch, h as PetsRepository, R as RegisteredPet, W as WidgetPet, i as createPetsRepository, w as widgetPetFromWire } from '../petsRepository-
|
|
15
|
-
export { b as CHECKIN_ANSWERS, c as CasesRepository, C as CheckinAnswer, a as CheckinOutcome, W as WatchCase, d as createCasesRepository } from '../casesRepository-
|
|
13
|
+
export { F as FunnelSendOptions, R as RequestFunnel, a as RequestFunnelDeps, c as createRequestFunnel } from '../requestFunnel-BkSFsLKh.js';
|
|
14
|
+
export { c as PET_AGE_YEARS_MAX, d as PET_BREED_MAX, e as PET_NAME_MAX, f as PET_SPECIES_MAX, g as PET_WEIGHT_KG_MAX, P as PetProfileInput, a as PetProfilePatch, h as PetsRepository, R as RegisteredPet, W as WidgetPet, i as createPetsRepository, w as widgetPetFromWire } from '../petsRepository-RGI_xPK1.js';
|
|
15
|
+
export { b as CHECKIN_ANSWERS, c as CasesRepository, C as CheckinAnswer, a as CheckinOutcome, W as WatchCase, d as createCasesRepository } from '../casesRepository-qAkKKgji.js';
|
|
16
16
|
import '../ErrorPolicyPort-C3nNSS_j.js';
|
|
17
17
|
import '../profile-CSs1wlXT.js';
|
|
18
18
|
|
package/dist/client/index.js
CHANGED
|
@@ -87,7 +87,7 @@ import{z}from"zod";var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
|
|
|
87
87
|
/* @__PURE__ */Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
88
88
|
/* @__PURE__ */Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(row=>row.wireCode));var NORMALIZED_FOLD=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict"}),CONTRACT_ERROR_ROWS=/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(generated=>/* @__PURE__ */Object.freeze({wireCode:generated.wireCode,envelope:generated.envelope,retryable:generated.retryable,normalized:NORMALIZED_FOLD[generated.wireCode]}))),BY_KEY=new Map(CONTRACT_ERROR_ROWS.map(r=>[r.envelope+r.wireCode.toUpperCase(),r])),ENVELOPE_LOOKUP_ORDER=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(CONTRACT_ERROR_ROWS.map(r=>r.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(wireCode,envelope){if(typeof wireCode!="string")return;let key=wireCode.trim().toUpperCase();if(key.length!==0)for(let candidate of[envelope??"http_envelope",...ENVELOPE_LOOKUP_ORDER]){let row=BY_KEY.get(candidate+key);if(row)return row}}function contractDocUrl(entry){return entry.envelope==="sse_frame"?`/errors#sse-${entry.wireCode}`:entry.envelope==="oauth_error"?`/errors#oauth-${entry.wireCode}`:`/errors#${entry.wireCode}`}var DOC_SITE_ORIGIN=null;function publishedDocUrl(entry){return null}var EVERFUR_ERROR_CODES=/* @__PURE__ */Object.freeze(["authExpired","authRejected","sessionRequired","accessDenied","paymentRequired","quotaExceeded","rateLimited","validationFailed","sdkUpdateRequired","conflict","idempotencyConflict","idempotencyInFlight","conversationNotFound","petNotFound","resourceNotFound","streamTimeout","mediaUploadFailed","moderationBlocked","upstreamLlmTimeout","internalError","notImplemented","serviceUnavailable","streamIncomplete","identitySignatureRequired","runtimeDisposed","unknown"]),EVERFUR_ERROR_CATEGORIES=/* @__PURE__ */Object.freeze(["authentication","authorization","entitlement","rateLimit","invalidRequest","notFound","conflict","connection","server","media","policy","unknown"]),CATEGORY_OF=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(code){return CATEGORY_OF[code]}function fromWire(wire){let contractRow=contractErrorFor(wire);if(contractRow)return contractRow.normalized;let upper=(wire??"").trim().toUpperCase(),canonical=upper.replace(/[^A-Z0-9]/g,"");if(canonical==="AUTHREJECTED")return"authRejected";if(upper.startsWith("AUTH"))return"authExpired";switch(canonical){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}function fromHttpStatus(status){return status===401?"authExpired":status===403?"accessDenied":status===404?"conversationNotFound":status===409?"idempotencyConflict":status===421?"unknown":status===429?"rateLimited":status===400||status===422?"unknown":status>=500?"internalError":"unknown"}var AUTO_RETRYABLE_CODES=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(code){return AUTO_RETRYABLE_CODES.has(code)}var RETRYABLE_CONTRACT_CODES=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(code){return isAutoRetryable(code)||RETRYABLE_CONTRACT_CODES.has(code)}function shouldRetry(code,frameRetryable=false){return frameRetryable||isAutoRetryable(code)}var BACKOFF_BASE_MS=500,BACKOFF_CAP_MS=8e3,MAX_RETRY_ATTEMPTS=4;function backoffDelayMs(attempt,rng=Math.random){let bounded=Math.max(0,attempt),ceiling=Math.min(BACKOFF_BASE_MS*2**bounded,BACKOFF_CAP_MS);return Math.floor(rng()*ceiling)}function canRecreateOnNotFound(code){return code==="conversationNotFound"}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ACCESS_DENIED_COPY,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:VALIDATION_FAILED_COPY,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."});function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),error={code:code,category:categoryFor(code),retryable:opts?.retryable??isRetryableCode(code),displayMessage:userFacingError(code)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}function ok(value,warning){/* @__PURE__ */
|
|
89
89
|
return Object.freeze(warning===void 0?{ok:true,value:value}:{ok:true,value:value,warning:warning})}function err(error){/* @__PURE__ */
|
|
90
|
-
return Object.freeze({ok:false,error:error})}function isOk(r){return r.ok}function isErr(r){return!r.ok}var EverfurThrownError=class _EverfurThrownError extends Error{constructor(error){super(`${error.code}: ${error.displayMessage}`),this.name="EverfurThrownError",this.error=error,this.code=error.code,this.category=error.category,Object.setPrototypeOf(this,_EverfurThrownError.prototype)}};function unwrap(r){if(r.ok)return r.value;throw new EverfurThrownError(r.error)}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.9.
|
|
90
|
+
return Object.freeze({ok:false,error:error})}function isOk(r){return r.ok}function isErr(r){return!r.ok}var EverfurThrownError=class _EverfurThrownError extends Error{constructor(error){super(`${error.code}: ${error.displayMessage}`),this.name="EverfurThrownError",this.error=error,this.code=error.code,this.category=error.category,Object.setPrototypeOf(this,_EverfurThrownError.prototype)}};function unwrap(r){if(r.ok)return r.value;throw new EverfurThrownError(r.error)}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var SDK_VERSION="0.9.2",SDK_PLATFORM="react-native",DEFAULT_CONTRACT_VERSION="2026-09-19",ENV_API_BASE_URL="EVERFUR_API_BASE_URL";function configFailure(reason,message){/* @__PURE__ */
|
|
91
91
|
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__ */
|
|
92
92
|
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__ */
|
|
93
93
|
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 resolveClientConfig(config,options){let outcome=tryResolveClientConfig(config,options);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.config}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 resolveApiBaseUrl(apiBaseUrl){let outcome=tryResolveApiBaseUrl(apiBaseUrl);if(!outcome.ok)throw new EverfurConfigError("invalid-argument",outcome.failure.message);return outcome.value}function buildBaseHeaders(cfg){return{"X-Everfur-SDK-Version":cfg.sdkVersion,"X-Everfur-SDK-Platform":cfg.platform,"X-Everfur-Contract":cfg.contractVersion}}var ABSOLUTE_URL=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;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__ */
|
|
@@ -409,7 +409,7 @@ declare function getGlobalFetch(): FetchLike;
|
|
|
409
409
|
* Package semver, sent as X-Everfur-SDK-Version. MUST track package.json version (release checklist Item 12
|
|
410
410
|
* keeps the npm semver tag and this constant in lockstep). Set inside the SDK, never by partner code.
|
|
411
411
|
*/
|
|
412
|
-
declare const SDK_VERSION = "0.9.
|
|
412
|
+
declare const SDK_VERSION = "0.9.2";
|
|
413
413
|
/**
|
|
414
414
|
* The platforms this package ships an entry point for, as the wire names them (X-Everfur-SDK-Platform).
|
|
415
415
|
*
|
|
@@ -409,7 +409,7 @@ declare function getGlobalFetch(): FetchLike;
|
|
|
409
409
|
* Package semver, sent as X-Everfur-SDK-Version. MUST track package.json version (release checklist Item 12
|
|
410
410
|
* keeps the npm semver tag and this constant in lockstep). Set inside the SDK, never by partner code.
|
|
411
411
|
*/
|
|
412
|
-
declare const SDK_VERSION = "0.9.
|
|
412
|
+
declare const SDK_VERSION = "0.9.2";
|
|
413
413
|
/**
|
|
414
414
|
* The platforms this package ships an entry point for, as the wire names them (X-Everfur-SDK-Platform).
|
|
415
415
|
*
|