//#region src/awakeable-ref.d.ts /** * Externally reconstructable awakeable address. * * The canonical address of a pending awakeable/approval is the triple * `(workflowId, threadId, name)` - exactly what the REST surface * consumes (`POST /v1/workflows/:workflowId/resume` with * `{ threadId, name }`). These helpers serialize the triple into a * single compact string of the shape * * `wf:::` * * (segments URI-encoded) so channel surfaces with a single opaque * payload slot - a messenger button's callback data, an email link - * can round-trip the address without a side table. No process is * involved: both functions are pure. * * @packageDocumentation */ /** Address triple of a pending awakeable / approval. @stable */ interface AwakeableRef { /** Workflow id/name the thread belongs to (the REST path segment). */ readonly workflowId: string; readonly threadId: string; /** Caller-chosen awakeable / approval name inside the thread. */ readonly name: string; } /** * Serialize an {@link AwakeableRef} into `wf:::` * with URI-encoded segments. Throws `TypeError` when any segment is * empty - a partial address is unresolvable by construction. * * @stable */ declare function serializeAwakeableRef(ref: AwakeableRef): string; /** * Parse a string produced by {@link serializeAwakeableRef}. Returns * `null` on anything malformed (wrong prefix, wrong arity, empty or * undecodable segments) - callback data arriving from a channel is * untrusted input, so the parse never throws. * * @stable */ declare function parseAwakeableRef(raw: string): AwakeableRef | null; //#endregion export { AwakeableRef, parseAwakeableRef, serializeAwakeableRef }; //# sourceMappingURL=awakeable-ref.d.ts.map