MCPcopy Create free account
hub / github.com/middleapi/orpc / parseDurableIteratorToken

Function parseDurableIteratorToken

packages/durable-iterator/src/schemas.ts:52–60  ·  view source on GitHub ↗
(token: string | null | undefined)

Source from the content-addressed store, hash-verified

50 * @throws if invalid format
51 */
52export function parseDurableIteratorToken(token: string | null | undefined): DurableIteratorTokenPayload {
53 try {
54 const payload = parseEmptyableJSON(getSignedValue(token))
55 return v.parse(DurableIteratorTokenPayloadSchema, payload)
56 }
57 catch (error) {
58 throw new DurableIteratorError('Invalid token payload', { cause: error })
59 }
60}

Callers 4

schemas.test.tsFile · 0.90
validateTokenMethod · 0.90
getFunction · 0.90
plugin.test.tsFile · 0.90

Calls 2

parseEmptyableJSONFunction · 0.90
getSignedValueFunction · 0.90

Tested by

no test coverage detected