@everfur/sdk 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/CHANGELOG.md +220 -0
  2. package/README.md +9 -8
  3. package/dist/{Chat-BZZ-Py5l.d.ts → Chat-Rzplrf5M.d.ts} +17 -3
  4. package/dist/{Chat-Dq4fffIO.d.cts → Chat-ypo6miKm.d.cts} +17 -3
  5. package/dist/{DepthViews-BG3E25MD.d.ts → DepthViews-CeTfPUBX.d.ts} +1 -1
  6. package/dist/{DepthViews-B_hIypI6.d.cts → DepthViews-ClykXOJj.d.cts} +1 -1
  7. package/dist/{DepthViews-CL75jyRA.d.cts → DepthViews-Cui3oonj.d.cts} +1 -1
  8. package/dist/{DepthViews-CkYri51q.d.ts → DepthViews-baYLMNQ-.d.ts} +1 -1
  9. package/dist/{ErrorPolicyPort-CwbfmxzJ.d.ts → ErrorPolicyPort-D22LUVrK.d.ts} +1 -1
  10. package/dist/{ErrorPolicyPort-CNf4uQZP.d.cts → ErrorPolicyPort-D6CybiqJ.d.cts} +1 -1
  11. package/dist/{EverfurResult-DN9pL2Ab.d.cts → EverfurError-DmELDpXp.d.cts} +1 -67
  12. package/dist/{EverfurResult-DN9pL2Ab.d.ts → EverfurError-DmELDpXp.d.ts} +1 -67
  13. package/dist/EverfurResult-SGvHKsCB.d.ts +69 -0
  14. package/dist/EverfurResult-ZtH-YV1h.d.cts +69 -0
  15. package/dist/animations/index.cjs +1 -1
  16. package/dist/animations/index.d.cts +6 -5
  17. package/dist/animations/index.d.ts +6 -5
  18. package/dist/animations/index.js +1 -1
  19. package/dist/{attachments-D_SECjr1.d.cts → attachments-CwsR-bPN.d.cts} +7 -6
  20. package/dist/{attachments-BrUWQYNK.d.ts → attachments-CzZ7in24.d.ts} +7 -6
  21. package/dist/{attachments-DpldrvIW.d.ts → attachments-D3HCBmOE.d.ts} +3 -3
  22. package/dist/{attachments-BorG422I.d.cts → attachments-Nk73Lll8.d.cts} +3 -3
  23. package/dist/{bookingCopy-SREvkG19.d.cts → bookingCopy-Dv8rKqyV.d.cts} +417 -14
  24. package/dist/{bookingCopy-CqtDYvCR.d.ts → bookingCopy-SDkXaxDf.d.ts} +417 -14
  25. package/dist/branding-Xb_wL8N1.d.cts +212 -0
  26. package/dist/branding-xpQ056sM.d.ts +212 -0
  27. package/dist/callCopy-rDH9JTFo.d.cts +45 -0
  28. package/dist/callCopy-rDH9JTFo.d.ts +45 -0
  29. package/dist/callRoom-7wrE3RP2.d.ts +62 -0
  30. package/dist/callRoom-B_EqaUzx.d.cts +62 -0
  31. package/dist/{casesRepository-v6QczS9N.d.ts → casesRepository-BTAecTnF.d.ts} +14 -2
  32. package/dist/{casesRepository-DwtZVsbj.d.cts → casesRepository-aryld7fJ.d.cts} +14 -2
  33. package/dist/chat/index.cjs +1 -1
  34. package/dist/chat/index.d.cts +12 -11
  35. package/dist/chat/index.d.ts +12 -11
  36. package/dist/chat/index.js +1 -1
  37. package/dist/client/index.cjs +5 -5
  38. package/dist/client/index.d.cts +14 -12
  39. package/dist/client/index.d.ts +14 -12
  40. package/dist/client/index.js +5 -5
  41. package/dist/{config-C7eb_IMD.d.ts → config-6qS7Sohy.d.cts} +3 -2
  42. package/dist/{config--Wu1Umhd.d.cts → config-X6BtwDwQ.d.ts} +3 -2
  43. package/dist/consent/index.cjs +1 -1
  44. package/dist/consent/index.d.cts +9 -8
  45. package/dist/consent/index.d.ts +9 -8
  46. package/dist/consent/index.js +1 -1
  47. package/dist/{context-CahAEha8.d.ts → context-7f3Nb_xE.d.ts} +9 -8
  48. package/dist/{context-CL3lyuy1.d.cts → context-CkqPM4Ml.d.cts} +9 -8
  49. package/dist/{copy-UeUJVk8X.d.cts → copy-Bd__Pw5s.d.cts} +5 -4
  50. package/dist/{copy-DdVFDL01.d.ts → copy-NgKgOOET.d.ts} +5 -4
  51. package/dist/core/index.cjs +9 -9
  52. package/dist/core/index.d.cts +19 -17
  53. package/dist/core/index.d.ts +19 -17
  54. package/dist/core/index.js +9 -9
  55. package/dist/{depth-DvPwPuT_.d.ts → depth-CYPH92jE.d.ts} +6 -5
  56. package/dist/{depth-D5HwcvKC.d.cts → depth-CyjaJJ6V.d.cts} +6 -5
  57. package/dist/{entitlementRepository-B7egEdW6.d.ts → entitlementRepository-DdeFuEKp.d.ts} +4 -4
  58. package/dist/{entitlementRepository-BpJ7tiwl.d.cts → entitlementRepository-Dl1qRLcJ.d.cts} +4 -4
  59. package/dist/{identity-C2-08BZW.d.cts → identity-DjqhDm5Z.d.cts} +2 -2
  60. package/dist/{identity-CEi9GRFZ.d.ts → identity-Dy_L7Yq4.d.ts} +2 -2
  61. package/dist/index.cjs +6 -6
  62. package/dist/index.d.cts +19 -17
  63. package/dist/index.d.ts +19 -17
  64. package/dist/index.js +6 -6
  65. package/dist/{models-D2EUxPZY.d.cts → models-Bn2z0NNo.d.cts} +1 -1
  66. package/dist/{models-B-Uh2LTf.d.ts → models-DSqA5Ahs.d.ts} +1 -1
  67. package/dist/notifications/index.cjs +2 -2
  68. package/dist/notifications/index.d.cts +5 -4
  69. package/dist/notifications/index.d.ts +5 -4
  70. package/dist/notifications/index.js +2 -2
  71. package/dist/{pets-JVCXgRgR.d.cts → pets-BSG2qbr_.d.cts} +2 -2
  72. package/dist/{pets-DJv2sj2H.d.ts → pets-D7cZutrX.d.ts} +2 -2
  73. package/dist/{petsRepository-B_gKbAzJ.d.cts → petsRepository-D1bnxDZg.d.cts} +2 -2
  74. package/dist/{petsRepository-Bk6GDwLs.d.ts → petsRepository-DhsX3GLw.d.ts} +2 -2
  75. package/dist/photo/index.cjs +1 -1
  76. package/dist/photo/index.d.cts +3 -2
  77. package/dist/photo/index.d.ts +3 -2
  78. package/dist/photo/index.js +1 -1
  79. package/dist/{ports-D7YW8qz9.d.ts → ports-C0m1G1fS.d.ts} +13 -6
  80. package/dist/{ports-BY2ph0_y.d.cts → ports-DNXyyzZF.d.cts} +13 -6
  81. package/dist/records/depth/index.cjs +2 -2
  82. package/dist/records/depth/index.d.cts +11 -10
  83. package/dist/records/depth/index.d.ts +11 -10
  84. package/dist/records/depth/index.js +2 -2
  85. package/dist/records/index.cjs +3 -3
  86. package/dist/records/index.d.cts +25 -14
  87. package/dist/records/index.d.ts +25 -14
  88. package/dist/records/index.js +3 -3
  89. package/dist/{requestFunnel-BjDpqqvm.d.cts → requestFunnel-Bqc1inM9.d.cts} +5 -4
  90. package/dist/{requestFunnel-DFMGcluw.d.ts → requestFunnel-FvE5yLDD.d.ts} +5 -4
  91. package/dist/{runtimeTypes-w5KqBMcs.d.ts → runtimeTypes-C0yPBz89.d.ts} +7 -7
  92. package/dist/{runtimeTypes-gZEJu-da.d.cts → runtimeTypes-RN-VXTFV.d.cts} +7 -7
  93. package/dist/server/events/index.cjs +1 -1
  94. package/dist/server/events/index.d.cts +4 -3
  95. package/dist/server/events/index.d.ts +4 -3
  96. package/dist/server/events/index.js +1 -1
  97. package/dist/server/index.cjs +1 -1
  98. package/dist/server/index.d.cts +5 -4
  99. package/dist/server/index.d.ts +5 -4
  100. package/dist/server/index.js +1 -1
  101. package/dist/televet/booking/index.cjs +1 -1
  102. package/dist/televet/booking/index.d.cts +310 -32
  103. package/dist/televet/booking/index.d.ts +310 -32
  104. package/dist/televet/booking/index.js +1 -1
  105. package/dist/televet/call/index.cjs +1 -1
  106. package/dist/televet/call/index.d.cts +25 -5
  107. package/dist/televet/call/index.d.ts +25 -5
  108. package/dist/televet/call/index.js +1 -1
  109. package/dist/televet/index.cjs +1 -1
  110. package/dist/televet/index.d.cts +41 -71
  111. package/dist/televet/index.d.ts +41 -71
  112. package/dist/televet/index.js +1 -1
  113. package/dist/televetGlobal-CEk0_cW9.d.cts +34 -0
  114. package/dist/televetGlobal-Cs9Wbqsy.d.ts +34 -0
  115. package/dist/testing/index.cjs +3 -3
  116. package/dist/testing/index.d.cts +3 -2
  117. package/dist/testing/index.d.ts +3 -2
  118. package/dist/testing/index.js +3 -3
  119. package/dist/testing/rn/index.cjs +1 -1
  120. package/dist/testing/rn/index.d.cts +13 -11
  121. package/dist/testing/rn/index.d.ts +13 -11
  122. package/dist/testing/rn/index.js +1 -1
  123. package/dist/testing/web/index.cjs +1 -1
  124. package/dist/testing/web/index.d.cts +14 -13
  125. package/dist/testing/web/index.d.ts +14 -13
  126. package/dist/testing/web/index.js +1 -1
  127. package/dist/{timelineRows-C15jxFFH.d.ts → timelineRows-D4U6A8zE.d.ts} +1 -1
  128. package/dist/{timelineRows-odO8g9r2.d.cts → timelineRows-DAB5dpjF.d.cts} +1 -1
  129. package/dist/{branding-CsRdeNwK.d.cts → tokens-CIngRkvt.d.cts} +7 -211
  130. package/dist/{branding-CsRdeNwK.d.ts → tokens-CIngRkvt.d.ts} +7 -211
  131. package/dist/{typeStyle-DmoyacDG.d.ts → typeStyle-DHJzDaUo.d.cts} +2 -1
  132. package/dist/{typeStyle-CKqVYD6L.d.cts → typeStyle-YPS_MXeI.d.ts} +2 -1
  133. package/dist/{useRecordsDepth-crhBllQK.d.ts → useRecordsDepth--ObtMyjH.d.ts} +24 -5
  134. package/dist/{useRecordsDepth-C6rjEaLn.d.cts → useRecordsDepth-B35y8bV-.d.cts} +24 -5
  135. package/dist/{useVetVisit-CjmMa896.d.ts → useVetVisit-BsjoDO-n.d.ts} +21 -6
  136. package/dist/{useVetVisit-Bc84hWUU.d.cts → useVetVisit-Ds8f1peV.d.cts} +21 -6
  137. package/dist/video/index.cjs +1 -1
  138. package/dist/video/index.d.cts +3 -2
  139. package/dist/video/index.d.ts +3 -2
  140. package/dist/video/index.js +1 -1
  141. package/dist/{view-DyitEO0m.d.cts → view-B-Toym_j.d.cts} +5 -4
  142. package/dist/{view-Bxwxp4xD.d.ts → view-D9JqNQai.d.ts} +5 -4
  143. package/dist/web/consent/index.cjs +1 -1
  144. package/dist/web/consent/index.d.cts +9 -8
  145. package/dist/web/consent/index.d.ts +9 -8
  146. package/dist/web/consent/index.js +1 -1
  147. package/dist/web/index.cjs +10 -10
  148. package/dist/web/index.d.cts +42 -19
  149. package/dist/web/index.d.ts +42 -19
  150. package/dist/web/index.js +10 -10
  151. package/dist/web/notifications/index.cjs +2 -2
  152. package/dist/web/notifications/index.d.cts +7 -6
  153. package/dist/web/notifications/index.d.ts +7 -6
  154. package/dist/web/notifications/index.js +2 -2
  155. package/dist/web/records/depth/index.cjs +2 -2
  156. package/dist/web/records/depth/index.d.cts +11 -10
  157. package/dist/web/records/depth/index.d.ts +11 -10
  158. package/dist/web/records/depth/index.js +2 -2
  159. package/dist/web/records/index.cjs +3 -3
  160. package/dist/web/records/index.d.cts +53 -35
  161. package/dist/web/records/index.d.ts +53 -35
  162. package/dist/web/records/index.js +3 -3
  163. package/dist/web/televet/booking/index.cjs +2 -1
  164. package/dist/web/televet/booking/index.d.cts +458 -33
  165. package/dist/web/televet/booking/index.d.ts +458 -33
  166. package/dist/web/televet/booking/index.js +2 -1
  167. package/dist/web/televet/call/index.cjs +1 -1
  168. package/dist/web/televet/call/index.d.cts +3 -1
  169. package/dist/web/televet/call/index.d.ts +3 -1
  170. package/dist/web/televet/call/index.js +1 -1
  171. package/dist/web/televet/index.cjs +1 -1
  172. package/dist/web/televet/index.d.cts +40 -74
  173. package/dist/web/televet/index.d.ts +40 -74
  174. package/dist/web/televet/index.js +1 -1
  175. package/package.json +3 -2
  176. package/dist/callCopy-DoQKG3-L.d.cts +0 -40
  177. package/dist/callCopy-DoQKG3-L.d.ts +0 -40
@@ -0,0 +1,212 @@
1
+ import { c as EverfurThemeSlotName, b as EverfurFontFaceKey, d as EverfurThemeSlots } from './tokens-CIngRkvt.cjs';
2
+
3
+ /**
4
+ * One slot's paint on the `theme` prop; colours in any form `parseColor` reads, the radius in dp/px. The console's
5
+ * snake_case wire keys are accepted beside the camelCase ones.
6
+ */
7
+ interface EverfurThemeSlotInput {
8
+ readonly backgroundColor?: string | number;
9
+ readonly background_color?: string | number;
10
+ readonly borderColor?: string | number;
11
+ readonly border_color?: string | number;
12
+ readonly borderRadius?: number | string;
13
+ readonly border_radius?: number | string;
14
+ readonly textColor?: string | number;
15
+ readonly text_color?: string | number;
16
+ }
17
+ /** The `slots` map on the `theme` prop: any subset of the eight slot names. */
18
+ type EverfurThemeSlotsInput = Readonly<Partial<Record<EverfurThemeSlotName, EverfurThemeSlotInput>>>;
19
+ /**
20
+ * The faces a theme names: the three text weights and the three mono weights (`EverfurFontFaceKey` on the tokens).
21
+ * A missing weight falls back along its chain: bold -> medium -> regular, monoBold -> monoMedium -> mono.
22
+ */
23
+ type EverfurThemeFontFaceKey = 'regular' | 'medium' | 'bold' | 'mono' | 'monoMedium' | 'monoBold';
24
+ /** The `fonts` map on the `theme` prop: a registered family name per face, any subset. */
25
+ type EverfurThemeFontsInput = Readonly<Partial<Record<EverfurThemeFontFaceKey, string>>>;
26
+ /** The `font_urls` map on the `theme` prop (web only): a brand-font URL per face, any subset. */
27
+ type EverfurThemeFontUrlsInput = Readonly<Partial<Record<EverfurThemeFontFaceKey, string>>>;
28
+ /**
29
+ * The client `theme` prop. Any shape is tolerated (unknown keys are ignored, malformed values are dropped); the
30
+ * named keys are the ones the resolver reads, in the console's snake_case with camelCase twins.
31
+ */
32
+ interface EverfurThemeInput {
33
+ readonly display_name?: string;
34
+ readonly displayName?: string;
35
+ readonly logo_url?: string;
36
+ readonly logoUrl?: string;
37
+ /** The logo shown on the dark palette; absent, `logo_url` is shown on both. */
38
+ readonly logo_url_dark?: string;
39
+ readonly logoUrlDark?: string;
40
+ readonly primary_color?: string | number;
41
+ readonly primaryColor?: string | number;
42
+ readonly accent_color?: string | number;
43
+ readonly accentColor?: string | number;
44
+ /** The primary fill on the dark palette; absent, it is derived from `primary_color` (`deriveDarkVariant`). */
45
+ readonly primary_color_dark?: string | number;
46
+ readonly primaryColorDark?: string | number;
47
+ readonly accent_color_dark?: string | number;
48
+ readonly accentColorDark?: string | number;
49
+ /**
50
+ * `light` or `dark` pins the palette; `auto` follows the device's scheme. Absent (here and in the console), the
51
+ * theme is LIGHT, as Everfur's own apps are: the device scheme is never read unless someone chose `auto`.
52
+ */
53
+ readonly brightness?: string;
54
+ /** The console's name for `brightness` (`light`, `dark` or `auto`); `brightness` wins when both are set. */
55
+ readonly color_scheme?: string;
56
+ readonly colorScheme?: string;
57
+ readonly font_family?: string;
58
+ readonly fontFamily?: string;
59
+ readonly font_url?: string;
60
+ readonly fontUrl?: string;
61
+ /**
62
+ * The family per face. Two conventions, the same rendering on React Native and the web:
63
+ * - one registered face per weight, the way the Everfur app maps weight to family (`Azeret-Regular`,
64
+ * `Azeret-Medium`, `Azeret-Bold`, `AzeretMono-Regular`): a name no other weight of its group uses is a NAMED
65
+ * face, rendered with no weight of its own (React Native) or at the normal weight (the web);
66
+ * - one family for every weight (`Azeret`): a name shared across the weights of a group is a BASE family, and
67
+ * every face takes its numeric weight on both hosts.
68
+ * A missing weight falls back along its chain (regular -> medium -> bold, mono -> monoMedium -> monoBold). The host
69
+ * registers the faces itself (the native font files, or a web `@font-face`) and passes the NAMES only: the SDK
70
+ * bundles no font. Beats `font_family` for the weights it names. On React Native, when the app's font registry can
71
+ * tell (expo-font's), a named face that is not registered falls back to the platform font at its weight, with a
72
+ * development warning.
73
+ */
74
+ readonly fonts?: EverfurThemeFontsInput;
75
+ /**
76
+ * Web only: the woff2 URL per face, loaded through the SDK's brand-font allow-list (a woff2 under `/fonts/`
77
+ * on the Everfur SDK CDN). A URL on any other origin is refused, so a host that serves its own licensed
78
+ * faces loads them with its own `@font-face` and passes `fonts` names only.
79
+ */
80
+ readonly font_urls?: EverfurThemeFontUrlsInput;
81
+ readonly fontUrls?: EverfurThemeFontUrlsInput;
82
+ readonly chat_placeholder?: string;
83
+ readonly chatPlaceholder?: string;
84
+ readonly placeholder?: string;
85
+ /** Typed for completeness; INERT on the client. The server decides the attribution from the plan. */
86
+ readonly hide_powered_by?: boolean;
87
+ readonly hidePoweredBy?: boolean;
88
+ /** `white`, `cream` or `subtle`. */
89
+ readonly surface_style?: string;
90
+ readonly surfaceStyle?: string;
91
+ /** `sharp`, `default` or `round`. */
92
+ readonly radius_scale?: string;
93
+ readonly radiusScale?: string;
94
+ /**
95
+ * The cap on the CHROME text tiers (headings, controls, chips, badges): 1 to 3.1, or 0 for none (the default,
96
+ * the tiers alone: headings 2, controls 1.8, chips 1.5, badges 1.3). Flowing content is never capped.
97
+ */
98
+ readonly accessibility_max_font_scale?: number | string;
99
+ readonly accessibilityMaxFontScale?: number | string;
100
+ /** Paint overrides at the named slots. */
101
+ readonly slots?: EverfurThemeSlotsInput;
102
+ /** Tolerated for any other key; ignored by the resolver. */
103
+ readonly [key: string]: unknown;
104
+ }
105
+
106
+ interface ClientBranding {
107
+ readonly displayName: string | null;
108
+ /** normalized (https-hardened downstream) logo URL */
109
+ readonly logoUrl: string | null;
110
+ /** normalized color string (#RRGGBB or rgba(...)) or null */
111
+ readonly primaryColor: string | null;
112
+ readonly accentColor: string | null;
113
+ /**
114
+ * `light` or `dark` pins the palette; `auto` follows the device's scheme (an explicit opt-in). null (absent)
115
+ * resolves to LIGHT, as Everfur's own apps render. Read from `brightness`, or its console alias `color_scheme`
116
+ * (`colorScheme`).
117
+ */
118
+ readonly brightness: 'light' | 'dark' | 'auto' | null;
119
+ readonly fontFamily: string | null;
120
+ readonly fontUrl: string | null;
121
+ /**
122
+ * fonts: one registered family per face (`regular` / `medium` / `bold` / `mono` / `monoMedium` / `monoBold`),
123
+ * any subset. A name used by one face of its group only is a named face, rendered without a synthetic
124
+ * `fontWeight`; a name repeated across the weights of a group is a base family and takes the numeric weights.
125
+ * Absent/null names none (the base families stand).
126
+ */
127
+ readonly fonts?: Readonly<Partial<Record<EverfurFontFaceKey, string>>> | null;
128
+ /** font_urls: the brand-font URL per face (web only), any subset; hardened https-only downstream. */
129
+ readonly fontUrls?: Readonly<Partial<Record<EverfurFontFaceKey, string>>> | null;
130
+ /** composer placeholder override (chat_placeholder/placeholder); null keeps the base. */
131
+ readonly placeholder: string | null;
132
+ /**
133
+ * white-label switch (hide_powered_by): hide the powered-by attribution. null = unset (keep the base). Honoured
134
+ * from SERVER branding only: `resolveTheme` ignores it on the client override (attribution is server-only).
135
+ */
136
+ readonly hidePoweredBy: boolean | null;
137
+ /** primary_color_dark: the primary fill used when the resolved palette is dark. Absent/null derives one. */
138
+ readonly primaryColorDark?: string | null;
139
+ /** accent_color_dark: the accent fill used when the resolved palette is dark. Absent/null derives one. */
140
+ readonly accentColorDark?: string | null;
141
+ /**
142
+ * surface_style: which compiled surface the chat ground (`chatGround`) uses. Absent/null keeps the palette's
143
+ * white ground (the Everfur app's shell). The composer and the record cards keep their cream either way.
144
+ */
145
+ readonly surfaceStyle?: SurfaceStyle | null;
146
+ /** radius_scale: scales the corner radii (the pill radius is never scaled). Absent/null keeps the palette radii. */
147
+ readonly radiusScale?: RadiusScale | null;
148
+ /** logo_url_dark: the logo shown on the dark palette. Absent/null keeps logoUrl on both palettes. */
149
+ readonly logoUrlDark?: string | null;
150
+ /** slots: paint overrides at the named slots (schema 2). Absent/null paints none. */
151
+ readonly slots?: EverfurThemeSlots | null;
152
+ /**
153
+ * accessibility_max_font_scale: the tenant's cap on the CHROME text tiers (headings, controls, chips, badges),
154
+ * 1..3.1, or 0 for none. Flowing content is never capped. Absent/null keeps the default (0, the tiers alone).
155
+ */
156
+ readonly accessibilityMaxFontScale?: number | null;
157
+ /**
158
+ * locked_fields: the wire names the tenant keeps server-wins (schema 2): a field, `slots` (every slot) or
159
+ * `slots.<name>` (one slot); the wire also lists `hide_powered_by`, which is locked whether listed or not.
160
+ * Meaningful on SERVER branding only; ignored on the client override. Absent/null locks nothing beyond the
161
+ * attribution.
162
+ */
163
+ readonly lockedFields?: readonly ThemeLockName[] | null;
164
+ /**
165
+ * schema_version: the wire version the branding was written for. null when absent (schema 1); 0 when present but
166
+ * not a positive integer. A version this SDK does not know (`THEME_SCHEMA_VERSIONS`) drops the server branding.
167
+ */
168
+ readonly schemaVersion?: number | null;
169
+ }
170
+ /** The compiled surface a branding may pick for the chat ground (`surface_style`). */
171
+ type SurfaceStyle = 'white' | 'cream' | 'subtle';
172
+ /** The corner-radius scale a branding may pick (`radius_scale`). */
173
+ type RadiusScale = 'sharp' | 'default' | 'round';
174
+ /**
175
+ * The wire names a tenant may list in `locked_fields` (every cosmetic field). `hide_powered_by` is not listed:
176
+ * it is server-wins unconditionally, so locking it is meaningless.
177
+ */
178
+ declare const LOCKABLE_THEME_FIELDS: readonly ["display_name", "logo_url", "logo_url_dark", "primary_color", "accent_color", "primary_color_dark", "accent_color_dark", "brightness", "color_scheme", "font_family", "font_url", "fonts", "font_urls", "chat_placeholder", "surface_style", "radius_scale", "accessibility_max_font_scale", "slots"];
179
+ type LockableThemeField = (typeof LOCKABLE_THEME_FIELDS)[number];
180
+ /** The `locked_fields` key that locks one slot (`slots.<name>`), as EFBackend branding_slots.py emits it. */
181
+ declare const SLOT_LOCK_PREFIX = "slots.";
182
+ type SlotLockName = `${typeof SLOT_LOCK_PREFIX}${EverfurThemeSlotName}`;
183
+ /** Everything `locked_fields` may name: a cosmetic field, one slot, or the (always locked) attribution. */
184
+ type ThemeLockName = LockableThemeField | SlotLockName | 'hide_powered_by';
185
+ /** The branding wire versions this SDK reads: 1 (absent on the wire) and 2 (the 18 Sep 2026 fields). */
186
+ declare const THEME_SCHEMA_VERSIONS: readonly number[];
187
+ /**
188
+ * true when every field is null (no config) - treated by callers as "absent". The version stamp alone is not a
189
+ * value: a branding that carries only `schema_version` is empty.
190
+ */
191
+ declare function isEmptyBranding(b: ClientBranding): boolean;
192
+ /** true when the branding is absent or written for a wire version this SDK knows. */
193
+ declare function isKnownBrandingSchema(b: ClientBranding | null): boolean;
194
+ /** The names a server branding keeps server-wins: its `locked_fields`, plus the attribution always. */
195
+ declare function lockedFieldsOf(b: ClientBranding | null): ReadonlySet<string>;
196
+ /**
197
+ * Parse an untrusted branding blob (from the entitlements render_hints, or the client `theme` prop) into a
198
+ * normalized `ClientBranding`. Accepts BOTH snake_case and camelCase keys. Returns null when the input is not
199
+ * an object OR when the result is empty (all fields null) - callers read null as "no config" (fail-closed to
200
+ * the compiled default). Never throws.
201
+ */
202
+ declare function parseClientBranding(json: unknown): ClientBranding | null;
203
+ /** The largest cap a tenant may set on the chrome tiers: iOS's largest accessibility text size (AX5, 310%). */
204
+ declare const MAX_FONT_SCALE_CEILING = 3.1;
205
+ /**
206
+ * Return the URL only if it is an https URL with no embedded whitespace, else null (security invariant:
207
+ * https-only; rejects http:, javascript:, data:, etc.). Uses a protocol-locked regex rather than the URL
208
+ * constructor so it is portable + total on React Native (whose URL global is incomplete) and never throws.
209
+ */
210
+ declare function hardenHttpsUrl(url: string | null): string | null;
211
+
212
+ export { type ClientBranding as C, type EverfurThemeInput as E, LOCKABLE_THEME_FIELDS as L, MAX_FONT_SCALE_CEILING as M, type RadiusScale as R, type SurfaceStyle as S, THEME_SCHEMA_VERSIONS as T, type EverfurThemeFontFaceKey as a, type EverfurThemeFontUrlsInput as b, type EverfurThemeFontsInput as c, type EverfurThemeSlotInput as d, type EverfurThemeSlotsInput as e, type LockableThemeField as f, SLOT_LOCK_PREFIX as g, type SlotLockName as h, type ThemeLockName as i, hardenHttpsUrl as j, isEmptyBranding as k, isKnownBrandingSchema as l, lockedFieldsOf as m, parseClientBranding as p };
@@ -0,0 +1,212 @@
1
+ import { c as EverfurThemeSlotName, b as EverfurFontFaceKey, d as EverfurThemeSlots } from './tokens-CIngRkvt.js';
2
+
3
+ /**
4
+ * One slot's paint on the `theme` prop; colours in any form `parseColor` reads, the radius in dp/px. The console's
5
+ * snake_case wire keys are accepted beside the camelCase ones.
6
+ */
7
+ interface EverfurThemeSlotInput {
8
+ readonly backgroundColor?: string | number;
9
+ readonly background_color?: string | number;
10
+ readonly borderColor?: string | number;
11
+ readonly border_color?: string | number;
12
+ readonly borderRadius?: number | string;
13
+ readonly border_radius?: number | string;
14
+ readonly textColor?: string | number;
15
+ readonly text_color?: string | number;
16
+ }
17
+ /** The `slots` map on the `theme` prop: any subset of the eight slot names. */
18
+ type EverfurThemeSlotsInput = Readonly<Partial<Record<EverfurThemeSlotName, EverfurThemeSlotInput>>>;
19
+ /**
20
+ * The faces a theme names: the three text weights and the three mono weights (`EverfurFontFaceKey` on the tokens).
21
+ * A missing weight falls back along its chain: bold -> medium -> regular, monoBold -> monoMedium -> mono.
22
+ */
23
+ type EverfurThemeFontFaceKey = 'regular' | 'medium' | 'bold' | 'mono' | 'monoMedium' | 'monoBold';
24
+ /** The `fonts` map on the `theme` prop: a registered family name per face, any subset. */
25
+ type EverfurThemeFontsInput = Readonly<Partial<Record<EverfurThemeFontFaceKey, string>>>;
26
+ /** The `font_urls` map on the `theme` prop (web only): a brand-font URL per face, any subset. */
27
+ type EverfurThemeFontUrlsInput = Readonly<Partial<Record<EverfurThemeFontFaceKey, string>>>;
28
+ /**
29
+ * The client `theme` prop. Any shape is tolerated (unknown keys are ignored, malformed values are dropped); the
30
+ * named keys are the ones the resolver reads, in the console's snake_case with camelCase twins.
31
+ */
32
+ interface EverfurThemeInput {
33
+ readonly display_name?: string;
34
+ readonly displayName?: string;
35
+ readonly logo_url?: string;
36
+ readonly logoUrl?: string;
37
+ /** The logo shown on the dark palette; absent, `logo_url` is shown on both. */
38
+ readonly logo_url_dark?: string;
39
+ readonly logoUrlDark?: string;
40
+ readonly primary_color?: string | number;
41
+ readonly primaryColor?: string | number;
42
+ readonly accent_color?: string | number;
43
+ readonly accentColor?: string | number;
44
+ /** The primary fill on the dark palette; absent, it is derived from `primary_color` (`deriveDarkVariant`). */
45
+ readonly primary_color_dark?: string | number;
46
+ readonly primaryColorDark?: string | number;
47
+ readonly accent_color_dark?: string | number;
48
+ readonly accentColorDark?: string | number;
49
+ /**
50
+ * `light` or `dark` pins the palette; `auto` follows the device's scheme. Absent (here and in the console), the
51
+ * theme is LIGHT, as Everfur's own apps are: the device scheme is never read unless someone chose `auto`.
52
+ */
53
+ readonly brightness?: string;
54
+ /** The console's name for `brightness` (`light`, `dark` or `auto`); `brightness` wins when both are set. */
55
+ readonly color_scheme?: string;
56
+ readonly colorScheme?: string;
57
+ readonly font_family?: string;
58
+ readonly fontFamily?: string;
59
+ readonly font_url?: string;
60
+ readonly fontUrl?: string;
61
+ /**
62
+ * The family per face. Two conventions, the same rendering on React Native and the web:
63
+ * - one registered face per weight, the way the Everfur app maps weight to family (`Azeret-Regular`,
64
+ * `Azeret-Medium`, `Azeret-Bold`, `AzeretMono-Regular`): a name no other weight of its group uses is a NAMED
65
+ * face, rendered with no weight of its own (React Native) or at the normal weight (the web);
66
+ * - one family for every weight (`Azeret`): a name shared across the weights of a group is a BASE family, and
67
+ * every face takes its numeric weight on both hosts.
68
+ * A missing weight falls back along its chain (regular -> medium -> bold, mono -> monoMedium -> monoBold). The host
69
+ * registers the faces itself (the native font files, or a web `@font-face`) and passes the NAMES only: the SDK
70
+ * bundles no font. Beats `font_family` for the weights it names. On React Native, when the app's font registry can
71
+ * tell (expo-font's), a named face that is not registered falls back to the platform font at its weight, with a
72
+ * development warning.
73
+ */
74
+ readonly fonts?: EverfurThemeFontsInput;
75
+ /**
76
+ * Web only: the woff2 URL per face, loaded through the SDK's brand-font allow-list (a woff2 under `/fonts/`
77
+ * on the Everfur SDK CDN). A URL on any other origin is refused, so a host that serves its own licensed
78
+ * faces loads them with its own `@font-face` and passes `fonts` names only.
79
+ */
80
+ readonly font_urls?: EverfurThemeFontUrlsInput;
81
+ readonly fontUrls?: EverfurThemeFontUrlsInput;
82
+ readonly chat_placeholder?: string;
83
+ readonly chatPlaceholder?: string;
84
+ readonly placeholder?: string;
85
+ /** Typed for completeness; INERT on the client. The server decides the attribution from the plan. */
86
+ readonly hide_powered_by?: boolean;
87
+ readonly hidePoweredBy?: boolean;
88
+ /** `white`, `cream` or `subtle`. */
89
+ readonly surface_style?: string;
90
+ readonly surfaceStyle?: string;
91
+ /** `sharp`, `default` or `round`. */
92
+ readonly radius_scale?: string;
93
+ readonly radiusScale?: string;
94
+ /**
95
+ * The cap on the CHROME text tiers (headings, controls, chips, badges): 1 to 3.1, or 0 for none (the default,
96
+ * the tiers alone: headings 2, controls 1.8, chips 1.5, badges 1.3). Flowing content is never capped.
97
+ */
98
+ readonly accessibility_max_font_scale?: number | string;
99
+ readonly accessibilityMaxFontScale?: number | string;
100
+ /** Paint overrides at the named slots. */
101
+ readonly slots?: EverfurThemeSlotsInput;
102
+ /** Tolerated for any other key; ignored by the resolver. */
103
+ readonly [key: string]: unknown;
104
+ }
105
+
106
+ interface ClientBranding {
107
+ readonly displayName: string | null;
108
+ /** normalized (https-hardened downstream) logo URL */
109
+ readonly logoUrl: string | null;
110
+ /** normalized color string (#RRGGBB or rgba(...)) or null */
111
+ readonly primaryColor: string | null;
112
+ readonly accentColor: string | null;
113
+ /**
114
+ * `light` or `dark` pins the palette; `auto` follows the device's scheme (an explicit opt-in). null (absent)
115
+ * resolves to LIGHT, as Everfur's own apps render. Read from `brightness`, or its console alias `color_scheme`
116
+ * (`colorScheme`).
117
+ */
118
+ readonly brightness: 'light' | 'dark' | 'auto' | null;
119
+ readonly fontFamily: string | null;
120
+ readonly fontUrl: string | null;
121
+ /**
122
+ * fonts: one registered family per face (`regular` / `medium` / `bold` / `mono` / `monoMedium` / `monoBold`),
123
+ * any subset. A name used by one face of its group only is a named face, rendered without a synthetic
124
+ * `fontWeight`; a name repeated across the weights of a group is a base family and takes the numeric weights.
125
+ * Absent/null names none (the base families stand).
126
+ */
127
+ readonly fonts?: Readonly<Partial<Record<EverfurFontFaceKey, string>>> | null;
128
+ /** font_urls: the brand-font URL per face (web only), any subset; hardened https-only downstream. */
129
+ readonly fontUrls?: Readonly<Partial<Record<EverfurFontFaceKey, string>>> | null;
130
+ /** composer placeholder override (chat_placeholder/placeholder); null keeps the base. */
131
+ readonly placeholder: string | null;
132
+ /**
133
+ * white-label switch (hide_powered_by): hide the powered-by attribution. null = unset (keep the base). Honoured
134
+ * from SERVER branding only: `resolveTheme` ignores it on the client override (attribution is server-only).
135
+ */
136
+ readonly hidePoweredBy: boolean | null;
137
+ /** primary_color_dark: the primary fill used when the resolved palette is dark. Absent/null derives one. */
138
+ readonly primaryColorDark?: string | null;
139
+ /** accent_color_dark: the accent fill used when the resolved palette is dark. Absent/null derives one. */
140
+ readonly accentColorDark?: string | null;
141
+ /**
142
+ * surface_style: which compiled surface the chat ground (`chatGround`) uses. Absent/null keeps the palette's
143
+ * white ground (the Everfur app's shell). The composer and the record cards keep their cream either way.
144
+ */
145
+ readonly surfaceStyle?: SurfaceStyle | null;
146
+ /** radius_scale: scales the corner radii (the pill radius is never scaled). Absent/null keeps the palette radii. */
147
+ readonly radiusScale?: RadiusScale | null;
148
+ /** logo_url_dark: the logo shown on the dark palette. Absent/null keeps logoUrl on both palettes. */
149
+ readonly logoUrlDark?: string | null;
150
+ /** slots: paint overrides at the named slots (schema 2). Absent/null paints none. */
151
+ readonly slots?: EverfurThemeSlots | null;
152
+ /**
153
+ * accessibility_max_font_scale: the tenant's cap on the CHROME text tiers (headings, controls, chips, badges),
154
+ * 1..3.1, or 0 for none. Flowing content is never capped. Absent/null keeps the default (0, the tiers alone).
155
+ */
156
+ readonly accessibilityMaxFontScale?: number | null;
157
+ /**
158
+ * locked_fields: the wire names the tenant keeps server-wins (schema 2): a field, `slots` (every slot) or
159
+ * `slots.<name>` (one slot); the wire also lists `hide_powered_by`, which is locked whether listed or not.
160
+ * Meaningful on SERVER branding only; ignored on the client override. Absent/null locks nothing beyond the
161
+ * attribution.
162
+ */
163
+ readonly lockedFields?: readonly ThemeLockName[] | null;
164
+ /**
165
+ * schema_version: the wire version the branding was written for. null when absent (schema 1); 0 when present but
166
+ * not a positive integer. A version this SDK does not know (`THEME_SCHEMA_VERSIONS`) drops the server branding.
167
+ */
168
+ readonly schemaVersion?: number | null;
169
+ }
170
+ /** The compiled surface a branding may pick for the chat ground (`surface_style`). */
171
+ type SurfaceStyle = 'white' | 'cream' | 'subtle';
172
+ /** The corner-radius scale a branding may pick (`radius_scale`). */
173
+ type RadiusScale = 'sharp' | 'default' | 'round';
174
+ /**
175
+ * The wire names a tenant may list in `locked_fields` (every cosmetic field). `hide_powered_by` is not listed:
176
+ * it is server-wins unconditionally, so locking it is meaningless.
177
+ */
178
+ declare const LOCKABLE_THEME_FIELDS: readonly ["display_name", "logo_url", "logo_url_dark", "primary_color", "accent_color", "primary_color_dark", "accent_color_dark", "brightness", "color_scheme", "font_family", "font_url", "fonts", "font_urls", "chat_placeholder", "surface_style", "radius_scale", "accessibility_max_font_scale", "slots"];
179
+ type LockableThemeField = (typeof LOCKABLE_THEME_FIELDS)[number];
180
+ /** The `locked_fields` key that locks one slot (`slots.<name>`), as EFBackend branding_slots.py emits it. */
181
+ declare const SLOT_LOCK_PREFIX = "slots.";
182
+ type SlotLockName = `${typeof SLOT_LOCK_PREFIX}${EverfurThemeSlotName}`;
183
+ /** Everything `locked_fields` may name: a cosmetic field, one slot, or the (always locked) attribution. */
184
+ type ThemeLockName = LockableThemeField | SlotLockName | 'hide_powered_by';
185
+ /** The branding wire versions this SDK reads: 1 (absent on the wire) and 2 (the 18 Sep 2026 fields). */
186
+ declare const THEME_SCHEMA_VERSIONS: readonly number[];
187
+ /**
188
+ * true when every field is null (no config) - treated by callers as "absent". The version stamp alone is not a
189
+ * value: a branding that carries only `schema_version` is empty.
190
+ */
191
+ declare function isEmptyBranding(b: ClientBranding): boolean;
192
+ /** true when the branding is absent or written for a wire version this SDK knows. */
193
+ declare function isKnownBrandingSchema(b: ClientBranding | null): boolean;
194
+ /** The names a server branding keeps server-wins: its `locked_fields`, plus the attribution always. */
195
+ declare function lockedFieldsOf(b: ClientBranding | null): ReadonlySet<string>;
196
+ /**
197
+ * Parse an untrusted branding blob (from the entitlements render_hints, or the client `theme` prop) into a
198
+ * normalized `ClientBranding`. Accepts BOTH snake_case and camelCase keys. Returns null when the input is not
199
+ * an object OR when the result is empty (all fields null) - callers read null as "no config" (fail-closed to
200
+ * the compiled default). Never throws.
201
+ */
202
+ declare function parseClientBranding(json: unknown): ClientBranding | null;
203
+ /** The largest cap a tenant may set on the chrome tiers: iOS's largest accessibility text size (AX5, 310%). */
204
+ declare const MAX_FONT_SCALE_CEILING = 3.1;
205
+ /**
206
+ * Return the URL only if it is an https URL with no embedded whitespace, else null (security invariant:
207
+ * https-only; rejects http:, javascript:, data:, etc.). Uses a protocol-locked regex rather than the URL
208
+ * constructor so it is portable + total on React Native (whose URL global is incomplete) and never throws.
209
+ */
210
+ declare function hardenHttpsUrl(url: string | null): string | null;
211
+
212
+ export { type ClientBranding as C, type EverfurThemeInput as E, LOCKABLE_THEME_FIELDS as L, MAX_FONT_SCALE_CEILING as M, type RadiusScale as R, type SurfaceStyle as S, THEME_SCHEMA_VERSIONS as T, type EverfurThemeFontFaceKey as a, type EverfurThemeFontUrlsInput as b, type EverfurThemeFontsInput as c, type EverfurThemeSlotInput as d, type EverfurThemeSlotsInput as e, type LockableThemeField as f, SLOT_LOCK_PREFIX as g, type SlotLockName as h, type ThemeLockName as i, hardenHttpsUrl as j, isEmptyBranding as k, isKnownBrandingSchema as l, lockedFieldsOf as m, parseClientBranding as p };
@@ -0,0 +1,45 @@
1
+ /** The consult length the lobby quotes, in minutes. everfur-mobile-2026-7 televetTime.ts:85 `CONSULT_MINUTES`. */
2
+ declare const VET_CALL_CONSULT_MINUTES = 10;
3
+ declare const VET_CALL_COPY: Readonly<{
4
+ /** Controls, shared by the lobby and the live call. */
5
+ muteCta: "Mute";
6
+ unmuteCta: "Unmute";
7
+ cameraOffCta: "Camera off";
8
+ cameraOnCta: "Camera on";
9
+ leaveCta: "Leave";
10
+ /**
11
+ * ADDED FOR RNUI-10, from the same deck (everfur-mobile copy.ts at 9856f5199): switchCameraCta :1029,
12
+ * speakerOffCta :1038, speakerOnCta :1039. Labelled by the ACTION, like the camera controls: "Front camera" as
13
+ * a label is ambiguous about whether it names the state or the result.
14
+ */
15
+ switchCameraCta: "Switch camera";
16
+ speakerOffCta: "Speaker off";
17
+ speakerOnCta: "Speaker on";
18
+ /** The lobby: the member is in the room and the clinician is not. */
19
+ lobbyTitleNoName: "Your vet is joining";
20
+ lobbySubtitle: "Usually under a minute";
21
+ lobbyPrepLabel: "WHILE YOU WAIT";
22
+ lobbyPrepNoPet: "Have your pet nearby and somewhere well lit.";
23
+ /** `{name}` is DATA from the consult, never a key. Absent, `lobbyTitleNoName` is used instead. */
24
+ lobbyTitle: (clinicianName: string | null | undefined) => string;
25
+ /** `{pet}` is DATA from the roster. Absent, the pet-free form is used instead. */
26
+ lobbyPrep: (petName: string | null | undefined) => string;
27
+ /** `{n}` is `VET_CALL_CONSULT_MINUTES`, never a hardcoded number. */
28
+ lobbyDuration: (minutes: number) => string;
29
+ /** The consumer app's `visit.joinFailedReason` (:735), shown when the call object errors. */
30
+ joinFailedReason: "That did not open. Try again.";
31
+ /** D8, shown BEFORE the room: acknowledging it is the only way in. Both consumer apps, verbatim. */
32
+ recordingNoticeTitle: "This consultation is recorded.";
33
+ /** The acknowledgement that actually opens the room. Mobile `recordingNoticeCta`, web `recordingNoticeAck`. */
34
+ recordingNoticeCta: "Continue to the call";
35
+ /** WEB ONLY: declining the notice. everfur-frontend ownerCopy.ts:229. */
36
+ recordingNoticeDecline: "Not now";
37
+ /**
38
+ * The member's own tile while their camera is off. NOT `cameraOnCta`: the tile used to be captioned with the
39
+ * control's imperative, so at the moment the camera was off it read "Camera on" (mobile copy.ts:1065 and
40
+ * the fix at TelevetCallScreen.tsx:1128-1133).
41
+ */
42
+ selfCameraOffLabel: "Your camera is off";
43
+ }>;
44
+
45
+ export { VET_CALL_CONSULT_MINUTES as V, VET_CALL_COPY as a };
@@ -0,0 +1,45 @@
1
+ /** The consult length the lobby quotes, in minutes. everfur-mobile-2026-7 televetTime.ts:85 `CONSULT_MINUTES`. */
2
+ declare const VET_CALL_CONSULT_MINUTES = 10;
3
+ declare const VET_CALL_COPY: Readonly<{
4
+ /** Controls, shared by the lobby and the live call. */
5
+ muteCta: "Mute";
6
+ unmuteCta: "Unmute";
7
+ cameraOffCta: "Camera off";
8
+ cameraOnCta: "Camera on";
9
+ leaveCta: "Leave";
10
+ /**
11
+ * ADDED FOR RNUI-10, from the same deck (everfur-mobile copy.ts at 9856f5199): switchCameraCta :1029,
12
+ * speakerOffCta :1038, speakerOnCta :1039. Labelled by the ACTION, like the camera controls: "Front camera" as
13
+ * a label is ambiguous about whether it names the state or the result.
14
+ */
15
+ switchCameraCta: "Switch camera";
16
+ speakerOffCta: "Speaker off";
17
+ speakerOnCta: "Speaker on";
18
+ /** The lobby: the member is in the room and the clinician is not. */
19
+ lobbyTitleNoName: "Your vet is joining";
20
+ lobbySubtitle: "Usually under a minute";
21
+ lobbyPrepLabel: "WHILE YOU WAIT";
22
+ lobbyPrepNoPet: "Have your pet nearby and somewhere well lit.";
23
+ /** `{name}` is DATA from the consult, never a key. Absent, `lobbyTitleNoName` is used instead. */
24
+ lobbyTitle: (clinicianName: string | null | undefined) => string;
25
+ /** `{pet}` is DATA from the roster. Absent, the pet-free form is used instead. */
26
+ lobbyPrep: (petName: string | null | undefined) => string;
27
+ /** `{n}` is `VET_CALL_CONSULT_MINUTES`, never a hardcoded number. */
28
+ lobbyDuration: (minutes: number) => string;
29
+ /** The consumer app's `visit.joinFailedReason` (:735), shown when the call object errors. */
30
+ joinFailedReason: "That did not open. Try again.";
31
+ /** D8, shown BEFORE the room: acknowledging it is the only way in. Both consumer apps, verbatim. */
32
+ recordingNoticeTitle: "This consultation is recorded.";
33
+ /** The acknowledgement that actually opens the room. Mobile `recordingNoticeCta`, web `recordingNoticeAck`. */
34
+ recordingNoticeCta: "Continue to the call";
35
+ /** WEB ONLY: declining the notice. everfur-frontend ownerCopy.ts:229. */
36
+ recordingNoticeDecline: "Not now";
37
+ /**
38
+ * The member's own tile while their camera is off. NOT `cameraOnCta`: the tile used to be captioned with the
39
+ * control's imperative, so at the moment the camera was off it read "Camera on" (mobile copy.ts:1065 and
40
+ * the fix at TelevetCallScreen.tsx:1128-1133).
41
+ */
42
+ selfCameraOffLabel: "Your camera is off";
43
+ }>;
44
+
45
+ export { VET_CALL_CONSULT_MINUTES as V, VET_CALL_COPY as a };
@@ -0,0 +1,62 @@
1
+ import { E as EverfurError } from './EverfurError-DmELDpXp.js';
2
+
3
+ /** The phases the in-app call surface moves through. The consumer app's `CallPhase`, verbatim. */
4
+ type VetCallPhase = 'joining' | 'joined' | 'left' | 'error';
5
+ /**
6
+ * Refuses anything that is not an https room.
7
+ *
8
+ * NEVER THROWS and never echoes the input: an unparseable value returns false rather than raising, because
9
+ * the caller is already on a failure path when it asks.
10
+ */
11
+ declare function isSafeRoomUrl(url: string): boolean;
12
+ /**
13
+ * The whole credential floor: an https room AND a non-empty join token. The call surface renders nothing and
14
+ * creates no call object unless this is true.
15
+ */
16
+ declare function isUsableRoomCredential(roomUrl: string, token: string): boolean;
17
+ /** The call's clock as the join response served it (`CallLimitsResponse`). */
18
+ interface VetCallLimits {
19
+ /** The sold visit length, in minutes. */
20
+ readonly consultMinutes: number;
21
+ /** When the app leaves the call on its own, in minutes; 0 means never. */
22
+ readonly autoEndMinutes: number;
23
+ /** How long before either limit a warning is due, in seconds. */
24
+ readonly warnBeforeSeconds: number;
25
+ }
26
+ /** One participant's admission to the consult's room. The token is a credential: never log or store it. */
27
+ interface VetCallCredential {
28
+ readonly roomUrl: string;
29
+ readonly token: string;
30
+ /** D8: the room is recorded, so the notice comes before the room. True unless the server said false. */
31
+ readonly recordingNotice: boolean;
32
+ /** Null when the server sent none, or sent a block with an unusable number in it. */
33
+ readonly callLimits: VetCallLimits | null;
34
+ }
35
+ /**
36
+ * Read a join response. Null when it carries no usable room or no token: a credential with half of itself
37
+ * missing cannot open anything, and the caller settles that as a failed join rather than a call that hangs.
38
+ */
39
+ declare function parseVetCallCredential(wire: unknown): VetCallCredential | null;
40
+ /**
41
+ * Why a join was refused. The consumer app's `televetJoinRefusal` (everfur-mobile
42
+ * src/features/liveVet/join/televetJoin.ts), plus `unavailable`, which the port adds for the same reason
43
+ * `televetBookingRefusal` adds it: a partner plane can be dark (404) where the consumer plane cannot.
44
+ *
45
+ * too_early the window has not opened. It will work closer to the time.
46
+ * too_late the window closed. It will never work for this consult.
47
+ * room_not_ready the room is still being provisioned; fine in seconds.
48
+ * not_joinable the consult is cancelled or finished (`status_*`).
49
+ * unavailable 404: the surface is dark, or the consult is not this member's. No retry can fix it.
50
+ * unknown anything else, including a transport failure. A retry is reasonable.
51
+ */
52
+ type VetCallJoinRefusal = 'too_early' | 'too_late' | 'room_not_ready' | 'not_joinable' | 'unavailable' | 'unknown';
53
+ /**
54
+ * The server's own reason for a refused join (`too_early`, `status_cancelled_owner`, ...), or null when the
55
+ * envelope carried none. The web surface words each `status_*` separately, as the consumer web app does, so it
56
+ * reads the reason itself; everything else reads the classification below.
57
+ */
58
+ declare function vetCallJoinReason(error: EverfurError): string | null;
59
+ /** Classify a failed join by the server's own reason, never by its message. */
60
+ declare function vetCallJoinRefusal(error: EverfurError): VetCallJoinRefusal;
61
+
62
+ export { type VetCallPhase as V, isUsableRoomCredential as a, type VetCallCredential as b, type VetCallJoinRefusal as c, type VetCallLimits as d, vetCallJoinRefusal as e, isSafeRoomUrl as i, parseVetCallCredential as p, vetCallJoinReason as v };
@@ -0,0 +1,62 @@
1
+ import { E as EverfurError } from './EverfurError-DmELDpXp.cjs';
2
+
3
+ /** The phases the in-app call surface moves through. The consumer app's `CallPhase`, verbatim. */
4
+ type VetCallPhase = 'joining' | 'joined' | 'left' | 'error';
5
+ /**
6
+ * Refuses anything that is not an https room.
7
+ *
8
+ * NEVER THROWS and never echoes the input: an unparseable value returns false rather than raising, because
9
+ * the caller is already on a failure path when it asks.
10
+ */
11
+ declare function isSafeRoomUrl(url: string): boolean;
12
+ /**
13
+ * The whole credential floor: an https room AND a non-empty join token. The call surface renders nothing and
14
+ * creates no call object unless this is true.
15
+ */
16
+ declare function isUsableRoomCredential(roomUrl: string, token: string): boolean;
17
+ /** The call's clock as the join response served it (`CallLimitsResponse`). */
18
+ interface VetCallLimits {
19
+ /** The sold visit length, in minutes. */
20
+ readonly consultMinutes: number;
21
+ /** When the app leaves the call on its own, in minutes; 0 means never. */
22
+ readonly autoEndMinutes: number;
23
+ /** How long before either limit a warning is due, in seconds. */
24
+ readonly warnBeforeSeconds: number;
25
+ }
26
+ /** One participant's admission to the consult's room. The token is a credential: never log or store it. */
27
+ interface VetCallCredential {
28
+ readonly roomUrl: string;
29
+ readonly token: string;
30
+ /** D8: the room is recorded, so the notice comes before the room. True unless the server said false. */
31
+ readonly recordingNotice: boolean;
32
+ /** Null when the server sent none, or sent a block with an unusable number in it. */
33
+ readonly callLimits: VetCallLimits | null;
34
+ }
35
+ /**
36
+ * Read a join response. Null when it carries no usable room or no token: a credential with half of itself
37
+ * missing cannot open anything, and the caller settles that as a failed join rather than a call that hangs.
38
+ */
39
+ declare function parseVetCallCredential(wire: unknown): VetCallCredential | null;
40
+ /**
41
+ * Why a join was refused. The consumer app's `televetJoinRefusal` (everfur-mobile
42
+ * src/features/liveVet/join/televetJoin.ts), plus `unavailable`, which the port adds for the same reason
43
+ * `televetBookingRefusal` adds it: a partner plane can be dark (404) where the consumer plane cannot.
44
+ *
45
+ * too_early the window has not opened. It will work closer to the time.
46
+ * too_late the window closed. It will never work for this consult.
47
+ * room_not_ready the room is still being provisioned; fine in seconds.
48
+ * not_joinable the consult is cancelled or finished (`status_*`).
49
+ * unavailable 404: the surface is dark, or the consult is not this member's. No retry can fix it.
50
+ * unknown anything else, including a transport failure. A retry is reasonable.
51
+ */
52
+ type VetCallJoinRefusal = 'too_early' | 'too_late' | 'room_not_ready' | 'not_joinable' | 'unavailable' | 'unknown';
53
+ /**
54
+ * The server's own reason for a refused join (`too_early`, `status_cancelled_owner`, ...), or null when the
55
+ * envelope carried none. The web surface words each `status_*` separately, as the consumer web app does, so it
56
+ * reads the reason itself; everything else reads the classification below.
57
+ */
58
+ declare function vetCallJoinReason(error: EverfurError): string | null;
59
+ /** Classify a failed join by the server's own reason, never by its message. */
60
+ declare function vetCallJoinRefusal(error: EverfurError): VetCallJoinRefusal;
61
+
62
+ export { type VetCallPhase as V, isUsableRoomCredential as a, type VetCallCredential as b, type VetCallJoinRefusal as c, type VetCallLimits as d, vetCallJoinRefusal as e, isSafeRoomUrl as i, parseVetCallCredential as p, vetCallJoinReason as v };