@everfur/sdk 0.1.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 +74 -0
- package/LICENSE +21 -0
- package/README.md +161 -0
- package/animations/package.json +8 -0
- package/chat/package.json +8 -0
- package/client/package.json +8 -0
- package/core/package.json +8 -0
- package/dist/CameraPort-Cv31Pz7g.d.cts +29 -0
- package/dist/CameraPort-Cv31Pz7g.d.ts +29 -0
- package/dist/ChatController-CKdBvPj2.d.ts +146 -0
- package/dist/ChatController-CpUMvvZf.d.cts +146 -0
- package/dist/EverfurResult-D92-uL82.d.cts +240 -0
- package/dist/EverfurResult-D92-uL82.d.ts +240 -0
- package/dist/FilePort-BabWrv7I.d.cts +22 -0
- package/dist/FilePort-BabWrv7I.d.ts +22 -0
- package/dist/PhotoController-BItt5M7u.d.cts +43 -0
- package/dist/PhotoController-D8zMTdcW.d.ts +43 -0
- package/dist/TelemetryPort-BDNr00hu.d.cts +12 -0
- package/dist/TelemetryPort-BDNr00hu.d.ts +12 -0
- package/dist/animations/index.cjs +1997 -0
- package/dist/animations/index.d.cts +517 -0
- package/dist/animations/index.d.ts +517 -0
- package/dist/animations/index.js +1972 -0
- package/dist/cacheEpoch-DknKn3S0.d.cts +36 -0
- package/dist/cacheEpoch-DknKn3S0.d.ts +36 -0
- package/dist/chat/index.cjs +1170 -0
- package/dist/chat/index.d.cts +59 -0
- package/dist/chat/index.d.ts +59 -0
- package/dist/chat/index.js +1167 -0
- package/dist/client/index.cjs +2317 -0
- package/dist/client/index.d.cts +65 -0
- package/dist/client/index.d.ts +65 -0
- package/dist/client/index.js +2217 -0
- package/dist/config-BSjBdxrZ.d.cts +501 -0
- package/dist/config-CiJ0PVBB.d.ts +501 -0
- package/dist/core/index.cjs +3175 -0
- package/dist/core/index.d.cts +70 -0
- package/dist/core/index.d.ts +70 -0
- package/dist/core/index.js +3163 -0
- package/dist/identity-Brl-lDd6.d.cts +91 -0
- package/dist/identity-DK9zORrG.d.ts +91 -0
- package/dist/ids-CJ1S6adf.d.cts +46 -0
- package/dist/ids-CJ1S6adf.d.ts +46 -0
- package/dist/index.cjs +4488 -0
- package/dist/index.d.cts +156 -0
- package/dist/index.d.ts +156 -0
- package/dist/index.js +4464 -0
- package/dist/petsRepository-BEGb97M9.d.cts +326 -0
- package/dist/petsRepository-Bu18r2kK.d.ts +326 -0
- package/dist/photo/index.cjs +2189 -0
- package/dist/photo/index.d.cts +43 -0
- package/dist/photo/index.d.ts +43 -0
- package/dist/photo/index.js +2186 -0
- package/dist/projection-CeIUsbSk.d.cts +8 -0
- package/dist/projection-CeIUsbSk.d.ts +8 -0
- package/dist/records/index.cjs +2840 -0
- package/dist/records/index.d.cts +224 -0
- package/dist/records/index.d.ts +224 -0
- package/dist/records/index.js +2834 -0
- package/dist/requestFunnel-DuUH-kAe.d.cts +28 -0
- package/dist/requestFunnel-dio5OmR9.d.ts +28 -0
- package/dist/resolve-Dq_4_agU.d.cts +86 -0
- package/dist/resolve-Dq_4_agU.d.ts +86 -0
- package/dist/runtime-BgQnA594.d.cts +349 -0
- package/dist/runtime-CBA-LvdM.d.ts +349 -0
- package/dist/server/index.cjs +533 -0
- package/dist/server/index.d.cts +48 -0
- package/dist/server/index.d.ts +48 -0
- package/dist/server/index.js +530 -0
- package/dist/testing/index.cjs +825 -0
- package/dist/testing/index.d.cts +113 -0
- package/dist/testing/index.d.ts +113 -0
- package/dist/testing/index.js +822 -0
- package/dist/testing/rn/index.cjs +449 -0
- package/dist/testing/rn/index.d.cts +49 -0
- package/dist/testing/rn/index.d.ts +49 -0
- package/dist/testing/rn/index.js +444 -0
- package/dist/video/index.cjs +1941 -0
- package/dist/video/index.d.cts +66 -0
- package/dist/video/index.d.ts +66 -0
- package/dist/video/index.js +1938 -0
- package/package.json +311 -0
- package/photo/package.json +8 -0
- package/records/package.json +8 -0
- package/server/device-blocked.cjs +15 -0
- package/server/package.json +9 -0
- package/testing/package.json +8 -0
- package/testing/rn/package.json +8 -0
- package/video/package.json +8 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { E as EverfurResult } from './EverfurResult-D92-uL82.cjs';
|
|
2
|
+
import { U as UserRef } from './ids-CJ1S6adf.cjs';
|
|
3
|
+
import { T as TransportPort, E as EverfurRequest } from './config-BSjBdxrZ.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Supplies a session token. The partner-backend implementation hits POST /widget/v1/sessions and returns the
|
|
7
|
+
* session_token; it always mints fresh. The SDK caches the result in IdentityProvider memory. (SPEC-00 4.3.)
|
|
8
|
+
*/
|
|
9
|
+
type TokenProvider = () => Promise<string>;
|
|
10
|
+
interface IdentityProvider {
|
|
11
|
+
readonly userRef: UserRef | null;
|
|
12
|
+
/** Lazily mints on first call and caches in memory. forceRefresh drops the cache and re-mints. */
|
|
13
|
+
currentToken(opts?: {
|
|
14
|
+
readonly forceRefresh?: boolean;
|
|
15
|
+
}): Promise<string>;
|
|
16
|
+
hasToken(): boolean;
|
|
17
|
+
/** Drop the cached bearer (user switch / logout) so a stale token is never sent post-switch. */
|
|
18
|
+
clear(): void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Memory-only identity. The token is NEVER written through KvPort or to disk (SPEC-00 4.3, identity.dart
|
|
22
|
+
* 12,47-57). Concurrent callers share one in-flight mint so a burst of authed requests mints exactly once.
|
|
23
|
+
*/
|
|
24
|
+
declare function createIdentityProvider(userRef: UserRef, getToken: TokenProvider): IdentityProvider;
|
|
25
|
+
type DeviceAuth = {
|
|
26
|
+
readonly mode: 'personalized';
|
|
27
|
+
readonly token: string;
|
|
28
|
+
readonly userRef: UserRef | null;
|
|
29
|
+
readonly sessionId?: string;
|
|
30
|
+
} | {
|
|
31
|
+
readonly mode: 'anonymous';
|
|
32
|
+
readonly publishableKey: string;
|
|
33
|
+
readonly userRef: UserRef | null;
|
|
34
|
+
readonly sessionId?: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* A v4 UUID for `x-everfur-session-id`, minted ONCE per runtime.
|
|
38
|
+
*
|
|
39
|
+
* WHY THIS EXISTS, and why the header is not optional in practice. The server's own helper documents the
|
|
40
|
+
* header as "optional ... solely for analytics correlation", and when it is absent or not a strict v4 it
|
|
41
|
+
* substitutes `str(uuid.uuid4())` PER REQUEST. For a personalized caller that is harmless. For an ANONYMOUS
|
|
42
|
+
* caller it is not: the widget context derives the identity from it (`user_ref = f"anon-{session_id}"`), so
|
|
43
|
+
* without a stable value every request is a different user. `POST /conversations` creates the thread under
|
|
44
|
+
* one identity and the very next `POST /conversations/{id}/messages` is resolved as another, the ownership
|
|
45
|
+
* check misses, and the send settles `conversationNotFound` — every time. Each attempt also inserts a junk
|
|
46
|
+
* virtual-user row and consumes the per-IP anonymous-creation budget.
|
|
47
|
+
*
|
|
48
|
+
* 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}$`
|
|
49
|
+
* and SILENTLY replaces anything else, so a merely-random string would fail exactly as an absent one does.
|
|
50
|
+
*/
|
|
51
|
+
declare function newSessionId(): string;
|
|
52
|
+
/**
|
|
53
|
+
* Build the auth headers for ONE device request. Personalized -> Authorization: Bearer alone. Anonymous ->
|
|
54
|
+
* x-everfur-partner-key alone. NEVER both (both on one device request trips a 403 edge deny). x-everfur-user-ref
|
|
55
|
+
* is attached when a user is set.
|
|
56
|
+
*/
|
|
57
|
+
declare function authHeaders(auth: DeviceAuth): Record<string, string>;
|
|
58
|
+
/** Apply auth headers, stripping any partner-supplied auth header so the SDK is the sole authority. */
|
|
59
|
+
declare function withAuthHeaders(req: EverfurRequest, auth: DeviceAuth): EverfurRequest;
|
|
60
|
+
type AuthContext = {
|
|
61
|
+
readonly mode: 'personalized';
|
|
62
|
+
readonly transport: TransportPort;
|
|
63
|
+
readonly identity: IdentityProvider;
|
|
64
|
+
readonly userRef: UserRef | null;
|
|
65
|
+
/** Stable per runtime; see `newSessionId`. REQUIRED: an omission silently breaks anonymous identity. */
|
|
66
|
+
readonly sessionId: string;
|
|
67
|
+
} | {
|
|
68
|
+
readonly mode: 'anonymous';
|
|
69
|
+
readonly transport: TransportPort;
|
|
70
|
+
readonly publishableKey: string;
|
|
71
|
+
readonly userRef: UserRef | null;
|
|
72
|
+
/**
|
|
73
|
+
* Stable per runtime; see `newSessionId`. REQUIRED, not optional.
|
|
74
|
+
*
|
|
75
|
+
* `AuthContext` is exported from the public `@everfur/sdk/client` subpath and three factories take one
|
|
76
|
+
* from the caller (`createPetsRepository`, `createHttpRecordsRepository`, `fetchEntitlements`). While
|
|
77
|
+
* this was optional, building a literal without it type-checked, compiled, and silently reintroduced
|
|
78
|
+
* the defect where every anonymous request resolves as a NEW server-side user. Making it required
|
|
79
|
+
* means `tsc` catches every omission instead.
|
|
80
|
+
*/
|
|
81
|
+
readonly sessionId: string;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Send a unary request with device auth. Anonymous mode carries pk alone (no refresh path, no token).
|
|
85
|
+
* Personalized mode carries the bearer; on a 401 it re-mints once via TokenProvider(forceRefresh) and replays
|
|
86
|
+
* the original request EXACTLY once. A second 401, or a failed re-mint, surfaces terminal authRejected (not
|
|
87
|
+
* auto-retried). A 403 is distinct and is returned as-is (never a sign-out, never a refresh).
|
|
88
|
+
*/
|
|
89
|
+
declare function authedSend<T>(req: EverfurRequest, ctx: AuthContext): Promise<EverfurResult<T>>;
|
|
90
|
+
|
|
91
|
+
export { type AuthContext as A, type DeviceAuth as D, type IdentityProvider as I, type TokenProvider as T, authHeaders as a, authedSend as b, createIdentityProvider as c, newSessionId as n, withAuthHeaders as w };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { E as EverfurResult } from './EverfurResult-D92-uL82.js';
|
|
2
|
+
import { U as UserRef } from './ids-CJ1S6adf.js';
|
|
3
|
+
import { T as TransportPort, E as EverfurRequest } from './config-CiJ0PVBB.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Supplies a session token. The partner-backend implementation hits POST /widget/v1/sessions and returns the
|
|
7
|
+
* session_token; it always mints fresh. The SDK caches the result in IdentityProvider memory. (SPEC-00 4.3.)
|
|
8
|
+
*/
|
|
9
|
+
type TokenProvider = () => Promise<string>;
|
|
10
|
+
interface IdentityProvider {
|
|
11
|
+
readonly userRef: UserRef | null;
|
|
12
|
+
/** Lazily mints on first call and caches in memory. forceRefresh drops the cache and re-mints. */
|
|
13
|
+
currentToken(opts?: {
|
|
14
|
+
readonly forceRefresh?: boolean;
|
|
15
|
+
}): Promise<string>;
|
|
16
|
+
hasToken(): boolean;
|
|
17
|
+
/** Drop the cached bearer (user switch / logout) so a stale token is never sent post-switch. */
|
|
18
|
+
clear(): void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Memory-only identity. The token is NEVER written through KvPort or to disk (SPEC-00 4.3, identity.dart
|
|
22
|
+
* 12,47-57). Concurrent callers share one in-flight mint so a burst of authed requests mints exactly once.
|
|
23
|
+
*/
|
|
24
|
+
declare function createIdentityProvider(userRef: UserRef, getToken: TokenProvider): IdentityProvider;
|
|
25
|
+
type DeviceAuth = {
|
|
26
|
+
readonly mode: 'personalized';
|
|
27
|
+
readonly token: string;
|
|
28
|
+
readonly userRef: UserRef | null;
|
|
29
|
+
readonly sessionId?: string;
|
|
30
|
+
} | {
|
|
31
|
+
readonly mode: 'anonymous';
|
|
32
|
+
readonly publishableKey: string;
|
|
33
|
+
readonly userRef: UserRef | null;
|
|
34
|
+
readonly sessionId?: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* A v4 UUID for `x-everfur-session-id`, minted ONCE per runtime.
|
|
38
|
+
*
|
|
39
|
+
* WHY THIS EXISTS, and why the header is not optional in practice. The server's own helper documents the
|
|
40
|
+
* header as "optional ... solely for analytics correlation", and when it is absent or not a strict v4 it
|
|
41
|
+
* substitutes `str(uuid.uuid4())` PER REQUEST. For a personalized caller that is harmless. For an ANONYMOUS
|
|
42
|
+
* caller it is not: the widget context derives the identity from it (`user_ref = f"anon-{session_id}"`), so
|
|
43
|
+
* without a stable value every request is a different user. `POST /conversations` creates the thread under
|
|
44
|
+
* one identity and the very next `POST /conversations/{id}/messages` is resolved as another, the ownership
|
|
45
|
+
* check misses, and the send settles `conversationNotFound` — every time. Each attempt also inserts a junk
|
|
46
|
+
* virtual-user row and consumes the per-IP anonymous-creation budget.
|
|
47
|
+
*
|
|
48
|
+
* 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}$`
|
|
49
|
+
* and SILENTLY replaces anything else, so a merely-random string would fail exactly as an absent one does.
|
|
50
|
+
*/
|
|
51
|
+
declare function newSessionId(): string;
|
|
52
|
+
/**
|
|
53
|
+
* Build the auth headers for ONE device request. Personalized -> Authorization: Bearer alone. Anonymous ->
|
|
54
|
+
* x-everfur-partner-key alone. NEVER both (both on one device request trips a 403 edge deny). x-everfur-user-ref
|
|
55
|
+
* is attached when a user is set.
|
|
56
|
+
*/
|
|
57
|
+
declare function authHeaders(auth: DeviceAuth): Record<string, string>;
|
|
58
|
+
/** Apply auth headers, stripping any partner-supplied auth header so the SDK is the sole authority. */
|
|
59
|
+
declare function withAuthHeaders(req: EverfurRequest, auth: DeviceAuth): EverfurRequest;
|
|
60
|
+
type AuthContext = {
|
|
61
|
+
readonly mode: 'personalized';
|
|
62
|
+
readonly transport: TransportPort;
|
|
63
|
+
readonly identity: IdentityProvider;
|
|
64
|
+
readonly userRef: UserRef | null;
|
|
65
|
+
/** Stable per runtime; see `newSessionId`. REQUIRED: an omission silently breaks anonymous identity. */
|
|
66
|
+
readonly sessionId: string;
|
|
67
|
+
} | {
|
|
68
|
+
readonly mode: 'anonymous';
|
|
69
|
+
readonly transport: TransportPort;
|
|
70
|
+
readonly publishableKey: string;
|
|
71
|
+
readonly userRef: UserRef | null;
|
|
72
|
+
/**
|
|
73
|
+
* Stable per runtime; see `newSessionId`. REQUIRED, not optional.
|
|
74
|
+
*
|
|
75
|
+
* `AuthContext` is exported from the public `@everfur/sdk/client` subpath and three factories take one
|
|
76
|
+
* from the caller (`createPetsRepository`, `createHttpRecordsRepository`, `fetchEntitlements`). While
|
|
77
|
+
* this was optional, building a literal without it type-checked, compiled, and silently reintroduced
|
|
78
|
+
* the defect where every anonymous request resolves as a NEW server-side user. Making it required
|
|
79
|
+
* means `tsc` catches every omission instead.
|
|
80
|
+
*/
|
|
81
|
+
readonly sessionId: string;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Send a unary request with device auth. Anonymous mode carries pk alone (no refresh path, no token).
|
|
85
|
+
* Personalized mode carries the bearer; on a 401 it re-mints once via TokenProvider(forceRefresh) and replays
|
|
86
|
+
* the original request EXACTLY once. A second 401, or a failed re-mint, surfaces terminal authRejected (not
|
|
87
|
+
* auto-retried). A 403 is distinct and is returned as-is (never a sign-out, never a refresh).
|
|
88
|
+
*/
|
|
89
|
+
declare function authedSend<T>(req: EverfurRequest, ctx: AuthContext): Promise<EverfurResult<T>>;
|
|
90
|
+
|
|
91
|
+
export { type AuthContext as A, type DeviceAuth as D, type IdentityProvider as I, type TokenProvider as T, authHeaders as a, authedSend as b, createIdentityProvider as c, newSessionId as n, withAuthHeaders as w };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** Compile-time-only brand. Zero runtime cost; a raw string cannot flow into an id slot. */
|
|
2
|
+
declare const __brand: unique symbol;
|
|
3
|
+
type Brand<T, B extends string> = T & {
|
|
4
|
+
readonly [__brand]: B;
|
|
5
|
+
};
|
|
6
|
+
type PetRef = Brand<string, 'PetRef'>;
|
|
7
|
+
type UserRef = Brand<string, 'UserRef'>;
|
|
8
|
+
type ConversationId = Brand<string, 'ConversationId'>;
|
|
9
|
+
type ResponseId = Brand<string, 'ResponseId'>;
|
|
10
|
+
type ClientId = Brand<string, 'ClientId'>;
|
|
11
|
+
type DocumentId = Brand<string, 'DocumentId'>;
|
|
12
|
+
type JobId = Brand<string, 'JobId'>;
|
|
13
|
+
type RecordsRequestId = Brand<string, 'RecordsRequestId'>;
|
|
14
|
+
/**
|
|
15
|
+
* Validating constructor for a partner-supplied pet id. Crosses the value at the adapter boundary.
|
|
16
|
+
* @throws {EverfurConfigError} synchronously on an empty, over-long, or non-printable id (programmer error).
|
|
17
|
+
*/
|
|
18
|
+
declare function petRef(raw: string): PetRef;
|
|
19
|
+
/**
|
|
20
|
+
* Validating constructor for a partner-supplied end-user id (becomes x-everfur-user-ref).
|
|
21
|
+
* @throws {EverfurConfigError} synchronously on empty, over-long, containing '@', or non-printable.
|
|
22
|
+
*/
|
|
23
|
+
declare function userRef(raw: string): UserRef;
|
|
24
|
+
/**
|
|
25
|
+
* Validating constructor for a server-owned conversation id.
|
|
26
|
+
* @throws {EverfurConfigError} synchronously if `raw` is not a UUID (programmer error).
|
|
27
|
+
*/
|
|
28
|
+
declare function conversationId(raw: string): ConversationId;
|
|
29
|
+
/** Unchecked. For the response-mapper boundary where the value is already trusted. Adapters only. */
|
|
30
|
+
declare function unsafePetRef(raw: string): PetRef;
|
|
31
|
+
/** Unchecked. For the response-mapper boundary where the value is already trusted. Adapters only. */
|
|
32
|
+
declare function unsafeUserRef(raw: string): UserRef;
|
|
33
|
+
/** Unchecked. Server-owned; arrives pre-branded from a mapper. Adapters only. */
|
|
34
|
+
declare function unsafeConversationId(raw: string): ConversationId;
|
|
35
|
+
/** Unchecked. From the terminal `done`/completed frame. Adapters only. */
|
|
36
|
+
declare function unsafeResponseId(raw: string): ResponseId;
|
|
37
|
+
/** Unchecked. pk-resolved server-side. Adapters only. */
|
|
38
|
+
declare function unsafeClientId(raw: string): ClientId;
|
|
39
|
+
/** Unchecked. Server-owned medical-record doc id. Adapters only. */
|
|
40
|
+
declare function unsafeDocumentId(raw: string): DocumentId;
|
|
41
|
+
/** Unchecked. Server-owned async analysis-job id (video/photo). Adapters only. */
|
|
42
|
+
declare function unsafeJobId(raw: string): JobId;
|
|
43
|
+
/** Unchecked. Server-owned records-request handle (SPEC-11a). Adapters only. */
|
|
44
|
+
declare function unsafeRecordsRequestId(raw: string): RecordsRequestId;
|
|
45
|
+
|
|
46
|
+
export { type Brand as B, type ClientId as C, type DocumentId as D, type JobId as J, type PetRef as P, type RecordsRequestId as R, type UserRef as U, __brand as _, type ConversationId as a, type ResponseId as b, conversationId as c, unsafeConversationId as d, unsafeDocumentId as e, unsafeJobId as f, unsafePetRef as g, unsafeRecordsRequestId as h, unsafeResponseId as i, unsafeUserRef as j, userRef as k, petRef as p, unsafeClientId as u };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** Compile-time-only brand. Zero runtime cost; a raw string cannot flow into an id slot. */
|
|
2
|
+
declare const __brand: unique symbol;
|
|
3
|
+
type Brand<T, B extends string> = T & {
|
|
4
|
+
readonly [__brand]: B;
|
|
5
|
+
};
|
|
6
|
+
type PetRef = Brand<string, 'PetRef'>;
|
|
7
|
+
type UserRef = Brand<string, 'UserRef'>;
|
|
8
|
+
type ConversationId = Brand<string, 'ConversationId'>;
|
|
9
|
+
type ResponseId = Brand<string, 'ResponseId'>;
|
|
10
|
+
type ClientId = Brand<string, 'ClientId'>;
|
|
11
|
+
type DocumentId = Brand<string, 'DocumentId'>;
|
|
12
|
+
type JobId = Brand<string, 'JobId'>;
|
|
13
|
+
type RecordsRequestId = Brand<string, 'RecordsRequestId'>;
|
|
14
|
+
/**
|
|
15
|
+
* Validating constructor for a partner-supplied pet id. Crosses the value at the adapter boundary.
|
|
16
|
+
* @throws {EverfurConfigError} synchronously on an empty, over-long, or non-printable id (programmer error).
|
|
17
|
+
*/
|
|
18
|
+
declare function petRef(raw: string): PetRef;
|
|
19
|
+
/**
|
|
20
|
+
* Validating constructor for a partner-supplied end-user id (becomes x-everfur-user-ref).
|
|
21
|
+
* @throws {EverfurConfigError} synchronously on empty, over-long, containing '@', or non-printable.
|
|
22
|
+
*/
|
|
23
|
+
declare function userRef(raw: string): UserRef;
|
|
24
|
+
/**
|
|
25
|
+
* Validating constructor for a server-owned conversation id.
|
|
26
|
+
* @throws {EverfurConfigError} synchronously if `raw` is not a UUID (programmer error).
|
|
27
|
+
*/
|
|
28
|
+
declare function conversationId(raw: string): ConversationId;
|
|
29
|
+
/** Unchecked. For the response-mapper boundary where the value is already trusted. Adapters only. */
|
|
30
|
+
declare function unsafePetRef(raw: string): PetRef;
|
|
31
|
+
/** Unchecked. For the response-mapper boundary where the value is already trusted. Adapters only. */
|
|
32
|
+
declare function unsafeUserRef(raw: string): UserRef;
|
|
33
|
+
/** Unchecked. Server-owned; arrives pre-branded from a mapper. Adapters only. */
|
|
34
|
+
declare function unsafeConversationId(raw: string): ConversationId;
|
|
35
|
+
/** Unchecked. From the terminal `done`/completed frame. Adapters only. */
|
|
36
|
+
declare function unsafeResponseId(raw: string): ResponseId;
|
|
37
|
+
/** Unchecked. pk-resolved server-side. Adapters only. */
|
|
38
|
+
declare function unsafeClientId(raw: string): ClientId;
|
|
39
|
+
/** Unchecked. Server-owned medical-record doc id. Adapters only. */
|
|
40
|
+
declare function unsafeDocumentId(raw: string): DocumentId;
|
|
41
|
+
/** Unchecked. Server-owned async analysis-job id (video/photo). Adapters only. */
|
|
42
|
+
declare function unsafeJobId(raw: string): JobId;
|
|
43
|
+
/** Unchecked. Server-owned records-request handle (SPEC-11a). Adapters only. */
|
|
44
|
+
declare function unsafeRecordsRequestId(raw: string): RecordsRequestId;
|
|
45
|
+
|
|
46
|
+
export { type Brand as B, type ClientId as C, type DocumentId as D, type JobId as J, type PetRef as P, type RecordsRequestId as R, type UserRef as U, __brand as _, type ConversationId as a, type ResponseId as b, conversationId as c, unsafeConversationId as d, unsafeDocumentId as e, unsafeJobId as f, unsafePetRef as g, unsafeRecordsRequestId as h, unsafeResponseId as i, unsafeUserRef as j, userRef as k, petRef as p, unsafeClientId as u };
|