@everfur/sdk 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +634 -0
- package/README.md +58 -23
- package/consent/package.json +8 -0
- package/dist/Chat-DPUD6dnc.d.cts +128 -0
- package/dist/Chat-DwAC2vhB.d.ts +128 -0
- package/dist/DepthViews-DNEM96Se.d.ts +16 -0
- package/dist/DepthViews-DP0R-DhB.d.cts +19 -0
- package/dist/DepthViews-D_3hl4xk.d.ts +19 -0
- package/dist/DepthViews-DbFhR4Du.d.cts +16 -0
- package/dist/ErrorPolicyPort-CNf4uQZP.d.cts +22 -0
- package/dist/ErrorPolicyPort-CwbfmxzJ.d.ts +22 -0
- package/dist/{EverfurResult-D92-uL82.d.cts → EverfurResult-DN9pL2Ab.d.cts} +11 -10
- package/dist/{EverfurResult-D92-uL82.d.ts → EverfurResult-DN9pL2Ab.d.ts} +11 -10
- package/dist/{PhotoController-BItt5M7u.d.cts → PhotoController-3l7MT9jA.d.cts} +1 -1
- package/dist/{PhotoController-D8zMTdcW.d.ts → PhotoController-vzY5bfY_.d.ts} +1 -1
- package/dist/animations/index.cjs +1 -1997
- package/dist/animations/index.d.cts +35 -35
- package/dist/animations/index.d.ts +35 -35
- package/dist/animations/index.js +1 -1972
- package/dist/attachments-5NeobOCd.d.ts +256 -0
- package/dist/attachments-Bw3iMQgu.d.ts +146 -0
- package/dist/attachments-CQgFrEQ7.d.cts +146 -0
- package/dist/attachments-D8T5re7e.d.cts +256 -0
- package/dist/casesRepository-ClLv6qMl.d.ts +188 -0
- package/dist/casesRepository-DHwtGRYY.d.cts +188 -0
- package/dist/chat/index.cjs +1 -1170
- package/dist/chat/index.d.cts +31 -53
- package/dist/chat/index.d.ts +31 -53
- package/dist/chat/index.js +1 -1167
- package/dist/client/index.cjs +9 -2315
- package/dist/client/index.d.cts +77 -15
- package/dist/client/index.d.ts +77 -15
- package/dist/client/index.js +9 -2215
- package/dist/{config-CiJ0PVBB.d.ts → config-CzTZGlfF.d.cts} +63 -25
- package/dist/{config-BSjBdxrZ.d.cts → config-DW60uRb9.d.ts} +63 -25
- package/dist/consent/index.cjs +1 -0
- package/dist/consent/index.d.cts +33 -0
- package/dist/consent/index.d.ts +33 -0
- package/dist/consent/index.js +1 -0
- package/dist/context-DXhqHlPU.d.ts +159 -0
- package/dist/context-XvTzq1tE.d.cts +159 -0
- package/dist/copy-Mjoo91aS.d.ts +198 -0
- package/dist/copy-bKDNigLb.d.cts +198 -0
- package/dist/core/index.cjs +13 -3178
- package/dist/core/index.d.cts +58 -12
- package/dist/core/index.d.ts +58 -12
- package/dist/core/index.js +13 -3166
- package/dist/depth-CErXCU8J.d.cts +502 -0
- package/dist/depth-DjDcJ6kH.d.ts +502 -0
- package/dist/entitlementRepository-DKdXFgTo.d.cts +698 -0
- package/dist/entitlementRepository-DSbzuyAW.d.ts +698 -0
- package/dist/{identity-DK9zORrG.d.ts → identity-BMx2SUOM.d.ts} +19 -6
- package/dist/{identity-Brl-lDd6.d.cts → identity-DI4eVx9S.d.cts} +19 -6
- package/dist/{ids-CJ1S6adf.d.cts → ids-B2GAAifq.d.cts} +1 -1
- package/dist/{ids-CJ1S6adf.d.ts → ids-B2GAAifq.d.ts} +1 -1
- package/dist/index.cjs +12 -4494
- package/dist/index.d.cts +29 -121
- package/dist/index.d.ts +29 -121
- package/dist/index.js +12 -4470
- package/dist/models-B-Uh2LTf.d.ts +214 -0
- package/dist/models-D2EUxPZY.d.cts +214 -0
- package/dist/notifications/index.cjs +2 -0
- package/dist/notifications/index.d.cts +17 -0
- package/dist/notifications/index.d.ts +17 -0
- package/dist/notifications/index.js +2 -0
- package/dist/pets-CtQdRpWo.d.ts +92 -0
- package/dist/pets-aB8q0JyX.d.cts +92 -0
- package/dist/photo/index.cjs +1 -2189
- package/dist/photo/index.d.cts +6 -6
- package/dist/photo/index.d.ts +6 -6
- package/dist/photo/index.js +1 -2186
- package/dist/ports-BN6RHF9W.d.cts +48 -0
- package/dist/ports-BN6RHF9W.d.ts +48 -0
- package/dist/ports-DEBzEhbp.d.cts +386 -0
- package/dist/ports-DMolTRzU.d.ts +386 -0
- package/dist/profile-CSs1wlXT.d.cts +93 -0
- package/dist/profile-CSs1wlXT.d.ts +93 -0
- package/dist/records/depth/index.cjs +2 -0
- package/dist/records/depth/index.d.cts +13 -0
- package/dist/records/depth/index.d.ts +13 -0
- package/dist/records/depth/index.js +2 -0
- package/dist/records/index.cjs +3 -2839
- package/dist/records/index.d.cts +137 -203
- package/dist/records/index.d.ts +137 -203
- package/dist/records/index.js +3 -2833
- package/dist/requestFunnel-CjW7uDuA.d.ts +87 -0
- package/dist/requestFunnel-L-BQfi0z.d.cts +87 -0
- package/dist/{resolve-Dq_4_agU.d.ts → resolve-D4Ywz5OS.d.cts} +10 -4
- package/dist/{resolve-Dq_4_agU.d.cts → resolve-D4Ywz5OS.d.ts} +10 -4
- package/dist/{runtime-Bvr8yqXm.d.cts → runtime-B8s-_hv8.d.cts} +121 -59
- package/dist/{runtime-BIYzf9cK.d.ts → runtime-BR9ysG0J.d.ts} +121 -59
- package/dist/server/events/index.cjs +2 -0
- package/dist/server/events/index.d.cts +550 -0
- package/dist/server/events/index.d.ts +550 -0
- package/dist/server/events/index.js +2 -0
- package/dist/server/index.cjs +2 -533
- package/dist/server/index.d.cts +73 -18
- package/dist/server/index.d.ts +73 -18
- package/dist/server/index.js +2 -530
- package/dist/species-BXAIMh7I.d.cts +9 -0
- package/dist/species-BXAIMh7I.d.ts +9 -0
- package/dist/televet/index.cjs +1 -0
- package/dist/televet/index.d.cts +60 -0
- package/dist/televet/index.d.ts +60 -0
- package/dist/televet/index.js +1 -0
- package/dist/testing/index.cjs +5 -823
- package/dist/testing/index.d.cts +17 -3
- package/dist/testing/index.d.ts +17 -3
- package/dist/testing/index.js +5 -820
- package/dist/testing/rn/index.cjs +1 -449
- package/dist/testing/rn/index.d.cts +17 -29
- package/dist/testing/rn/index.d.ts +17 -29
- package/dist/testing/rn/index.js +1 -444
- package/dist/testing/web/index.cjs +1 -0
- package/dist/testing/web/index.d.cts +131 -0
- package/dist/testing/web/index.d.ts +131 -0
- package/dist/testing/web/index.js +1 -0
- package/dist/timelineRows-CaohZzXS.d.cts +19 -0
- package/dist/timelineRows-DZed6dAM.d.ts +19 -0
- package/dist/typeStyle-0TydiZ1w.d.cts +19 -0
- package/dist/typeStyle-CWMsoe6b.d.ts +19 -0
- package/dist/uploadTransport-D0M0T4hN.d.ts +38 -0
- package/dist/uploadTransport-DKJHs3Yj.d.cts +38 -0
- package/dist/useRecordsDepth-BHBzJ76R.d.cts +237 -0
- package/dist/useRecordsDepth-BU-OhzH6.d.ts +237 -0
- package/dist/useVetVisit-Bc84hWUU.d.cts +187 -0
- package/dist/useVetVisit-CjmMa896.d.ts +187 -0
- package/dist/video/index.cjs +1 -1941
- package/dist/video/index.d.cts +4 -4
- package/dist/video/index.d.ts +4 -4
- package/dist/video/index.js +1 -1938
- package/dist/view-C3qPIXGX.d.cts +310 -0
- package/dist/view-DtSPYpKa.d.ts +310 -0
- package/dist/visitIntent-D7_yVp1I.d.cts +8 -0
- package/dist/visitIntent-D7_yVp1I.d.ts +8 -0
- package/dist/web/consent/index.cjs +1 -0
- package/dist/web/consent/index.d.cts +34 -0
- package/dist/web/consent/index.d.ts +34 -0
- package/dist/web/consent/index.js +1 -0
- package/dist/web/index.cjs +14 -0
- package/dist/web/index.d.cts +217 -0
- package/dist/web/index.d.ts +217 -0
- package/dist/web/index.js +14 -0
- package/dist/web/notifications/index.cjs +2 -0
- package/dist/web/notifications/index.d.cts +213 -0
- package/dist/web/notifications/index.d.ts +213 -0
- package/dist/web/notifications/index.js +2 -0
- package/dist/web/records/depth/index.cjs +2 -0
- package/dist/web/records/depth/index.d.cts +12 -0
- package/dist/web/records/depth/index.d.ts +12 -0
- package/dist/web/records/depth/index.js +2 -0
- package/dist/web/records/index.cjs +4 -0
- package/dist/web/records/index.d.cts +194 -0
- package/dist/web/records/index.d.ts +194 -0
- package/dist/web/records/index.js +4 -0
- package/dist/web/televet/index.cjs +1 -0
- package/dist/web/televet/index.d.cts +50 -0
- package/dist/web/televet/index.d.ts +50 -0
- package/dist/web/televet/index.js +1 -0
- package/notifications/package.json +8 -0
- package/package.json +197 -9
- package/records/depth/package.json +8 -0
- package/server/events/device-blocked.cjs +15 -0
- package/server/events/package.json +9 -0
- package/televet/package.json +8 -0
- package/testing/web/native-blocked.cjs +12 -0
- package/testing/web/package.json +8 -0
- package/web/consent/native-blocked.cjs +12 -0
- package/web/consent/package.json +8 -0
- package/web/native-blocked.cjs +12 -0
- package/web/notifications/native-blocked.cjs +12 -0
- package/web/notifications/package.json +8 -0
- package/web/package.json +8 -0
- package/web/records/depth/native-blocked.cjs +12 -0
- package/web/records/depth/package.json +8 -0
- package/web/records/native-blocked.cjs +12 -0
- package/web/records/package.json +8 -0
- package/web/televet/native-blocked.cjs +12 -0
- package/web/televet/package.json +8 -0
- package/dist/ChatController-CKdBvPj2.d.ts +0 -146
- package/dist/ChatController-CpUMvvZf.d.cts +0 -146
- package/dist/FilePort-BabWrv7I.d.cts +0 -22
- package/dist/FilePort-BabWrv7I.d.ts +0 -22
- package/dist/petsRepository-BEGb97M9.d.cts +0 -326
- package/dist/petsRepository-Bu18r2kK.d.ts +0 -326
- package/dist/requestFunnel-DuUH-kAe.d.cts +0 -28
- package/dist/requestFunnel-dio5OmR9.d.ts +0 -28
package/dist/index.d.cts
CHANGED
|
@@ -1,99 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export { a as
|
|
15
|
-
export { F as FileHandle, a as FilePort } from './FilePort-BabWrv7I.cjs';
|
|
16
|
-
import { E as ErrorPolicyPort } from './ChatController-CpUMvvZf.cjs';
|
|
17
|
-
export { c as ChatMessage, e as ChatStatus, f as Citation, g as SendOptions } from './ChatController-CpUMvvZf.cjs';
|
|
1
|
+
export { B as Brand, a as ClientId, C as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as userRef } from './ids-B2GAAifq.cjs';
|
|
2
|
+
export { d as EverfurConfigError, E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as EverfurResult, e as EverfurThrownError, f as categoryFor, i as isErr, g as isOk, h as isRetryableCode, u as unwrap, j as userFacingError } from './EverfurResult-DN9pL2Ab.cjs';
|
|
3
|
+
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-CzTZGlfF.cjs';
|
|
4
|
+
export { M as MintedToken, T as TokenProvider } from './identity-DI4eVx9S.cjs';
|
|
5
|
+
export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from './runtime-B8s-_hv8.cjs';
|
|
6
|
+
import { C as CapabilityName, a as CapabilityDecision } from './resolve-D4Ywz5OS.cjs';
|
|
7
|
+
export { b as CapabilityDisabled, D as DisabledLevel } from './resolve-D4Ywz5OS.cjs';
|
|
8
|
+
export { I as ImageCachePort, K as KvPort } from './cacheEpoch-DknKn3S0.cjs';
|
|
9
|
+
export { T as TelemetryPort } from './TelemetryPort-BDNr00hu.cjs';
|
|
10
|
+
export { C as CameraPort, a as CaptureOptions, M as MediaSource } from './CameraPort-Cv31Pz7g.cjs';
|
|
11
|
+
export { F as FileHandle, b as FilePort, a as UploadPolicyWire, U as UploadTransport } from './ports-BN6RHF9W.cjs';
|
|
12
|
+
export { E as ErrorPolicyPort } from './ErrorPolicyPort-CNf4uQZP.cjs';
|
|
13
|
+
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, i as ChatMessage, h as ChatMessagePage, j as ChatStatus, k as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from './ports-DEBzEhbp.cjs';
|
|
14
|
+
export { R as RecordsDocumentPicker, a as RnRecordsUploadFetch, b as RnRecordsUploadTransportOptions, c as createRnRecordsUploadTransport } from './uploadTransport-DKJHs3Yj.cjs';
|
|
18
15
|
import { ReactNode } from 'react';
|
|
16
|
+
import { E as EverfurProviderProps } from './context-XvTzq1tE.cjs';
|
|
17
|
+
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from './context-XvTzq1tE.cjs';
|
|
19
18
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
20
|
-
export {
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
|
|
19
|
+
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-D8T5re7e.cjs';
|
|
20
|
+
export { E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps } from './Chat-DPUD6dnc.cjs';
|
|
21
|
+
export { C as CheckinAnswer, a as CheckinOutcome, P as PetProfileInput, c as PetProfilePatch, R as RegisteredPet, W as WatchCase, b as WidgetPet, d as WidgetPetProfile } from './casesRepository-DHwtGRYY.cjs';
|
|
22
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments-CQgFrEQ7.cjs';
|
|
23
|
+
export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from './profile-CSs1wlXT.cjs';
|
|
24
|
+
export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from './species-BXAIMh7I.cjs';
|
|
25
|
+
import { c as EverfurThemeInput } from './entitlementRepository-DKdXFgTo.cjs';
|
|
26
|
+
export { d as EverfurColorTokens, b as EverfurFontFaceKey, e as EverfurFontFamilies, E as EverfurFontWeight, f as EverfurLetterSpacingTokens, g as EverfurLineHeightTokens, h as EverfurMotionDurationTokens, i as EverfurMotionTokens, j as EverfurRadiusTokens, k as EverfurSpaceTokens, l as EverfurSpringToken, m as EverfurTextColorTokens, a as EverfurTheme, n as EverfurThemeFontFaceKey, o as EverfurThemeFontUrlsInput, p as EverfurThemeFontsInput, q as EverfurThemeMeta, r as EverfurThemeSlot, s as EverfurThemeSlotInput, t as EverfurThemeSlotKey, u as EverfurThemeSlotName, v as EverfurThemeSlots, w as EverfurThemeSlotsInput, x as EverfurTypeSizeTokens, y as EverfurTypeTokens, z as EverfurWeightTokens, T as THEME_SLOT_KEYS, A as THEME_SLOT_NAMES, B as previewTheme } from './entitlementRepository-DKdXFgTo.cjs';
|
|
27
|
+
export { E as EverfurFaceStyle, f as face } from './typeStyle-0TydiZ1w.cjs';
|
|
28
|
+
import './requestFunnel-L-BQfi0z.cjs';
|
|
24
29
|
|
|
25
|
-
interface EverfurConfig {
|
|
26
|
-
/** pk_live_... ; tenant-resolved server-side (the keyless-fallback / anonymous-mode credential). */
|
|
27
|
-
readonly publishableKey: string;
|
|
28
|
-
/** REQUIRED via config or the EVERFUR_API_BASE_URL env var; the SDK ships no hardcoded host (INV-ORG-AGNOSTIC). */
|
|
29
|
-
readonly apiBaseUrl?: string;
|
|
30
|
-
/** Sent as X-Everfur-Contract; server additive-only. */
|
|
31
|
-
readonly contractVersion?: string;
|
|
32
|
-
/** Non-secret durable KV; a token is NEVER written through it. In-memory fallback when absent. */
|
|
33
|
-
readonly storage?: KvPort;
|
|
34
|
-
/** Opt-in encrypted storage, the ONLY port a token may cross to disk. Omit for memory-only tokens. */
|
|
35
|
-
readonly secureStore?: SecureStorePort;
|
|
36
|
-
/** Analytics sink; the SDK never imports PostHog/Sentry. No-op default. */
|
|
37
|
-
readonly telemetry?: TelemetryPort;
|
|
38
|
-
/** Receives ALREADY-redacted structured log records. */
|
|
39
|
-
readonly logSink?: LogSink;
|
|
40
|
-
/** Recovery decisions the host can override; a default policy is applied when absent. */
|
|
41
|
-
readonly errorPolicy?: ErrorPolicyPort;
|
|
42
|
-
/** Test seam; production builds the real transport from apiBaseUrl. */
|
|
43
|
-
readonly transport?: TransportPort;
|
|
44
|
-
/**
|
|
45
|
-
* Native capture seam for video / photo (an rn adapter over the camera peer). Absent =>
|
|
46
|
-
* capture-unavailable state, never a crash.
|
|
47
|
-
*/
|
|
48
|
-
readonly camera?: CameraPort;
|
|
49
|
-
/** Native presigned-PUT seam for video / photo uploads. Absent => submits settle to a handled failure. */
|
|
50
|
-
readonly upload?: UploadPort;
|
|
51
|
-
/** Native S3-multipart seam for records document upload. Absent => records reads work, upload settles to a handled failure. */
|
|
52
|
-
readonly uploadTransport?: UploadTransport;
|
|
53
|
-
/** Platform image-cache seam for the animations fleet-wide epoch purge. Absent => the cosmetic purge no-ops. */
|
|
54
|
-
readonly imageCache?: ImageCachePort;
|
|
55
|
-
/** Structured, redacted LogPort events when true. */
|
|
56
|
-
readonly debug?: boolean;
|
|
57
|
-
}
|
|
58
|
-
/** Identity handed to the provider: the partner's opaque user id + a lazy token minter (SPEC-00 §4.3). */
|
|
59
|
-
interface EverfurUser {
|
|
60
|
-
readonly userRef: UserRef;
|
|
61
|
-
readonly getToken: () => Promise<string>;
|
|
62
|
-
}
|
|
63
|
-
/** Opaque, permissive theme input; server branding merges ON TOP. Hostile values are sanitized downstream. */
|
|
64
|
-
type EverfurThemeInput = Readonly<Record<string, string | number | boolean>>;
|
|
65
|
-
interface EverfurProviderProps {
|
|
66
|
-
readonly config: EverfurConfig;
|
|
67
|
-
/** Omit => general (anonymous) mode: pk alone on the wire. */
|
|
68
|
-
readonly user?: EverfurUser;
|
|
69
|
-
/** Optional default pet scope for capability hooks. */
|
|
70
|
-
readonly activePet?: PetRef;
|
|
71
|
-
readonly theme?: EverfurThemeInput;
|
|
72
|
-
readonly children: ReactNode;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Imperative handle for non-hook callers (parity with the Flutter facade). Obtained via `useEverfur()`.
|
|
76
|
-
* Each verb re-scopes every open capability in ONE commit through the core runtime (SPEC-10 §3).
|
|
77
|
-
*/
|
|
78
|
-
interface EverfurHandle {
|
|
79
|
-
/** null => logout: drops the cached bearer and re-scopes every open capability. */
|
|
80
|
-
setUser(user: EverfurUser | null): void;
|
|
81
|
-
/** Re-scopes pet-bound controllers in the same commit. */
|
|
82
|
-
setActivePet(pet: PetRef | null): void;
|
|
83
|
-
/**
|
|
84
|
-
* Register (or update) the widget pet profile that records and consent assume exists. Without it, consent
|
|
85
|
-
* 404s for any pet the partner has not upserted out of band, so records is unreachable. Idempotent.
|
|
86
|
-
*/
|
|
87
|
-
registerPet: EverfurRuntime['registerPet'];
|
|
88
|
-
/** Navigate / mount a prebuilt capability screen (host-routed via the runtime). */
|
|
89
|
-
open(capability: CapabilityName): void;
|
|
90
|
-
/**
|
|
91
|
-
* == setUser(null); additionally sweeps the SDK's genuinely per-user durable KV keys (the explicit
|
|
92
|
-
* PER_USER_KV_KEYS allowlist, EMPTY today; device-global keys are NOT swept). Returns a promise so a host
|
|
93
|
-
* can `await handle.logout()` before `setUser(nextUser)`.
|
|
94
|
-
*/
|
|
95
|
-
logout(): Promise<void>;
|
|
96
|
-
}
|
|
97
30
|
/**
|
|
98
31
|
* Wrap the tree ONCE, high. Mounting constructs the runtime (transport, identity, registry,
|
|
99
32
|
* entitlement repository, pollers) exactly once and starts fail-closed: a bad manifest/entitlement
|
|
@@ -102,22 +35,6 @@ interface EverfurHandle {
|
|
|
102
35
|
* off at `sdk_config`), never a throw: see `createEverfurRuntime`.
|
|
103
36
|
*/
|
|
104
37
|
declare function EverfurProvider(props: EverfurProviderProps): ReactNode;
|
|
105
|
-
/**
|
|
106
|
-
* The imperative facade handle for non-hook callers.
|
|
107
|
-
* @throws {EverfurConfigError} kind 'not-initialized' if called outside an EverfurProvider.
|
|
108
|
-
*/
|
|
109
|
-
declare function useEverfur(): EverfurHandle;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Read the resolved verdict for a coarse capability.
|
|
113
|
-
*
|
|
114
|
-
* During the first resolve (or while a stale value is being revalidated) the store reports
|
|
115
|
-
* `isPending`, and this returns `{ enabled:false, isPending:true }` so a gated surface shows a
|
|
116
|
-
* skeleton, never a flash of enabled UI it must retract. A kill-switch flip propagates through the
|
|
117
|
-
* store's revision poller and re-renders every subscriber in <2s. Never throws for a resolution
|
|
118
|
-
* failure (fail-closed: an absent verdict reads as denied).
|
|
119
|
-
*/
|
|
120
|
-
declare function useCapability(name: CapabilityName): CapabilityDecision;
|
|
121
38
|
|
|
122
39
|
interface CapabilityGateProps {
|
|
123
40
|
readonly capability: CapabilityName;
|
|
@@ -130,13 +47,6 @@ interface CapabilityGateProps {
|
|
|
130
47
|
}
|
|
131
48
|
declare function CapabilityGate(props: CapabilityGateProps): ReactNode;
|
|
132
49
|
|
|
133
|
-
/**
|
|
134
|
-
* Read the resolved Everfur theme. Returns a COMPLETE, legible, deeply-frozen theme in every case - inside a
|
|
135
|
-
* provider it is the server-resolved theme; outside one it is the compiled Everfur default (never null, never
|
|
136
|
-
* blank). Read a token as `theme.color.brand`, `theme.space.md`, `theme.type.size.body`, `theme.radius.lg`.
|
|
137
|
-
*/
|
|
138
|
-
declare function useEverfurTheme(): EverfurTheme;
|
|
139
|
-
|
|
140
50
|
interface EverfurThemeProviderProps {
|
|
141
51
|
/**
|
|
142
52
|
* The clamped client `theme` prop, a first-paint/offline fallback merged UNDER the server branding. Any
|
|
@@ -146,11 +56,9 @@ interface EverfurThemeProviderProps {
|
|
|
146
56
|
readonly children: ReactNode;
|
|
147
57
|
}
|
|
148
58
|
/**
|
|
149
|
-
* Compute + publish the resolved theme
|
|
150
|
-
*
|
|
151
|
-
* the clamped client prop UNDER the server via the pure `resolveTheme`. Recomputes only when one of those
|
|
152
|
-
* inputs changes; a plain re-render reuses the frozen theme.
|
|
59
|
+
* Compute + publish the resolved theme for a React Native host. See `EverfurThemeProviderCore` for the
|
|
60
|
+
* inputs and the memoization; this binding only names where the device preferences come from.
|
|
153
61
|
*/
|
|
154
62
|
declare function EverfurThemeProvider(props: EverfurThemeProviderProps): ReactNode;
|
|
155
63
|
|
|
156
|
-
export {
|
|
64
|
+
export { CapabilityDecision, CapabilityGate, type CapabilityGateProps, CapabilityName, EverfurProvider, EverfurProviderProps, EverfurThemeInput, EverfurThemeProvider, type EverfurThemeProviderProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,99 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export { a as
|
|
15
|
-
export { F as FileHandle, a as FilePort } from './FilePort-BabWrv7I.js';
|
|
16
|
-
import { E as ErrorPolicyPort } from './ChatController-CKdBvPj2.js';
|
|
17
|
-
export { c as ChatMessage, e as ChatStatus, f as Citation, g as SendOptions } from './ChatController-CKdBvPj2.js';
|
|
1
|
+
export { B as Brand, a as ClientId, C as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, u as userRef } from './ids-B2GAAifq.js';
|
|
2
|
+
export { d as EverfurConfigError, E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode, c as EverfurResult, e as EverfurThrownError, f as categoryFor, i as isErr, g as isOk, h as isRetryableCode, u as unwrap, j as userFacingError } from './EverfurResult-DN9pL2Ab.js';
|
|
3
|
+
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-DW60uRb9.js';
|
|
4
|
+
export { M as MintedToken, T as TokenProvider } from './identity-BMx2SUOM.js';
|
|
5
|
+
export { L as LogLevel, a as LogRecord, b as LogSink, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, S as SecureStorePort } from './runtime-BR9ysG0J.js';
|
|
6
|
+
import { C as CapabilityName, a as CapabilityDecision } from './resolve-D4Ywz5OS.js';
|
|
7
|
+
export { b as CapabilityDisabled, D as DisabledLevel } from './resolve-D4Ywz5OS.js';
|
|
8
|
+
export { I as ImageCachePort, K as KvPort } from './cacheEpoch-DknKn3S0.js';
|
|
9
|
+
export { T as TelemetryPort } from './TelemetryPort-BDNr00hu.js';
|
|
10
|
+
export { C as CameraPort, a as CaptureOptions, M as MediaSource } from './CameraPort-Cv31Pz7g.js';
|
|
11
|
+
export { F as FileHandle, b as FilePort, a as UploadPolicyWire, U as UploadTransport } from './ports-BN6RHF9W.js';
|
|
12
|
+
export { E as ErrorPolicyPort } from './ErrorPolicyPort-CwbfmxzJ.js';
|
|
13
|
+
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, i as ChatMessage, h as ChatMessagePage, j as ChatStatus, k as Citation, P as PresignedPolicy, S as SendOptions, U as UploadPort } from './ports-DMolTRzU.js';
|
|
14
|
+
export { R as RecordsDocumentPicker, a as RnRecordsUploadFetch, b as RnRecordsUploadTransportOptions, c as createRnRecordsUploadTransport } from './uploadTransport-D0M0T4hN.js';
|
|
18
15
|
import { ReactNode } from 'react';
|
|
16
|
+
import { E as EverfurProviderProps } from './context-DXhqHlPU.js';
|
|
17
|
+
export { a as EverfurConfig, b as EverfurHandle, c as EverfurUser, U as UseEverfurPetProfileState, u as useCapability, d as useEverfur, e as useEverfurPetProfile, f as useEverfurTheme } from './context-DXhqHlPU.js';
|
|
19
18
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
20
|
-
export {
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
|
|
19
|
+
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-5NeobOCd.js';
|
|
20
|
+
export { E as EverfurChat, a as EverfurChatAttachments, b as EverfurChatProps } from './Chat-DwAC2vhB.js';
|
|
21
|
+
export { C as CheckinAnswer, a as CheckinOutcome, P as PetProfileInput, c as PetProfilePatch, R as RegisteredPet, W as WatchCase, b as WidgetPet, d as WidgetPetProfile } from './casesRepository-ClLv6qMl.js';
|
|
22
|
+
export { A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, d as AttachmentState, e as AttachmentStatus } from './attachments-Bw3iMQgu.js';
|
|
23
|
+
export { b as PetActivityLevel, c as PetAllergy, d as PetAllergySeverity, e as PetBirthDatePrecision, f as PetCondition, a as PetHealthProfile, P as PetHealthProfileInput, g as PetIndoorOutdoor, h as PetMedication, i as PetSex } from './profile-CSs1wlXT.js';
|
|
24
|
+
export { C as CanonicalPetSpecies, c as canonicalPetSpecies } from './species-BXAIMh7I.js';
|
|
25
|
+
import { c as EverfurThemeInput } from './entitlementRepository-DSbzuyAW.js';
|
|
26
|
+
export { d as EverfurColorTokens, b as EverfurFontFaceKey, e as EverfurFontFamilies, E as EverfurFontWeight, f as EverfurLetterSpacingTokens, g as EverfurLineHeightTokens, h as EverfurMotionDurationTokens, i as EverfurMotionTokens, j as EverfurRadiusTokens, k as EverfurSpaceTokens, l as EverfurSpringToken, m as EverfurTextColorTokens, a as EverfurTheme, n as EverfurThemeFontFaceKey, o as EverfurThemeFontUrlsInput, p as EverfurThemeFontsInput, q as EverfurThemeMeta, r as EverfurThemeSlot, s as EverfurThemeSlotInput, t as EverfurThemeSlotKey, u as EverfurThemeSlotName, v as EverfurThemeSlots, w as EverfurThemeSlotsInput, x as EverfurTypeSizeTokens, y as EverfurTypeTokens, z as EverfurWeightTokens, T as THEME_SLOT_KEYS, A as THEME_SLOT_NAMES, B as previewTheme } from './entitlementRepository-DSbzuyAW.js';
|
|
27
|
+
export { E as EverfurFaceStyle, f as face } from './typeStyle-CWMsoe6b.js';
|
|
28
|
+
import './requestFunnel-CjW7uDuA.js';
|
|
24
29
|
|
|
25
|
-
interface EverfurConfig {
|
|
26
|
-
/** pk_live_... ; tenant-resolved server-side (the keyless-fallback / anonymous-mode credential). */
|
|
27
|
-
readonly publishableKey: string;
|
|
28
|
-
/** REQUIRED via config or the EVERFUR_API_BASE_URL env var; the SDK ships no hardcoded host (INV-ORG-AGNOSTIC). */
|
|
29
|
-
readonly apiBaseUrl?: string;
|
|
30
|
-
/** Sent as X-Everfur-Contract; server additive-only. */
|
|
31
|
-
readonly contractVersion?: string;
|
|
32
|
-
/** Non-secret durable KV; a token is NEVER written through it. In-memory fallback when absent. */
|
|
33
|
-
readonly storage?: KvPort;
|
|
34
|
-
/** Opt-in encrypted storage, the ONLY port a token may cross to disk. Omit for memory-only tokens. */
|
|
35
|
-
readonly secureStore?: SecureStorePort;
|
|
36
|
-
/** Analytics sink; the SDK never imports PostHog/Sentry. No-op default. */
|
|
37
|
-
readonly telemetry?: TelemetryPort;
|
|
38
|
-
/** Receives ALREADY-redacted structured log records. */
|
|
39
|
-
readonly logSink?: LogSink;
|
|
40
|
-
/** Recovery decisions the host can override; a default policy is applied when absent. */
|
|
41
|
-
readonly errorPolicy?: ErrorPolicyPort;
|
|
42
|
-
/** Test seam; production builds the real transport from apiBaseUrl. */
|
|
43
|
-
readonly transport?: TransportPort;
|
|
44
|
-
/**
|
|
45
|
-
* Native capture seam for video / photo (an rn adapter over the camera peer). Absent =>
|
|
46
|
-
* capture-unavailable state, never a crash.
|
|
47
|
-
*/
|
|
48
|
-
readonly camera?: CameraPort;
|
|
49
|
-
/** Native presigned-PUT seam for video / photo uploads. Absent => submits settle to a handled failure. */
|
|
50
|
-
readonly upload?: UploadPort;
|
|
51
|
-
/** Native S3-multipart seam for records document upload. Absent => records reads work, upload settles to a handled failure. */
|
|
52
|
-
readonly uploadTransport?: UploadTransport;
|
|
53
|
-
/** Platform image-cache seam for the animations fleet-wide epoch purge. Absent => the cosmetic purge no-ops. */
|
|
54
|
-
readonly imageCache?: ImageCachePort;
|
|
55
|
-
/** Structured, redacted LogPort events when true. */
|
|
56
|
-
readonly debug?: boolean;
|
|
57
|
-
}
|
|
58
|
-
/** Identity handed to the provider: the partner's opaque user id + a lazy token minter (SPEC-00 §4.3). */
|
|
59
|
-
interface EverfurUser {
|
|
60
|
-
readonly userRef: UserRef;
|
|
61
|
-
readonly getToken: () => Promise<string>;
|
|
62
|
-
}
|
|
63
|
-
/** Opaque, permissive theme input; server branding merges ON TOP. Hostile values are sanitized downstream. */
|
|
64
|
-
type EverfurThemeInput = Readonly<Record<string, string | number | boolean>>;
|
|
65
|
-
interface EverfurProviderProps {
|
|
66
|
-
readonly config: EverfurConfig;
|
|
67
|
-
/** Omit => general (anonymous) mode: pk alone on the wire. */
|
|
68
|
-
readonly user?: EverfurUser;
|
|
69
|
-
/** Optional default pet scope for capability hooks. */
|
|
70
|
-
readonly activePet?: PetRef;
|
|
71
|
-
readonly theme?: EverfurThemeInput;
|
|
72
|
-
readonly children: ReactNode;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Imperative handle for non-hook callers (parity with the Flutter facade). Obtained via `useEverfur()`.
|
|
76
|
-
* Each verb re-scopes every open capability in ONE commit through the core runtime (SPEC-10 §3).
|
|
77
|
-
*/
|
|
78
|
-
interface EverfurHandle {
|
|
79
|
-
/** null => logout: drops the cached bearer and re-scopes every open capability. */
|
|
80
|
-
setUser(user: EverfurUser | null): void;
|
|
81
|
-
/** Re-scopes pet-bound controllers in the same commit. */
|
|
82
|
-
setActivePet(pet: PetRef | null): void;
|
|
83
|
-
/**
|
|
84
|
-
* Register (or update) the widget pet profile that records and consent assume exists. Without it, consent
|
|
85
|
-
* 404s for any pet the partner has not upserted out of band, so records is unreachable. Idempotent.
|
|
86
|
-
*/
|
|
87
|
-
registerPet: EverfurRuntime['registerPet'];
|
|
88
|
-
/** Navigate / mount a prebuilt capability screen (host-routed via the runtime). */
|
|
89
|
-
open(capability: CapabilityName): void;
|
|
90
|
-
/**
|
|
91
|
-
* == setUser(null); additionally sweeps the SDK's genuinely per-user durable KV keys (the explicit
|
|
92
|
-
* PER_USER_KV_KEYS allowlist, EMPTY today; device-global keys are NOT swept). Returns a promise so a host
|
|
93
|
-
* can `await handle.logout()` before `setUser(nextUser)`.
|
|
94
|
-
*/
|
|
95
|
-
logout(): Promise<void>;
|
|
96
|
-
}
|
|
97
30
|
/**
|
|
98
31
|
* Wrap the tree ONCE, high. Mounting constructs the runtime (transport, identity, registry,
|
|
99
32
|
* entitlement repository, pollers) exactly once and starts fail-closed: a bad manifest/entitlement
|
|
@@ -102,22 +35,6 @@ interface EverfurHandle {
|
|
|
102
35
|
* off at `sdk_config`), never a throw: see `createEverfurRuntime`.
|
|
103
36
|
*/
|
|
104
37
|
declare function EverfurProvider(props: EverfurProviderProps): ReactNode;
|
|
105
|
-
/**
|
|
106
|
-
* The imperative facade handle for non-hook callers.
|
|
107
|
-
* @throws {EverfurConfigError} kind 'not-initialized' if called outside an EverfurProvider.
|
|
108
|
-
*/
|
|
109
|
-
declare function useEverfur(): EverfurHandle;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Read the resolved verdict for a coarse capability.
|
|
113
|
-
*
|
|
114
|
-
* During the first resolve (or while a stale value is being revalidated) the store reports
|
|
115
|
-
* `isPending`, and this returns `{ enabled:false, isPending:true }` so a gated surface shows a
|
|
116
|
-
* skeleton, never a flash of enabled UI it must retract. A kill-switch flip propagates through the
|
|
117
|
-
* store's revision poller and re-renders every subscriber in <2s. Never throws for a resolution
|
|
118
|
-
* failure (fail-closed: an absent verdict reads as denied).
|
|
119
|
-
*/
|
|
120
|
-
declare function useCapability(name: CapabilityName): CapabilityDecision;
|
|
121
38
|
|
|
122
39
|
interface CapabilityGateProps {
|
|
123
40
|
readonly capability: CapabilityName;
|
|
@@ -130,13 +47,6 @@ interface CapabilityGateProps {
|
|
|
130
47
|
}
|
|
131
48
|
declare function CapabilityGate(props: CapabilityGateProps): ReactNode;
|
|
132
49
|
|
|
133
|
-
/**
|
|
134
|
-
* Read the resolved Everfur theme. Returns a COMPLETE, legible, deeply-frozen theme in every case - inside a
|
|
135
|
-
* provider it is the server-resolved theme; outside one it is the compiled Everfur default (never null, never
|
|
136
|
-
* blank). Read a token as `theme.color.brand`, `theme.space.md`, `theme.type.size.body`, `theme.radius.lg`.
|
|
137
|
-
*/
|
|
138
|
-
declare function useEverfurTheme(): EverfurTheme;
|
|
139
|
-
|
|
140
50
|
interface EverfurThemeProviderProps {
|
|
141
51
|
/**
|
|
142
52
|
* The clamped client `theme` prop, a first-paint/offline fallback merged UNDER the server branding. Any
|
|
@@ -146,11 +56,9 @@ interface EverfurThemeProviderProps {
|
|
|
146
56
|
readonly children: ReactNode;
|
|
147
57
|
}
|
|
148
58
|
/**
|
|
149
|
-
* Compute + publish the resolved theme
|
|
150
|
-
*
|
|
151
|
-
* the clamped client prop UNDER the server via the pure `resolveTheme`. Recomputes only when one of those
|
|
152
|
-
* inputs changes; a plain re-render reuses the frozen theme.
|
|
59
|
+
* Compute + publish the resolved theme for a React Native host. See `EverfurThemeProviderCore` for the
|
|
60
|
+
* inputs and the memoization; this binding only names where the device preferences come from.
|
|
153
61
|
*/
|
|
154
62
|
declare function EverfurThemeProvider(props: EverfurThemeProviderProps): ReactNode;
|
|
155
63
|
|
|
156
|
-
export {
|
|
64
|
+
export { CapabilityDecision, CapabilityGate, type CapabilityGateProps, CapabilityName, EverfurProvider, EverfurProviderProps, EverfurThemeInput, EverfurThemeProvider, type EverfurThemeProviderProps };
|