@everfur/sdk 0.3.0 → 0.4.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 +69 -4
- package/README.md +6 -1
- package/dist/{Chat-DwAC2vhB.d.ts → Chat-BZZ-Py5l.d.ts} +3 -3
- package/dist/{Chat-DPUD6dnc.d.cts → Chat-Dq4fffIO.d.cts} +3 -3
- package/dist/{DepthViews-DNEM96Se.d.ts → DepthViews-BG3E25MD.d.ts} +1 -1
- package/dist/{DepthViews-DP0R-DhB.d.cts → DepthViews-B_hIypI6.d.cts} +1 -1
- package/dist/{DepthViews-DbFhR4Du.d.cts → DepthViews-CL75jyRA.d.cts} +1 -1
- package/dist/{DepthViews-D_3hl4xk.d.ts → DepthViews-CkYri51q.d.ts} +1 -1
- package/dist/animations/index.cjs +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/animations/index.js +1 -1
- package/dist/{attachments-CQgFrEQ7.d.cts → attachments-BorG422I.d.cts} +2 -2
- package/dist/{attachments-5NeobOCd.d.ts → attachments-BrUWQYNK.d.ts} +5 -4
- package/dist/{attachments-D8T5re7e.d.cts → attachments-D_SECjr1.d.cts} +5 -4
- package/dist/{attachments-Bw3iMQgu.d.ts → attachments-DpldrvIW.d.ts} +2 -2
- package/dist/bookingCopy-CqtDYvCR.d.ts +732 -0
- package/dist/bookingCopy-SREvkG19.d.cts +732 -0
- package/dist/{entitlementRepository-DSbzuyAW.d.ts → branding-CsRdeNwK.d.cts} +1 -133
- package/dist/{entitlementRepository-DKdXFgTo.d.cts → branding-CsRdeNwK.d.ts} +1 -133
- package/dist/callCopy-DoQKG3-L.d.cts +40 -0
- package/dist/callCopy-DoQKG3-L.d.ts +40 -0
- package/dist/casesRepository-DwtZVsbj.d.cts +51 -0
- package/dist/casesRepository-v6QczS9N.d.ts +51 -0
- package/dist/chat/index.cjs +1 -1
- package/dist/chat/index.d.cts +9 -8
- package/dist/chat/index.d.ts +9 -8
- package/dist/chat/index.js +1 -1
- package/dist/client/index.cjs +5 -5
- package/dist/client/index.d.cts +10 -8
- package/dist/client/index.d.ts +10 -8
- package/dist/client/index.js +5 -5
- package/dist/{config-CzTZGlfF.d.cts → config--Wu1Umhd.d.cts} +2 -2
- package/dist/{config-DW60uRb9.d.ts → config-C7eb_IMD.d.ts} +2 -2
- package/dist/consent/index.cjs +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/consent/index.js +1 -1
- package/dist/{context-XvTzq1tE.d.cts → context-CL3lyuy1.d.cts} +6 -6
- package/dist/{context-DXhqHlPU.d.ts → context-CahAEha8.d.ts} +6 -6
- package/dist/{copy-Mjoo91aS.d.ts → copy-DdVFDL01.d.ts} +2 -2
- package/dist/{copy-bKDNigLb.d.cts → copy-UeUJVk8X.d.cts} +2 -2
- package/dist/core/index.cjs +7 -7
- package/dist/core/index.d.cts +118 -29
- package/dist/core/index.d.ts +118 -29
- package/dist/core/index.js +7 -7
- package/dist/{depth-CErXCU8J.d.cts → depth-D5HwcvKC.d.cts} +34 -3
- package/dist/{depth-DjDcJ6kH.d.ts → depth-DvPwPuT_.d.ts} +34 -3
- package/dist/entitlementRepository-B7egEdW6.d.ts +43 -0
- package/dist/entitlementRepository-BpJ7tiwl.d.cts +43 -0
- package/dist/{identity-DI4eVx9S.d.cts → identity-C2-08BZW.d.cts} +2 -2
- package/dist/{identity-BMx2SUOM.d.ts → identity-CEi9GRFZ.d.ts} +2 -2
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +17 -16
- package/dist/index.d.ts +17 -16
- package/dist/index.js +6 -6
- package/dist/notifications/index.cjs +2 -2
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +2 -2
- package/dist/optionalModule-DbJmsq5f.d.cts +21 -0
- package/dist/optionalModule-DbJmsq5f.d.ts +21 -0
- package/dist/{pets-CtQdRpWo.d.ts → pets-DJv2sj2H.d.ts} +1 -1
- package/dist/{pets-aB8q0JyX.d.cts → pets-JVCXgRgR.d.cts} +1 -1
- package/dist/{casesRepository-DHwtGRYY.d.cts → petsRepository-B_gKbAzJ.d.cts} +2 -48
- package/dist/{casesRepository-ClLv6qMl.d.ts → petsRepository-Bk6GDwLs.d.ts} +2 -48
- package/dist/photo/index.cjs +1 -1
- package/dist/photo/index.js +1 -1
- package/dist/{ports-DEBzEhbp.d.cts → ports-BY2ph0_y.d.cts} +5 -15
- package/dist/{ports-DMolTRzU.d.ts → ports-D7YW8qz9.d.ts} +5 -15
- package/dist/records/depth/index.cjs +2 -2
- package/dist/records/depth/index.d.cts +7 -7
- package/dist/records/depth/index.d.ts +7 -7
- package/dist/records/depth/index.js +2 -2
- package/dist/records/index.cjs +3 -3
- package/dist/records/index.d.cts +9 -9
- package/dist/records/index.d.ts +9 -9
- package/dist/records/index.js +3 -3
- package/dist/{requestFunnel-L-BQfi0z.d.cts → requestFunnel-BjDpqqvm.d.cts} +25 -2
- package/dist/{requestFunnel-CjW7uDuA.d.ts → requestFunnel-DFMGcluw.d.ts} +25 -2
- package/dist/{runtime-B8s-_hv8.d.cts → runtimeTypes-gZEJu-da.d.cts} +9 -99
- package/dist/{runtime-BR9ysG0J.d.ts → runtimeTypes-w5KqBMcs.d.ts} +9 -99
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.d.cts +2 -2
- package/dist/server/events/index.d.ts +2 -2
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/televet/booking/index.cjs +1 -0
- package/dist/televet/booking/index.d.cts +294 -0
- package/dist/televet/booking/index.d.ts +294 -0
- package/dist/televet/booking/index.js +1 -0
- package/dist/televet/call/index.cjs +1 -0
- package/dist/televet/call/index.d.cts +141 -0
- package/dist/televet/call/index.d.ts +141 -0
- package/dist/televet/call/index.js +1 -0
- package/dist/televet/index.cjs +1 -1
- package/dist/televet/index.d.cts +87 -5
- package/dist/televet/index.d.ts +87 -5
- package/dist/televet/index.js +1 -1
- package/dist/testing/index.cjs +3 -3
- package/dist/testing/index.d.cts +2 -2
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +3 -3
- package/dist/testing/rn/index.cjs +1 -1
- package/dist/testing/rn/index.d.cts +9 -8
- package/dist/testing/rn/index.d.ts +9 -8
- package/dist/testing/rn/index.js +1 -1
- package/dist/testing/web/index.cjs +1 -1
- package/dist/testing/web/index.d.cts +9 -8
- package/dist/testing/web/index.d.ts +9 -8
- package/dist/testing/web/index.js +1 -1
- package/dist/{timelineRows-DZed6dAM.d.ts → timelineRows-C15jxFFH.d.ts} +1 -1
- package/dist/{timelineRows-CaohZzXS.d.cts → timelineRows-odO8g9r2.d.cts} +1 -1
- package/dist/typeStyle-CKqVYD6L.d.cts +111 -0
- package/dist/typeStyle-DmoyacDG.d.ts +111 -0
- package/dist/{useRecordsDepth-BHBzJ76R.d.cts → useRecordsDepth-C6rjEaLn.d.cts} +1 -1
- package/dist/{useRecordsDepth-BU-OhzH6.d.ts → useRecordsDepth-crhBllQK.d.ts} +1 -1
- package/dist/video/index.cjs +1 -1
- package/dist/video/index.js +1 -1
- package/dist/{view-DtSPYpKa.d.ts → view-Bxwxp4xD.d.ts} +2 -2
- package/dist/{view-C3qPIXGX.d.cts → view-DyitEO0m.d.cts} +2 -2
- package/dist/web/consent/index.cjs +1 -1
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/consent/index.js +1 -1
- package/dist/web/index.cjs +7 -7
- package/dist/web/index.d.cts +18 -17
- package/dist/web/index.d.ts +18 -17
- package/dist/web/index.js +7 -7
- package/dist/web/notifications/index.cjs +2 -2
- package/dist/web/notifications/index.d.cts +3 -3
- package/dist/web/notifications/index.d.ts +3 -3
- package/dist/web/notifications/index.js +2 -2
- package/dist/web/records/depth/index.cjs +2 -2
- package/dist/web/records/depth/index.d.cts +7 -7
- package/dist/web/records/depth/index.d.ts +7 -7
- package/dist/web/records/depth/index.js +2 -2
- package/dist/web/records/index.cjs +3 -3
- package/dist/web/records/index.d.cts +102 -11
- package/dist/web/records/index.d.ts +102 -11
- package/dist/web/records/index.js +3 -3
- package/dist/web/televet/booking/index.cjs +1 -0
- package/dist/web/televet/booking/index.d.cts +349 -0
- package/dist/web/televet/booking/index.d.ts +349 -0
- package/dist/web/televet/booking/index.js +1 -0
- package/dist/web/televet/call/index.cjs +1 -0
- package/dist/web/televet/call/index.d.cts +142 -0
- package/dist/web/televet/call/index.d.ts +142 -0
- package/dist/web/televet/call/index.js +1 -0
- package/dist/web/televet/index.cjs +1 -1
- package/dist/web/televet/index.d.cts +90 -4
- package/dist/web/televet/index.d.ts +90 -4
- package/dist/web/televet/index.js +1 -1
- package/package.json +72 -4
- package/televet/booking/package.json +8 -0
- package/televet/call/package.json +8 -0
- package/web/televet/booking/native-blocked.cjs +12 -0
- package/web/televet/booking/package.json +8 -0
- package/web/televet/call/native-blocked.cjs +12 -0
- package/web/televet/call/package.json +8 -0
- package/dist/typeStyle-0TydiZ1w.d.cts +0 -19
- package/dist/typeStyle-CWMsoe6b.d.ts +0 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as EverfurResult, E as EverfurError } from './EverfurResult-DN9pL2Ab.cjs';
|
|
2
2
|
import { P as PetRef } from './ids-B2GAAifq.cjs';
|
|
3
|
-
import { R as RequestFunnel } from './requestFunnel-
|
|
4
|
-
import { A as AuthContext } from './identity-
|
|
3
|
+
import { R as RequestFunnel } from './requestFunnel-BjDpqqvm.cjs';
|
|
4
|
+
import { A as AuthContext } from './identity-C2-08BZW.cjs';
|
|
5
5
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort-CNf4uQZP.cjs';
|
|
6
6
|
import { d as RecordsRequestView, R as RecordDocumentMeta, a as RecordEntity } from './models-D2EUxPZY.cjs';
|
|
7
7
|
|
|
@@ -254,6 +254,27 @@ interface HttpRecordsRepositoryDeps {
|
|
|
254
254
|
readonly apiBaseUrl?: string;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
+
/**
|
|
258
|
+
* One file the member uploaded onto their own request.
|
|
259
|
+
*
|
|
260
|
+
* `fileName` is null for an upload made before the server kept the name (the schema says so), and a
|
|
261
|
+
* surface must then show the format, size and time on their own rather than inventing a title.
|
|
262
|
+
* `byteSize` and `receivedAt` are nullable for the same historical reason.
|
|
263
|
+
*/
|
|
264
|
+
interface RecordsRequestDocument {
|
|
265
|
+
/** The document's own id on the wire. Stable, and the list key. */
|
|
266
|
+
readonly sourceDocId: string;
|
|
267
|
+
readonly fileName: string | null;
|
|
268
|
+
readonly docFormat: string | null;
|
|
269
|
+
readonly byteSize: number | null;
|
|
270
|
+
/** ISO 8601, or null when the row carries no time. */
|
|
271
|
+
readonly receivedAt: string | null;
|
|
272
|
+
/** A presigned https GET the host opens itself. Never fetched with the bearer. */
|
|
273
|
+
readonly downloadUrl: string;
|
|
274
|
+
/** Seconds the signed URL stays good for, as the server minted it. */
|
|
275
|
+
readonly expiresInSeconds: number;
|
|
276
|
+
}
|
|
277
|
+
|
|
257
278
|
/** A freshly minted share link. `shareUrl` is shown once; the list read never repeats it. */
|
|
258
279
|
interface RecordShareLink {
|
|
259
280
|
readonly shareId: string;
|
|
@@ -493,10 +514,20 @@ interface RecordsDepthClient {
|
|
|
493
514
|
editFact(petRef: PetRef, input: RecordFactEditInput): Promise<EverfurResult<void>>;
|
|
494
515
|
/** Remove one fact from the owner-facing record (append-only reject; 409 when reviewer-decided). */
|
|
495
516
|
removeFact(petRef: PetRef, input: RecordFactRemoveInput): Promise<EverfurResult<void>>;
|
|
517
|
+
/**
|
|
518
|
+
* The files the member uploaded onto one of their own records requests, oldest first, each with a
|
|
519
|
+
* short-lived signed download.
|
|
520
|
+
*
|
|
521
|
+
* NOT GATED BY THE DEPTH SWITCH, unlike every other method on this client: the route bounds these
|
|
522
|
+
* on `records.record.read` and the pet's records consent only, because they are the member's OWN
|
|
523
|
+
* uploads rather than clinical depth. So a caller must NOT fold a 404 here to `available:false`
|
|
524
|
+
* and hide the member's files; a 404 means the request is not theirs.
|
|
525
|
+
*/
|
|
526
|
+
listRequestDocuments(requestId: string): Promise<EverfurResult<readonly RecordsRequestDocument[]>>;
|
|
496
527
|
/** The member's reusable signature gallery for the consent screen, newest first. */
|
|
497
528
|
listAuthorizationSignatures(): Promise<EverfurResult<readonly RecordsSignatureSuggestion[]>>;
|
|
498
529
|
}
|
|
499
530
|
/** The depth client, over the same auth, funnel and error policy as the records repository. */
|
|
500
531
|
declare function createRecordsDepthClient(deps: HttpRecordsRepositoryDeps): RecordsDepthClient;
|
|
501
532
|
|
|
502
|
-
export {
|
|
533
|
+
export { isFactReviewerLocked as $, RECORDS_CLINIC_BATCH_MAX as A, type RecordFactEditInput as B, type CreateClinicRequestBatchInput as C, type RecordFactRemoveInput as D, type RecordMarker as E, FACT_FIELD_BY_KIND as F, type RecordMarkerLatest as G, type HttpRecordsClinicRepositoryDeps as H, type RecordMarkerPoint as I, type RecordMarkerSummary as J, type RecordMarkersView as K, type RecordPdfLink as L, type RecordShare as M, type RecordShareLink as N, type RecordsAuthorizationSignature as O, type RecordsClinicBatch as P, type RecordsClinicBatchClient as Q, type RecordClinicianNote as R, type RecordsClinicBatchItem as S, type RecordsClinicBatchResult as T, type RecordsClinicTarget as U, type RecordsSignatureSuggestion as V, createRecordsClinicBatchClient as W, createRecordsDepthClient as X, factCorrectionFor as Y, factValueCorrection as Z, inferFactValueKind as _, type RecordClinicianNoteSection as a, mapRecordMarkers as a0, mapRecordPdfLink as a1, mapRecordShareLink as a2, mapRecordShareList as a3, mapSignatureSuggestions as a4, resolveShareUrl as a5, type RecordsClinicSearchInput as a6, type RecordsClinicSearchPage as a7, type RecordsRecentClinicsInput as a8, type RecordsAuthorizationCopy as a9, type CreateClinicRequestInput as aa, type RecordsSignatureUploadPolicy as ab, type RecordCompleteness as b, type RecordConflict as c, type RecordConflictCandidate as d, type RecordDepthView as e, type RecordDocumentContributionsView as f, type RecordEncounter as g, type RecordExamSystem as h, type RecordLabMarker as i, type RecordLabPoint as j, type RecordPhysicalExam as k, type RecordsClinic as l, type RecordsDepthClient as m, type RecordsRequestDocument as n, type RecordsTimelineMedication as o, type RecordsTimelineVaccine as p, type RecordsTimelineView as q, type RecordsTimelineVisit as r, type RecordsTimelineWeight as s, mapDocumentContributions as t, mapRecordDepth as u, mapRecordsTimeline as v, FACT_VALUE_FIELD as w, type FactFieldValue as x, type FactValueKind as y, type HttpRecordsRepositoryDeps as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as EverfurResult, E as EverfurError } from './EverfurResult-DN9pL2Ab.js';
|
|
2
2
|
import { P as PetRef } from './ids-B2GAAifq.js';
|
|
3
|
-
import { R as RequestFunnel } from './requestFunnel-
|
|
4
|
-
import { A as AuthContext } from './identity-
|
|
3
|
+
import { R as RequestFunnel } from './requestFunnel-DFMGcluw.js';
|
|
4
|
+
import { A as AuthContext } from './identity-CEi9GRFZ.js';
|
|
5
5
|
import { E as ErrorPolicyPort } from './ErrorPolicyPort-CwbfmxzJ.js';
|
|
6
6
|
import { d as RecordsRequestView, R as RecordDocumentMeta, a as RecordEntity } from './models-B-Uh2LTf.js';
|
|
7
7
|
|
|
@@ -254,6 +254,27 @@ interface HttpRecordsRepositoryDeps {
|
|
|
254
254
|
readonly apiBaseUrl?: string;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
+
/**
|
|
258
|
+
* One file the member uploaded onto their own request.
|
|
259
|
+
*
|
|
260
|
+
* `fileName` is null for an upload made before the server kept the name (the schema says so), and a
|
|
261
|
+
* surface must then show the format, size and time on their own rather than inventing a title.
|
|
262
|
+
* `byteSize` and `receivedAt` are nullable for the same historical reason.
|
|
263
|
+
*/
|
|
264
|
+
interface RecordsRequestDocument {
|
|
265
|
+
/** The document's own id on the wire. Stable, and the list key. */
|
|
266
|
+
readonly sourceDocId: string;
|
|
267
|
+
readonly fileName: string | null;
|
|
268
|
+
readonly docFormat: string | null;
|
|
269
|
+
readonly byteSize: number | null;
|
|
270
|
+
/** ISO 8601, or null when the row carries no time. */
|
|
271
|
+
readonly receivedAt: string | null;
|
|
272
|
+
/** A presigned https GET the host opens itself. Never fetched with the bearer. */
|
|
273
|
+
readonly downloadUrl: string;
|
|
274
|
+
/** Seconds the signed URL stays good for, as the server minted it. */
|
|
275
|
+
readonly expiresInSeconds: number;
|
|
276
|
+
}
|
|
277
|
+
|
|
257
278
|
/** A freshly minted share link. `shareUrl` is shown once; the list read never repeats it. */
|
|
258
279
|
interface RecordShareLink {
|
|
259
280
|
readonly shareId: string;
|
|
@@ -493,10 +514,20 @@ interface RecordsDepthClient {
|
|
|
493
514
|
editFact(petRef: PetRef, input: RecordFactEditInput): Promise<EverfurResult<void>>;
|
|
494
515
|
/** Remove one fact from the owner-facing record (append-only reject; 409 when reviewer-decided). */
|
|
495
516
|
removeFact(petRef: PetRef, input: RecordFactRemoveInput): Promise<EverfurResult<void>>;
|
|
517
|
+
/**
|
|
518
|
+
* The files the member uploaded onto one of their own records requests, oldest first, each with a
|
|
519
|
+
* short-lived signed download.
|
|
520
|
+
*
|
|
521
|
+
* NOT GATED BY THE DEPTH SWITCH, unlike every other method on this client: the route bounds these
|
|
522
|
+
* on `records.record.read` and the pet's records consent only, because they are the member's OWN
|
|
523
|
+
* uploads rather than clinical depth. So a caller must NOT fold a 404 here to `available:false`
|
|
524
|
+
* and hide the member's files; a 404 means the request is not theirs.
|
|
525
|
+
*/
|
|
526
|
+
listRequestDocuments(requestId: string): Promise<EverfurResult<readonly RecordsRequestDocument[]>>;
|
|
496
527
|
/** The member's reusable signature gallery for the consent screen, newest first. */
|
|
497
528
|
listAuthorizationSignatures(): Promise<EverfurResult<readonly RecordsSignatureSuggestion[]>>;
|
|
498
529
|
}
|
|
499
530
|
/** The depth client, over the same auth, funnel and error policy as the records repository. */
|
|
500
531
|
declare function createRecordsDepthClient(deps: HttpRecordsRepositoryDeps): RecordsDepthClient;
|
|
501
532
|
|
|
502
|
-
export {
|
|
533
|
+
export { isFactReviewerLocked as $, RECORDS_CLINIC_BATCH_MAX as A, type RecordFactEditInput as B, type CreateClinicRequestBatchInput as C, type RecordFactRemoveInput as D, type RecordMarker as E, FACT_FIELD_BY_KIND as F, type RecordMarkerLatest as G, type HttpRecordsClinicRepositoryDeps as H, type RecordMarkerPoint as I, type RecordMarkerSummary as J, type RecordMarkersView as K, type RecordPdfLink as L, type RecordShare as M, type RecordShareLink as N, type RecordsAuthorizationSignature as O, type RecordsClinicBatch as P, type RecordsClinicBatchClient as Q, type RecordClinicianNote as R, type RecordsClinicBatchItem as S, type RecordsClinicBatchResult as T, type RecordsClinicTarget as U, type RecordsSignatureSuggestion as V, createRecordsClinicBatchClient as W, createRecordsDepthClient as X, factCorrectionFor as Y, factValueCorrection as Z, inferFactValueKind as _, type RecordClinicianNoteSection as a, mapRecordMarkers as a0, mapRecordPdfLink as a1, mapRecordShareLink as a2, mapRecordShareList as a3, mapSignatureSuggestions as a4, resolveShareUrl as a5, type RecordsClinicSearchInput as a6, type RecordsClinicSearchPage as a7, type RecordsRecentClinicsInput as a8, type RecordsAuthorizationCopy as a9, type CreateClinicRequestInput as aa, type RecordsSignatureUploadPolicy as ab, type RecordCompleteness as b, type RecordConflict as c, type RecordConflictCandidate as d, type RecordDepthView as e, type RecordDocumentContributionsView as f, type RecordEncounter as g, type RecordExamSystem as h, type RecordLabMarker as i, type RecordLabPoint as j, type RecordPhysicalExam as k, type RecordsClinic as l, type RecordsDepthClient as m, type RecordsRequestDocument as n, type RecordsTimelineMedication as o, type RecordsTimelineVaccine as p, type RecordsTimelineView as q, type RecordsTimelineVisit as r, type RecordsTimelineWeight as s, mapDocumentContributions as t, mapRecordDepth as u, mapRecordsTimeline as v, FACT_VALUE_FIELD as w, type FactFieldValue as x, type FactValueKind as y, type HttpRecordsRepositoryDeps as z };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { E as EverfurError } from './EverfurResult-DN9pL2Ab.js';
|
|
2
|
+
import { R as RequestFunnel } from './requestFunnel-DFMGcluw.js';
|
|
3
|
+
import { A as AuthContext } from './identity-CEi9GRFZ.js';
|
|
4
|
+
import { C as ClientBranding } from './branding-CsRdeNwK.js';
|
|
5
|
+
import { E as EntitlementDecision } from './resolve-D4Ywz5OS.js';
|
|
6
|
+
|
|
7
|
+
/** The conditional-GET endpoint (SPEC-00 §5.3). Relative; the transport prefixes the resolved base URL. */
|
|
8
|
+
declare const ENTITLEMENTS_PATH = "/widget/v1/entitlements";
|
|
9
|
+
/**
|
|
10
|
+
* The settled outcome of one entitlement fetch. `updated` carries a fresh verdict + the cadence to re-poll on;
|
|
11
|
+
* `notModified` means the cached verdict still holds; `failed` carries a normalized error and means keep-last.
|
|
12
|
+
*/
|
|
13
|
+
type EntitlementResolution = {
|
|
14
|
+
readonly kind: 'updated';
|
|
15
|
+
readonly revision: number;
|
|
16
|
+
readonly region: string;
|
|
17
|
+
readonly ttlSeconds: number;
|
|
18
|
+
readonly decisions: readonly EntitlementDecision[];
|
|
19
|
+
/**
|
|
20
|
+
* Server-driven branding parsed from the SAME 200 body's render_hints (orthogonal to capabilities).
|
|
21
|
+
* null when absent or unparseable (fail-closed -> the compiled Everfur default theme). OPTIONAL so a
|
|
22
|
+
* hand-built resolution (tests / injected resolve) need not supply it.
|
|
23
|
+
*/
|
|
24
|
+
readonly branding?: ClientBranding | null;
|
|
25
|
+
} | {
|
|
26
|
+
readonly kind: 'notModified';
|
|
27
|
+
} | {
|
|
28
|
+
readonly kind: 'failed';
|
|
29
|
+
readonly error: EverfurError;
|
|
30
|
+
};
|
|
31
|
+
interface FetchEntitlementsArgs {
|
|
32
|
+
/** The revision we last stored; echoed as If-None-Match so an unchanged verdict returns 304. */
|
|
33
|
+
readonly cachedRevision?: number | null;
|
|
34
|
+
/** Optional region hint; forwarded as ?region. */
|
|
35
|
+
readonly region?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Fetch the server-resolved entitlement verdict once. Never throws: a 304, a domain error, a network reject,
|
|
39
|
+
* and a malformed body all SETTLE to an EntitlementResolution. Fail-closed on every non-`updated` path.
|
|
40
|
+
*/
|
|
41
|
+
declare function fetchEntitlements(auth: AuthContext, args?: FetchEntitlementsArgs, funnel?: RequestFunnel): Promise<EntitlementResolution>;
|
|
42
|
+
|
|
43
|
+
export { ENTITLEMENTS_PATH as E, type FetchEntitlementsArgs as F, type EntitlementResolution as a, fetchEntitlements as f };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { E as EverfurError } from './EverfurResult-DN9pL2Ab.cjs';
|
|
2
|
+
import { R as RequestFunnel } from './requestFunnel-BjDpqqvm.cjs';
|
|
3
|
+
import { A as AuthContext } from './identity-C2-08BZW.cjs';
|
|
4
|
+
import { C as ClientBranding } from './branding-CsRdeNwK.cjs';
|
|
5
|
+
import { E as EntitlementDecision } from './resolve-D4Ywz5OS.cjs';
|
|
6
|
+
|
|
7
|
+
/** The conditional-GET endpoint (SPEC-00 §5.3). Relative; the transport prefixes the resolved base URL. */
|
|
8
|
+
declare const ENTITLEMENTS_PATH = "/widget/v1/entitlements";
|
|
9
|
+
/**
|
|
10
|
+
* The settled outcome of one entitlement fetch. `updated` carries a fresh verdict + the cadence to re-poll on;
|
|
11
|
+
* `notModified` means the cached verdict still holds; `failed` carries a normalized error and means keep-last.
|
|
12
|
+
*/
|
|
13
|
+
type EntitlementResolution = {
|
|
14
|
+
readonly kind: 'updated';
|
|
15
|
+
readonly revision: number;
|
|
16
|
+
readonly region: string;
|
|
17
|
+
readonly ttlSeconds: number;
|
|
18
|
+
readonly decisions: readonly EntitlementDecision[];
|
|
19
|
+
/**
|
|
20
|
+
* Server-driven branding parsed from the SAME 200 body's render_hints (orthogonal to capabilities).
|
|
21
|
+
* null when absent or unparseable (fail-closed -> the compiled Everfur default theme). OPTIONAL so a
|
|
22
|
+
* hand-built resolution (tests / injected resolve) need not supply it.
|
|
23
|
+
*/
|
|
24
|
+
readonly branding?: ClientBranding | null;
|
|
25
|
+
} | {
|
|
26
|
+
readonly kind: 'notModified';
|
|
27
|
+
} | {
|
|
28
|
+
readonly kind: 'failed';
|
|
29
|
+
readonly error: EverfurError;
|
|
30
|
+
};
|
|
31
|
+
interface FetchEntitlementsArgs {
|
|
32
|
+
/** The revision we last stored; echoed as If-None-Match so an unchanged verdict returns 304. */
|
|
33
|
+
readonly cachedRevision?: number | null;
|
|
34
|
+
/** Optional region hint; forwarded as ?region. */
|
|
35
|
+
readonly region?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Fetch the server-resolved entitlement verdict once. Never throws: a 304, a domain error, a network reject,
|
|
39
|
+
* and a malformed body all SETTLE to an EntitlementResolution. Fail-closed on every non-`updated` path.
|
|
40
|
+
*/
|
|
41
|
+
declare function fetchEntitlements(auth: AuthContext, args?: FetchEntitlementsArgs, funnel?: RequestFunnel): Promise<EntitlementResolution>;
|
|
42
|
+
|
|
43
|
+
export { ENTITLEMENTS_PATH as E, type FetchEntitlementsArgs as F, type EntitlementResolution as a, fetchEntitlements as f };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as EverfurResult } from './EverfurResult-DN9pL2Ab.cjs';
|
|
2
2
|
import { U as UserRef } from './ids-B2GAAifq.cjs';
|
|
3
|
-
import { T as TransportPort, d as EverfurRequest } from './config
|
|
3
|
+
import { T as TransportPort, d as EverfurRequest } from './config--Wu1Umhd.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* A minted session token with the expiry the minter knows. `expiresAt` is what `mintPartnerSession` returns
|
|
@@ -55,7 +55,7 @@ type DeviceAuth = {
|
|
|
55
55
|
* caller it is not: the widget context derives the identity from it (`user_ref = f"anon-{session_id}"`), so
|
|
56
56
|
* without a stable value every request is a different user. `POST /conversations` creates the thread under
|
|
57
57
|
* one identity and the very next `POST /conversations/{id}/messages` is resolved as another, the ownership
|
|
58
|
-
* check misses, and the send settles `conversationNotFound
|
|
58
|
+
* check misses, and the send settles `conversationNotFound`, every time. Each attempt also inserts a junk
|
|
59
59
|
* virtual-user row and consumes the per-IP anonymous-creation budget.
|
|
60
60
|
*
|
|
61
61
|
* The format is load-bearing: the server matches `^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as EverfurResult } from './EverfurResult-DN9pL2Ab.js';
|
|
2
2
|
import { U as UserRef } from './ids-B2GAAifq.js';
|
|
3
|
-
import { T as TransportPort, d as EverfurRequest } from './config-
|
|
3
|
+
import { T as TransportPort, d as EverfurRequest } from './config-C7eb_IMD.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* A minted session token with the expiry the minter knows. `expiresAt` is what `mintPartnerSession` returns
|
|
@@ -55,7 +55,7 @@ type DeviceAuth = {
|
|
|
55
55
|
* caller it is not: the widget context derives the identity from it (`user_ref = f"anon-{session_id}"`), so
|
|
56
56
|
* without a stable value every request is a different user. `POST /conversations` creates the thread under
|
|
57
57
|
* one identity and the very next `POST /conversations/{id}/messages` is resolved as another, the ownership
|
|
58
|
-
* check misses, and the send settles `conversationNotFound
|
|
58
|
+
* check misses, and the send settles `conversationNotFound`, every time. Each attempt also inserts a junk
|
|
59
59
|
* virtual-user row and consumes the per-IP anonymous-creation budget.
|
|
60
60
|
*
|
|
61
61
|
* The format is load-bearing: the server matches `^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$`
|