@everfur/sdk 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/CHANGELOG.md +251 -4
  2. package/README.md +9 -3
  3. package/dist/{Chat-DwAC2vhB.d.ts → Chat-BOX-03ho.d.ts} +17 -3
  4. package/dist/{Chat-DPUD6dnc.d.cts → Chat-TA-aTcVF.d.cts} +17 -3
  5. package/dist/{DepthViews-DP0R-DhB.d.cts → DepthViews-CgjX2AJ5.d.ts} +1 -1
  6. package/dist/{DepthViews-DbFhR4Du.d.cts → DepthViews-Cviea-ri.d.cts} +1 -1
  7. package/dist/{DepthViews-DNEM96Se.d.ts → DepthViews-D2dRqWRq.d.ts} +1 -1
  8. package/dist/{DepthViews-D_3hl4xk.d.ts → DepthViews-DSFyaSeL.d.cts} +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-5NeobOCd.d.ts → attachments-C_vtFu2f.d.ts} +7 -5
  20. package/dist/{attachments-D8T5re7e.d.cts → attachments-DHvnITuE.d.cts} +7 -5
  21. package/dist/{attachments-Bw3iMQgu.d.ts → attachments-oD5U2fXI.d.ts} +3 -3
  22. package/dist/{attachments-CQgFrEQ7.d.cts → attachments-pIdGOQfm.d.cts} +3 -3
  23. package/dist/bookingCopy-CJir9mjb.d.ts +1135 -0
  24. package/dist/bookingCopy-DfuA13dh.d.cts +1135 -0
  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-B-Eg8ZJ3.d.cts +63 -0
  32. package/dist/casesRepository-DHgIYKN9.d.ts +63 -0
  33. package/dist/chat/index.cjs +1 -1
  34. package/dist/chat/index.d.cts +12 -10
  35. package/dist/chat/index.d.ts +12 -10
  36. package/dist/chat/index.js +1 -1
  37. package/dist/client/index.cjs +5 -5
  38. package/dist/client/index.d.cts +15 -11
  39. package/dist/client/index.d.ts +15 -11
  40. package/dist/client/index.js +5 -5
  41. package/dist/{config-CzTZGlfF.d.cts → config-ClI7QxB0.d.ts} +4 -3
  42. package/dist/{config-DW60uRb9.d.ts → config-DAFbf721.d.cts} +4 -3
  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-XvTzq1tE.d.cts → context-B-dUM1Qf.d.cts} +9 -8
  48. package/dist/{context-DXhqHlPU.d.ts → context-CZbgF_OH.d.ts} +9 -8
  49. package/dist/{copy-Mjoo91aS.d.ts → copy-CeRH3NXy.d.ts} +5 -4
  50. package/dist/{copy-bKDNigLb.d.cts → copy-CneuYdrO.d.cts} +5 -4
  51. package/dist/core/index.cjs +9 -9
  52. package/dist/core/index.d.cts +123 -32
  53. package/dist/core/index.d.ts +123 -32
  54. package/dist/core/index.js +9 -9
  55. package/dist/{depth-CErXCU8J.d.cts → depth-B3NFKlF9.d.cts} +38 -6
  56. package/dist/{depth-DjDcJ6kH.d.ts → depth-DO3Ko_qs.d.ts} +38 -6
  57. package/dist/entitlementRepository-74kW5mK0.d.ts +43 -0
  58. package/dist/entitlementRepository-m6zLUmiB.d.cts +43 -0
  59. package/dist/{identity-DI4eVx9S.d.cts → identity-C7uxGwfT.d.cts} +3 -3
  60. package/dist/{identity-BMx2SUOM.d.ts → identity-CLAUq-K4.d.ts} +3 -3
  61. package/dist/index.cjs +6 -6
  62. package/dist/index.d.cts +20 -17
  63. package/dist/index.d.ts +20 -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/optionalModule-DbJmsq5f.d.cts +21 -0
  72. package/dist/optionalModule-DbJmsq5f.d.ts +21 -0
  73. package/dist/{pets-aB8q0JyX.d.cts → pets-BoB5B7kp.d.cts} +2 -2
  74. package/dist/{pets-CtQdRpWo.d.ts → pets-w4M9d-Dn.d.ts} +2 -2
  75. package/dist/{casesRepository-ClLv6qMl.d.ts → petsRepository-BjKJ8UsN.d.ts} +3 -49
  76. package/dist/{casesRepository-DHwtGRYY.d.cts → petsRepository-DZZoEG3r.d.cts} +3 -49
  77. package/dist/photo/index.cjs +1 -1
  78. package/dist/photo/index.d.cts +3 -2
  79. package/dist/photo/index.d.ts +3 -2
  80. package/dist/photo/index.js +1 -1
  81. package/dist/{ports-DMolTRzU.d.ts → ports-BO3bzTJg.d.ts} +14 -17
  82. package/dist/{ports-DEBzEhbp.d.cts → ports-C2EVK416.d.cts} +14 -17
  83. package/dist/records/depth/index.cjs +2 -2
  84. package/dist/records/depth/index.d.cts +11 -10
  85. package/dist/records/depth/index.d.ts +11 -10
  86. package/dist/records/depth/index.js +2 -2
  87. package/dist/records/index.cjs +3 -3
  88. package/dist/records/index.d.cts +25 -14
  89. package/dist/records/index.d.ts +25 -14
  90. package/dist/records/index.js +3 -3
  91. package/dist/{requestFunnel-CjW7uDuA.d.ts → requestFunnel-D7ipek3e.d.ts} +28 -4
  92. package/dist/{requestFunnel-L-BQfi0z.d.cts → requestFunnel-Djjwgoe9.d.cts} +28 -4
  93. package/dist/{runtime-BR9ysG0J.d.ts → runtimeTypes-CTL3yToK.d.ts} +10 -100
  94. package/dist/{runtime-B8s-_hv8.d.cts → runtimeTypes-D2C9uD85.d.cts} +10 -100
  95. package/dist/server/events/index.cjs +1 -1
  96. package/dist/server/events/index.d.cts +4 -3
  97. package/dist/server/events/index.d.ts +4 -3
  98. package/dist/server/events/index.js +1 -1
  99. package/dist/server/index.cjs +1 -1
  100. package/dist/server/index.d.cts +5 -4
  101. package/dist/server/index.d.ts +5 -4
  102. package/dist/server/index.js +1 -1
  103. package/dist/televet/booking/index.cjs +1 -0
  104. package/dist/televet/booking/index.d.cts +566 -0
  105. package/dist/televet/booking/index.d.ts +566 -0
  106. package/dist/televet/booking/index.js +1 -0
  107. package/dist/televet/call/index.cjs +1 -0
  108. package/dist/televet/call/index.d.cts +161 -0
  109. package/dist/televet/call/index.d.ts +161 -0
  110. package/dist/televet/call/index.js +1 -0
  111. package/dist/televet/index.cjs +1 -1
  112. package/dist/televet/index.d.cts +64 -12
  113. package/dist/televet/index.d.ts +64 -12
  114. package/dist/televet/index.js +1 -1
  115. package/dist/televetGlobal-CEk0_cW9.d.cts +34 -0
  116. package/dist/televetGlobal-Cs9Wbqsy.d.ts +34 -0
  117. package/dist/testing/index.cjs +4 -4
  118. package/dist/testing/index.d.cts +4 -3
  119. package/dist/testing/index.d.ts +4 -3
  120. package/dist/testing/index.js +4 -4
  121. package/dist/testing/rn/index.cjs +1 -1
  122. package/dist/testing/rn/index.d.cts +13 -10
  123. package/dist/testing/rn/index.d.ts +13 -10
  124. package/dist/testing/rn/index.js +1 -1
  125. package/dist/testing/web/index.cjs +1 -1
  126. package/dist/testing/web/index.d.cts +14 -12
  127. package/dist/testing/web/index.d.ts +14 -12
  128. package/dist/testing/web/index.js +1 -1
  129. package/dist/{timelineRows-DZed6dAM.d.ts → timelineRows-7yFNK_rU.d.ts} +1 -1
  130. package/dist/{timelineRows-CaohZzXS.d.cts → timelineRows-CzR1T2DR.d.cts} +1 -1
  131. package/dist/tokens-CIngRkvt.d.cts +362 -0
  132. package/dist/tokens-CIngRkvt.d.ts +362 -0
  133. package/dist/typeStyle-DHJzDaUo.d.cts +112 -0
  134. package/dist/typeStyle-YPS_MXeI.d.ts +112 -0
  135. package/dist/{useRecordsDepth-BHBzJ76R.d.cts → useRecordsDepth-Bnw36jPr.d.cts} +24 -5
  136. package/dist/{useRecordsDepth-BU-OhzH6.d.ts → useRecordsDepth-DFF7Faxx.d.ts} +24 -5
  137. package/dist/{useVetVisit-CjmMa896.d.ts → useVetVisit-BsjoDO-n.d.ts} +21 -6
  138. package/dist/{useVetVisit-Bc84hWUU.d.cts → useVetVisit-Ds8f1peV.d.cts} +21 -6
  139. package/dist/video/index.cjs +1 -1
  140. package/dist/video/index.d.cts +3 -2
  141. package/dist/video/index.d.ts +3 -2
  142. package/dist/video/index.js +1 -1
  143. package/dist/{view-DtSPYpKa.d.ts → view-BqcOYFTr.d.ts} +5 -4
  144. package/dist/{view-C3qPIXGX.d.cts → view-CaJs8WFH.d.cts} +5 -4
  145. package/dist/web/consent/index.cjs +1 -1
  146. package/dist/web/consent/index.d.cts +9 -8
  147. package/dist/web/consent/index.d.ts +9 -8
  148. package/dist/web/consent/index.js +1 -1
  149. package/dist/web/index.cjs +10 -10
  150. package/dist/web/index.d.cts +43 -19
  151. package/dist/web/index.d.ts +43 -19
  152. package/dist/web/index.js +10 -10
  153. package/dist/web/notifications/index.cjs +2 -2
  154. package/dist/web/notifications/index.d.cts +7 -6
  155. package/dist/web/notifications/index.d.ts +7 -6
  156. package/dist/web/notifications/index.js +2 -2
  157. package/dist/web/records/depth/index.cjs +2 -2
  158. package/dist/web/records/depth/index.d.cts +11 -10
  159. package/dist/web/records/depth/index.d.ts +11 -10
  160. package/dist/web/records/depth/index.js +2 -2
  161. package/dist/web/records/index.cjs +3 -3
  162. package/dist/web/records/index.d.cts +123 -14
  163. package/dist/web/records/index.d.ts +123 -14
  164. package/dist/web/records/index.js +3 -3
  165. package/dist/web/televet/booking/index.cjs +2 -0
  166. package/dist/web/televet/booking/index.d.cts +770 -0
  167. package/dist/web/televet/booking/index.d.ts +770 -0
  168. package/dist/web/televet/booking/index.js +2 -0
  169. package/dist/web/televet/call/index.cjs +1 -0
  170. package/dist/web/televet/call/index.d.cts +144 -0
  171. package/dist/web/televet/call/index.d.ts +144 -0
  172. package/dist/web/televet/call/index.js +1 -0
  173. package/dist/web/televet/index.cjs +1 -1
  174. package/dist/web/televet/index.d.cts +61 -9
  175. package/dist/web/televet/index.d.ts +61 -9
  176. package/dist/web/televet/index.js +1 -1
  177. package/package.json +74 -5
  178. package/televet/booking/package.json +8 -0
  179. package/televet/call/package.json +8 -0
  180. package/web/televet/booking/native-blocked.cjs +12 -0
  181. package/web/televet/booking/package.json +8 -0
  182. package/web/televet/call/native-blocked.cjs +12 -0
  183. package/web/televet/call/package.json +8 -0
  184. package/dist/entitlementRepository-DKdXFgTo.d.cts +0 -698
  185. package/dist/entitlementRepository-DSbzuyAW.d.ts +0 -698
  186. package/dist/typeStyle-0TydiZ1w.d.cts +0 -19
  187. package/dist/typeStyle-CWMsoe6b.d.ts +0 -19
@@ -0,0 +1,63 @@
1
+ import { E as EverfurResult } from './EverfurResult-ZtH-YV1h.cjs';
2
+ import { A as AuthContext } from './identity-C7uxGwfT.cjs';
3
+ import { P as PetRef } from './ids-B2GAAifq.cjs';
4
+
5
+ /** The owner's answer to a check-in, the wire values of the consumer `CheckinResponse` enum. */
6
+ type CheckinAnswer = 'better' | 'same' | 'worse';
7
+ /** The closed answer set, in the order the consumer surfaces offer it. */
8
+ declare const CHECKIN_ANSWERS: readonly CheckinAnswer[];
9
+ /**
10
+ * The member-safe view of one watch case (consumer `WatchCaseView`). Case STATE only: the concern itself
11
+ * never rides on this row. `status` is the server's vocabulary (`watching` while open, then `resolved`,
12
+ * `escalated` or `lapsed`), carried as a string so a status added later never breaks a frozen client.
13
+ */
14
+ interface WatchCase {
15
+ readonly caseId: string;
16
+ readonly status: string;
17
+ /** The body-region copy hint (`ears`, `eyes`, ..., `general`), never a diagnosis. */
18
+ readonly bodyLocation: string | null;
19
+ /** The CASE's latest answer, not any one ask's: after a SAME the case is asked again (see `checkinAskCount`). */
20
+ readonly lastResponse: CheckinAnswer | null;
21
+ readonly checkInDueAt: string | null;
22
+ readonly openedAt: string | null;
23
+ readonly resolvedAt: string | null;
24
+ /** The server's own non-diagnostic post-answer line, stamped only on a BETTER resolve. */
25
+ readonly resolutionText: string | null;
26
+ /**
27
+ * How many check-ins the case has ASKED (`checkin_ask_count`, EFBackend V347), null when the read did not
28
+ * carry it. A 0 on a case older than V347 means "not counted", never "never asked". Optional because the
29
+ * shape was already in partner hands and test doubles before it: absent reads as unknown.
30
+ */
31
+ readonly checkinAskCount?: number | null;
32
+ /**
33
+ * How many of them the owner ANSWERED (`checkin_answer_count`, V347), null when absent. Compared with
34
+ * `checkinAskCount` only, to tell whether `lastResponse` answers the newest ask; never meant to be shown.
35
+ */
36
+ readonly checkinAnswerCount?: number | null;
37
+ }
38
+ /** The result of recording a check-in. `ctaDeepLink` is set only on a WORSE escalation (an `everfur://` pointer). */
39
+ interface CheckinOutcome {
40
+ readonly case: WatchCase;
41
+ readonly ctaDeepLink: string | null;
42
+ }
43
+ interface CasesRepository {
44
+ /**
45
+ * `GET /widget/v1/pets/{pet_ref}/cases` - the pet's open (`watching`) cases. Settles `ok([])` when the pet
46
+ * has none, which the server makes indistinguishable from a non-member or the feature being off.
47
+ */
48
+ list(petRef: PetRef, opts?: {
49
+ signal?: AbortSignal;
50
+ }): Promise<EverfurResult<readonly WatchCase[]>>;
51
+ /**
52
+ * `POST /widget/v1/pets/{pet_ref}/cases/{case_id}/checkin` - record the owner's answer. Settles
53
+ * `ok(CheckinOutcome)` on 200; a case that is stale, closed, another member's or gated off is the ordinary
54
+ * not-found error. A malformed case id or an answer outside the closed set is refused before the wire.
55
+ */
56
+ checkin(petRef: PetRef, caseId: string, answer: CheckinAnswer, opts?: {
57
+ signal?: AbortSignal;
58
+ }): Promise<EverfurResult<CheckinOutcome>>;
59
+ }
60
+ /** Build the repository over a device AuthContext (personalized bearer XOR anonymous pk). */
61
+ declare function createCasesRepository(auth: AuthContext): CasesRepository;
62
+
63
+ export { type CheckinAnswer as C, type WatchCase as W, type CheckinOutcome as a, CHECKIN_ANSWERS as b, type CasesRepository as c, createCasesRepository as d };
@@ -0,0 +1,63 @@
1
+ import { E as EverfurResult } from './EverfurResult-SGvHKsCB.js';
2
+ import { A as AuthContext } from './identity-CLAUq-K4.js';
3
+ import { P as PetRef } from './ids-B2GAAifq.js';
4
+
5
+ /** The owner's answer to a check-in, the wire values of the consumer `CheckinResponse` enum. */
6
+ type CheckinAnswer = 'better' | 'same' | 'worse';
7
+ /** The closed answer set, in the order the consumer surfaces offer it. */
8
+ declare const CHECKIN_ANSWERS: readonly CheckinAnswer[];
9
+ /**
10
+ * The member-safe view of one watch case (consumer `WatchCaseView`). Case STATE only: the concern itself
11
+ * never rides on this row. `status` is the server's vocabulary (`watching` while open, then `resolved`,
12
+ * `escalated` or `lapsed`), carried as a string so a status added later never breaks a frozen client.
13
+ */
14
+ interface WatchCase {
15
+ readonly caseId: string;
16
+ readonly status: string;
17
+ /** The body-region copy hint (`ears`, `eyes`, ..., `general`), never a diagnosis. */
18
+ readonly bodyLocation: string | null;
19
+ /** The CASE's latest answer, not any one ask's: after a SAME the case is asked again (see `checkinAskCount`). */
20
+ readonly lastResponse: CheckinAnswer | null;
21
+ readonly checkInDueAt: string | null;
22
+ readonly openedAt: string | null;
23
+ readonly resolvedAt: string | null;
24
+ /** The server's own non-diagnostic post-answer line, stamped only on a BETTER resolve. */
25
+ readonly resolutionText: string | null;
26
+ /**
27
+ * How many check-ins the case has ASKED (`checkin_ask_count`, EFBackend V347), null when the read did not
28
+ * carry it. A 0 on a case older than V347 means "not counted", never "never asked". Optional because the
29
+ * shape was already in partner hands and test doubles before it: absent reads as unknown.
30
+ */
31
+ readonly checkinAskCount?: number | null;
32
+ /**
33
+ * How many of them the owner ANSWERED (`checkin_answer_count`, V347), null when absent. Compared with
34
+ * `checkinAskCount` only, to tell whether `lastResponse` answers the newest ask; never meant to be shown.
35
+ */
36
+ readonly checkinAnswerCount?: number | null;
37
+ }
38
+ /** The result of recording a check-in. `ctaDeepLink` is set only on a WORSE escalation (an `everfur://` pointer). */
39
+ interface CheckinOutcome {
40
+ readonly case: WatchCase;
41
+ readonly ctaDeepLink: string | null;
42
+ }
43
+ interface CasesRepository {
44
+ /**
45
+ * `GET /widget/v1/pets/{pet_ref}/cases` - the pet's open (`watching`) cases. Settles `ok([])` when the pet
46
+ * has none, which the server makes indistinguishable from a non-member or the feature being off.
47
+ */
48
+ list(petRef: PetRef, opts?: {
49
+ signal?: AbortSignal;
50
+ }): Promise<EverfurResult<readonly WatchCase[]>>;
51
+ /**
52
+ * `POST /widget/v1/pets/{pet_ref}/cases/{case_id}/checkin` - record the owner's answer. Settles
53
+ * `ok(CheckinOutcome)` on 200; a case that is stale, closed, another member's or gated off is the ordinary
54
+ * not-found error. A malformed case id or an answer outside the closed set is refused before the wire.
55
+ */
56
+ checkin(petRef: PetRef, caseId: string, answer: CheckinAnswer, opts?: {
57
+ signal?: AbortSignal;
58
+ }): Promise<EverfurResult<CheckinOutcome>>;
59
+ }
60
+ /** Build the repository over a device AuthContext (personalized bearer XOR anonymous pk). */
61
+ declare function createCasesRepository(auth: AuthContext): CasesRepository;
62
+
63
+ export { type CheckinAnswer as C, type WatchCase as W, type CheckinOutcome as a, CHECKIN_ANSWERS as b, type CasesRepository as c, createCasesRepository as d };