@everfur/sdk 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/README.md +9 -7
- package/dist/{Chat-Ml-HlOiV.d.cts → Chat-BOG0SXKV.d.cts} +3 -3
- package/dist/{Chat-DwGk5APA.d.ts → Chat-CIolBgjJ.d.ts} +3 -3
- package/dist/{DepthViews-DwCS5KKh.d.ts → DepthViews-280t3BcQ.d.ts} +1 -1
- package/dist/{DepthViews-DAJySZqL.d.cts → DepthViews-BR6VQ3Ta.d.cts} +1 -1
- package/dist/{DepthViews-PgA2KvTE.d.cts → DepthViews-BTbF_DJY.d.cts} +1 -1
- package/dist/{DepthViews-kM-_Mn2x.d.ts → DepthViews-DlBuFsgN.d.ts} +1 -1
- package/dist/animations/index.cjs +4 -2
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/animations/index.js +4 -2
- package/dist/{attachments-BV1Mbqm-.d.cts → attachments-B6h4cJU-.d.cts} +5 -5
- package/dist/{attachments-DWv9stp1.d.ts → attachments-CGxvnYu4.d.ts} +5 -5
- package/dist/{attachments-BH0vdghi.d.ts → attachments-CWNj1ZkM.d.ts} +2 -2
- package/dist/{attachments-DaWeeeBW.d.cts → attachments-waXcJWCp.d.cts} +2 -2
- package/dist/{bookingCopy-DRwrhDUe.d.cts → bookingCopy-8aEU6ZmR.d.cts} +2 -2
- package/dist/{bookingCopy-Cc3Cl-IJ.d.ts → bookingCopy-CjPKeg75.d.ts} +2 -2
- package/dist/{casesRepository-BhfPDWhY.d.cts → casesRepository-CGdhvzTu.d.cts} +1 -1
- package/dist/{casesRepository-DMkRRKr8.d.ts → casesRepository-ZG9Sg0e4.d.ts} +1 -1
- package/dist/chat/index.cjs +4 -2
- package/dist/chat/index.d.cts +9 -9
- package/dist/chat/index.d.ts +9 -9
- package/dist/chat/index.js +4 -2
- package/dist/client/index.cjs +6 -4
- package/dist/client/index.d.cts +7 -7
- package/dist/client/index.d.ts +7 -7
- package/dist/client/index.js +6 -4
- package/dist/{config-lilR0260.d.cts → config-B0p6Lygh.d.cts} +1 -1
- package/dist/{config-CuOczZUI.d.ts → config-DmFAZJOx.d.ts} +1 -1
- package/dist/consent/index.cjs +4 -2
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/consent/index.js +4 -2
- package/dist/{context-CL3cR0MA.d.ts → context-BNreNLtL.d.ts} +10 -6
- package/dist/{context-BA6X6ZHd.d.cts → context-BgS2a57J.d.cts} +10 -6
- package/dist/{copy-A2n7xXsL.d.ts → copy-DLJriGQS.d.ts} +2 -2
- package/dist/{copy-DkoUo0VR.d.cts → copy-lWp-Lkv5.d.cts} +2 -2
- package/dist/core/index.cjs +8 -6
- package/dist/core/index.d.cts +12 -12
- package/dist/core/index.d.ts +12 -12
- package/dist/core/index.js +8 -6
- package/dist/{depth-DOPtk0vF.d.cts → depth-BYb3RXoA.d.cts} +2 -2
- package/dist/{depth-6_BYIt0s.d.ts → depth-COz-sSG5.d.ts} +2 -2
- package/dist/{entitlementRepository-BE-L6vX1.d.ts → entitlementRepository-CrTOP_-o.d.ts} +2 -2
- package/dist/{entitlementRepository-Blh38A2b.d.cts → entitlementRepository-D-Lse67w.d.cts} +2 -2
- package/dist/{identity-4lohfP2L.d.ts → identity-Cw07BKZp.d.ts} +1 -1
- package/dist/{identity-YXqHjBln.d.cts → identity-DFVGYn1o.d.cts} +1 -1
- package/dist/index.cjs +8 -6
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +8 -6
- package/dist/notifications/index.cjs +5 -3
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +5 -3
- package/dist/{pets-DzXi_9hY.d.ts → pets-BYALZTSu.d.ts} +2 -2
- package/dist/{pets-m61lisZt.d.cts → pets-CcyPQS-H.d.cts} +2 -2
- package/dist/{petsRepository-B1I6Lq_m.d.ts → petsRepository-518QkPxH.d.ts} +1 -1
- package/dist/{petsRepository-CQeuDdDC.d.cts → petsRepository-B_Q1gFkE.d.cts} +1 -1
- package/dist/photo/index.cjs +4 -2
- package/dist/photo/index.js +4 -2
- package/dist/{ports-CrGAcey9.d.ts → ports-DmQeMArX.d.ts} +4 -4
- package/dist/{ports-DUqO_XX0.d.cts → ports-RuNJmBA-.d.cts} +4 -4
- package/dist/records/depth/index.cjs +4 -2
- package/dist/records/depth/index.d.cts +7 -7
- package/dist/records/depth/index.d.ts +7 -7
- package/dist/records/depth/index.js +4 -2
- package/dist/records/index.cjs +4 -2
- package/dist/records/index.d.cts +9 -9
- package/dist/records/index.d.ts +9 -9
- package/dist/records/index.js +4 -2
- package/dist/{requestFunnel-B86gQFka.d.ts → requestFunnel-B9fdXMi5.d.ts} +2 -2
- package/dist/{requestFunnel-hXkP5T7K.d.cts → requestFunnel-BBjNNwc9.d.cts} +2 -2
- package/dist/{runtimeTypes-Bt_tIj3h.d.cts → runtimeTypes-CstDBX8w.d.cts} +4 -4
- package/dist/{runtimeTypes-DXKxY2yq.d.ts → runtimeTypes-N_K4BVZB.d.ts} +4 -4
- package/dist/server/events/index.cjs +4 -2
- package/dist/server/events/index.d.cts +2 -2
- package/dist/server/events/index.d.ts +2 -2
- package/dist/server/events/index.js +4 -2
- package/dist/server/index.cjs +7 -5
- package/dist/server/index.d.cts +27 -4
- package/dist/server/index.d.ts +27 -4
- package/dist/server/index.js +7 -5
- package/dist/televet/booking/index.cjs +5 -3
- package/dist/televet/booking/index.d.cts +6 -6
- package/dist/televet/booking/index.d.ts +6 -6
- package/dist/televet/booking/index.js +5 -3
- package/dist/televet/index.cjs +4 -2
- package/dist/televet/index.js +4 -2
- package/dist/testing/index.cjs +4 -2
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +4 -2
- package/dist/testing/rn/index.cjs +4 -2
- package/dist/testing/rn/index.d.cts +7 -7
- package/dist/testing/rn/index.d.ts +7 -7
- package/dist/testing/rn/index.js +4 -2
- package/dist/testing/web/index.cjs +4 -2
- package/dist/testing/web/index.d.cts +7 -7
- package/dist/testing/web/index.d.ts +7 -7
- package/dist/testing/web/index.js +4 -2
- package/dist/{timelineRows-C2ObTmfN.d.ts → timelineRows-7yjHyh8i.d.ts} +1 -1
- package/dist/{timelineRows-CrA-ePrQ.d.cts → timelineRows-WvnL-Lds.d.cts} +1 -1
- package/dist/{useRecordsDepth-NQNJaGyk.d.ts → useRecordsDepth-Bp6L4M5P.d.ts} +1 -1
- package/dist/{useRecordsDepth-Dcr9y6i-.d.cts → useRecordsDepth-DPdAK_81.d.cts} +1 -1
- package/dist/video/index.cjs +4 -2
- package/dist/video/index.js +4 -2
- package/dist/{view-DWJa2L0U.d.ts → view-C6go2uUt.d.ts} +2 -2
- package/dist/{view-Dk7xpBJ4.d.cts → view-CiF_HVFQ.d.cts} +2 -2
- package/dist/web/consent/index.cjs +4 -2
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/consent/index.js +4 -2
- package/dist/web/index.cjs +8 -6
- package/dist/web/index.d.cts +14 -14
- package/dist/web/index.d.ts +14 -14
- package/dist/web/index.js +8 -6
- package/dist/web/notifications/index.cjs +5 -3
- package/dist/web/notifications/index.d.cts +3 -3
- package/dist/web/notifications/index.d.ts +3 -3
- package/dist/web/notifications/index.js +5 -3
- package/dist/web/records/depth/index.cjs +4 -2
- 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 +4 -2
- package/dist/web/records/index.cjs +8 -6
- package/dist/web/records/index.d.cts +9 -9
- package/dist/web/records/index.d.ts +9 -9
- package/dist/web/records/index.js +8 -6
- package/dist/web/televet/booking/index.cjs +5 -3
- 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 +5 -3
- package/dist/web/televet/index.cjs +4 -2
- package/dist/web/televet/index.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,74 @@ changes that has not been earned by any production integration yet.
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.12.0] - 2026-10-08
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **`revokePartnerMemberSessions` on `@everfur/sdk/server`.** Wraps `POST /widget/v1/sessions/revoke`: every session
|
|
18
|
+
of one member minted before the call is refused with `401 session_revoked`, and a session minted after it works.
|
|
19
|
+
Needs the unrestricted `sk_partner_` key; an `rk_partner_` key throws `EverfurConfigError` before the request (the
|
|
20
|
+
route answers `403 unrestrictedKeyRequired`). Documented in chapter 8.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- **A revoked session says so.** A `session_revoked` refusal (the partner ended the member's sessions) now renders the
|
|
25
|
+
registry's authored sentence, "This session has ended. Please sign in again.", wherever the settled error's
|
|
26
|
+
`displayMessage` is shown (chat, records), whether the one re-mint is refused by your backend or refused again by Everfur. Every other auth refusal
|
|
27
|
+
keeps "Please sign in again to continue." The code is still `authExpired` / `authRejected`.
|
|
28
|
+
- **A refused `user_ref` is a developer error, not "update the app".** `mintPartnerSession` and
|
|
29
|
+
`revokePartnerMemberSessions` settle the routes' `400 user_ref_invalid` (as the wire code or a forwarded
|
|
30
|
+
`reason_code`) as `validationFailed` with `reasonCode` `user_ref_invalid`. Any other `invalidRequest` (the
|
|
31
|
+
minimum-version gate) still folds to `sdkUpdateRequired`.
|
|
32
|
+
- **A terminal `authRejected` keeps its cause.** When your `getToken` throws, the thrown value is now on the error's
|
|
33
|
+
non-enumerable `raw` (its message on `wireMessage`), in `authedSend` and in `prepare()`'s `session` result. A 401
|
|
34
|
+
that survives the one re-mint (for example `session_revoked`) now keeps its `requestId`, `httpStatus`, wire
|
|
35
|
+
`docUrl` and `wireMessage`. The code and the rendered copy are unchanged.
|
|
36
|
+
- **A pet switch no longer flashes the Everfur default theme.** `setActivePet` keeps the tenant's branding painted
|
|
37
|
+
until the next verdict lands; a user switch still resets it.
|
|
38
|
+
- **A branded tenant no longer re-resolves its theme on every entitlement poll.** The platform answers a branded
|
|
39
|
+
tenant with a 200 on every poll; an unchanged branding now keeps the same object, so the theme provider's memo
|
|
40
|
+
holds.
|
|
41
|
+
- **The server helpers surface a `429` wait.** `mintPartnerSession`, the partner pet helpers, `sendPartnerEvent` and
|
|
42
|
+
`setPartnerMemberNotificationProfile` now read the `Retry-After` header into `error.retryAfterSeconds`, as the
|
|
43
|
+
device transport already did.
|
|
44
|
+
|
|
45
|
+
### Docs
|
|
46
|
+
|
|
47
|
+
- `secureStore` is documented as reserved (an available store throws), not as a working seam.
|
|
48
|
+
- The `getToken` route answers JSON `{ token, expiresAt }` everywhere (chapter 5's table said plain text).
|
|
49
|
+
- Frame mode: a `sessionToken` without `getToken` ends in `authRejected` and `session_expired`, not a
|
|
50
|
+
`tokenUnavailable` on `onError`.
|
|
51
|
+
- Corrected: anonymous mode sends the session id, not a user ref; the SDK ships both records upload transports; the
|
|
52
|
+
React Native vet-visit screens are a static import; the re-mint timing for short TTLs; the secret key is used on
|
|
53
|
+
every server route, not only the mint; the mint's 400/429/503; webhook delivery is built and switched off, not
|
|
54
|
+
unbuilt.
|
|
55
|
+
|
|
56
|
+
## [0.11.0] - 2026-10-07
|
|
57
|
+
|
|
58
|
+
### Behaviour changes
|
|
59
|
+
|
|
60
|
+
- **`ContractWireErrorCode` gains `session_revoked` and `unrestrictedKeyRequired` (#202).** An exhaustive `switch` over
|
|
61
|
+
it with a `never` check needs the two new cases or a default to compile.
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
|
|
65
|
+
- **The platform's two session revocation codes are in the vendored contract and error registry (EFBackend
|
|
66
|
+
#2018; #202).** `session_revoked` (401, a bearer issued before the partner revoked the member's sessions) folds to
|
|
67
|
+
`authExpired`, so it takes the existing re-mint and replay-once path: a re-mint that succeeds carries on, and
|
|
68
|
+
a refused re-mint or a second 401 settles `authRejected` and raises `onEvent` `session_expired` as before.
|
|
69
|
+
`unrestrictedKeyRequired` (403, `POST /widget/v1/sessions/revoke` called with a restricted key; server only)
|
|
70
|
+
folds to `accessDenied`, beside `insufficientCapability`.
|
|
71
|
+
|
|
72
|
+
### Changed
|
|
73
|
+
|
|
74
|
+
- **The web records page's upload prompt names photos while photo upload is live (#200).** It said `Upload PDF records
|
|
75
|
+
you already have` while the upload screen it opens says `A PDF, or a photo of a paper record.` With photo upload
|
|
76
|
+
live it now reads `Upload records you already have as a PDF, or a photo, up to 25 MB each.`; with it off, the
|
|
77
|
+
PDF wording is unchanged (owner-approved copy).
|
|
78
|
+
- **Docs: `contact.exported` is listed in the webhook catalog** (#200; `docs/partner-integration/15-EVENTS-AND-WEBHOOKS.md`
|
|
79
|
+
and the rendered docs page), with its owner-approved description.
|
|
80
|
+
|
|
13
81
|
## [0.10.0] - 2026-10-07
|
|
14
82
|
|
|
15
83
|
### Behaviour changes
|
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.
|
|
13
|
+
> `0.12.0`, 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. -->
|
|
@@ -67,7 +67,7 @@ Two ways, one wire contract, documented in
|
|
|
67
67
|
root is the React Native entry and imports `react-native` and `react-native-safe-area-context`, so in a
|
|
68
68
|
browser project it fails to resolve them rather than rendering. The `/web` entries need `react`,
|
|
69
69
|
`react/jsx-runtime` and `zod` and nothing native, which `npm run verify:pack` proves on every CI run by
|
|
70
|
-
importing
|
|
70
|
+
importing every one of them in a React web project.
|
|
71
71
|
- **Frame mode**, for a page you do not fully control (a storefront theme, a CMS page): one `<script
|
|
72
72
|
src="https://sdk.everfur.com/v1/everfur.js">` puts the surface in an iframe on `sdk.everfur.com`, and
|
|
73
73
|
the frame refuses to initialise on any page origin your tenant has not registered. The copy-paste shape
|
|
@@ -79,9 +79,10 @@ account) have their own entry on both hosts, `@everfur/sdk/web/televet` and `@ev
|
|
|
79
79
|
INSIDE your app by default: booking, the confirmation and the call run in an Everfur modal (React Native) or
|
|
80
80
|
dialog (web) that `VetVisitButton` and `EverfurChat` mount themselves; the hosted page is an explicit opt-in,
|
|
81
81
|
`prefer="redirect"`. The booking screens (`@everfur/sdk/televet/booking`, `@everfur/sdk/web/televet/booking`)
|
|
82
|
-
and the call (`@everfur/sdk/televet/call`, `@everfur/sdk/web/televet/call`) are their own entries
|
|
83
|
-
demand, so a page where nobody opens a visit downloads neither and a page where nobody joins takes
|
|
84
|
-
dependency
|
|
82
|
+
and the call (`@everfur/sdk/televet/call`, `@everfur/sdk/web/televet/call`) are their own entries. On the web they
|
|
83
|
+
are loaded on demand, so a page where nobody opens a visit downloads neither and a page where nobody joins takes
|
|
84
|
+
no WebRTC dependency; on React Native both are static imports in the same bundle (the WebRTC stack is the native
|
|
85
|
+
module your app registers with `registerEverfurDaily`).
|
|
85
86
|
[docs/partner-integration/16-TELEVET-VISITS.md](https://sdk.everfur.com/v1/docs/index.html#sec-televet).
|
|
86
87
|
|
|
87
88
|
## Quickstart
|
|
@@ -140,7 +141,8 @@ async function getToken(): Promise<MintedToken> {
|
|
|
140
141
|
}
|
|
141
142
|
```
|
|
142
143
|
|
|
143
|
-
The SDK calls `getToken` lazily, re-mints about a minute before `expiresAt
|
|
144
|
+
The SDK calls `getToken` lazily, re-mints about a minute before `expiresAt` (halfway through, for a token that
|
|
145
|
+
lives under two minutes), and re-calls it once after a
|
|
144
146
|
`401`, so a fresh token is always used without you managing expiry. Everfur never sees how you signed the person in (OAuth, a JWT, Firebase, Cognito, a
|
|
145
147
|
session, a magic link all work); it needs one stable, opaque, non-guessable id per person as `userRef`. Records lives on its own subpath:
|
|
146
148
|
|
|
@@ -202,7 +204,7 @@ off-state, never a blank region.
|
|
|
202
204
|
| `@everfur/sdk/web` | the browser entry: `EverfurProvider`, `CapabilityGate`, `EverfurChat`, `useEverfurChat`, the theme hook, rendered with `react-dom`; withheld from React Native bundles the way `./server` is |
|
|
203
205
|
| `@everfur/sdk/web/records` | records for a browser host: `EverfurRecordsPage` (the Everfur web app's records page, complete on its own: request from a clinic, upload, request status, the full record with vaccinations, all inside your page), the named screens, `EverfurRecords` (the React Native-shaped flow), `useEverfurRecords`, `createWebRecordsUploadTransport`, `fileToHandle`; its own entry, withheld from React Native like `./web`; available when Everfur enables records for the account. Frame mode serves it with `surface: 'records'` (see [chapter 13](https://sdk.everfur.com/v1/docs/index.html#web--2-frame-mode-the-loader-and-the-frame)) |
|
|
204
206
|
| `@everfur/sdk/web/records/upload` | `createWebRecordsUploadTransport` alone, for the `uploadTransport` on the provider config at your app root; the same function `@everfur/sdk/web/records` exports, without the records entry |
|
|
205
|
-
| `@everfur/sdk/server` | **server-only** `mintPartnerSession` (no React Native resolution; never bundled on-device) |
|
|
207
|
+
| `@everfur/sdk/server` | **server-only** `mintPartnerSession`, `revokePartnerMemberSessions` (end one member's sessions now) and the partner pet helpers (no React Native resolution; never bundled on-device) |
|
|
206
208
|
| `@everfur/sdk/server/events` | **server-only, Node only** partner events (preview): `constructEvent` to verify webhooks, `sendPartnerEvent`; see [chapter 15](https://sdk.everfur.com/v1/docs/index.html#sec-events) |
|
|
207
209
|
| `@everfur/sdk/testing`, `@everfur/sdk/testing/rn`, `@everfur/sdk/testing/web` | test seams (`MockTransport`, `useEverfurTestEntitlements`, ...) for your own tests |
|
|
208
210
|
|
|
@@ -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-RuNJmBA-.cjs';
|
|
6
|
+
import { W as WidgetPet, P as PetProfileInput } from './petsRepository-B_Q1gFkE.cjs';
|
|
7
|
+
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from './attachments-B6h4cJU-.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-DmQeMArX.js';
|
|
6
|
+
import { W as WidgetPet, P as PetProfileInput } from './petsRepository-518QkPxH.js';
|
|
7
|
+
import { U as UrgencyDisplayLevel, L as LifecyclePort, E as EverfurChatDraftStore } from './attachments-CGxvnYu4.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,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-Bp6L4M5P.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-DPdAK_81.cjs';
|
|
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-DPdAK_81.cjs';
|
|
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-Bp6L4M5P.js';
|
|
3
3
|
|
|
4
4
|
interface EverfurRecordsDepthProps extends Pick<RecordsScreenBaseProps, 'petRef' | 'petName' | 'onNavigate' | 'onBack'> {
|
|
5
5
|
readonly style?: CSSProperties;
|
|
@@ -67,6 +67,7 @@ return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fiel
|
|
|
67
67
|
/* @__PURE__ */Object.freeze({wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false}),
|
|
68
68
|
/* @__PURE__ */Object.freeze({wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
69
69
|
/* @__PURE__ */Object.freeze({wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
70
|
+
/* @__PURE__ */Object.freeze({wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false}),
|
|
70
71
|
/* @__PURE__ */Object.freeze({wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false}),
|
|
71
72
|
/* @__PURE__ */Object.freeze({wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true}),
|
|
72
73
|
/* @__PURE__ */Object.freeze({wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
@@ -78,6 +79,7 @@ return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fiel
|
|
|
78
79
|
/* @__PURE__ */Object.freeze({wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
79
80
|
/* @__PURE__ */Object.freeze({wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true}),
|
|
80
81
|
/* @__PURE__ */Object.freeze({wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),
|
|
82
|
+
/* @__PURE__ */Object.freeze({wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
81
83
|
/* @__PURE__ */Object.freeze({wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false}),
|
|
82
84
|
/* @__PURE__ */Object.freeze({wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false}),
|
|
83
85
|
/* @__PURE__ */Object.freeze({wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true}),
|
|
@@ -86,13 +88,13 @@ return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fiel
|
|
|
86
88
|
/* @__PURE__ */Object.freeze({wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),
|
|
87
89
|
/* @__PURE__ */Object.freeze({wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
88
90
|
/* @__PURE__ */Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
|
|
89
|
-
/* @__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}}var 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"}}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)}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)}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)}var REQUIRES=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"])});function requires(name){return REQUIRES[name]}function decideCapability(name,decisions,opts){let keys=requires(name),byResource=/* @__PURE__ */new Map;for(let decision of decisions)byResource.set(decision.resource,decision);if(opts?.isPending===true&&keys.some(key=>!byResource.has(key)))return freezeDecision({name:name,enabled:false,isPending:true,limits:{}});let limits=mergeLimits(keys,byResource);return keys.filter(key=>byResource.get(key)?.granted!==true).length===0?freezeDecision({name:name,enabled:true,isPending:false,limits:limits}):freezeDecision({name:name,enabled:false,isPending:false,limits:limits,disabled:disabledFor(keys,byResource)})}function mergeLimits(keys,byResource){let out={};for(let key of keys){let decisionLimits=byResource.get(key)?.limits;if(decisionLimits)for(let[limitKey,limitValue]of Object.entries(decisionLimits)){let existing=out[limitKey];out[limitKey]=existing===void 0?limitValue:Math.min(existing,limitValue)}}return out}function disabledFor(keys,byResource){for(let key of keys){let explicit=byResource.get(key)?.disabled;if(explicit)/* @__PURE__ */
|
|
91
|
+
/* @__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",session_revoked:"authExpired",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"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}}var 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"}}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)}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)}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."}),SESSION_REVOKED_COPY="This session has ended. Please sign in again.";function displayFor(code,wireCode){return(code==="authRejected"||code==="authExpired")&&typeof wireCode=="string"&&wireCode.trim().toLowerCase()==="session_revoked"?SESSION_REVOKED_COPY:userFacingError(code)}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:displayFor(code,opts?.wireCode)};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)}var REQUIRES=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"])});function requires(name){return REQUIRES[name]}function decideCapability(name,decisions,opts){let keys=requires(name),byResource=/* @__PURE__ */new Map;for(let decision of decisions)byResource.set(decision.resource,decision);if(opts?.isPending===true&&keys.some(key=>!byResource.has(key)))return freezeDecision({name:name,enabled:false,isPending:true,limits:{}});let limits=mergeLimits(keys,byResource);return keys.filter(key=>byResource.get(key)?.granted!==true).length===0?freezeDecision({name:name,enabled:true,isPending:false,limits:limits}):freezeDecision({name:name,enabled:false,isPending:false,limits:limits,disabled:disabledFor(keys,byResource)})}function mergeLimits(keys,byResource){let out={};for(let key of keys){let decisionLimits=byResource.get(key)?.limits;if(decisionLimits)for(let[limitKey,limitValue]of Object.entries(decisionLimits)){let existing=out[limitKey];out[limitKey]=existing===void 0?limitValue:Math.min(existing,limitValue)}}return out}function disabledFor(keys,byResource){for(let key of keys){let explicit=byResource.get(key)?.disabled;if(explicit)/* @__PURE__ */
|
|
90
92
|
return Object.freeze({reason:explicit.reason,level:explicit.level,recoverable:explicit.recoverable})}/* @__PURE__ */
|
|
91
93
|
return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function freezeDecision(d){let base={name:d.name,enabled:d.enabled,isPending:d.isPending,limits:/* @__PURE__ */Object.freeze({...d.limits})};return d.disabled!==void 0&&(base.disabled=d.disabled),/* @__PURE__ */Object.freeze(base)}function ok(value,warning){/* @__PURE__ */
|
|
92
94
|
return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
|
|
93
95
|
return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};var EVERFUR_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),globalContextHost=globalThis,EverfurContext=globalContextHost[EVERFUR_CONTEXT_SYMBOL]??(globalContextHost[EVERFUR_CONTEXT_SYMBOL]=react.createContext(null));EverfurContext.displayName??="EverfurContext";function useEverfurContext(){let ctx=react.useContext(EverfurContext);if(ctx===null)throw new EverfurConfigError("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return ctx}function useCapability(name){let{runtime:runtime}=useEverfurContext(),store=runtime.entitlements,snapshot=react.useSyncExternalStore(store.subscribe,store.getSnapshot,store.getSnapshot);return react.useMemo(()=>decideCapability(name,snapshot.decisions,{isPending:snapshot.isPending}),[name,snapshot])}var MIN_OFFSTATE_HEIGHT=48;function selectView(decision){return decision.isPending?"pending":decision.enabled?"enabled":"disabled"}function CapabilityGate(props){let{capability:capability,children:children,renderDisabled:renderDisabled,renderPending:renderPending,style:style}=props,decision=useCapability(capability),view=react.useMemo(()=>selectView(decision),[decision]);switch(view){case"enabled":return children;case"pending":return renderPending?/* @__PURE__ */jsxRuntime.jsx(HostRender,{render:renderPending,fallback:/* @__PURE__ */jsxRuntime.jsx(PendingSkeleton,{capability:capability,style:style})}):/* @__PURE__ */jsxRuntime.jsx(PendingSkeleton,{capability:capability,style:style});case"disabled":return renderDisabled?/* @__PURE__ */jsxRuntime.jsx(HostRender,{render:()=>renderDisabled(decision),fallback:/* @__PURE__ */jsxRuntime.jsx(OffState,{decision:decision,style:style}),resetKey:decision}):/* @__PURE__ */jsxRuntime.jsx(OffState,{decision:decision,style:style});default:return assertNever(view)}}function PendingSkeleton({capability:capability,style:style}){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeStyles(theme),[theme]);/* @__PURE__ */
|
|
94
96
|
return jsxRuntime.jsx(reactNative.View,{style:[styles.offstate,style],accessible:true,accessibilityState:{busy:true},accessibilityLabel:`Loading ${capability}`,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.skeletonBar})})}function OffState({decision:decision,style:style}){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeStyles(theme),[theme]),message=decision.disabled?.reason??"";/* @__PURE__ */
|
|
95
|
-
return jsxRuntime.jsx(reactNative.View,{style:[styles.offstate,style],accessible:true,accessibilityRole:"text",accessibilityLabel:message,children:message.length>0?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.offstateText,children:message}):null})}function makeStyles(theme){let{color:color,space:space,radius:radius,type:type}=theme;return reactNative.StyleSheet.create({offstate:{minHeight:MIN_OFFSTATE_HEIGHT,justifyContent:"center",paddingHorizontal:space.lg,paddingVertical:space.md,backgroundColor:color.surfaceCream,borderRadius:radius.md,borderWidth:reactNative.StyleSheet.hairlineWidth,borderColor:color.brandBorder},offstateText:{...face(theme,"regular"),fontSize:type.size.body,lineHeight:Math.round(type.size.body*type.lineHeight.normal),color:color.text.muted},skeletonBar:{height:space.md,borderRadius:radius.xs,backgroundColor:color.brandSofter}})}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{return ctx.identity.reportRejected?.(),err(
|
|
97
|
+
return jsxRuntime.jsx(reactNative.View,{style:[styles.offstate,style],accessible:true,accessibilityRole:"text",accessibilityLabel:message,children:message.length>0?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.offstateText,children:message}):null})}function makeStyles(theme){let{color:color,space:space,radius:radius,type:type}=theme;return reactNative.StyleSheet.create({offstate:{minHeight:MIN_OFFSTATE_HEIGHT,justifyContent:"center",paddingHorizontal:space.lg,paddingVertical:space.md,backgroundColor:color.surfaceCream,borderRadius:radius.md,borderWidth:reactNative.StyleSheet.hairlineWidth,borderColor:color.brandBorder},offstateText:{...face(theme,"regular"),fontSize:type.size.body,lineHeight:Math.round(type.size.body*type.lineHeight.normal),color:color.text.muted},skeletonBar:{height:space.md,borderRadius:radius.xs,backgroundColor:color.brandSofter}})}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 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}function networkError(cause){return makeEverfurError("internalError",{retryable:true,wireMessage:describeCause(cause)})}function describeCause(cause){return cause instanceof Error?cause.message:typeof cause=="string"?cause:"network request failed"}var FUNNEL_UNARY_TIMEOUT_MS=3e4,RETRY_OVERRIDE_MAX_MS=BACKOFF_CAP_MS*2,IDEMPOTENCY_HEADER="idempotency-key",MUTATING_METHODS=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),NOOP_OBSERVER=/* @__PURE__ */Object.freeze({onEvent(){}}),defaultFunnelTimers=/* @__PURE__ */Object.freeze({setTimeout:(handler,ms)=>setTimeout(handler,ms),clearTimeout:handle=>clearTimeout(handle),now:()=>Date.now()});function seededIdempotencyKey(seed){let safe=seed.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return safe.length===0?null:`efs_${safe}`.slice(0,128)}function createRequestFunnel(deps){let observer=deps.observer??NOOP_OBSERVER,timers=deps.timers??defaultFunnelTimers,rng=deps.rng??Math.random,sleep=deps.sleep??((ms,signal)=>delayAbortable(ms,timers,signal)),ceiling=deps.maxAttempts??MAX_RETRY_ATTEMPTS,timeoutMs=deps.unaryTimeoutMs??FUNNEL_UNARY_TIMEOUT_MS,mintKey=deps.newIdempotencyKey??defaultIdempotencyKeyFactory(),emit=event=>{try{observer.onEvent(event)}catch{}};async function send(call,req,opts){let perCallMaxAttempts=opts?.maxAttempts,maxAttempts=Math.max(1,perCallMaxAttempts??ceiling),idempotent=opts?.idempotent??MUTATING_METHODS.has(req.method),seeded=opts?.idempotencyKey===void 0?null:seededIdempotencyKey(opts.idempotencyKey),idempotencyKey=idempotent?seeded??mintKey():null,base=assembleHeaders(req,idempotencyKey),attempt=0;for(;;){let stamp=extra=>/* @__PURE__ */Object.freeze({call:call,method:req.method,path:req.path,attempt:attempt,...idempotencyKey?{idempotencyKey:idempotencyKey}:{},...extra});emit(stamp({phase:"attempt"}));let deadline=boundedSignal(timeoutMs,timers),merged=mergeSignals(deadline.signal,req.signal),settled;try{settled=await authedSend({...base,signal:merged.signal},deps.auth)}catch(cause){settled=err(networkError(cause))}finally{merged.dispose(),deadline.cancel()}if(settled.ok)return emit(stamp({phase:"settled",ok:true,reason:"ok"})),settled;let error=settled.error,decision=decideRetry(error,attempt,{maxAttempts:maxAttempts,rng:rng,now:timers.now(),aborted:req.signal?.aborted===true,...perCallMaxAttempts!==void 0?{perCallMaxAttempts:perCallMaxAttempts}:{},...deps.errorPolicy!==void 0?{policy:deps.errorPolicy}:{}}),settledEvent={ok:false,code:error.code,reason:decision.reason,...error.httpStatus!==void 0?{httpStatus:error.httpStatus}:{},...error.requestId!==void 0?{requestId:error.requestId}:{}};if(!decision.retry)return emit(stamp({phase:"settled",...settledEvent})),err(error);if(emit(stamp({phase:"retry",...settledEvent,delayMs:decision.delayMs})),await sleep(decision.delayMs,req.signal),req.signal?.aborted===true)return emit(stamp({phase:"settled",...settledEvent,reason:"aborted"})),err(error);attempt+=1}}async function authorize(req){return withAuthHeaders(req,await resolveDeviceAuth(deps.auth))}async function*stream(call,req,signal){emit(
|
|
96
98
|
/* @__PURE__ */Object.freeze({call:call,phase:"stream.open",method:req.method,path:req.path,attempt:0}));try{yield*deps.auth.transport.stream(req,signal)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
|
|
97
99
|
return Object.freeze({send:send,authorize:authorize,stream:stream})}function assembleHeaders(req,idempotencyKey){let headers={};for(let[key,value]of Object.entries(req.headers??{}))key.toLowerCase()!==IDEMPOTENCY_HEADER&&(headers[key]=value);return idempotencyKey!==null&&(headers["Idempotency-Key"]=idempotencyKey),{...req,headers:headers}}function defaultIdempotencyKeyFactory(){let counter=0;return()=>`efk_${Date.now().toString(36)}_${(counter++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var POLICY_MAX_ATTEMPTS_CAP=10;function decideRetry(error,attempt,ctx){if(ctx.aborted)return{retry:false,reason:"aborted"};let throttle=throttleKind(error);if(throttle==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(throttle!=="burst"&&!isAutoRetryable(error.code))return{retry:false,reason:"terminal-code"};let reason=throttle==="burst"?"burst-throttle":"retryable-code";if((()=>{if(ctx.policy===void 0)return false;try{return!ctx.policy.shouldRetry(error.code,attempt)}catch{return false}})())return{retry:false,reason:"terminal-code"};let policyCeiling=()=>{if(ctx.policy===void 0)return null;let raw;try{raw=ctx.policy.maxAttempts(error.code)}catch{return null}return typeof raw!="number"||!Number.isFinite(raw)?null:Math.max(1,Math.min(POLICY_MAX_ATTEMPTS_CAP,Math.floor(raw)))},ceiling=ctx.perCallMaxAttempts??policyCeiling()??ctx.maxAttempts;if(attempt+1>=ceiling)return{retry:false,reason:"attempts-exhausted"};let override=retryOverrideMs(error,ctx.now);return override!==null?override>RETRY_OVERRIDE_MAX_MS?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:reason,delayMs:override}:{retry:true,reason:reason,delayMs:backoffDelayMs(attempt,ctx.rng)}}function throttleKind(error){let code=error.code==="unknown"?fromWire(rawWireCode(error.raw)):error.code;return code==="quotaExceeded"?"quota":code==="rateLimited"||error.httpStatus===429?"burst":null}function retryOverrideMs(error,now){let at=findResetsAt(error.raw);if(at!==null){let delta=at-now;return delta>0?delta:0}let wait=findRetryAfterSeconds(error.raw);return wait===null?null:Math.round(wait*1e3)}function findRetryAfterSeconds(raw){for(let scope of candidateScopes(raw)){let value=scope.retry_after_seconds;if(typeof value=="number"&&Number.isFinite(value)&&value>=0)return value}return null}function findResetsAt(raw){for(let scope of candidateScopes(raw)){let value=scope.resets_at,parsed=parseInstantMs(value);if(parsed!==null)return parsed}return null}function candidateScopes(raw){if(!isRecord(raw))return[];let out=[raw];for(let nested of["error","detail"]){let value=raw[nested];isRecord(value)&&out.push(value)}return out}function parseInstantMs(value){if(typeof value=="number"&&Number.isFinite(value))return value<1e11?Math.round(value*1e3):Math.round(value);if(typeof value=="string"&&value.trim().length>0){let parsed=Date.parse(value);return Number.isFinite(parsed)?parsed:null}return null}function rawWireCode(raw){for(let scope of candidateScopes(raw)){let code=scope.code;if(typeof code=="string"&&code.length>0)return code}return null}function isRecord(value){return typeof value=="object"&&value!==null}async function resolveDeviceAuth(auth){return auth.mode==="anonymous"?{mode:"anonymous",publishableKey:auth.publishableKey,userRef:auth.userRef,...auth.sessionId?{sessionId:auth.sessionId}:{}}:{mode:"personalized",token:await auth.identity.currentToken(),userRef:auth.userRef,...auth.sessionId?{sessionId:auth.sessionId}:{}}}function boundedSignal(ms,timers){let ctrl=new AbortController,handle=timers.setTimeout(()=>ctrl.abort(),ms);return{signal:ctrl.signal,cancel:()=>timers.clearTimeout(handle)}}function mergeSignals(deadline,caller){let noop=()=>{};if(!caller)return{signal:deadline,dispose:noop};let ctrl=new AbortController;if(deadline.aborted||caller.aborted)return ctrl.abort(),{signal:ctrl.signal,dispose:noop};let onAbort=()=>ctrl.abort();return deadline.addEventListener("abort",onAbort,{once:true}),caller.addEventListener("abort",onAbort,{once:true}),{signal:ctrl.signal,dispose:()=>{deadline.removeEventListener("abort",onAbort),caller.removeEventListener("abort",onAbort)}}}function delayAbortable(ms,timers,signal){return ms<=0||signal?.aborted===true?Promise.resolve():new Promise(resolve=>{let handle=timers.setTimeout(()=>{signal?.removeEventListener("abort",onAbort),resolve()},ms),onAbort=()=>{timers.clearTimeout(handle),resolve()};signal?.addEventListener("abort",onAbort,{once:true})})}function hasLoneSurrogate(value){for(let i=0;i<value.length;i+=1){let code=value.charCodeAt(i);if(code>=55296&&code<=56319){let low=value.charCodeAt(i+1);if(!(low>=56320&&low<=57343))return true;i+=1}else if(code>=56320&&code<=57343)return true}return false}function mapTier(wire){let tier={url:wire.url,kind:wire.kind,expiresAt:wire.expires_at};return typeof wire.loop_duration_ms=="number"&&(tier.loopDurationMs=wire.loop_duration_ms),typeof wire.cache_key=="string"&&wire.cache_key.length>0&&(tier.cacheKey=wire.cache_key),/* @__PURE__ */Object.freeze(tier)}function mapPetStateResponse(wire){let tiers={};wire.tiers.animation&&(tiers.animation=mapTier(wire.tiers.animation)),wire.tiers.image&&(tiers.image=mapTier(wire.tiers.image));let overlays={};wire.overlays.weather_alert&&(overlays.weatherAlert=mapTier(wire.overlays.weather_alert));let response={category:wire.category,tiers:/* @__PURE__ */Object.freeze(tiers),overlays:/* @__PURE__ */Object.freeze(overlays),idle:"bundled",ttlSeconds:wire.ttl_seconds,degraded:wire.degraded};return typeof wire.cache_epoch=="number"&&(response.cacheEpoch=wire.cache_epoch),/* @__PURE__ */Object.freeze(response)}var mediaKindWireSchema=/* @__PURE__ */zod.z.enum(["webp","video"]),categoryWireSchema=/* @__PURE__ */zod.z.enum(["health","attention","moment","activity","mood","idle"]),petStateTierWireSchema=/* @__PURE__ */zod.z.object({url:/* @__PURE__ */zod.z.string(),kind:/* @__PURE__ */mediaKindWireSchema.default("webp"),loop_duration_ms:/* @__PURE__ */zod.z.number().nullish(),expires_at:/* @__PURE__ */zod.z.string(),cache_key:/* @__PURE__ */zod.z.string().nullish()}),petStateResponseWireSchema=/* @__PURE__ */zod.z.object({category:categoryWireSchema,tiers:/* @__PURE__ */zod.z.object({animation:/* @__PURE__ */petStateTierWireSchema.optional(),image:/* @__PURE__ */petStateTierWireSchema.optional()}).default({}),overlays:/* @__PURE__ */zod.z.object({weather_alert:/* @__PURE__ */petStateTierWireSchema.optional()}).default({}),idle:/* @__PURE__ */zod.z.literal("bundled").default("bundled"),ttl_seconds:/* @__PURE__ */zod.z.number(),degraded:/* @__PURE__ */zod.z.boolean().default(false),cache_epoch:/* @__PURE__ */zod.z.number().default(0)});function parsePetStateWire(raw){let parsed=petStateResponseWireSchema.safeParse(raw);return parsed.success?parsed.data:null}function createPetStateRepository(auth){return createPetStateRepositoryOver(createRequestFunnel({auth:auth}))}function createPetStateRepositoryOver(funnel){return{async getState(petRef,opts){if(hasLoneSurrogate(petRef))return err(makeEverfurError("validationFailed",{retryable:false,wireMessage:"pet_ref contains an unpaired surrogate and cannot be encoded"}));let path=`/widget/v1/pets/${encodeURIComponent(petRef)}/state`,res=await funnel.send("animations.getState",opts?.signal?{method:"GET",path:path,signal:opts.signal}:{method:"GET",path:path});if(res.ok){let wire=parsePetStateWire(res.value);return wire===null?err(makeEverfurError("internalError",{retryable:true})):ok(mapPetStateResponse(wire))}return res.error.httpStatus===404?ok(null):err(res.error)}}}function stableMediaKey(source){if(source===void 0)return"bundled:none";if(typeof source=="number")return`bundled:${source}`;if("kind"in source)return`bundled:${source.id}`;let uri=source.uri,q=uri.indexOf("?");return q===-1?uri:uri.slice(0,q)}function selectTier(i){return i.hasPhoto&&!i.photoFailed?"photo":i.canAnimate&&!i.animationFailed?"animation":i.hasImage&&!i.imageFailed?"image":"idle"}function retireTier(current,failed){switch(current){case"photo":return{failed:freezeFailed({...failed,photo:true}),reason:"network_error"};case"animation":return{failed:freezeFailed({...failed,animation:true}),reason:"network_error"};case"image":return{failed:freezeFailed({...failed,image:true}),reason:"network_error"};case"idle":return{failed:freezeFailed(failed),reason:"idle_asset_failed"};default:return{failed:freezeFailed(failed),reason:"network_error"}}}var NO_FAILURES=/* @__PURE__ */Object.freeze({photo:false,animation:false,image:false});function freezeFailed(f){/* @__PURE__ */
|
|
98
100
|
return Object.freeze({photo:f.photo,animation:f.animation,image:f.image})}function isLoaderSafeCategory(category){switch(category){case"activity":case"mood":case"moment":case"idle":return true;case"health":case"attention":return false;default:return false}}var CACHE_EPOCH_STORAGE_KEY="everfur.petState.cacheEpoch";function createCacheEpochGuard(deps){let lastActed=0,loaded=false,inFlight=null,run=async serverEpoch=>{if(loaded||(lastActed=await readStoredEpoch(deps.kv),loaded=true),serverEpoch<=lastActed)return false;try{await deps.kv.setItem(CACHE_EPOCH_STORAGE_KEY,String(serverEpoch))}catch{}lastActed=serverEpoch;try{await deps.cache.clearMemoryCache()}catch{}try{await deps.cache.clearDiskCache()}catch{}return true};return{async sync(serverEpoch){return typeof serverEpoch!="number"||!Number.isFinite(serverEpoch)||serverEpoch<=0||loaded&&serverEpoch<=lastActed?false:inFlight||(inFlight=run(serverEpoch).finally(()=>{inFlight=null}),inFlight)}}}async function readStoredEpoch(kv){let raw;try{raw=await kv.getItem(CACHE_EPOCH_STORAGE_KEY)}catch{return 0}if(raw===null)return 0;let parsed=Number(raw);return Number.isFinite(parsed)&&parsed>0?parsed:0}var SUPPORTED_SCHEMA_VERSION=1,MANIFEST_LKG_STORAGE_KEY="everfur.manifest.lastKnownGood",COMPILED_DEFAULT_IDLE=/* @__PURE__ */Object.freeze({kind:"bundled",id:"everfur-idle"}),COMPILED_DEFAULT_MANIFEST=/* @__PURE__ */Object.freeze({schemaVersion:SUPPORTED_SCHEMA_VERSION,revision:"compiled-default",surfaces:/* @__PURE__ */Object.freeze({animations:/* @__PURE__ */Object.freeze({enabled:true,idle:COMPILED_DEFAULT_IDLE})})}),bundledIdleSchema=/* @__PURE__ */zod.z.object({kind:/* @__PURE__ */zod.z.literal("bundled"),id:/* @__PURE__ */zod.z.string().min(1)}),animationsSurfaceWireSchema=/* @__PURE__ */zod.z.object({enabled:/* @__PURE__ */zod.z.boolean().default(true),idle:/* @__PURE__ */bundledIdleSchema.optional()}),manifestWireSchema=/* @__PURE__ */zod.z.object({schema_version:/* @__PURE__ */zod.z.number().int(),revision:/* @__PURE__ */zod.z.string().default(""),surfaces:/* @__PURE__ */zod.z.object({animations:/* @__PURE__ */animationsSurfaceWireSchema.optional()}).default({})});function parseManifest(raw){let parsed=manifestWireSchema.safeParse(raw);if(!parsed.success)return{ok:false,reason:"unparseable"};if(parsed.data.schema_version>SUPPORTED_SCHEMA_VERSION)return{ok:false,reason:"newer_schema"};let animationsWire=parsed.data.surfaces.animations,surfaces={};return animationsWire&&(surfaces.animations=/* @__PURE__ */Object.freeze({enabled:animationsWire.enabled,idle:animationsWire.idle?/* @__PURE__ */Object.freeze({...animationsWire.idle}):COMPILED_DEFAULT_IDLE})),{ok:true,manifest:/* @__PURE__ */Object.freeze({schemaVersion:parsed.data.schema_version,revision:parsed.data.revision,surfaces:/* @__PURE__ */Object.freeze(surfaces)})}}async function resolveManifest(liveRaw,kv,tel){if(liveRaw!=null){let parsed=parseManifest(liveRaw);if(parsed.ok)return await writeLastKnownGood(kv,liveRaw),tel.track("manifest.fallback",{source:"live"}),/* @__PURE__ */Object.freeze({manifest:parsed.manifest,source:"live"});parsed.reason==="newer_schema"&&tel.track("manifest.refused_newer",{})}let lkg=await readLastKnownGood(kv);return lkg?(tel.track("manifest.fallback",{source:"last-known-good"}),/* @__PURE__ */Object.freeze({manifest:lkg,source:"last-known-good"})):(tel.track("manifest.fallback",{source:"compiled-default"}),/* @__PURE__ */Object.freeze({manifest:COMPILED_DEFAULT_MANIFEST,source:"compiled-default"}))}function animationsSurfaceOf(manifest){return manifest.surfaces.animations??COMPILED_DEFAULT_MANIFEST.surfaces.animations??{enabled:true,idle:COMPILED_DEFAULT_IDLE}}async function writeLastKnownGood(kv,raw){try{await kv.setItem(MANIFEST_LKG_STORAGE_KEY,JSON.stringify(raw))}catch{}}async function readLastKnownGood(kv){let stored;try{stored=await kv.getItem(MANIFEST_LKG_STORAGE_KEY)}catch{return null}if(stored===null)return null;let json;try{json=JSON.parse(stored)}catch{return null}let parsed=parseManifest(json);return parsed.ok?parsed.manifest:null}var EMPTY_SNAPSHOT=/* @__PURE__ */Object.freeze({data:null,isPending:false,isError:false,error:null,isDark:false});function createPetStateStore(deps){let{repo:repo,cacheEpoch:cacheEpoch,timers:timers}=deps,listeners=/* @__PURE__ */new Set,warm=/* @__PURE__ */new Map,snapshot=EMPTY_SNAPSHOT,currentPetRef=null,dataPetRef=null,isFocused=false,terminatedPetRef=null,remintHandle=null,inFlight=null,epoch=0,emit=()=>{for(let listener of listeners)listener()},patch=partial=>{snapshot=/* @__PURE__ */Object.freeze({...snapshot,...partial}),emit()},clearRemint=()=>{remintHandle!==null&&(timers.clearTimeout(remintHandle),remintHandle=null)},staleMs=data=>data?Math.max(1,data.ttlSeconds)*1e3:6e4,touchWarm=petRef=>{let entry=warm.get(petRef);entry!==void 0&&(warm.delete(petRef),warm.set(petRef,entry))},setWarm=(petRef,data)=>{for(warm.delete(petRef),warm.set(petRef,/* @__PURE__ */Object.freeze({data:data,fetchedAt:timers.now()}));warm.size>32;){let oldest=warm.keys().next().value;if(oldest===void 0||oldest===petRef)break;warm.delete(oldest)}},hasGoodTiers=petRef=>{let entry=warm.get(petRef);return entry?!!(entry.data.tiers.animation||entry.data.tiers.image):false},scheduleRemint=(petRef,ttlSeconds)=>{if(clearRemint(),!isFocused)return;let ms=Math.max(1,ttlSeconds)*1e3,scheduledEpoch=epoch;remintHandle=timers.setTimeout(()=>{remintHandle=null,!(scheduledEpoch!==epoch||currentPetRef!==petRef||!isFocused)&&fetchOnce(petRef,0)},ms)},fetchOnce=async(petRef,attempt)=>{if(currentPetRef!==petRef||terminatedPetRef===petRef||!isFocused)return;let myEpoch=epoch;inFlight?.abort();let ctrl=new AbortController;inFlight=ctrl;let res=await repo.getState(petRef,{signal:ctrl.signal});if(!(myEpoch!==epoch||currentPetRef!==petRef)){if(res.ok){let resp=res.value;if(resp===null){onTerminalDark(petRef);return}cacheEpoch.sync(resp.cacheEpoch);let respHasTiers=!!(resp.tiers.animation||resp.tiers.image);if(resp.degraded&&!respHasTiers&&hasGoodTiers(petRef)){patch({isError:false,error:null,isPending:false,isDark:false}),scheduleRemint(petRef,resp.ttlSeconds);return}setWarm(petRef,resp),dataPetRef=petRef,patch({data:resp,isPending:false,isError:false,error:null,isDark:false}),scheduleRemint(petRef,resp.ttlSeconds);return}if(isTerminalPetStateError(res.error)){onTerminalDisabled(petRef,res.error);return}if(patch({isError:true,error:res.error,isPending:snapshot.data===null&&dataPetRef!==petRef}),attempt<2){clearRemint();let backoff=500*(attempt+1),scheduledEpoch=epoch;remintHandle=timers.setTimeout(()=>{remintHandle=null,!(scheduledEpoch!==epoch||currentPetRef!==petRef||!isFocused)&&fetchOnce(petRef,attempt+1)},backoff)}else scheduleRemint(petRef,5)}},onTerminalDark=petRef=>{terminatedPetRef=petRef,warm.delete(petRef),clearRemint(),dataPetRef=petRef,patch({data:null,isPending:false,isError:false,error:null,isDark:true})},onTerminalDisabled=(petRef,error)=>{terminatedPetRef=petRef,warm.delete(petRef),clearRemint(),dataPetRef=petRef,patch({data:null,isPending:false,isError:false,error:error,isDark:true})};return{observe(petRef,opts){let focusChanged=opts.isFocused!==isFocused;if(isFocused=opts.isFocused,petRef!==currentPetRef){if(epoch+=1,inFlight?.abort(),inFlight=null,clearRemint(),terminatedPetRef=null,currentPetRef=petRef,petRef===null){dataPetRef=null,snapshot=EMPTY_SNAPSHOT,emit();return}let warmEntry=warm.get(petRef),fresh=warmEntry&&timers.now()-warmEntry.fetchedAt<staleMs(warmEntry.data)?warmEntry:null;fresh?(touchWarm(petRef),dataPetRef=petRef,patch({data:fresh.data,isPending:false,isError:false,error:null,isDark:false})):patch({isPending:true,isError:false,error:null,isDark:false}),isFocused&&fetchOnce(petRef,0);return}if(!focusChanged||petRef===null)return;if(!isFocused){clearRemint();return}let entry=warm.get(petRef);!entry||timers.now()-entry.fetchedAt>=staleMs(entry.data)?terminatedPetRef!==petRef&&fetchOnce(petRef,0):scheduleRemint(petRef,entry.data.ttlSeconds)},getSnapshot(){return snapshot},subscribe(listener){return listeners.add(listener),()=>{listeners.delete(listener)}},getCachedPetStateMedia(petRef){let entry=warm.get(petRef);return!entry||timers.now()-entry.fetchedAt>=staleMs(entry.data)?null:(touchWarm(petRef),entry.data)},dispose(){epoch+=1,inFlight?.abort(),inFlight=null,clearRemint(),listeners.clear(),warm.clear()}}}function isTerminalPetStateError(error){if(typeof error!="object"||error===null)return false;let record=error,status=typeof record.status=="number"?record.status:record.httpStatus;return status===403||status===404}var noopTelemetry=/* @__PURE__ */Object.freeze({track(){},trackExpectedFailure(){}});function createAnimationController(deps){let telemetry=deps.telemetry??noopTelemetry,timers=deps.timers??defaultTimers(deps.now),store=createPetStateStore({repo:deps.repo,cacheEpoch:createCacheEpochGuard({kv:deps.kv,cache:deps.cache}),timers:timers}),listeners=/* @__PURE__ */new Set,failed=NO_FAILURES,fallbackReason="none",paused=false,photoUrl=null,lastData=null,lastDark=false,dataToken=0,lastShownKey="",view=pendingView(surface()),disposed=false;function surface(){let manifest=deps.manifest?deps.manifest():COMPILED_DEFAULT_MANIFEST;return animationsSurfaceOf(manifest)}let emit=()=>{for(let listener of listeners)listener()},unsubscribeStore=store.subscribe(()=>{onStoreChange()});function onStoreChange(){let snap=store.getSnapshot();(snap.data!==lastData||snap.isDark!==lastDark)&&(lastData=snap.data,lastDark=snap.isDark,failed=NO_FAILURES,fallbackReason=snap.isDark?"dark_or_missing":"none",dataToken+=1),recompute(snap)}function recompute(snap=store.getSnapshot()){let surf=surface(),next=buildView(surf,snap,{failed:failed,fallbackReason:fallbackReason,paused:paused,photoUrl:photoUrl,reducedMotion:deps.reducedMotion()});view=next,maybeEmitShown(next),emit()}function maybeEmitShown(next){if(next.kind!=="ready")return;let key=`${next.category}|${next.tier}|${next.fallbackReason}|${next.reducedMotion?1:0}`;key!==lastShownKey&&(lastShownKey=key,telemetry.track("pet_state_shown",{category:next.category,tier:next.tier,fallback_reason:next.fallbackReason,reduced_motion:next.reducedMotion}),next.fallbackReason==="idle_asset_failed"&&telemetry.trackExpectedFailure("idle_asset_failed",{category:next.category}))}return{observe(petRef,opts){disposed||(photoUrl=opts.photoUrl??null,failed=NO_FAILURES,store.observe(petRef,{isFocused:opts.isFocused}),onStoreChange())},getState(){return view},subscribe(listener){return listeners.add(listener),()=>{listeners.delete(listener)}},onMediaError(){if(disposed||view.kind!=="ready")return;let retired=retireTier(view.tier,failed);failed=retired.failed,fallbackReason=retired.reason,recompute()},setPaused(next){disposed||paused===next||(paused=next,recompute())},dispose(){disposed||(disposed=true,unsubscribeStore(),store.dispose(),listeners.clear())}}}function buildView(surf,snap,inputs){let idleSource=surf.idle;if(!surf.enabled)/* @__PURE__ */
|
|
@@ -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-DFVGYn1o.cjs';
|
|
5
|
+
export { I as IdentityProvider, n as newSessionId } from '../identity-DFVGYn1o.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-B0p6Lygh.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-Cw07BKZp.js';
|
|
5
|
+
export { I as IdentityProvider, n as newSessionId } from '../identity-Cw07BKZp.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-DmFAZJOx.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* The full /state payload. `degraded` + `cache_epoch` + `cache_key` are additive fields an older backend
|