MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / encodeOffsetCursor

Function encodeOffsetCursor

server/src/training-agent/pagination.ts:8–10  ·  view source on GitHub ↗
(kind: string, offset: number)

Source from the content-addressed store, hash-verified

6// specific list endpoint so a caller can't move a list_creatives cursor onto
7// list_accounts and accidentally land at a meaningful offset.
8export function encodeOffsetCursor(kind: string, offset: number): string {
9 return Buffer.from(`${kind}:offset:${offset}`).toString('base64url');
10}
11
12// Returns null when the cursor is present but malformed (or scoped to a
13// different list endpoint). The caller MUST surface INVALID_REQUEST in that

Callers 7

handleGetMediaBuysFunction · 0.85
encodeCreativeCursorFunction · 0.85
handleGetSignalsFunction · 0.85
handleListPropertyListsFunction · 0.85
handleListAccountsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected