@postrun/js 4.1.0 → 4.2.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/dist/{chunk-E75IP76L.js → chunk-C4MYARB5.js} +341 -12
- package/dist/chunk-C4MYARB5.js.map +1 -0
- package/dist/{chunk-FH5WJE2D.js → chunk-HY5QFRKO.js} +3 -3
- package/dist/{chunk-FH5WJE2D.js.map → chunk-HY5QFRKO.js.map} +1 -1
- package/dist/index.cjs +349 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -6
- package/dist/index.d.ts +14 -6
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +195 -81
- package/dist/query.d.ts +195 -81
- package/dist/query.js.map +1 -1
- package/dist/schemas/index.cjs +339 -9
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +7732 -4193
- package/dist/schemas/index.d.ts +7732 -4193
- package/dist/schemas/index.js +1 -1
- package/dist/server.cjs +338 -9
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +2 -2
- package/dist/{types.gen-BwX9xx6y.d.cts → types.gen-Ca6kUFtq.d.cts} +139 -25
- package/dist/{types.gen-BwX9xx6y.d.ts → types.gen-Ca6kUFtq.d.ts} +139 -25
- package/package.json +1 -1
- package/dist/chunk-E75IP76L.js.map +0 -1
package/dist/query.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client/core/bodySerializer.gen.ts","../src/client/core/serverSentEvents.gen.ts","../src/client/core/pathSerializer.gen.ts","../src/client/core/utils.gen.ts","../src/client/core/auth.gen.ts","../src/client/client/utils.gen.ts","../src/client/client/client.gen.ts","../src/client/client.gen.ts","../src/client/sdk.gen.ts","../src/client/@tanstack/react-query.gen.ts"],"names":["joinedValues","config","request","url"],"mappings":";;;;;AA2DO,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ACX","file":"query.js","sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen';\n\nexport type QuerySerializer = (query: Record<string, unknown>) => string;\n\nexport type BodySerializer = (body: unknown) => unknown;\n\ntype QuerySerializerOptionsObject = {\n allowReserved?: boolean;\n array?: Partial<SerializerOptions<ArrayStyle>>;\n object?: Partial<SerializerOptions<ObjectStyle>>;\n};\n\nexport type QuerySerializerOptions = QuerySerializerOptionsObject & {\n /**\n * Per-parameter serialization overrides. When provided, these settings\n * override the global array/object settings for specific parameter names.\n */\n parameters?: Record<string, QuerySerializerOptionsObject>;\n};\n\nconst serializeFormDataPair = (data: FormData, key: string, value: unknown): void => {\n if (typeof value === 'string' || value instanceof Blob) {\n data.append(key, value);\n } else if (value instanceof Date) {\n data.append(key, value.toISOString());\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown): void => {\n if (typeof value === 'string') {\n data.append(key, value);\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nexport const formDataBodySerializer = {\n bodySerializer: (body: unknown): FormData => {\n const data = new FormData();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeFormDataPair(data, key, v));\n } else {\n serializeFormDataPair(data, key, value);\n }\n });\n\n return data;\n },\n};\n\nexport const jsonBodySerializer = {\n bodySerializer: (body: unknown): string =>\n JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n bodySerializer: (body: unknown): string => {\n const data = new URLSearchParams();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeUrlSearchParamsPair(data, key, v));\n } else {\n serializeUrlSearchParamsPair(data, key, value);\n }\n });\n\n return data.toString();\n },\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen';\n\nexport type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> &\n Pick<Config, 'method' | 'responseTransformer' | 'responseValidator'> & {\n /**\n * Fetch API implementation. You can use this option to provide a custom\n * fetch instance.\n *\n * @default globalThis.fetch\n */\n fetch?: typeof fetch;\n /**\n * Implementing clients can call request interceptors inside this hook.\n */\n onRequest?: (url: string, init: RequestInit) => Promise<Request>;\n /**\n * Callback invoked when a network or parsing error occurs during streaming.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param error The error that occurred.\n */\n onSseError?: (error: unknown) => void;\n /**\n * Callback invoked when an event is streamed from the server.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param event Event streamed from the server.\n * @returns Nothing (void).\n */\n onSseEvent?: (event: StreamEvent<TData>) => void;\n serializedBody?: RequestInit['body'];\n /**\n * Default retry delay in milliseconds.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 3000\n */\n sseDefaultRetryDelay?: number;\n /**\n * Maximum number of retry attempts before giving up.\n */\n sseMaxRetryAttempts?: number;\n /**\n * Maximum retry delay in milliseconds.\n *\n * Applies only when exponential backoff is used.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 30000\n */\n sseMaxRetryDelay?: number;\n /**\n * Optional sleep function for retry backoff.\n *\n * Defaults to using `setTimeout`.\n */\n sseSleepFn?: (ms: number) => Promise<void>;\n url: string;\n };\n\nexport interface StreamEvent<TData = unknown> {\n data: TData;\n event?: string;\n id?: string;\n retry?: number;\n}\n\nexport type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {\n stream: AsyncGenerator<\n TData extends Record<string, unknown> ? TData[keyof TData] : TData,\n TReturn,\n TNext\n >;\n};\n\nexport function createSseClient<TData = unknown>({\n onRequest,\n onSseError,\n onSseEvent,\n responseTransformer,\n responseValidator,\n sseDefaultRetryDelay,\n sseMaxRetryAttempts,\n sseMaxRetryDelay,\n sseSleepFn,\n url,\n ...options\n}: ServerSentEventsOptions): ServerSentEventsResult<TData> {\n let lastEventId: string | undefined;\n\n const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)));\n\n const createStream = async function* () {\n let retryDelay: number = sseDefaultRetryDelay ?? 3000;\n let attempt = 0;\n const signal = options.signal ?? new AbortController().signal;\n\n while (true) {\n if (signal.aborted) break;\n\n attempt++;\n\n const headers =\n options.headers instanceof Headers\n ? options.headers\n : new Headers(options.headers as Record<string, string> | undefined);\n\n if (lastEventId !== undefined) {\n headers.set('Last-Event-ID', lastEventId);\n }\n\n try {\n const requestInit: RequestInit = {\n redirect: 'follow',\n ...options,\n body: options.serializedBody,\n headers,\n signal,\n };\n let request = new Request(url, requestInit);\n if (onRequest) {\n request = await onRequest(url, requestInit);\n }\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = options.fetch ?? globalThis.fetch;\n const response = await _fetch(request);\n\n if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);\n\n if (!response.body) throw new Error('No body in SSE response');\n\n const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();\n\n let buffer = '';\n\n const abortHandler = () => {\n try {\n reader.cancel();\n } catch {\n // noop\n }\n };\n\n signal.addEventListener('abort', abortHandler);\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += value;\n buffer = buffer.replace(/\\r\\n?/g, '\\n'); // normalize line endings\n\n const chunks = buffer.split('\\n\\n');\n buffer = chunks.pop() ?? '';\n\n for (const chunk of chunks) {\n const lines = chunk.split('\\n');\n const dataLines: Array<string> = [];\n let eventName: string | undefined;\n\n for (const line of lines) {\n if (line.startsWith('data:')) {\n dataLines.push(line.replace(/^data:\\s*/, ''));\n } else if (line.startsWith('event:')) {\n eventName = line.replace(/^event:\\s*/, '');\n } else if (line.startsWith('id:')) {\n lastEventId = line.replace(/^id:\\s*/, '');\n } else if (line.startsWith('retry:')) {\n const parsed = Number.parseInt(line.replace(/^retry:\\s*/, ''), 10);\n if (!Number.isNaN(parsed)) {\n retryDelay = parsed;\n }\n }\n }\n\n let data: unknown;\n let parsedJson = false;\n\n if (dataLines.length) {\n const rawData = dataLines.join('\\n');\n try {\n data = JSON.parse(rawData);\n parsedJson = true;\n } catch {\n data = rawData;\n }\n }\n\n if (parsedJson) {\n if (responseValidator) {\n await responseValidator(data);\n }\n\n if (responseTransformer) {\n data = await responseTransformer(data);\n }\n }\n\n onSseEvent?.({\n data,\n event: eventName,\n id: lastEventId,\n retry: retryDelay,\n });\n\n if (dataLines.length) {\n yield data as any;\n }\n }\n }\n } finally {\n signal.removeEventListener('abort', abortHandler);\n reader.releaseLock();\n }\n\n break; // exit loop on normal completion\n } catch (error) {\n // connection failed or aborted; retry after delay\n onSseError?.(error);\n\n if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {\n break; // stop after firing error\n }\n\n // exponential backoff: double retry each attempt, cap at 30s\n const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);\n await sleep(backoff);\n }\n }\n };\n\n const stream = createStream();\n\n return { stream };\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\ninterface SerializeOptions<T> extends SerializePrimitiveOptions, SerializerOptions<T> {}\n\ninterface SerializePrimitiveOptions {\n allowReserved?: boolean;\n name: string;\n}\n\nexport interface SerializerOptions<T> {\n /**\n * @default true\n */\n explode: boolean;\n style: T;\n}\n\nexport type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectStyle = 'form' | 'deepObject';\ntype ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\n\ninterface SerializePrimitiveParam extends SerializePrimitiveOptions {\n value: string;\n}\n\nexport const separatorArrayExplode = (style: ArraySeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const separatorArrayNoExplode = (style: ArraySeparatorStyle): ',' | '|' | '%20' => {\n switch (style) {\n case 'form':\n return ',';\n case 'pipeDelimited':\n return '|';\n case 'spaceDelimited':\n return '%20';\n default:\n return ',';\n }\n};\n\nexport const separatorObjectExplode = (style: ObjectSeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const serializeArrayParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n}: SerializeOptions<ArraySeparatorStyle> & {\n value: unknown[];\n}): string => {\n if (!explode) {\n const joinedValues = (\n allowReserved ? value : value.map((v) => encodeURIComponent(v as string))\n ).join(separatorArrayNoExplode(style));\n switch (style) {\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n case 'simple':\n return joinedValues;\n default:\n return `${name}=${joinedValues}`;\n }\n }\n\n const separator = separatorArrayExplode(style);\n const joinedValues = value\n .map((v) => {\n if (style === 'label' || style === 'simple') {\n return allowReserved ? v : encodeURIComponent(v as string);\n }\n\n return serializePrimitiveParam({\n allowReserved,\n name,\n value: v as string,\n });\n })\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n\nexport const serializePrimitiveParam = ({\n allowReserved,\n name,\n value,\n}: SerializePrimitiveParam): string => {\n if (value === undefined || value === null) {\n return '';\n }\n\n if (typeof value === 'object') {\n throw new Error(\n 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.',\n );\n }\n\n return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;\n};\n\nexport const serializeObjectParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n valueOnly,\n}: SerializeOptions<ObjectSeparatorStyle> & {\n value: Record<string, unknown> | Date;\n valueOnly?: boolean;\n}): string => {\n if (value instanceof Date) {\n return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;\n }\n\n if (style !== 'deepObject' && !explode) {\n let values: string[] = [];\n Object.entries(value).forEach(([key, v]) => {\n values = [...values, key, allowReserved ? (v as string) : encodeURIComponent(v as string)];\n });\n const joinedValues = values.join(',');\n switch (style) {\n case 'form':\n return `${name}=${joinedValues}`;\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n default:\n return joinedValues;\n }\n }\n\n const separator = separatorObjectExplode(style);\n const joinedValues = Object.entries(value)\n .map(([key, v]) =>\n serializePrimitiveParam({\n allowReserved,\n name: style === 'deepObject' ? `${name}[${key}]` : key,\n value: v as string,\n }),\n )\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen';\nimport {\n type ArraySeparatorStyle,\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from './pathSerializer.gen';\n\nexport interface PathSerializer {\n path: Record<string, unknown>;\n url: string;\n}\n\nexport const PATH_PARAM_RE: RegExp = /\\{[^{}]+\\}/g;\n\nexport const defaultPathSerializer = ({ path, url: _url }: PathSerializer): string => {\n let url = _url;\n const matches = _url.match(PATH_PARAM_RE);\n if (matches) {\n for (const match of matches) {\n let explode = false;\n let name = match.substring(1, match.length - 1);\n let style: ArraySeparatorStyle = 'simple';\n\n if (name.endsWith('*')) {\n explode = true;\n name = name.substring(0, name.length - 1);\n }\n\n if (name.startsWith('.')) {\n name = name.substring(1);\n style = 'label';\n } else if (name.startsWith(';')) {\n name = name.substring(1);\n style = 'matrix';\n }\n\n const value = path[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n if (Array.isArray(value)) {\n url = url.replace(match, serializeArrayParam({ explode, name, style, value }));\n continue;\n }\n\n if (typeof value === 'object') {\n url = url.replace(\n match,\n serializeObjectParam({\n explode,\n name,\n style,\n value: value as Record<string, unknown>,\n valueOnly: true,\n }),\n );\n continue;\n }\n\n if (style === 'matrix') {\n url = url.replace(\n match,\n `;${serializePrimitiveParam({\n name,\n value: value as string,\n })}`,\n );\n continue;\n }\n\n const replaceValue = encodeURIComponent(\n style === 'label' ? `.${value as string}` : (value as string),\n );\n url = url.replace(match, replaceValue);\n }\n }\n return url;\n};\n\nexport const getUrl = ({\n baseUrl,\n path,\n query,\n querySerializer,\n url: _url,\n}: {\n baseUrl?: string;\n path?: Record<string, unknown>;\n query?: Record<string, unknown>;\n querySerializer: QuerySerializer;\n url: string;\n}): string => {\n const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;\n let url = (baseUrl ?? '') + pathUrl;\n if (path) {\n url = defaultPathSerializer({ path, url });\n }\n let search = query ? querySerializer(query) : '';\n if (search.startsWith('?')) {\n search = search.substring(1);\n }\n if (search) {\n url += `?${search}`;\n }\n return url;\n};\n\nexport function getValidRequestBody(options: {\n body?: unknown;\n bodySerializer?: BodySerializer | null;\n serializedBody?: unknown;\n}): unknown {\n const hasBody = options.body !== undefined;\n const isSerializedBody = hasBody && options.bodySerializer;\n\n if (isSerializedBody) {\n if ('serializedBody' in options) {\n const hasSerializedBody =\n options.serializedBody !== undefined && options.serializedBody !== '';\n\n return hasSerializedBody ? options.serializedBody : null;\n }\n\n // not all clients implement a serializedBody property (i.e., client-axios)\n return options.body !== '' ? options.body : null;\n }\n\n // plain/text body\n if (hasBody) {\n return options.body;\n }\n\n // no body was provided\n return undefined;\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nexport type AuthToken = string | undefined;\n\nexport interface Auth {\n /**\n * Which part of the request do we use to send the auth?\n *\n * @default 'header'\n */\n in?: 'header' | 'query' | 'cookie';\n /**\n * A unique identifier for the security scheme.\n *\n * Defined only when there are multiple security schemes whose `Auth`\n * shape would otherwise be identical.\n */\n key?: string;\n /**\n * Header or query parameter name.\n *\n * @default 'Authorization'\n */\n name?: string;\n scheme?: 'basic' | 'bearer';\n type: 'apiKey' | 'http';\n}\n\nexport const getAuthToken = async (\n auth: Auth,\n callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken,\n): Promise<string | undefined> => {\n const token = typeof callback === 'function' ? await callback(auth) : callback;\n\n if (!token) {\n return;\n }\n\n if (auth.scheme === 'bearer') {\n return `Bearer ${token}`;\n }\n\n if (auth.scheme === 'basic') {\n return `Basic ${btoa(token)}`;\n }\n\n return token;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport { getUrl } from '../core/utils.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\nexport const createQuerySerializer = <T = unknown>({\n parameters = {},\n ...args\n}: QuerySerializerOptions = {}): ((queryParams: T) => string) => {\n const querySerializer = (queryParams: T): string => {\n const search: string[] = [];\n if (queryParams && typeof queryParams === 'object') {\n for (const name in queryParams) {\n const value = queryParams[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n const options = parameters[name] || args;\n\n if (Array.isArray(value)) {\n const serializedArray = serializeArrayParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'form',\n value,\n ...options.array,\n });\n if (serializedArray) search.push(serializedArray);\n } else if (typeof value === 'object') {\n const serializedObject = serializeObjectParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'deepObject',\n value: value as Record<string, unknown>,\n ...options.object,\n });\n if (serializedObject) search.push(serializedObject);\n } else {\n const serializedPrimitive = serializePrimitiveParam({\n allowReserved: options.allowReserved,\n name,\n value: value as string,\n });\n if (serializedPrimitive) search.push(serializedPrimitive);\n }\n }\n }\n return search.join('&');\n };\n return querySerializer;\n};\n\n/**\n * Infers parseAs value from provided Content-Type header.\n */\nexport const getParseAs = (contentType: string | null): Exclude<Config['parseAs'], 'auto'> => {\n if (!contentType) {\n // If no Content-Type header is provided, the best we can do is return the raw response body,\n // which is effectively the same as the 'stream' option.\n return 'stream';\n }\n\n const cleanContent = contentType.split(';')[0]?.trim();\n\n if (!cleanContent) {\n return;\n }\n\n if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) {\n return 'json';\n }\n\n if (cleanContent === 'multipart/form-data') {\n return 'formData';\n }\n\n if (\n ['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type))\n ) {\n return 'blob';\n }\n\n if (cleanContent.startsWith('text/')) {\n return 'text';\n }\n\n return;\n};\n\nconst checkForExistence = (\n options: Pick<RequestOptions, 'auth' | 'query'> & {\n headers: Headers;\n },\n name?: string,\n): boolean => {\n if (!name) {\n return false;\n }\n if (\n options.headers.has(name) ||\n options.query?.[name] ||\n options.headers.get('Cookie')?.includes(`${name}=`)\n ) {\n return true;\n }\n return false;\n};\n\nexport async function setAuthParams(\n options: Pick<RequestOptions, 'auth' | 'query' | 'security'> & {\n headers: Headers;\n },\n): Promise<void> {\n for (const auth of options.security ?? []) {\n if (checkForExistence(options, auth.name)) {\n continue;\n }\n\n const token = await getAuthToken(auth, options.auth);\n\n if (!token) {\n continue;\n }\n\n const name = auth.name ?? 'Authorization';\n\n switch (auth.in) {\n case 'query':\n if (!options.query) {\n options.query = {};\n }\n options.query[name] = token;\n break;\n case 'cookie':\n options.headers.append('Cookie', `${name}=${token}`);\n break;\n case 'header':\n default:\n options.headers.set(name, token);\n break;\n }\n }\n}\n\nexport const buildUrl: Client['buildUrl'] = (options) =>\n getUrl({\n baseUrl: options.baseUrl as string,\n path: options.path,\n query: options.query,\n querySerializer:\n typeof options.querySerializer === 'function'\n ? options.querySerializer\n : createQuerySerializer(options.querySerializer),\n url: options.url,\n });\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n const config = { ...a, ...b };\n if (config.baseUrl?.endsWith('/')) {\n config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);\n }\n config.headers = mergeHeaders(a.headers, b.headers);\n return config;\n};\n\nconst headersEntries = (headers: Headers): Array<[string, string]> => {\n const entries: Array<[string, string]> = [];\n headers.forEach((value, key) => {\n entries.push([key, value]);\n });\n return entries;\n};\n\nexport const mergeHeaders = (\n ...headers: Array<Required<Config>['headers'] | undefined>\n): Headers => {\n const mergedHeaders = new Headers();\n for (const header of headers) {\n if (!header) {\n continue;\n }\n\n const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);\n\n for (const [key, value] of iterator) {\n if (value === null) {\n mergedHeaders.delete(key);\n } else if (Array.isArray(value)) {\n for (const v of value) {\n mergedHeaders.append(key, v as string);\n }\n } else if (value !== undefined) {\n // assume object headers are meant to be JSON stringified, i.e., their\n // content value in OpenAPI specification is 'application/json'\n mergedHeaders.set(\n key,\n typeof value === 'object' ? JSON.stringify(value) : (value as string),\n );\n }\n }\n }\n return mergedHeaders;\n};\n\ntype ErrInterceptor<Err, Res, Req, Options> = (\n error: Err,\n /** response may be undefined due to a network error where no response object is produced */\n response: Res | undefined,\n /** request may be undefined, because error may be from building the request object itself */\n request: Req | undefined,\n options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;\n\ntype ResInterceptor<Res, Req, Options> = (\n response: Res,\n request: Req,\n options: Options,\n) => Res | Promise<Res>;\n\nclass Interceptors<Interceptor> {\n fns: Array<Interceptor | null> = [];\n\n clear(): void {\n this.fns = [];\n }\n\n eject(id: number | Interceptor): void {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = null;\n }\n }\n\n exists(id: number | Interceptor): boolean {\n const index = this.getInterceptorIndex(id);\n return Boolean(this.fns[index]);\n }\n\n getInterceptorIndex(id: number | Interceptor): number {\n if (typeof id === 'number') {\n return this.fns[id] ? id : -1;\n }\n return this.fns.indexOf(id);\n }\n\n update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = fn;\n return id;\n }\n return false;\n }\n\n use(fn: Interceptor): number {\n this.fns.push(fn);\n return this.fns.length - 1;\n }\n}\n\nexport interface Middleware<Req, Res, Err, Options> {\n error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;\n request: Interceptors<ReqInterceptor<Req, Options>>;\n response: Interceptors<ResInterceptor<Res, Req, Options>>;\n}\n\nexport const createInterceptors = <Req, Res, Err, Options>(): Middleware<\n Req,\n Res,\n Err,\n Options\n> => ({\n error: new Interceptors<ErrInterceptor<Err, Res, Req, Options>>(),\n request: new Interceptors<ReqInterceptor<Req, Options>>(),\n response: new Interceptors<ResInterceptor<Res, Req, Options>>(),\n});\n\nconst defaultQuerySerializer = createQuerySerializer({\n allowReserved: false,\n array: {\n explode: true,\n style: 'form',\n },\n object: {\n explode: true,\n style: 'deepObject',\n },\n});\n\nconst defaultHeaders = {\n 'Content-Type': 'application/json',\n};\n\nexport const createConfig = <T extends ClientOptions = ClientOptions>(\n override: Config<Omit<ClientOptions, keyof T> & T> = {},\n): Config<Omit<ClientOptions, keyof T> & T> => ({\n ...jsonBodySerializer,\n headers: defaultHeaders,\n parseAs: 'auto',\n querySerializer: defaultQuerySerializer,\n ...override,\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen';\nimport {\n buildUrl,\n createConfig,\n createInterceptors,\n getParseAs,\n mergeConfigs,\n mergeHeaders,\n setAuthParams,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n body?: any;\n headers: ReturnType<typeof mergeHeaders>;\n};\n\nexport const createClient = (config: Config = {}): Client => {\n let _config = mergeConfigs(createConfig(), config);\n\n const getConfig = (): Config => ({ ..._config });\n\n const setConfig = (config: Config): Config => {\n _config = mergeConfigs(_config, config);\n return getConfig();\n };\n\n const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();\n\n const beforeRequest = async <\n TData = unknown,\n TResponseStyle extends 'data' | 'fields' = 'fields',\n ThrowOnError extends boolean = boolean,\n Url extends string = string,\n >(\n options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,\n ) => {\n const opts = {\n ..._config,\n ...options,\n fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n headers: mergeHeaders(_config.headers, options.headers),\n serializedBody: undefined as string | undefined,\n };\n\n if (opts.security) {\n await setAuthParams(opts);\n }\n\n if (opts.requestValidator) {\n await opts.requestValidator(opts);\n }\n\n if (opts.body !== undefined && opts.bodySerializer) {\n opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined;\n }\n\n // remove Content-Type header if body is empty to avoid sending invalid requests\n if (opts.body === undefined || opts.serializedBody === '') {\n opts.headers.delete('Content-Type');\n }\n\n const resolvedOpts = opts as typeof opts &\n ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;\n const url = buildUrl(resolvedOpts);\n\n return { opts: resolvedOpts, url };\n };\n\n const request: Client['request'] = async (options) => {\n const throwOnError = options.throwOnError ?? _config.throwOnError;\n const responseStyle = options.responseStyle ?? _config.responseStyle;\n\n let request: Request | undefined;\n let response: Response | undefined;\n\n try {\n const { opts, url } = await beforeRequest(options);\n const requestInit: ReqInit = {\n redirect: 'follow',\n ...opts,\n body: getValidRequestBody(opts),\n };\n\n request = new Request(url, requestInit);\n\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = opts.fetch!;\n\n response = await _fetch(request);\n\n for (const fn of interceptors.response.fns) {\n if (fn) {\n response = await fn(response, request, opts);\n }\n }\n\n const result = {\n request,\n response,\n };\n\n if (response.ok) {\n const parseAs =\n (opts.parseAs === 'auto'\n ? getParseAs(response.headers.get('Content-Type'))\n : opts.parseAs) ?? 'json';\n\n if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n let emptyData: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'text':\n emptyData = await response[parseAs]();\n break;\n case 'formData':\n emptyData = new FormData();\n break;\n case 'stream':\n emptyData = response.body;\n break;\n case 'json':\n default:\n emptyData = {};\n break;\n }\n return opts.responseStyle === 'data'\n ? emptyData\n : {\n data: emptyData,\n ...result,\n };\n }\n\n let data: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'formData':\n case 'text':\n data = await response[parseAs]();\n break;\n case 'json': {\n // Some servers return 200 with no Content-Length and empty body.\n // response.json() would throw; read as text and parse if non-empty.\n const text = await response.text();\n data = text ? JSON.parse(text) : {};\n break;\n }\n case 'stream':\n return opts.responseStyle === 'data'\n ? response.body\n : {\n data: response.body,\n ...result,\n };\n }\n\n if (parseAs === 'json') {\n if (opts.responseValidator) {\n await opts.responseValidator(data);\n }\n\n if (opts.responseTransformer) {\n data = await opts.responseTransformer(data);\n }\n }\n\n return opts.responseStyle === 'data'\n ? data\n : {\n data,\n ...result,\n };\n }\n\n const textError = await response.text();\n let jsonError: unknown;\n\n try {\n jsonError = JSON.parse(textError);\n } catch {\n // noop\n }\n\n throw jsonError ?? textError;\n } catch (error) {\n let finalError = error;\n\n for (const fn of interceptors.error.fns) {\n if (fn) {\n finalError = await fn(finalError, response, request, options as ResolvedRequestOptions);\n }\n }\n\n finalError = finalError || {};\n\n if (throwOnError) {\n throw finalError;\n }\n\n // TODO: we probably want to return error and improve types\n return responseStyle === 'data'\n ? undefined\n : {\n error: finalError,\n request,\n response,\n };\n }\n };\n\n const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n request({ ...options, method });\n\n const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n const { opts, url } = await beforeRequest(options);\n return createSseClient({\n ...opts,\n body: opts.body as BodyInit | null | undefined,\n method,\n onRequest: async (url, init) => {\n let request = new Request(url, init);\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n return request;\n },\n serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n url,\n });\n };\n\n const _buildUrl: Client['buildUrl'] = (options) => buildUrl({ ..._config, ...options });\n\n return {\n buildUrl: _buildUrl,\n connect: makeMethodFn('CONNECT'),\n delete: makeMethodFn('DELETE'),\n get: makeMethodFn('GET'),\n getConfig,\n head: makeMethodFn('HEAD'),\n interceptors,\n options: makeMethodFn('OPTIONS'),\n patch: makeMethodFn('PATCH'),\n post: makeMethodFn('POST'),\n put: makeMethodFn('PUT'),\n request,\n setConfig,\n sse: {\n connect: makeSseFn('CONNECT'),\n delete: makeSseFn('DELETE'),\n get: makeSseFn('GET'),\n head: makeSseFn('HEAD'),\n options: makeSseFn('OPTIONS'),\n patch: makeSseFn('PATCH'),\n post: makeSseFn('POST'),\n put: makeSseFn('PUT'),\n trace: makeSseFn('TRACE'),\n },\n trace: makeMethodFn('TRACE'),\n } as Client;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type ClientOptions, type Config, createClient, createConfig } from './client';\nimport type { ClientOptions as ClientOptions2 } from './types.gen';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;\n\nexport const client: Client = createClient(createConfig<ClientOptions2>({ baseUrl: 'https://api.postrun.ai/v1', throwOnError: true }));\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { ConnectionsConnectData, ConnectionsConnectErrors, ConnectionsConnectResponses, ConnectionsDeleteData, ConnectionsDeleteErrors, ConnectionsDeleteResponses, ConnectionsGetAnalyticsData, ConnectionsGetAnalyticsErrors, ConnectionsGetAnalyticsResponses, ConnectionsGetData, ConnectionsGetErrors, ConnectionsGetResponses, ConnectionsListAccountsData, ConnectionsListAccountsErrors, ConnectionsListAccountsResponses, ConnectionsListByProfileData, ConnectionsListByProfileErrors, ConnectionsListByProfileResponses, ConnectionsSelectData, ConnectionsSelectErrors, ConnectionsSelectResponses, LogsGetData, LogsGetErrors, LogsGetResponses, LogsListData, LogsListErrors, LogsListResponses, MediaAbortData, MediaAbortErrors, MediaAbortResponses, MediaCompleteData, MediaCompleteErrors, MediaCompleteResponses, MediaCreateData, MediaCreateErrors, MediaCreateResponses, MediaDeleteData, MediaDeleteErrors, MediaDeleteResponses, MediaGetData, MediaGetErrors, MediaGetResponses, MediaListData, MediaListErrors, MediaListPartsData, MediaListPartsErrors, MediaListPartsResponses, MediaListResponses, MediaSignPartData, MediaSignPartErrors, MediaSignPartResponses, MediaUpdateData, MediaUpdateErrors, MediaUpdateResponses, PostsCreateData, PostsCreateErrors, PostsCreateResponses, PostsDeleteData, PostsDeleteErrors, PostsDeleteResponses, PostsGetAnalyticsData, PostsGetAnalyticsErrors, PostsGetAnalyticsResponses, PostsGetData, PostsGetErrors, PostsGetResponses, PostsListData, PostsListErrors, PostsListResponses, PostsRetryData, PostsRetryErrors, PostsRetryResponses, PostsUpdateData, PostsUpdateErrors, PostsUpdateResponses, PostsValidateData, PostsValidateErrors, PostsValidateResponses, ProfilesCreateData, ProfilesCreateErrors, ProfilesCreateResponses, ProfilesDeleteData, ProfilesDeleteErrors, ProfilesDeleteResponses, ProfilesGetData, ProfilesGetErrors, ProfilesGetResponses, ProfilesListData, ProfilesListErrors, ProfilesListResponses, ProfilesUpdateData, ProfilesUpdateErrors, ProfilesUpdateResponses, TiktokCreatorInfoData, TiktokCreatorInfoErrors, TiktokCreatorInfoResponses, TokensMintData, TokensMintErrors, TokensMintResponses, WebhooksCreateEndpointData, WebhooksCreateEndpointErrors, WebhooksCreateEndpointResponses, WebhooksCreatePortalData, WebhooksCreatePortalErrors, WebhooksCreatePortalResponses, WebhooksDeleteEndpointData, WebhooksDeleteEndpointErrors, WebhooksDeleteEndpointResponses, WebhooksGetEndpointData, WebhooksGetEndpointErrors, WebhooksGetEndpointResponses, WebhooksListEndpointsData, WebhooksListEndpointsErrors, WebhooksListEndpointsResponses, WebhooksListEventTypesData, WebhooksListEventTypesErrors, WebhooksListEventTypesResponses, WebhooksPingData, WebhooksPingErrors, WebhooksPingResponses, WebhooksUpdateEndpointData, WebhooksUpdateEndpointErrors, WebhooksUpdateEndpointResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {\n /**\n * You can provide a client instance returned by `createClient()` instead of\n * individual options. This might be also useful if you want to implement a\n * custom client.\n */\n client?: Client;\n /**\n * You can pass arbitrary values through the `meta` object. This can be\n * used to access values that aren't defined as part of the SDK function.\n */\n meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;\n};\n\n/**\n * List profiles\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the profiles under your account, newest first.\n */\nexport const profilesList = <ThrowOnError extends boolean = true>(options?: Options<ProfilesListData, ThrowOnError>): RequestResult<ProfilesListResponses, ProfilesListErrors, ThrowOnError> => (options?.client ?? client).get<ProfilesListResponses, ProfilesListErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles',\n ...options\n});\n\n/**\n * Create a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:write` with account-wide profile scope (`all`); a profile-scoped token cannot create.\n *\n * Creates a profile — a client/brand workspace under your account, and the unit connections attach to.\n */\nexport const profilesCreate = <ThrowOnError extends boolean = true>(options: Options<ProfilesCreateData, ThrowOnError>): RequestResult<ProfilesCreateResponses, ProfilesCreateErrors, ThrowOnError> => (options.client ?? client).post<ProfilesCreateResponses, ProfilesCreateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:delete` scoped to the target profile.\n *\n * Deletes a profile. The profile must have no connections — delete its connections first (and a connection in turn cannot be deleted while a post still publishes through it).\n */\nexport const profilesDelete = <ThrowOnError extends boolean = true>(options: Options<ProfilesDeleteData, ThrowOnError>): RequestResult<ProfilesDeleteResponses, ProfilesDeleteErrors, ThrowOnError> => (options.client ?? client).delete<ProfilesDeleteResponses, ProfilesDeleteErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles/{id}',\n ...options\n});\n\n/**\n * Retrieve a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:read` scoped to the target profile.\n *\n * Retrieves a single profile by id.\n */\nexport const profilesGet = <ThrowOnError extends boolean = true>(options: Options<ProfilesGetData, ThrowOnError>): RequestResult<ProfilesGetResponses, ProfilesGetErrors, ThrowOnError> => (options.client ?? client).get<ProfilesGetResponses, ProfilesGetErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles/{id}',\n ...options\n});\n\n/**\n * Update a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:write` scoped to the target profile.\n *\n * Updates a profile. Send only the fields you want to change; provide at least one.\n */\nexport const profilesUpdate = <ThrowOnError extends boolean = true>(options: Options<ProfilesUpdateData, ThrowOnError>): RequestResult<ProfilesUpdateResponses, ProfilesUpdateErrors, ThrowOnError> => (options.client ?? client).patch<ProfilesUpdateResponses, ProfilesUpdateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List a profile's connections\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the target profile.\n *\n * Lists the external accounts connected to a profile, most recent first. Returns 404 if the profile doesn't exist in your account.\n */\nexport const connectionsListByProfile = <ThrowOnError extends boolean = true>(options: Options<ConnectionsListByProfileData, ThrowOnError>): RequestResult<ConnectionsListByProfileResponses, ConnectionsListByProfileErrors, ThrowOnError> => (options.client ?? client).get<ConnectionsListByProfileResponses, ConnectionsListByProfileErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles/{id}/connections',\n ...options\n});\n\n/**\n * Delete a connection\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:delete` scoped to the profile that owns the connection.\n *\n * Disconnects a connection. Returns a deletion marker; returns 404 if it does not exist in your account. Disconnect is unconditional — any scheduled posts that target this connection are not blocked; they fail gracefully at publish time with a `connection_removed` error until you reconnect and reschedule.\n */\nexport const connectionsDelete = <ThrowOnError extends boolean = true>(options: Options<ConnectionsDeleteData, ThrowOnError>): RequestResult<ConnectionsDeleteResponses, ConnectionsDeleteErrors, ThrowOnError> => (options.client ?? client).delete<ConnectionsDeleteResponses, ConnectionsDeleteErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}',\n ...options\n});\n\n/**\n * Retrieve a connection\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Retrieves a single connection by id.\n */\nexport const connectionsGet = <ThrowOnError extends boolean = true>(options: Options<ConnectionsGetData, ThrowOnError>): RequestResult<ConnectionsGetResponses, ConnectionsGetErrors, ThrowOnError> => (options.client ?? client).get<ConnectionsGetResponses, ConnectionsGetErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}',\n ...options\n});\n\n/**\n * Select a connection account\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:write` scoped to the profile that owns the connection.\n *\n * Activates a pending connection by choosing which external account (e.g. which Facebook Page) it uses. The account must be one reachable through the connection’s OAuth grant; its canonical name + currency are resolved server-side from discovery, so the stored display values can’t be spoofed by the caller.\n */\nexport const connectionsSelect = <ThrowOnError extends boolean = true>(options: Options<ConnectionsSelectData, ThrowOnError>): RequestResult<ConnectionsSelectResponses, ConnectionsSelectErrors, ThrowOnError> => (options.client ?? client).patch<ConnectionsSelectResponses, ConnectionsSelectErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List a connection’s discoverable accounts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Lists the external accounts reachable through this connection’s OAuth grant — the picker shown after OAuth, while the connection is still pending account selection. Returns 404 if the connection does not exist in your account, and 501 if account discovery is not yet supported for the connection’s platform.\n */\nexport const connectionsListAccounts = <ThrowOnError extends boolean = true>(options: Options<ConnectionsListAccountsData, ThrowOnError>): RequestResult<ConnectionsListAccountsResponses, ConnectionsListAccountsErrors, ThrowOnError> => (options.client ?? client).get<ConnectionsListAccountsResponses, ConnectionsListAccountsErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}/accounts',\n ...options\n});\n\n/**\n * Connect a platform account\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:write` scoped to the target profile.\n *\n * Starts an OAuth connect flow for a platform on this profile. Returns a short-lived session the client uses to authorize; the connection is created once authorization succeeds.\n */\nexport const connectionsConnect = <ThrowOnError extends boolean = true>(options: Options<ConnectionsConnectData, ThrowOnError>): RequestResult<ConnectionsConnectResponses, ConnectionsConnectErrors, ThrowOnError> => (options.client ?? client).post<ConnectionsConnectResponses, ConnectionsConnectErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles/{id}/connect',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Retrieve account analytics\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Reads a connected account’s totals and its daily activity live from the platform: the last 60 days for TikTok, 30 for Instagram and 90 for Facebook Pages. TikTok, Instagram and Facebook Page connections are supported. TikTok finalizes a day 24–48 hours after it ends, and Meta updates Page insights about once a day. Returns 404 if the connection does not exist in your account, 501 if its platform has no analytics yet, 409 if the account must be reconnected, and 502 if the platform’s call fails.\n */\nexport const connectionsGetAnalytics = <ThrowOnError extends boolean = true>(options: Options<ConnectionsGetAnalyticsData, ThrowOnError>): RequestResult<ConnectionsGetAnalyticsResponses, ConnectionsGetAnalyticsErrors, ThrowOnError> => (options.client ?? client).get<ConnectionsGetAnalyticsResponses, ConnectionsGetAnalyticsErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}/analytics',\n ...options\n});\n\n/**\n * List media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the media assets under your account, newest first. Filter by profile, status, kind, your own external_id, or metadata.\n */\nexport const mediaList = <ThrowOnError extends boolean = true>(options?: Options<MediaListData, ThrowOnError>): RequestResult<MediaListResponses, MediaListErrors, ThrowOnError> => (options?.client ?? client).get<MediaListResponses, MediaListErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media',\n ...options\n});\n\n/**\n * Upload media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the target profile.\n *\n * Creates a media asset. Two ways to supply the bytes: (1) omit `source_url` and upload the bytes with the returned multipart `upload` session — chunk the file at `part_size`, sign each part via `POST /media/{id}/multipart/sign`, PUT the bytes, then `POST /media/{id}/multipart/complete` (the direct-upload path; `upload` is non-null and resumable), or (2) supply a public `https` `source_url` and we fetch the bytes server-side, validate, transform, and store them (the import path; `upload` is null). Either way the asset settles through the same probe/transform flow.\n */\nexport const mediaCreate = <ThrowOnError extends boolean = true>(options: Options<MediaCreateData, ThrowOnError>): RequestResult<MediaCreateResponses, MediaCreateErrors, ThrowOnError> => (options.client ?? client).post<MediaCreateResponses, MediaCreateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:delete` scoped to the profile that owns the media asset.\n *\n * Deletes a media asset and its stored renditions.\n */\nexport const mediaDelete = <ThrowOnError extends boolean = true>(options: Options<MediaDeleteData, ThrowOnError>): RequestResult<MediaDeleteResponses, MediaDeleteErrors, ThrowOnError> => (options.client ?? client).delete<MediaDeleteResponses, MediaDeleteErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}',\n ...options\n});\n\n/**\n * Retrieve media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:read` scoped to the profile that owns the media asset.\n *\n * Retrieves a media asset, including its per-platform processing status and renditions.\n */\nexport const mediaGet = <ThrowOnError extends boolean = true>(options: Options<MediaGetData, ThrowOnError>): RequestResult<MediaGetResponses, MediaGetErrors, ThrowOnError> => (options.client ?? client).get<MediaGetResponses, MediaGetErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}',\n ...options\n});\n\n/**\n * Update media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Updates a media asset (alt text, metadata, external_id) or adds `targets` to pre-warm more platforms. Send only the fields to change.\n */\nexport const mediaUpdate = <ThrowOnError extends boolean = true>(options: Options<MediaUpdateData, ThrowOnError>): RequestResult<MediaUpdateResponses, MediaUpdateErrors, ThrowOnError> => (options.client ?? client).patch<MediaUpdateResponses, MediaUpdateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Sign an upload part\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Returns a presigned URL to PUT one part of a multipart upload. Chunk the file at the session’s `part_size` and sign each 1-indexed part; read each part PUT’s `ETag` for `complete`.\n */\nexport const mediaSignPart = <ThrowOnError extends boolean = true>(options: Options<MediaSignPartData, ThrowOnError>): RequestResult<MediaSignPartResponses, MediaSignPartErrors, ThrowOnError> => (options.client ?? client).post<MediaSignPartResponses, MediaSignPartErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}/multipart/sign',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List uploaded parts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Lists the parts already uploaded for this asset’s multipart upload (ascending). Skip re-uploading these to resume after a dropped connection.\n */\nexport const mediaListParts = <ThrowOnError extends boolean = true>(options: Options<MediaListPartsData, ThrowOnError>): RequestResult<MediaListPartsResponses, MediaListPartsErrors, ThrowOnError> => (options.client ?? client).get<MediaListPartsResponses, MediaListPartsErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}/multipart/parts',\n ...options\n});\n\n/**\n * Complete an upload\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Finishes a multipart upload by assembling the uploaded parts. Send every part as `{ part_number, etag }`. Idempotent: completing an already-finished upload returns the asset.\n */\nexport const mediaComplete = <ThrowOnError extends boolean = true>(options: Options<MediaCompleteData, ThrowOnError>): RequestResult<MediaCompleteResponses, MediaCompleteErrors, ThrowOnError> => (options.client ?? client).post<MediaCompleteResponses, MediaCompleteErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}/multipart/complete',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Abort an upload\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Aborts an in-flight multipart upload and discards its parts. Idempotent: aborting an already-finished or unknown upload still returns the asset.\n */\nexport const mediaAbort = <ThrowOnError extends boolean = true>(options: Options<MediaAbortData, ThrowOnError>): RequestResult<MediaAbortResponses, MediaAbortErrors, ThrowOnError> => (options.client ?? client).post<MediaAbortResponses, MediaAbortErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}/multipart/abort',\n ...options\n});\n\n/**\n * List posts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the posts under your account, newest first. Filter by profile or your own external_id.\n */\nexport const postsList = <ThrowOnError extends boolean = true>(options?: Options<PostsListData, ThrowOnError>): RequestResult<PostsListResponses, PostsListErrors, ThrowOnError> => (options?.client ?? client).get<PostsListResponses, PostsListErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts',\n ...options\n});\n\n/**\n * Create a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the target profile.\n *\n * Composes a post + its per-channel variants. `publish` decides the outcome: `now` publishes immediately, `schedule` publishes at `schedule_at`, `draft` just stores it.\n */\nexport const postsCreate = <ThrowOnError extends boolean = true>(options: Options<PostsCreateData, ThrowOnError>): RequestResult<PostsCreateResponses, PostsCreateErrors, ThrowOnError> => (options.client ?? client).post<PostsCreateResponses, PostsCreateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:delete` scoped to the profile that owns the post.\n *\n * Deletes a post and its variants. Returns a deletion marker; 404 if it does not exist in your account. Already-published posts are not retracted from the platform.\n */\nexport const postsDelete = <ThrowOnError extends boolean = true>(options: Options<PostsDeleteData, ThrowOnError>): RequestResult<PostsDeleteResponses, PostsDeleteErrors, ThrowOnError> => (options.client ?? client).delete<PostsDeleteResponses, PostsDeleteErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/{id}',\n ...options\n});\n\n/**\n * Retrieve a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the profile that owns the post.\n *\n * Retrieves a single post by id, including its per-channel variants and their derived status.\n */\nexport const postsGet = <ThrowOnError extends boolean = true>(options: Options<PostsGetData, ThrowOnError>): RequestResult<PostsGetResponses, PostsGetErrors, ThrowOnError> => (options.client ?? client).get<PostsGetResponses, PostsGetErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/{id}',\n ...options\n});\n\n/**\n * Update a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the profile that owns the post.\n *\n * Edits a post and/or transitions its publish state (`draft` / `schedule` / `now`). Valid only while the post is draft or scheduled. Send only the fields to change; providing `variants` replaces the whole set.\n */\nexport const postsUpdate = <ThrowOnError extends boolean = true>(options: Options<PostsUpdateData, ThrowOnError>): RequestResult<PostsUpdateResponses, PostsUpdateErrors, ThrowOnError> => (options.client ?? client).patch<PostsUpdateResponses, PostsUpdateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Retry a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the profile that owns the post.\n *\n * Re-publishes the post’s failed variants now, through the same path as `publish: \"now\"`. Published variants are never touched, and a failure that may already be live on the platform (e.g. `x_publish_failed`) is never re-sent, so a retry can’t post twice. Failed attempts are never billed.\n */\nexport const postsRetry = <ThrowOnError extends boolean = true>(options: Options<PostsRetryData, ThrowOnError>): RequestResult<PostsRetryResponses, PostsRetryErrors, ThrowOnError> => (options.client ?? client).post<PostsRetryResponses, PostsRetryErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/{id}/retry',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Validate a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the target profile.\n *\n * Runs the exact ownership + publish-readiness checks the create path runs under dry_run, with no side effects. Returns a per-issue verdict (`publishable` + `issues[]`) on 200; a reference to a connection/media outside the profile is a typed 422.\n */\nexport const postsValidate = <ThrowOnError extends boolean = true>(options: Options<PostsValidateData, ThrowOnError>): RequestResult<PostsValidateResponses, PostsValidateErrors, ThrowOnError> => (options.client ?? client).post<PostsValidateResponses, PostsValidateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/validate',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Retrieve post analytics\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the profile that owns the post.\n *\n * Reads each variant’s metrics live from its platform. TikTok, Instagram and Facebook Page variants return metrics; X and LinkedIn variants return `analytics_not_supported`. A variant with nothing to read (not published, connection removed, not public, deleted, or not yet reported by the platform) returns `analytics_no_data`. TikTok updates metrics 24–48 hours after the activity, and Meta can take up to 48 hours to report a new post. Returns 404 if the post does not exist in your account, 409 if an account must be reconnected, and 502 if the platform’s call fails.\n */\nexport const postsGetAnalytics = <ThrowOnError extends boolean = true>(options: Options<PostsGetAnalyticsData, ThrowOnError>): RequestResult<PostsGetAnalyticsResponses, PostsGetAnalyticsErrors, ThrowOnError> => (options.client ?? client).get<PostsGetAnalyticsResponses, PostsGetAnalyticsErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/{id}/analytics',\n ...options\n});\n\n/**\n * Retrieve TikTok creator info\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Retrieves a TikTok account’s publish options live from TikTok: the creator nickname + avatar, the audiences (`privacy_options`) available for photo posts, the Comment/Duet/Stitch availability, and the maximum video length. Returns 404 if the connection does not exist in your account or is not a TikTok connection, 409 if the TikTok account must be reconnected, and 502 if TikTok’s call fails.\n */\nexport const tiktokCreatorInfo = <ThrowOnError extends boolean = true>(options: Options<TiktokCreatorInfoData, ThrowOnError>): RequestResult<TiktokCreatorInfoResponses, TiktokCreatorInfoErrors, ThrowOnError> => (options.client ?? client).get<TiktokCreatorInfoResponses, TiktokCreatorInfoErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}/tiktok/creator-info',\n ...options\n});\n\n/**\n * List request logs\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the API activity for your account — one entry per action, newest first. Filter by profile, connection, platform, status, source, action, or time range.\n */\nexport const logsList = <ThrowOnError extends boolean = true>(options?: Options<LogsListData, ThrowOnError>): RequestResult<LogsListResponses, LogsListErrors, ThrowOnError> => (options?.client ?? client).get<LogsListResponses, LogsListErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/logs',\n ...options\n});\n\n/**\n * Retrieve a request log\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Retrieves a single request log entry by id.\n */\nexport const logsGet = <ThrowOnError extends boolean = true>(options: Options<LogsGetData, ThrowOnError>): RequestResult<LogsGetResponses, LogsGetErrors, ThrowOnError> => (options.client ?? client).get<LogsGetResponses, LogsGetErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/logs/{id}',\n ...options\n});\n\n/**\n * List webhook endpoints\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the webhook endpoints registered for your account.\n */\nexport const webhooksListEndpoints = <ThrowOnError extends boolean = true>(options?: Options<WebhooksListEndpointsData, ThrowOnError>): RequestResult<WebhooksListEndpointsResponses, WebhooksListEndpointsErrors, ThrowOnError> => (options?.client ?? client).get<WebhooksListEndpointsResponses, WebhooksListEndpointsErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/endpoints',\n ...options\n});\n\n/**\n * Create a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Registers a URL to receive the chosen event types. Delivery, retries, and signing are handled for you.\n */\nexport const webhooksCreateEndpoint = <ThrowOnError extends boolean = true>(options: Options<WebhooksCreateEndpointData, ThrowOnError>): RequestResult<WebhooksCreateEndpointResponses, WebhooksCreateEndpointErrors, ThrowOnError> => (options.client ?? client).post<WebhooksCreateEndpointResponses, WebhooksCreateEndpointErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/endpoints',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Deletes a webhook endpoint. Delivery to it stops immediately.\n */\nexport const webhooksDeleteEndpoint = <ThrowOnError extends boolean = true>(options: Options<WebhooksDeleteEndpointData, ThrowOnError>): RequestResult<WebhooksDeleteEndpointResponses, WebhooksDeleteEndpointErrors, ThrowOnError> => (options.client ?? client).delete<WebhooksDeleteEndpointResponses, WebhooksDeleteEndpointErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/endpoints/{id}',\n ...options\n});\n\n/**\n * Retrieve a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Retrieves a single webhook endpoint by id.\n */\nexport const webhooksGetEndpoint = <ThrowOnError extends boolean = true>(options: Options<WebhooksGetEndpointData, ThrowOnError>): RequestResult<WebhooksGetEndpointResponses, WebhooksGetEndpointErrors, ThrowOnError> => (options.client ?? client).get<WebhooksGetEndpointResponses, WebhooksGetEndpointErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/endpoints/{id}',\n ...options\n});\n\n/**\n * Update a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Updates a webhook endpoint. Send only the fields you want to change; provide at least one.\n */\nexport const webhooksUpdateEndpoint = <ThrowOnError extends boolean = true>(options: Options<WebhooksUpdateEndpointData, ThrowOnError>): RequestResult<WebhooksUpdateEndpointResponses, WebhooksUpdateEndpointErrors, ThrowOnError> => (options.client ?? client).patch<WebhooksUpdateEndpointResponses, WebhooksUpdateEndpointErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/endpoints/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Create a webhook portal link\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Mints a one-time App Portal URL where you (or your customer) self-serve webhook delivery logs and signing secrets.\n */\nexport const webhooksCreatePortal = <ThrowOnError extends boolean = true>(options?: Options<WebhooksCreatePortalData, ThrowOnError>): RequestResult<WebhooksCreatePortalResponses, WebhooksCreatePortalErrors, ThrowOnError> => (options?.client ?? client).post<WebhooksCreatePortalResponses, WebhooksCreatePortalErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/portal',\n ...options\n});\n\n/**\n * List webhook event types\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the event types you can subscribe an endpoint to (the catalog).\n */\nexport const webhooksListEventTypes = <ThrowOnError extends boolean = true>(options?: Options<WebhooksListEventTypesData, ThrowOnError>): RequestResult<WebhooksListEventTypesResponses, WebhooksListEventTypesErrors, ThrowOnError> => (options?.client ?? client).get<WebhooksListEventTypesResponses, WebhooksListEventTypesErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/event-types',\n ...options\n});\n\n/**\n * Send a test event\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Emits a `webhook.ping` event to your subscribed endpoints so you can verify delivery end to end.\n */\nexport const webhooksPing = <ThrowOnError extends boolean = true>(options: Options<WebhooksPingData, ThrowOnError>): RequestResult<WebhooksPingResponses, WebhooksPingErrors, ThrowOnError> => (options.client ?? client).post<WebhooksPingResponses, WebhooksPingErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/ping',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Mint a scoped frontend token\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Mints a short-lived, profile-scoped token from your secret `pr_` key. Call this from your backend; the returned token is safe to hand to a browser, which then calls the Postrun API directly. The secret key never touches the browser.\n */\nexport const tokensMint = <ThrowOnError extends boolean = true>(options: Options<TokensMintData, ThrowOnError>): RequestResult<TokensMintResponses, TokensMintErrors, ThrowOnError> => (options.client ?? client).post<TokensMintResponses, TokensMintErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/tokens',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { connectionsConnect, connectionsDelete, connectionsGet, connectionsGetAnalytics, connectionsListAccounts, connectionsListByProfile, connectionsSelect, logsGet, logsList, mediaAbort, mediaComplete, mediaCreate, mediaDelete, mediaGet, mediaList, mediaListParts, mediaSignPart, mediaUpdate, type Options, postsCreate, postsDelete, postsGet, postsGetAnalytics, postsList, postsRetry, postsUpdate, postsValidate, profilesCreate, profilesDelete, profilesGet, profilesList, profilesUpdate, tiktokCreatorInfo, tokensMint, webhooksCreateEndpoint, webhooksCreatePortal, webhooksDeleteEndpoint, webhooksGetEndpoint, webhooksListEndpoints, webhooksListEventTypes, webhooksPing, webhooksUpdateEndpoint } from '../sdk.gen';\nimport type { ConnectionsConnectData, ConnectionsConnectError, ConnectionsConnectResponse, ConnectionsDeleteData, ConnectionsDeleteError, ConnectionsDeleteResponse, ConnectionsGetAnalyticsData, ConnectionsGetAnalyticsError, ConnectionsGetAnalyticsResponse, ConnectionsGetData, ConnectionsGetError, ConnectionsGetResponse, ConnectionsListAccountsData, ConnectionsListAccountsError, ConnectionsListAccountsResponse, ConnectionsListByProfileData, ConnectionsListByProfileError, ConnectionsListByProfileResponse, ConnectionsSelectData, ConnectionsSelectError, ConnectionsSelectResponse, LogsGetData, LogsGetError, LogsGetResponse, LogsListData, LogsListError, LogsListResponse, MediaAbortData, MediaAbortError, MediaAbortResponse, MediaCompleteData, MediaCompleteError, MediaCompleteResponse, MediaCreateData, MediaCreateError, MediaCreateResponse, MediaDeleteData, MediaDeleteError, MediaDeleteResponse, MediaGetData, MediaGetError, MediaGetResponse, MediaListData, MediaListError, MediaListPartsData, MediaListPartsError, MediaListPartsResponse, MediaListResponse, MediaSignPartData, MediaSignPartError, MediaSignPartResponse, MediaUpdateData, MediaUpdateError, MediaUpdateResponse, PostsCreateData, PostsCreateError, PostsCreateResponse, PostsDeleteData, PostsDeleteError, PostsDeleteResponse, PostsGetAnalyticsData, PostsGetAnalyticsError, PostsGetAnalyticsResponse, PostsGetData, PostsGetError, PostsGetResponse, PostsListData, PostsListError, PostsListResponse, PostsRetryData, PostsRetryError, PostsRetryResponse, PostsUpdateData, PostsUpdateError, PostsUpdateResponse, PostsValidateData, PostsValidateError, PostsValidateResponse, ProfilesCreateData, ProfilesCreateError, ProfilesCreateResponse, ProfilesDeleteData, ProfilesDeleteError, ProfilesDeleteResponse, ProfilesGetData, ProfilesGetError, ProfilesGetResponse, ProfilesListData, ProfilesListError, ProfilesListResponse, ProfilesUpdateData, ProfilesUpdateError, ProfilesUpdateResponse, TiktokCreatorInfoData, TiktokCreatorInfoError, TiktokCreatorInfoResponse, TokensMintData, TokensMintError, TokensMintResponse, WebhooksCreateEndpointData, WebhooksCreateEndpointError, WebhooksCreateEndpointResponse, WebhooksCreatePortalData, WebhooksCreatePortalError, WebhooksCreatePortalResponse, WebhooksDeleteEndpointData, WebhooksDeleteEndpointError, WebhooksDeleteEndpointResponse, WebhooksGetEndpointData, WebhooksGetEndpointError, WebhooksGetEndpointResponse, WebhooksListEndpointsData, WebhooksListEndpointsError, WebhooksListEndpointsResponse, WebhooksListEventTypesData, WebhooksListEventTypesError, WebhooksListEventTypesResponse, WebhooksPingData, WebhooksPingError, WebhooksPingResponse, WebhooksUpdateEndpointData, WebhooksUpdateEndpointError, WebhooksUpdateEndpointResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n _id: string;\n _infinite?: boolean;\n tags?: ReadonlyArray<string>;\n }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n QueryKey<TOptions>[0]\n] => {\n const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n if (infinite) {\n params._infinite = infinite;\n }\n if (tags) {\n params.tags = tags;\n }\n if (options?.body) {\n params.body = options.body;\n }\n if (options?.headers) {\n params.headers = options.headers;\n }\n if (options?.path) {\n params.path = options.path;\n }\n if (options?.query) {\n params.query = options.query;\n }\n return [params];\n};\n\nexport const profilesListQueryKey = (options?: Options<ProfilesListData>) => createQueryKey('profilesList', options);\n\n/**\n * List profiles\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the profiles under your account, newest first.\n */\nexport const profilesListOptions = (options?: Options<ProfilesListData>) => queryOptions<ProfilesListResponse, ProfilesListError, ProfilesListResponse, ReturnType<typeof profilesListQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await profilesList({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: profilesListQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n const params = { ...queryKey[0] };\n if (page.body) {\n params.body = {\n ...queryKey[0].body as any,\n ...page.body as any\n };\n }\n if (page.headers) {\n params.headers = {\n ...queryKey[0].headers,\n ...page.headers\n };\n }\n if (page.path) {\n params.path = {\n ...queryKey[0].path as any,\n ...page.path as any\n };\n }\n if (page.query) {\n params.query = {\n ...queryKey[0].query as any,\n ...page.query as any\n };\n }\n return params as unknown as typeof page;\n};\n\nexport const profilesListInfiniteQueryKey = (options?: Options<ProfilesListData>): QueryKey<Options<ProfilesListData>> => createQueryKey('profilesList', options, true);\n\n/**\n * List profiles\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the profiles under your account, newest first.\n */\nexport const profilesListInfiniteOptions = (options?: Options<ProfilesListData>) => infiniteQueryOptions<ProfilesListResponse, ProfilesListError, InfiniteData<ProfilesListResponse>, QueryKey<Options<ProfilesListData>>, number | Pick<QueryKey<Options<ProfilesListData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<ProfilesListData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await profilesList({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: profilesListInfiniteQueryKey(options)\n});\n\n/**\n * Create a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:write` with account-wide profile scope (`all`); a profile-scoped token cannot create.\n *\n * Creates a profile — a client/brand workspace under your account, and the unit connections attach to.\n */\nexport const profilesCreateMutation = (options?: Partial<Options<ProfilesCreateData>>): UseMutationOptions<ProfilesCreateResponse, ProfilesCreateError, Options<ProfilesCreateData>> => {\n const mutationOptions: UseMutationOptions<ProfilesCreateResponse, ProfilesCreateError, Options<ProfilesCreateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await profilesCreate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Delete a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:delete` scoped to the target profile.\n *\n * Deletes a profile. The profile must have no connections — delete its connections first (and a connection in turn cannot be deleted while a post still publishes through it).\n */\nexport const profilesDeleteMutation = (options?: Partial<Options<ProfilesDeleteData>>): UseMutationOptions<ProfilesDeleteResponse, ProfilesDeleteError, Options<ProfilesDeleteData>> => {\n const mutationOptions: UseMutationOptions<ProfilesDeleteResponse, ProfilesDeleteError, Options<ProfilesDeleteData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await profilesDelete({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const profilesGetQueryKey = (options: Options<ProfilesGetData>) => createQueryKey('profilesGet', options);\n\n/**\n * Retrieve a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:read` scoped to the target profile.\n *\n * Retrieves a single profile by id.\n */\nexport const profilesGetOptions = (options: Options<ProfilesGetData>) => queryOptions<ProfilesGetResponse, ProfilesGetError, ProfilesGetResponse, ReturnType<typeof profilesGetQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await profilesGet({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: profilesGetQueryKey(options)\n});\n\n/**\n * Update a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:write` scoped to the target profile.\n *\n * Updates a profile. Send only the fields you want to change; provide at least one.\n */\nexport const profilesUpdateMutation = (options?: Partial<Options<ProfilesUpdateData>>): UseMutationOptions<ProfilesUpdateResponse, ProfilesUpdateError, Options<ProfilesUpdateData>> => {\n const mutationOptions: UseMutationOptions<ProfilesUpdateResponse, ProfilesUpdateError, Options<ProfilesUpdateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await profilesUpdate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const connectionsListByProfileQueryKey = (options: Options<ConnectionsListByProfileData>) => createQueryKey('connectionsListByProfile', options);\n\n/**\n * List a profile's connections\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the target profile.\n *\n * Lists the external accounts connected to a profile, most recent first. Returns 404 if the profile doesn't exist in your account.\n */\nexport const connectionsListByProfileOptions = (options: Options<ConnectionsListByProfileData>) => queryOptions<ConnectionsListByProfileResponse, ConnectionsListByProfileError, ConnectionsListByProfileResponse, ReturnType<typeof connectionsListByProfileQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await connectionsListByProfile({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: connectionsListByProfileQueryKey(options)\n});\n\nexport const connectionsListByProfileInfiniteQueryKey = (options: Options<ConnectionsListByProfileData>): QueryKey<Options<ConnectionsListByProfileData>> => createQueryKey('connectionsListByProfile', options, true);\n\n/**\n * List a profile's connections\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the target profile.\n *\n * Lists the external accounts connected to a profile, most recent first. Returns 404 if the profile doesn't exist in your account.\n */\nexport const connectionsListByProfileInfiniteOptions = (options: Options<ConnectionsListByProfileData>) => infiniteQueryOptions<ConnectionsListByProfileResponse, ConnectionsListByProfileError, InfiniteData<ConnectionsListByProfileResponse>, QueryKey<Options<ConnectionsListByProfileData>>, number | Pick<QueryKey<Options<ConnectionsListByProfileData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<ConnectionsListByProfileData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await connectionsListByProfile({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: connectionsListByProfileInfiniteQueryKey(options)\n});\n\n/**\n * Delete a connection\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:delete` scoped to the profile that owns the connection.\n *\n * Disconnects a connection. Returns a deletion marker; returns 404 if it does not exist in your account. Disconnect is unconditional — any scheduled posts that target this connection are not blocked; they fail gracefully at publish time with a `connection_removed` error until you reconnect and reschedule.\n */\nexport const connectionsDeleteMutation = (options?: Partial<Options<ConnectionsDeleteData>>): UseMutationOptions<ConnectionsDeleteResponse, ConnectionsDeleteError, Options<ConnectionsDeleteData>> => {\n const mutationOptions: UseMutationOptions<ConnectionsDeleteResponse, ConnectionsDeleteError, Options<ConnectionsDeleteData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await connectionsDelete({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const connectionsGetQueryKey = (options: Options<ConnectionsGetData>) => createQueryKey('connectionsGet', options);\n\n/**\n * Retrieve a connection\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Retrieves a single connection by id.\n */\nexport const connectionsGetOptions = (options: Options<ConnectionsGetData>) => queryOptions<ConnectionsGetResponse, ConnectionsGetError, ConnectionsGetResponse, ReturnType<typeof connectionsGetQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await connectionsGet({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: connectionsGetQueryKey(options)\n});\n\n/**\n * Select a connection account\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:write` scoped to the profile that owns the connection.\n *\n * Activates a pending connection by choosing which external account (e.g. which Facebook Page) it uses. The account must be one reachable through the connection’s OAuth grant; its canonical name + currency are resolved server-side from discovery, so the stored display values can’t be spoofed by the caller.\n */\nexport const connectionsSelectMutation = (options?: Partial<Options<ConnectionsSelectData>>): UseMutationOptions<ConnectionsSelectResponse, ConnectionsSelectError, Options<ConnectionsSelectData>> => {\n const mutationOptions: UseMutationOptions<ConnectionsSelectResponse, ConnectionsSelectError, Options<ConnectionsSelectData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await connectionsSelect({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const connectionsListAccountsQueryKey = (options: Options<ConnectionsListAccountsData>) => createQueryKey('connectionsListAccounts', options);\n\n/**\n * List a connection’s discoverable accounts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Lists the external accounts reachable through this connection’s OAuth grant — the picker shown after OAuth, while the connection is still pending account selection. Returns 404 if the connection does not exist in your account, and 501 if account discovery is not yet supported for the connection’s platform.\n */\nexport const connectionsListAccountsOptions = (options: Options<ConnectionsListAccountsData>) => queryOptions<ConnectionsListAccountsResponse, ConnectionsListAccountsError, ConnectionsListAccountsResponse, ReturnType<typeof connectionsListAccountsQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await connectionsListAccounts({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: connectionsListAccountsQueryKey(options)\n});\n\n/**\n * Connect a platform account\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:write` scoped to the target profile.\n *\n * Starts an OAuth connect flow for a platform on this profile. Returns a short-lived session the client uses to authorize; the connection is created once authorization succeeds.\n */\nexport const connectionsConnectMutation = (options?: Partial<Options<ConnectionsConnectData>>): UseMutationOptions<ConnectionsConnectResponse, ConnectionsConnectError, Options<ConnectionsConnectData>> => {\n const mutationOptions: UseMutationOptions<ConnectionsConnectResponse, ConnectionsConnectError, Options<ConnectionsConnectData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await connectionsConnect({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const connectionsGetAnalyticsQueryKey = (options: Options<ConnectionsGetAnalyticsData>) => createQueryKey('connectionsGetAnalytics', options);\n\n/**\n * Retrieve account analytics\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Reads a connected account’s totals and its daily activity live from the platform: the last 60 days for TikTok, 30 for Instagram and 90 for Facebook Pages. TikTok, Instagram and Facebook Page connections are supported. TikTok finalizes a day 24–48 hours after it ends, and Meta updates Page insights about once a day. Returns 404 if the connection does not exist in your account, 501 if its platform has no analytics yet, 409 if the account must be reconnected, and 502 if the platform’s call fails.\n */\nexport const connectionsGetAnalyticsOptions = (options: Options<ConnectionsGetAnalyticsData>) => queryOptions<ConnectionsGetAnalyticsResponse, ConnectionsGetAnalyticsError, ConnectionsGetAnalyticsResponse, ReturnType<typeof connectionsGetAnalyticsQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await connectionsGetAnalytics({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: connectionsGetAnalyticsQueryKey(options)\n});\n\nexport const mediaListQueryKey = (options?: Options<MediaListData>) => createQueryKey('mediaList', options);\n\n/**\n * List media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the media assets under your account, newest first. Filter by profile, status, kind, your own external_id, or metadata.\n */\nexport const mediaListOptions = (options?: Options<MediaListData>) => queryOptions<MediaListResponse, MediaListError, MediaListResponse, ReturnType<typeof mediaListQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await mediaList({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: mediaListQueryKey(options)\n});\n\nexport const mediaListInfiniteQueryKey = (options?: Options<MediaListData>): QueryKey<Options<MediaListData>> => createQueryKey('mediaList', options, true);\n\n/**\n * List media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the media assets under your account, newest first. Filter by profile, status, kind, your own external_id, or metadata.\n */\nexport const mediaListInfiniteOptions = (options?: Options<MediaListData>) => infiniteQueryOptions<MediaListResponse, MediaListError, InfiniteData<MediaListResponse>, QueryKey<Options<MediaListData>>, number | Pick<QueryKey<Options<MediaListData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<MediaListData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await mediaList({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: mediaListInfiniteQueryKey(options)\n});\n\n/**\n * Upload media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the target profile.\n *\n * Creates a media asset. Two ways to supply the bytes: (1) omit `source_url` and upload the bytes with the returned multipart `upload` session — chunk the file at `part_size`, sign each part via `POST /media/{id}/multipart/sign`, PUT the bytes, then `POST /media/{id}/multipart/complete` (the direct-upload path; `upload` is non-null and resumable), or (2) supply a public `https` `source_url` and we fetch the bytes server-side, validate, transform, and store them (the import path; `upload` is null). Either way the asset settles through the same probe/transform flow.\n */\nexport const mediaCreateMutation = (options?: Partial<Options<MediaCreateData>>): UseMutationOptions<MediaCreateResponse, MediaCreateError, Options<MediaCreateData>> => {\n const mutationOptions: UseMutationOptions<MediaCreateResponse, MediaCreateError, Options<MediaCreateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaCreate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Delete media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:delete` scoped to the profile that owns the media asset.\n *\n * Deletes a media asset and its stored renditions.\n */\nexport const mediaDeleteMutation = (options?: Partial<Options<MediaDeleteData>>): UseMutationOptions<MediaDeleteResponse, MediaDeleteError, Options<MediaDeleteData>> => {\n const mutationOptions: UseMutationOptions<MediaDeleteResponse, MediaDeleteError, Options<MediaDeleteData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaDelete({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const mediaGetQueryKey = (options: Options<MediaGetData>) => createQueryKey('mediaGet', options);\n\n/**\n * Retrieve media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:read` scoped to the profile that owns the media asset.\n *\n * Retrieves a media asset, including its per-platform processing status and renditions.\n */\nexport const mediaGetOptions = (options: Options<MediaGetData>) => queryOptions<MediaGetResponse, MediaGetError, MediaGetResponse, ReturnType<typeof mediaGetQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await mediaGet({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: mediaGetQueryKey(options)\n});\n\n/**\n * Update media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Updates a media asset (alt text, metadata, external_id) or adds `targets` to pre-warm more platforms. Send only the fields to change.\n */\nexport const mediaUpdateMutation = (options?: Partial<Options<MediaUpdateData>>): UseMutationOptions<MediaUpdateResponse, MediaUpdateError, Options<MediaUpdateData>> => {\n const mutationOptions: UseMutationOptions<MediaUpdateResponse, MediaUpdateError, Options<MediaUpdateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaUpdate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Sign an upload part\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Returns a presigned URL to PUT one part of a multipart upload. Chunk the file at the session’s `part_size` and sign each 1-indexed part; read each part PUT’s `ETag` for `complete`.\n */\nexport const mediaSignPartMutation = (options?: Partial<Options<MediaSignPartData>>): UseMutationOptions<MediaSignPartResponse, MediaSignPartError, Options<MediaSignPartData>> => {\n const mutationOptions: UseMutationOptions<MediaSignPartResponse, MediaSignPartError, Options<MediaSignPartData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaSignPart({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const mediaListPartsQueryKey = (options: Options<MediaListPartsData>) => createQueryKey('mediaListParts', options);\n\n/**\n * List uploaded parts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Lists the parts already uploaded for this asset’s multipart upload (ascending). Skip re-uploading these to resume after a dropped connection.\n */\nexport const mediaListPartsOptions = (options: Options<MediaListPartsData>) => queryOptions<MediaListPartsResponse, MediaListPartsError, MediaListPartsResponse, ReturnType<typeof mediaListPartsQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await mediaListParts({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: mediaListPartsQueryKey(options)\n});\n\n/**\n * Complete an upload\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Finishes a multipart upload by assembling the uploaded parts. Send every part as `{ part_number, etag }`. Idempotent: completing an already-finished upload returns the asset.\n */\nexport const mediaCompleteMutation = (options?: Partial<Options<MediaCompleteData>>): UseMutationOptions<MediaCompleteResponse, MediaCompleteError, Options<MediaCompleteData>> => {\n const mutationOptions: UseMutationOptions<MediaCompleteResponse, MediaCompleteError, Options<MediaCompleteData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaComplete({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Abort an upload\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Aborts an in-flight multipart upload and discards its parts. Idempotent: aborting an already-finished or unknown upload still returns the asset.\n */\nexport const mediaAbortMutation = (options?: Partial<Options<MediaAbortData>>): UseMutationOptions<MediaAbortResponse, MediaAbortError, Options<MediaAbortData>> => {\n const mutationOptions: UseMutationOptions<MediaAbortResponse, MediaAbortError, Options<MediaAbortData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaAbort({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const postsListQueryKey = (options?: Options<PostsListData>) => createQueryKey('postsList', options);\n\n/**\n * List posts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the posts under your account, newest first. Filter by profile or your own external_id.\n */\nexport const postsListOptions = (options?: Options<PostsListData>) => queryOptions<PostsListResponse, PostsListError, PostsListResponse, ReturnType<typeof postsListQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await postsList({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: postsListQueryKey(options)\n});\n\nexport const postsListInfiniteQueryKey = (options?: Options<PostsListData>): QueryKey<Options<PostsListData>> => createQueryKey('postsList', options, true);\n\n/**\n * List posts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the posts under your account, newest first. Filter by profile or your own external_id.\n */\nexport const postsListInfiniteOptions = (options?: Options<PostsListData>) => infiniteQueryOptions<PostsListResponse, PostsListError, InfiniteData<PostsListResponse>, QueryKey<Options<PostsListData>>, number | Pick<QueryKey<Options<PostsListData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<PostsListData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await postsList({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: postsListInfiniteQueryKey(options)\n});\n\n/**\n * Create a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the target profile.\n *\n * Composes a post + its per-channel variants. `publish` decides the outcome: `now` publishes immediately, `schedule` publishes at `schedule_at`, `draft` just stores it.\n */\nexport const postsCreateMutation = (options?: Partial<Options<PostsCreateData>>): UseMutationOptions<PostsCreateResponse, PostsCreateError, Options<PostsCreateData>> => {\n const mutationOptions: UseMutationOptions<PostsCreateResponse, PostsCreateError, Options<PostsCreateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await postsCreate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Delete a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:delete` scoped to the profile that owns the post.\n *\n * Deletes a post and its variants. Returns a deletion marker; 404 if it does not exist in your account. Already-published posts are not retracted from the platform.\n */\nexport const postsDeleteMutation = (options?: Partial<Options<PostsDeleteData>>): UseMutationOptions<PostsDeleteResponse, PostsDeleteError, Options<PostsDeleteData>> => {\n const mutationOptions: UseMutationOptions<PostsDeleteResponse, PostsDeleteError, Options<PostsDeleteData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await postsDelete({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const postsGetQueryKey = (options: Options<PostsGetData>) => createQueryKey('postsGet', options);\n\n/**\n * Retrieve a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the profile that owns the post.\n *\n * Retrieves a single post by id, including its per-channel variants and their derived status.\n */\nexport const postsGetOptions = (options: Options<PostsGetData>) => queryOptions<PostsGetResponse, PostsGetError, PostsGetResponse, ReturnType<typeof postsGetQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await postsGet({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: postsGetQueryKey(options)\n});\n\n/**\n * Update a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the profile that owns the post.\n *\n * Edits a post and/or transitions its publish state (`draft` / `schedule` / `now`). Valid only while the post is draft or scheduled. Send only the fields to change; providing `variants` replaces the whole set.\n */\nexport const postsUpdateMutation = (options?: Partial<Options<PostsUpdateData>>): UseMutationOptions<PostsUpdateResponse, PostsUpdateError, Options<PostsUpdateData>> => {\n const mutationOptions: UseMutationOptions<PostsUpdateResponse, PostsUpdateError, Options<PostsUpdateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await postsUpdate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Retry a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the profile that owns the post.\n *\n * Re-publishes the post’s failed variants now, through the same path as `publish: \"now\"`. Published variants are never touched, and a failure that may already be live on the platform (e.g. `x_publish_failed`) is never re-sent, so a retry can’t post twice. Failed attempts are never billed.\n */\nexport const postsRetryMutation = (options?: Partial<Options<PostsRetryData>>): UseMutationOptions<PostsRetryResponse, PostsRetryError, Options<PostsRetryData>> => {\n const mutationOptions: UseMutationOptions<PostsRetryResponse, PostsRetryError, Options<PostsRetryData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await postsRetry({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Validate a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the target profile.\n *\n * Runs the exact ownership + publish-readiness checks the create path runs under dry_run, with no side effects. Returns a per-issue verdict (`publishable` + `issues[]`) on 200; a reference to a connection/media outside the profile is a typed 422.\n */\nexport const postsValidateMutation = (options?: Partial<Options<PostsValidateData>>): UseMutationOptions<PostsValidateResponse, PostsValidateError, Options<PostsValidateData>> => {\n const mutationOptions: UseMutationOptions<PostsValidateResponse, PostsValidateError, Options<PostsValidateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await postsValidate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const postsGetAnalyticsQueryKey = (options: Options<PostsGetAnalyticsData>) => createQueryKey('postsGetAnalytics', options);\n\n/**\n * Retrieve post analytics\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the profile that owns the post.\n *\n * Reads each variant’s metrics live from its platform. TikTok, Instagram and Facebook Page variants return metrics; X and LinkedIn variants return `analytics_not_supported`. A variant with nothing to read (not published, connection removed, not public, deleted, or not yet reported by the platform) returns `analytics_no_data`. TikTok updates metrics 24–48 hours after the activity, and Meta can take up to 48 hours to report a new post. Returns 404 if the post does not exist in your account, 409 if an account must be reconnected, and 502 if the platform’s call fails.\n */\nexport const postsGetAnalyticsOptions = (options: Options<PostsGetAnalyticsData>) => queryOptions<PostsGetAnalyticsResponse, PostsGetAnalyticsError, PostsGetAnalyticsResponse, ReturnType<typeof postsGetAnalyticsQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await postsGetAnalytics({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: postsGetAnalyticsQueryKey(options)\n});\n\nexport const tiktokCreatorInfoQueryKey = (options: Options<TiktokCreatorInfoData>) => createQueryKey('tiktokCreatorInfo', options);\n\n/**\n * Retrieve TikTok creator info\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Retrieves a TikTok account’s publish options live from TikTok: the creator nickname + avatar, the audiences (`privacy_options`) available for photo posts, the Comment/Duet/Stitch availability, and the maximum video length. Returns 404 if the connection does not exist in your account or is not a TikTok connection, 409 if the TikTok account must be reconnected, and 502 if TikTok’s call fails.\n */\nexport const tiktokCreatorInfoOptions = (options: Options<TiktokCreatorInfoData>) => queryOptions<TiktokCreatorInfoResponse, TiktokCreatorInfoError, TiktokCreatorInfoResponse, ReturnType<typeof tiktokCreatorInfoQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await tiktokCreatorInfo({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: tiktokCreatorInfoQueryKey(options)\n});\n\nexport const logsListQueryKey = (options?: Options<LogsListData>) => createQueryKey('logsList', options);\n\n/**\n * List request logs\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the API activity for your account — one entry per action, newest first. Filter by profile, connection, platform, status, source, action, or time range.\n */\nexport const logsListOptions = (options?: Options<LogsListData>) => queryOptions<LogsListResponse, LogsListError, LogsListResponse, ReturnType<typeof logsListQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await logsList({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: logsListQueryKey(options)\n});\n\nexport const logsListInfiniteQueryKey = (options?: Options<LogsListData>): QueryKey<Options<LogsListData>> => createQueryKey('logsList', options, true);\n\n/**\n * List request logs\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the API activity for your account — one entry per action, newest first. Filter by profile, connection, platform, status, source, action, or time range.\n */\nexport const logsListInfiniteOptions = (options?: Options<LogsListData>) => infiniteQueryOptions<LogsListResponse, LogsListError, InfiniteData<LogsListResponse>, QueryKey<Options<LogsListData>>, number | Pick<QueryKey<Options<LogsListData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<LogsListData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await logsList({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: logsListInfiniteQueryKey(options)\n});\n\nexport const logsGetQueryKey = (options: Options<LogsGetData>) => createQueryKey('logsGet', options);\n\n/**\n * Retrieve a request log\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Retrieves a single request log entry by id.\n */\nexport const logsGetOptions = (options: Options<LogsGetData>) => queryOptions<LogsGetResponse, LogsGetError, LogsGetResponse, ReturnType<typeof logsGetQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await logsGet({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: logsGetQueryKey(options)\n});\n\nexport const webhooksListEndpointsQueryKey = (options?: Options<WebhooksListEndpointsData>) => createQueryKey('webhooksListEndpoints', options);\n\n/**\n * List webhook endpoints\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the webhook endpoints registered for your account.\n */\nexport const webhooksListEndpointsOptions = (options?: Options<WebhooksListEndpointsData>) => queryOptions<WebhooksListEndpointsResponse, WebhooksListEndpointsError, WebhooksListEndpointsResponse, ReturnType<typeof webhooksListEndpointsQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await webhooksListEndpoints({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: webhooksListEndpointsQueryKey(options)\n});\n\nexport const webhooksListEndpointsInfiniteQueryKey = (options?: Options<WebhooksListEndpointsData>): QueryKey<Options<WebhooksListEndpointsData>> => createQueryKey('webhooksListEndpoints', options, true);\n\n/**\n * List webhook endpoints\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the webhook endpoints registered for your account.\n */\nexport const webhooksListEndpointsInfiniteOptions = (options?: Options<WebhooksListEndpointsData>) => infiniteQueryOptions<WebhooksListEndpointsResponse, WebhooksListEndpointsError, InfiniteData<WebhooksListEndpointsResponse>, QueryKey<Options<WebhooksListEndpointsData>>, number | Pick<QueryKey<Options<WebhooksListEndpointsData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<WebhooksListEndpointsData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await webhooksListEndpoints({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: webhooksListEndpointsInfiniteQueryKey(options)\n});\n\n/**\n * Create a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Registers a URL to receive the chosen event types. Delivery, retries, and signing are handled for you.\n */\nexport const webhooksCreateEndpointMutation = (options?: Partial<Options<WebhooksCreateEndpointData>>): UseMutationOptions<WebhooksCreateEndpointResponse, WebhooksCreateEndpointError, Options<WebhooksCreateEndpointData>> => {\n const mutationOptions: UseMutationOptions<WebhooksCreateEndpointResponse, WebhooksCreateEndpointError, Options<WebhooksCreateEndpointData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await webhooksCreateEndpoint({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Delete a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Deletes a webhook endpoint. Delivery to it stops immediately.\n */\nexport const webhooksDeleteEndpointMutation = (options?: Partial<Options<WebhooksDeleteEndpointData>>): UseMutationOptions<WebhooksDeleteEndpointResponse, WebhooksDeleteEndpointError, Options<WebhooksDeleteEndpointData>> => {\n const mutationOptions: UseMutationOptions<WebhooksDeleteEndpointResponse, WebhooksDeleteEndpointError, Options<WebhooksDeleteEndpointData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await webhooksDeleteEndpoint({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const webhooksGetEndpointQueryKey = (options: Options<WebhooksGetEndpointData>) => createQueryKey('webhooksGetEndpoint', options);\n\n/**\n * Retrieve a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Retrieves a single webhook endpoint by id.\n */\nexport const webhooksGetEndpointOptions = (options: Options<WebhooksGetEndpointData>) => queryOptions<WebhooksGetEndpointResponse, WebhooksGetEndpointError, WebhooksGetEndpointResponse, ReturnType<typeof webhooksGetEndpointQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await webhooksGetEndpoint({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: webhooksGetEndpointQueryKey(options)\n});\n\n/**\n * Update a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Updates a webhook endpoint. Send only the fields you want to change; provide at least one.\n */\nexport const webhooksUpdateEndpointMutation = (options?: Partial<Options<WebhooksUpdateEndpointData>>): UseMutationOptions<WebhooksUpdateEndpointResponse, WebhooksUpdateEndpointError, Options<WebhooksUpdateEndpointData>> => {\n const mutationOptions: UseMutationOptions<WebhooksUpdateEndpointResponse, WebhooksUpdateEndpointError, Options<WebhooksUpdateEndpointData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await webhooksUpdateEndpoint({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Create a webhook portal link\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Mints a one-time App Portal URL where you (or your customer) self-serve webhook delivery logs and signing secrets.\n */\nexport const webhooksCreatePortalMutation = (options?: Partial<Options<WebhooksCreatePortalData>>): UseMutationOptions<WebhooksCreatePortalResponse, WebhooksCreatePortalError, Options<WebhooksCreatePortalData>> => {\n const mutationOptions: UseMutationOptions<WebhooksCreatePortalResponse, WebhooksCreatePortalError, Options<WebhooksCreatePortalData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await webhooksCreatePortal({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const webhooksListEventTypesQueryKey = (options?: Options<WebhooksListEventTypesData>) => createQueryKey('webhooksListEventTypes', options);\n\n/**\n * List webhook event types\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the event types you can subscribe an endpoint to (the catalog).\n */\nexport const webhooksListEventTypesOptions = (options?: Options<WebhooksListEventTypesData>) => queryOptions<WebhooksListEventTypesResponse, WebhooksListEventTypesError, WebhooksListEventTypesResponse, ReturnType<typeof webhooksListEventTypesQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await webhooksListEventTypes({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: webhooksListEventTypesQueryKey(options)\n});\n\n/**\n * Send a test event\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Emits a `webhook.ping` event to your subscribed endpoints so you can verify delivery end to end.\n */\nexport const webhooksPingMutation = (options?: Partial<Options<WebhooksPingData>>): UseMutationOptions<WebhooksPingResponse, WebhooksPingError, Options<WebhooksPingData>> => {\n const mutationOptions: UseMutationOptions<WebhooksPingResponse, WebhooksPingError, Options<WebhooksPingData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await webhooksPing({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Mint a scoped frontend token\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Mints a short-lived, profile-scoped token from your secret `pr_` key. Call this from your backend; the returned token is safe to hand to a browser, which then calls the Postrun API directly. The secret key never touches the browser.\n */\nexport const tokensMintMutation = (options?: Partial<Options<TokensMintData>>): UseMutationOptions<TokensMintResponse, TokensMintError, Options<TokensMintData>> => {\n const mutationOptions: UseMutationOptions<TokensMintResponse, TokensMintError, Options<TokensMintData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await tokensMint({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/client/core/bodySerializer.gen.ts","../src/client/core/serverSentEvents.gen.ts","../src/client/core/pathSerializer.gen.ts","../src/client/core/utils.gen.ts","../src/client/core/auth.gen.ts","../src/client/client/utils.gen.ts","../src/client/client/client.gen.ts","../src/client/client.gen.ts","../src/client/sdk.gen.ts","../src/client/@tanstack/react-query.gen.ts"],"names":["joinedValues","config","request","url"],"mappings":";;;;;AA2DO,IAAM,kBAAA,GAAqB;AAAA,EAChC,cAAA,EAAgB,CAAC,IAAA,KACf,IAAA,CAAK,UAAU,IAAA,EAAM,CAAC,IAAA,EAAM,KAAA,KAAW,OAAO,KA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kD,cAAA,CAAe,0BAA0B,OAAO;AAS1I,IAAM,6BAAA,GAAgC,CAAC,OAAA,KAAkD,YAAA,CAA6J;AAAA,EACzP,OAAA,EAAS,OAAO,EAAE,QAAA,EAAU,QAAO,KAAM;AACrC,IAAA,MAAM,EAAE,IAAA,EAAK,GAAI,MAAM,sBAAA,CAAuB;AAAA,MAC1C,GAAG,OAAA;AAAA,MACH,GAAG,SAAS,CAAC,CAAA;AAAA,MACb,MAAA;AAAA,MACA,YAAA,EAAc;AAAA,KACjB,CAAA;AACD,IAAA,OAAO,IAAA;AAAA,EACX,CAAA;AAAA,EACA,QAAA,EAAU,+BAA+B,OAAO;AACpD,CAAC;AASM,IAAM,oBAAA,GAAuB,CAAC,OAAA,KAAyI;AAC1K,EAAA,MAAM,eAAA,GAA0G;AAAA,IAC5G,UAAA,EAAY,OAAO,SAAA,KAAc;AAC7B,MAAA,MAAM,EAAE,IAAA,EAAK,GAAI,MAAM,YAAA,CAAa;AAAA,QAChC,GAAG,OAAA;AAAA,QACH,GAAG,SAAA;AAAA,QACH,YAAA,EAAc;AAAA,OACjB,CAAA;AACD,MAAA,OAAO,IAAA;AAAA,IACX;AAAA,GACJ;AACA,EAAA,OAAO,eAAA;AACX;AASO,IAAM,kBAAA,GAAqB,CAAC,OAAA,KAAiI;AAChK,EAAA,MAAM,eAAA,GAAoG;AAAA,IACtG,UAAA,EAAY,OAAO,SAAA,KAAc;AAC7B,MAAA,MAAM,EAAE,IAAA,EAAK,GAAI,MAAM,UAAA,CAAW;AAAA,QAC9B,GAAG,OAAA;AAAA,QACH,GAAG,SAAA;AAAA,QACH,YAAA,EAAc;AAAA,OACjB,CAAA;AACD,MAAA,OAAO,IAAA;AAAA,IACX;AAAA,GACJ;AACA,EAAA,OAAO,eAAA;AACX","file":"query.js","sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen';\n\nexport type QuerySerializer = (query: Record<string, unknown>) => string;\n\nexport type BodySerializer = (body: unknown) => unknown;\n\ntype QuerySerializerOptionsObject = {\n allowReserved?: boolean;\n array?: Partial<SerializerOptions<ArrayStyle>>;\n object?: Partial<SerializerOptions<ObjectStyle>>;\n};\n\nexport type QuerySerializerOptions = QuerySerializerOptionsObject & {\n /**\n * Per-parameter serialization overrides. When provided, these settings\n * override the global array/object settings for specific parameter names.\n */\n parameters?: Record<string, QuerySerializerOptionsObject>;\n};\n\nconst serializeFormDataPair = (data: FormData, key: string, value: unknown): void => {\n if (typeof value === 'string' || value instanceof Blob) {\n data.append(key, value);\n } else if (value instanceof Date) {\n data.append(key, value.toISOString());\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nconst serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown): void => {\n if (typeof value === 'string') {\n data.append(key, value);\n } else {\n data.append(key, JSON.stringify(value));\n }\n};\n\nexport const formDataBodySerializer = {\n bodySerializer: (body: unknown): FormData => {\n const data = new FormData();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeFormDataPair(data, key, v));\n } else {\n serializeFormDataPair(data, key, value);\n }\n });\n\n return data;\n },\n};\n\nexport const jsonBodySerializer = {\n bodySerializer: (body: unknown): string =>\n JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),\n};\n\nexport const urlSearchParamsBodySerializer = {\n bodySerializer: (body: unknown): string => {\n const data = new URLSearchParams();\n\n Object.entries(body as Record<string, unknown>).forEach(([key, value]) => {\n if (value === undefined || value === null) {\n return;\n }\n if (Array.isArray(value)) {\n value.forEach((v) => serializeUrlSearchParamsPair(data, key, v));\n } else {\n serializeUrlSearchParamsPair(data, key, value);\n }\n });\n\n return data.toString();\n },\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Config } from './types.gen';\n\nexport type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> &\n Pick<Config, 'method' | 'responseTransformer' | 'responseValidator'> & {\n /**\n * Fetch API implementation. You can use this option to provide a custom\n * fetch instance.\n *\n * @default globalThis.fetch\n */\n fetch?: typeof fetch;\n /**\n * Implementing clients can call request interceptors inside this hook.\n */\n onRequest?: (url: string, init: RequestInit) => Promise<Request>;\n /**\n * Callback invoked when a network or parsing error occurs during streaming.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param error The error that occurred.\n */\n onSseError?: (error: unknown) => void;\n /**\n * Callback invoked when an event is streamed from the server.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @param event Event streamed from the server.\n * @returns Nothing (void).\n */\n onSseEvent?: (event: StreamEvent<TData>) => void;\n serializedBody?: RequestInit['body'];\n /**\n * Default retry delay in milliseconds.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 3000\n */\n sseDefaultRetryDelay?: number;\n /**\n * Maximum number of retry attempts before giving up.\n */\n sseMaxRetryAttempts?: number;\n /**\n * Maximum retry delay in milliseconds.\n *\n * Applies only when exponential backoff is used.\n *\n * This option applies only if the endpoint returns a stream of events.\n *\n * @default 30000\n */\n sseMaxRetryDelay?: number;\n /**\n * Optional sleep function for retry backoff.\n *\n * Defaults to using `setTimeout`.\n */\n sseSleepFn?: (ms: number) => Promise<void>;\n url: string;\n };\n\nexport interface StreamEvent<TData = unknown> {\n data: TData;\n event?: string;\n id?: string;\n retry?: number;\n}\n\nexport type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {\n stream: AsyncGenerator<\n TData extends Record<string, unknown> ? TData[keyof TData] : TData,\n TReturn,\n TNext\n >;\n};\n\nexport function createSseClient<TData = unknown>({\n onRequest,\n onSseError,\n onSseEvent,\n responseTransformer,\n responseValidator,\n sseDefaultRetryDelay,\n sseMaxRetryAttempts,\n sseMaxRetryDelay,\n sseSleepFn,\n url,\n ...options\n}: ServerSentEventsOptions): ServerSentEventsResult<TData> {\n let lastEventId: string | undefined;\n\n const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms)));\n\n const createStream = async function* () {\n let retryDelay: number = sseDefaultRetryDelay ?? 3000;\n let attempt = 0;\n const signal = options.signal ?? new AbortController().signal;\n\n while (true) {\n if (signal.aborted) break;\n\n attempt++;\n\n const headers =\n options.headers instanceof Headers\n ? options.headers\n : new Headers(options.headers as Record<string, string> | undefined);\n\n if (lastEventId !== undefined) {\n headers.set('Last-Event-ID', lastEventId);\n }\n\n try {\n const requestInit: RequestInit = {\n redirect: 'follow',\n ...options,\n body: options.serializedBody,\n headers,\n signal,\n };\n let request = new Request(url, requestInit);\n if (onRequest) {\n request = await onRequest(url, requestInit);\n }\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = options.fetch ?? globalThis.fetch;\n const response = await _fetch(request);\n\n if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);\n\n if (!response.body) throw new Error('No body in SSE response');\n\n const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();\n\n let buffer = '';\n\n const abortHandler = () => {\n try {\n reader.cancel();\n } catch {\n // noop\n }\n };\n\n signal.addEventListener('abort', abortHandler);\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += value;\n buffer = buffer.replace(/\\r\\n?/g, '\\n'); // normalize line endings\n\n const chunks = buffer.split('\\n\\n');\n buffer = chunks.pop() ?? '';\n\n for (const chunk of chunks) {\n const lines = chunk.split('\\n');\n const dataLines: Array<string> = [];\n let eventName: string | undefined;\n\n for (const line of lines) {\n if (line.startsWith('data:')) {\n dataLines.push(line.replace(/^data:\\s*/, ''));\n } else if (line.startsWith('event:')) {\n eventName = line.replace(/^event:\\s*/, '');\n } else if (line.startsWith('id:')) {\n lastEventId = line.replace(/^id:\\s*/, '');\n } else if (line.startsWith('retry:')) {\n const parsed = Number.parseInt(line.replace(/^retry:\\s*/, ''), 10);\n if (!Number.isNaN(parsed)) {\n retryDelay = parsed;\n }\n }\n }\n\n let data: unknown;\n let parsedJson = false;\n\n if (dataLines.length) {\n const rawData = dataLines.join('\\n');\n try {\n data = JSON.parse(rawData);\n parsedJson = true;\n } catch {\n data = rawData;\n }\n }\n\n if (parsedJson) {\n if (responseValidator) {\n await responseValidator(data);\n }\n\n if (responseTransformer) {\n data = await responseTransformer(data);\n }\n }\n\n onSseEvent?.({\n data,\n event: eventName,\n id: lastEventId,\n retry: retryDelay,\n });\n\n if (dataLines.length) {\n yield data as any;\n }\n }\n }\n } finally {\n signal.removeEventListener('abort', abortHandler);\n reader.releaseLock();\n }\n\n break; // exit loop on normal completion\n } catch (error) {\n // connection failed or aborted; retry after delay\n onSseError?.(error);\n\n if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {\n break; // stop after firing error\n }\n\n // exponential backoff: double retry each attempt, cap at 30s\n const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);\n await sleep(backoff);\n }\n }\n };\n\n const stream = createStream();\n\n return { stream };\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\ninterface SerializeOptions<T> extends SerializePrimitiveOptions, SerializerOptions<T> {}\n\ninterface SerializePrimitiveOptions {\n allowReserved?: boolean;\n name: string;\n}\n\nexport interface SerializerOptions<T> {\n /**\n * @default true\n */\n explode: boolean;\n style: T;\n}\n\nexport type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';\nexport type ArraySeparatorStyle = ArrayStyle | MatrixStyle;\ntype MatrixStyle = 'label' | 'matrix' | 'simple';\nexport type ObjectStyle = 'form' | 'deepObject';\ntype ObjectSeparatorStyle = ObjectStyle | MatrixStyle;\n\ninterface SerializePrimitiveParam extends SerializePrimitiveOptions {\n value: string;\n}\n\nexport const separatorArrayExplode = (style: ArraySeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const separatorArrayNoExplode = (style: ArraySeparatorStyle): ',' | '|' | '%20' => {\n switch (style) {\n case 'form':\n return ',';\n case 'pipeDelimited':\n return '|';\n case 'spaceDelimited':\n return '%20';\n default:\n return ',';\n }\n};\n\nexport const separatorObjectExplode = (style: ObjectSeparatorStyle): '.' | ';' | ',' | '&' => {\n switch (style) {\n case 'label':\n return '.';\n case 'matrix':\n return ';';\n case 'simple':\n return ',';\n default:\n return '&';\n }\n};\n\nexport const serializeArrayParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n}: SerializeOptions<ArraySeparatorStyle> & {\n value: unknown[];\n}): string => {\n if (!explode) {\n const joinedValues = (\n allowReserved ? value : value.map((v) => encodeURIComponent(v as string))\n ).join(separatorArrayNoExplode(style));\n switch (style) {\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n case 'simple':\n return joinedValues;\n default:\n return `${name}=${joinedValues}`;\n }\n }\n\n const separator = separatorArrayExplode(style);\n const joinedValues = value\n .map((v) => {\n if (style === 'label' || style === 'simple') {\n return allowReserved ? v : encodeURIComponent(v as string);\n }\n\n return serializePrimitiveParam({\n allowReserved,\n name,\n value: v as string,\n });\n })\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n\nexport const serializePrimitiveParam = ({\n allowReserved,\n name,\n value,\n}: SerializePrimitiveParam): string => {\n if (value === undefined || value === null) {\n return '';\n }\n\n if (typeof value === 'object') {\n throw new Error(\n 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.',\n );\n }\n\n return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;\n};\n\nexport const serializeObjectParam = ({\n allowReserved,\n explode,\n name,\n style,\n value,\n valueOnly,\n}: SerializeOptions<ObjectSeparatorStyle> & {\n value: Record<string, unknown> | Date;\n valueOnly?: boolean;\n}): string => {\n if (value instanceof Date) {\n return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;\n }\n\n if (style !== 'deepObject' && !explode) {\n let values: string[] = [];\n Object.entries(value).forEach(([key, v]) => {\n values = [...values, key, allowReserved ? (v as string) : encodeURIComponent(v as string)];\n });\n const joinedValues = values.join(',');\n switch (style) {\n case 'form':\n return `${name}=${joinedValues}`;\n case 'label':\n return `.${joinedValues}`;\n case 'matrix':\n return `;${name}=${joinedValues}`;\n default:\n return joinedValues;\n }\n }\n\n const separator = separatorObjectExplode(style);\n const joinedValues = Object.entries(value)\n .map(([key, v]) =>\n serializePrimitiveParam({\n allowReserved,\n name: style === 'deepObject' ? `${name}[${key}]` : key,\n value: v as string,\n }),\n )\n .join(separator);\n return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { BodySerializer, QuerySerializer } from './bodySerializer.gen';\nimport {\n type ArraySeparatorStyle,\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from './pathSerializer.gen';\n\nexport interface PathSerializer {\n path: Record<string, unknown>;\n url: string;\n}\n\nexport const PATH_PARAM_RE: RegExp = /\\{[^{}]+\\}/g;\n\nexport const defaultPathSerializer = ({ path, url: _url }: PathSerializer): string => {\n let url = _url;\n const matches = _url.match(PATH_PARAM_RE);\n if (matches) {\n for (const match of matches) {\n let explode = false;\n let name = match.substring(1, match.length - 1);\n let style: ArraySeparatorStyle = 'simple';\n\n if (name.endsWith('*')) {\n explode = true;\n name = name.substring(0, name.length - 1);\n }\n\n if (name.startsWith('.')) {\n name = name.substring(1);\n style = 'label';\n } else if (name.startsWith(';')) {\n name = name.substring(1);\n style = 'matrix';\n }\n\n const value = path[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n if (Array.isArray(value)) {\n url = url.replace(match, serializeArrayParam({ explode, name, style, value }));\n continue;\n }\n\n if (typeof value === 'object') {\n url = url.replace(\n match,\n serializeObjectParam({\n explode,\n name,\n style,\n value: value as Record<string, unknown>,\n valueOnly: true,\n }),\n );\n continue;\n }\n\n if (style === 'matrix') {\n url = url.replace(\n match,\n `;${serializePrimitiveParam({\n name,\n value: value as string,\n })}`,\n );\n continue;\n }\n\n const replaceValue = encodeURIComponent(\n style === 'label' ? `.${value as string}` : (value as string),\n );\n url = url.replace(match, replaceValue);\n }\n }\n return url;\n};\n\nexport const getUrl = ({\n baseUrl,\n path,\n query,\n querySerializer,\n url: _url,\n}: {\n baseUrl?: string;\n path?: Record<string, unknown>;\n query?: Record<string, unknown>;\n querySerializer: QuerySerializer;\n url: string;\n}): string => {\n const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;\n let url = (baseUrl ?? '') + pathUrl;\n if (path) {\n url = defaultPathSerializer({ path, url });\n }\n let search = query ? querySerializer(query) : '';\n if (search.startsWith('?')) {\n search = search.substring(1);\n }\n if (search) {\n url += `?${search}`;\n }\n return url;\n};\n\nexport function getValidRequestBody(options: {\n body?: unknown;\n bodySerializer?: BodySerializer | null;\n serializedBody?: unknown;\n}): unknown {\n const hasBody = options.body !== undefined;\n const isSerializedBody = hasBody && options.bodySerializer;\n\n if (isSerializedBody) {\n if ('serializedBody' in options) {\n const hasSerializedBody =\n options.serializedBody !== undefined && options.serializedBody !== '';\n\n return hasSerializedBody ? options.serializedBody : null;\n }\n\n // not all clients implement a serializedBody property (i.e., client-axios)\n return options.body !== '' ? options.body : null;\n }\n\n // plain/text body\n if (hasBody) {\n return options.body;\n }\n\n // no body was provided\n return undefined;\n}\n","// This file is auto-generated by @hey-api/openapi-ts\n\nexport type AuthToken = string | undefined;\n\nexport interface Auth {\n /**\n * Which part of the request do we use to send the auth?\n *\n * @default 'header'\n */\n in?: 'header' | 'query' | 'cookie';\n /**\n * A unique identifier for the security scheme.\n *\n * Defined only when there are multiple security schemes whose `Auth`\n * shape would otherwise be identical.\n */\n key?: string;\n /**\n * Header or query parameter name.\n *\n * @default 'Authorization'\n */\n name?: string;\n scheme?: 'basic' | 'bearer';\n type: 'apiKey' | 'http';\n}\n\nexport const getAuthToken = async (\n auth: Auth,\n callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken,\n): Promise<string | undefined> => {\n const token = typeof callback === 'function' ? await callback(auth) : callback;\n\n if (!token) {\n return;\n }\n\n if (auth.scheme === 'bearer') {\n return `Bearer ${token}`;\n }\n\n if (auth.scheme === 'basic') {\n return `Basic ${btoa(token)}`;\n }\n\n return token;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { getAuthToken } from '../core/auth.gen';\nimport type { QuerySerializerOptions } from '../core/bodySerializer.gen';\nimport { jsonBodySerializer } from '../core/bodySerializer.gen';\nimport {\n serializeArrayParam,\n serializeObjectParam,\n serializePrimitiveParam,\n} from '../core/pathSerializer.gen';\nimport { getUrl } from '../core/utils.gen';\nimport type { Client, ClientOptions, Config, RequestOptions } from './types.gen';\n\nexport const createQuerySerializer = <T = unknown>({\n parameters = {},\n ...args\n}: QuerySerializerOptions = {}): ((queryParams: T) => string) => {\n const querySerializer = (queryParams: T): string => {\n const search: string[] = [];\n if (queryParams && typeof queryParams === 'object') {\n for (const name in queryParams) {\n const value = queryParams[name];\n\n if (value === undefined || value === null) {\n continue;\n }\n\n const options = parameters[name] || args;\n\n if (Array.isArray(value)) {\n const serializedArray = serializeArrayParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'form',\n value,\n ...options.array,\n });\n if (serializedArray) search.push(serializedArray);\n } else if (typeof value === 'object') {\n const serializedObject = serializeObjectParam({\n allowReserved: options.allowReserved,\n explode: true,\n name,\n style: 'deepObject',\n value: value as Record<string, unknown>,\n ...options.object,\n });\n if (serializedObject) search.push(serializedObject);\n } else {\n const serializedPrimitive = serializePrimitiveParam({\n allowReserved: options.allowReserved,\n name,\n value: value as string,\n });\n if (serializedPrimitive) search.push(serializedPrimitive);\n }\n }\n }\n return search.join('&');\n };\n return querySerializer;\n};\n\n/**\n * Infers parseAs value from provided Content-Type header.\n */\nexport const getParseAs = (contentType: string | null): Exclude<Config['parseAs'], 'auto'> => {\n if (!contentType) {\n // If no Content-Type header is provided, the best we can do is return the raw response body,\n // which is effectively the same as the 'stream' option.\n return 'stream';\n }\n\n const cleanContent = contentType.split(';')[0]?.trim();\n\n if (!cleanContent) {\n return;\n }\n\n if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) {\n return 'json';\n }\n\n if (cleanContent === 'multipart/form-data') {\n return 'formData';\n }\n\n if (\n ['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type))\n ) {\n return 'blob';\n }\n\n if (cleanContent.startsWith('text/')) {\n return 'text';\n }\n\n return;\n};\n\nconst checkForExistence = (\n options: Pick<RequestOptions, 'auth' | 'query'> & {\n headers: Headers;\n },\n name?: string,\n): boolean => {\n if (!name) {\n return false;\n }\n if (\n options.headers.has(name) ||\n options.query?.[name] ||\n options.headers.get('Cookie')?.includes(`${name}=`)\n ) {\n return true;\n }\n return false;\n};\n\nexport async function setAuthParams(\n options: Pick<RequestOptions, 'auth' | 'query' | 'security'> & {\n headers: Headers;\n },\n): Promise<void> {\n for (const auth of options.security ?? []) {\n if (checkForExistence(options, auth.name)) {\n continue;\n }\n\n const token = await getAuthToken(auth, options.auth);\n\n if (!token) {\n continue;\n }\n\n const name = auth.name ?? 'Authorization';\n\n switch (auth.in) {\n case 'query':\n if (!options.query) {\n options.query = {};\n }\n options.query[name] = token;\n break;\n case 'cookie':\n options.headers.append('Cookie', `${name}=${token}`);\n break;\n case 'header':\n default:\n options.headers.set(name, token);\n break;\n }\n }\n}\n\nexport const buildUrl: Client['buildUrl'] = (options) =>\n getUrl({\n baseUrl: options.baseUrl as string,\n path: options.path,\n query: options.query,\n querySerializer:\n typeof options.querySerializer === 'function'\n ? options.querySerializer\n : createQuerySerializer(options.querySerializer),\n url: options.url,\n });\n\nexport const mergeConfigs = (a: Config, b: Config): Config => {\n const config = { ...a, ...b };\n if (config.baseUrl?.endsWith('/')) {\n config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);\n }\n config.headers = mergeHeaders(a.headers, b.headers);\n return config;\n};\n\nconst headersEntries = (headers: Headers): Array<[string, string]> => {\n const entries: Array<[string, string]> = [];\n headers.forEach((value, key) => {\n entries.push([key, value]);\n });\n return entries;\n};\n\nexport const mergeHeaders = (\n ...headers: Array<Required<Config>['headers'] | undefined>\n): Headers => {\n const mergedHeaders = new Headers();\n for (const header of headers) {\n if (!header) {\n continue;\n }\n\n const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);\n\n for (const [key, value] of iterator) {\n if (value === null) {\n mergedHeaders.delete(key);\n } else if (Array.isArray(value)) {\n for (const v of value) {\n mergedHeaders.append(key, v as string);\n }\n } else if (value !== undefined) {\n // assume object headers are meant to be JSON stringified, i.e., their\n // content value in OpenAPI specification is 'application/json'\n mergedHeaders.set(\n key,\n typeof value === 'object' ? JSON.stringify(value) : (value as string),\n );\n }\n }\n }\n return mergedHeaders;\n};\n\ntype ErrInterceptor<Err, Res, Req, Options> = (\n error: Err,\n /** response may be undefined due to a network error where no response object is produced */\n response: Res | undefined,\n /** request may be undefined, because error may be from building the request object itself */\n request: Req | undefined,\n options: Options,\n) => Err | Promise<Err>;\n\ntype ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;\n\ntype ResInterceptor<Res, Req, Options> = (\n response: Res,\n request: Req,\n options: Options,\n) => Res | Promise<Res>;\n\nclass Interceptors<Interceptor> {\n fns: Array<Interceptor | null> = [];\n\n clear(): void {\n this.fns = [];\n }\n\n eject(id: number | Interceptor): void {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = null;\n }\n }\n\n exists(id: number | Interceptor): boolean {\n const index = this.getInterceptorIndex(id);\n return Boolean(this.fns[index]);\n }\n\n getInterceptorIndex(id: number | Interceptor): number {\n if (typeof id === 'number') {\n return this.fns[id] ? id : -1;\n }\n return this.fns.indexOf(id);\n }\n\n update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false {\n const index = this.getInterceptorIndex(id);\n if (this.fns[index]) {\n this.fns[index] = fn;\n return id;\n }\n return false;\n }\n\n use(fn: Interceptor): number {\n this.fns.push(fn);\n return this.fns.length - 1;\n }\n}\n\nexport interface Middleware<Req, Res, Err, Options> {\n error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;\n request: Interceptors<ReqInterceptor<Req, Options>>;\n response: Interceptors<ResInterceptor<Res, Req, Options>>;\n}\n\nexport const createInterceptors = <Req, Res, Err, Options>(): Middleware<\n Req,\n Res,\n Err,\n Options\n> => ({\n error: new Interceptors<ErrInterceptor<Err, Res, Req, Options>>(),\n request: new Interceptors<ReqInterceptor<Req, Options>>(),\n response: new Interceptors<ResInterceptor<Res, Req, Options>>(),\n});\n\nconst defaultQuerySerializer = createQuerySerializer({\n allowReserved: false,\n array: {\n explode: true,\n style: 'form',\n },\n object: {\n explode: true,\n style: 'deepObject',\n },\n});\n\nconst defaultHeaders = {\n 'Content-Type': 'application/json',\n};\n\nexport const createConfig = <T extends ClientOptions = ClientOptions>(\n override: Config<Omit<ClientOptions, keyof T> & T> = {},\n): Config<Omit<ClientOptions, keyof T> & T> => ({\n ...jsonBodySerializer,\n headers: defaultHeaders,\n parseAs: 'auto',\n querySerializer: defaultQuerySerializer,\n ...override,\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createSseClient } from '../core/serverSentEvents.gen';\nimport type { HttpMethod } from '../core/types.gen';\nimport { getValidRequestBody } from '../core/utils.gen';\nimport type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen';\nimport {\n buildUrl,\n createConfig,\n createInterceptors,\n getParseAs,\n mergeConfigs,\n mergeHeaders,\n setAuthParams,\n} from './utils.gen';\n\ntype ReqInit = Omit<RequestInit, 'body' | 'headers'> & {\n body?: any;\n headers: ReturnType<typeof mergeHeaders>;\n};\n\nexport const createClient = (config: Config = {}): Client => {\n let _config = mergeConfigs(createConfig(), config);\n\n const getConfig = (): Config => ({ ..._config });\n\n const setConfig = (config: Config): Config => {\n _config = mergeConfigs(_config, config);\n return getConfig();\n };\n\n const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();\n\n const beforeRequest = async <\n TData = unknown,\n TResponseStyle extends 'data' | 'fields' = 'fields',\n ThrowOnError extends boolean = boolean,\n Url extends string = string,\n >(\n options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,\n ) => {\n const opts = {\n ..._config,\n ...options,\n fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,\n headers: mergeHeaders(_config.headers, options.headers),\n serializedBody: undefined as string | undefined,\n };\n\n if (opts.security) {\n await setAuthParams(opts);\n }\n\n if (opts.requestValidator) {\n await opts.requestValidator(opts);\n }\n\n if (opts.body !== undefined && opts.bodySerializer) {\n opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined;\n }\n\n // remove Content-Type header if body is empty to avoid sending invalid requests\n if (opts.body === undefined || opts.serializedBody === '') {\n opts.headers.delete('Content-Type');\n }\n\n const resolvedOpts = opts as typeof opts &\n ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;\n const url = buildUrl(resolvedOpts);\n\n return { opts: resolvedOpts, url };\n };\n\n const request: Client['request'] = async (options) => {\n const throwOnError = options.throwOnError ?? _config.throwOnError;\n const responseStyle = options.responseStyle ?? _config.responseStyle;\n\n let request: Request | undefined;\n let response: Response | undefined;\n\n try {\n const { opts, url } = await beforeRequest(options);\n const requestInit: ReqInit = {\n redirect: 'follow',\n ...opts,\n body: getValidRequestBody(opts),\n };\n\n request = new Request(url, requestInit);\n\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n\n // fetch must be assigned here, otherwise it would throw the error:\n // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation\n const _fetch = opts.fetch!;\n\n response = await _fetch(request);\n\n for (const fn of interceptors.response.fns) {\n if (fn) {\n response = await fn(response, request, opts);\n }\n }\n\n const result = {\n request,\n response,\n };\n\n if (response.ok) {\n const parseAs =\n (opts.parseAs === 'auto'\n ? getParseAs(response.headers.get('Content-Type'))\n : opts.parseAs) ?? 'json';\n\n if (response.status === 204 || response.headers.get('Content-Length') === '0') {\n let emptyData: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'text':\n emptyData = await response[parseAs]();\n break;\n case 'formData':\n emptyData = new FormData();\n break;\n case 'stream':\n emptyData = response.body;\n break;\n case 'json':\n default:\n emptyData = {};\n break;\n }\n return opts.responseStyle === 'data'\n ? emptyData\n : {\n data: emptyData,\n ...result,\n };\n }\n\n let data: any;\n switch (parseAs) {\n case 'arrayBuffer':\n case 'blob':\n case 'formData':\n case 'text':\n data = await response[parseAs]();\n break;\n case 'json': {\n // Some servers return 200 with no Content-Length and empty body.\n // response.json() would throw; read as text and parse if non-empty.\n const text = await response.text();\n data = text ? JSON.parse(text) : {};\n break;\n }\n case 'stream':\n return opts.responseStyle === 'data'\n ? response.body\n : {\n data: response.body,\n ...result,\n };\n }\n\n if (parseAs === 'json') {\n if (opts.responseValidator) {\n await opts.responseValidator(data);\n }\n\n if (opts.responseTransformer) {\n data = await opts.responseTransformer(data);\n }\n }\n\n return opts.responseStyle === 'data'\n ? data\n : {\n data,\n ...result,\n };\n }\n\n const textError = await response.text();\n let jsonError: unknown;\n\n try {\n jsonError = JSON.parse(textError);\n } catch {\n // noop\n }\n\n throw jsonError ?? textError;\n } catch (error) {\n let finalError = error;\n\n for (const fn of interceptors.error.fns) {\n if (fn) {\n finalError = await fn(finalError, response, request, options as ResolvedRequestOptions);\n }\n }\n\n finalError = finalError || {};\n\n if (throwOnError) {\n throw finalError;\n }\n\n // TODO: we probably want to return error and improve types\n return responseStyle === 'data'\n ? undefined\n : {\n error: finalError,\n request,\n response,\n };\n }\n };\n\n const makeMethodFn = (method: Uppercase<HttpMethod>) => (options: RequestOptions) =>\n request({ ...options, method });\n\n const makeSseFn = (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => {\n const { opts, url } = await beforeRequest(options);\n return createSseClient({\n ...opts,\n body: opts.body as BodyInit | null | undefined,\n method,\n onRequest: async (url, init) => {\n let request = new Request(url, init);\n for (const fn of interceptors.request.fns) {\n if (fn) {\n request = await fn(request, opts);\n }\n }\n return request;\n },\n serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined,\n url,\n });\n };\n\n const _buildUrl: Client['buildUrl'] = (options) => buildUrl({ ..._config, ...options });\n\n return {\n buildUrl: _buildUrl,\n connect: makeMethodFn('CONNECT'),\n delete: makeMethodFn('DELETE'),\n get: makeMethodFn('GET'),\n getConfig,\n head: makeMethodFn('HEAD'),\n interceptors,\n options: makeMethodFn('OPTIONS'),\n patch: makeMethodFn('PATCH'),\n post: makeMethodFn('POST'),\n put: makeMethodFn('PUT'),\n request,\n setConfig,\n sse: {\n connect: makeSseFn('CONNECT'),\n delete: makeSseFn('DELETE'),\n get: makeSseFn('GET'),\n head: makeSseFn('HEAD'),\n options: makeSseFn('OPTIONS'),\n patch: makeSseFn('PATCH'),\n post: makeSseFn('POST'),\n put: makeSseFn('PUT'),\n trace: makeSseFn('TRACE'),\n },\n trace: makeMethodFn('TRACE'),\n } as Client;\n};\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type ClientOptions, type Config, createClient, createConfig } from './client';\nimport type { ClientOptions as ClientOptions2 } from './types.gen';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;\n\nexport const client: Client = createClient(createConfig<ClientOptions2>({ baseUrl: 'https://api.postrun.ai/v1', throwOnError: true }));\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { ConnectionsConnectData, ConnectionsConnectErrors, ConnectionsConnectResponses, ConnectionsDeleteData, ConnectionsDeleteErrors, ConnectionsDeleteResponses, ConnectionsGetAnalyticsData, ConnectionsGetAnalyticsErrors, ConnectionsGetAnalyticsResponses, ConnectionsGetData, ConnectionsGetErrors, ConnectionsGetResponses, ConnectionsListAccountsData, ConnectionsListAccountsErrors, ConnectionsListAccountsResponses, ConnectionsListByProfileData, ConnectionsListByProfileErrors, ConnectionsListByProfileResponses, ConnectionsSelectData, ConnectionsSelectErrors, ConnectionsSelectResponses, LogsGetData, LogsGetErrors, LogsGetResponses, LogsListData, LogsListErrors, LogsListResponses, MediaAbortData, MediaAbortErrors, MediaAbortResponses, MediaCompleteData, MediaCompleteErrors, MediaCompleteResponses, MediaCreateData, MediaCreateErrors, MediaCreateResponses, MediaDeleteData, MediaDeleteErrors, MediaDeleteResponses, MediaGetData, MediaGetErrors, MediaGetResponses, MediaListData, MediaListErrors, MediaListPartsData, MediaListPartsErrors, MediaListPartsResponses, MediaListResponses, MediaSignPartData, MediaSignPartErrors, MediaSignPartResponses, MediaUpdateData, MediaUpdateErrors, MediaUpdateResponses, PostsCreateData, PostsCreateErrors, PostsCreateResponses, PostsDeleteData, PostsDeleteErrors, PostsDeleteResponses, PostsGetAnalyticsData, PostsGetAnalyticsErrors, PostsGetAnalyticsResponses, PostsGetData, PostsGetErrors, PostsGetResponses, PostsListData, PostsListErrors, PostsListResponses, PostsRetryData, PostsRetryErrors, PostsRetryResponses, PostsUpdateData, PostsUpdateErrors, PostsUpdateResponses, PostsValidateData, PostsValidateErrors, PostsValidateResponses, ProfilesCreateData, ProfilesCreateErrors, ProfilesCreateResponses, ProfilesDeleteData, ProfilesDeleteErrors, ProfilesDeleteResponses, ProfilesGetData, ProfilesGetErrors, ProfilesGetResponses, ProfilesListData, ProfilesListErrors, ProfilesListResponses, ProfilesUpdateData, ProfilesUpdateErrors, ProfilesUpdateResponses, TiktokCreatorInfoData, TiktokCreatorInfoErrors, TiktokCreatorInfoResponses, TokensMintData, TokensMintErrors, TokensMintResponses, WebhooksCreateEndpointData, WebhooksCreateEndpointErrors, WebhooksCreateEndpointResponses, WebhooksCreatePortalData, WebhooksCreatePortalErrors, WebhooksCreatePortalResponses, WebhooksDeleteEndpointData, WebhooksDeleteEndpointErrors, WebhooksDeleteEndpointResponses, WebhooksGetEndpointData, WebhooksGetEndpointErrors, WebhooksGetEndpointResponses, WebhooksListEndpointsData, WebhooksListEndpointsErrors, WebhooksListEndpointsResponses, WebhooksListEventTypesData, WebhooksListEventTypesErrors, WebhooksListEventTypesResponses, WebhooksPingData, WebhooksPingErrors, WebhooksPingResponses, WebhooksUpdateEndpointData, WebhooksUpdateEndpointErrors, WebhooksUpdateEndpointResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {\n /**\n * You can provide a client instance returned by `createClient()` instead of\n * individual options. This might be also useful if you want to implement a\n * custom client.\n */\n client?: Client;\n /**\n * You can pass arbitrary values through the `meta` object. This can be\n * used to access values that aren't defined as part of the SDK function.\n */\n meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;\n};\n\n/**\n * List profiles\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the profiles under your account, newest first.\n */\nexport const profilesList = <ThrowOnError extends boolean = true>(options?: Options<ProfilesListData, ThrowOnError>): RequestResult<ProfilesListResponses, ProfilesListErrors, ThrowOnError> => (options?.client ?? client).get<ProfilesListResponses, ProfilesListErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles',\n ...options\n});\n\n/**\n * Create a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:write` with account-wide profile scope (`all`); a profile-scoped token cannot create.\n *\n * Creates a profile — a client/brand workspace under your account, and the unit connections attach to.\n */\nexport const profilesCreate = <ThrowOnError extends boolean = true>(options: Options<ProfilesCreateData, ThrowOnError>): RequestResult<ProfilesCreateResponses, ProfilesCreateErrors, ThrowOnError> => (options.client ?? client).post<ProfilesCreateResponses, ProfilesCreateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:delete` scoped to the target profile.\n *\n * Deletes a profile. The profile must have no connections — delete its connections first (and a connection in turn cannot be deleted while a post still publishes through it).\n */\nexport const profilesDelete = <ThrowOnError extends boolean = true>(options: Options<ProfilesDeleteData, ThrowOnError>): RequestResult<ProfilesDeleteResponses, ProfilesDeleteErrors, ThrowOnError> => (options.client ?? client).delete<ProfilesDeleteResponses, ProfilesDeleteErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles/{id}',\n ...options\n});\n\n/**\n * Retrieve a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:read` scoped to the target profile.\n *\n * Retrieves a single profile by id.\n */\nexport const profilesGet = <ThrowOnError extends boolean = true>(options: Options<ProfilesGetData, ThrowOnError>): RequestResult<ProfilesGetResponses, ProfilesGetErrors, ThrowOnError> => (options.client ?? client).get<ProfilesGetResponses, ProfilesGetErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles/{id}',\n ...options\n});\n\n/**\n * Update a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:write` scoped to the target profile.\n *\n * Updates a profile. Send only the fields you want to change; provide at least one.\n */\nexport const profilesUpdate = <ThrowOnError extends boolean = true>(options: Options<ProfilesUpdateData, ThrowOnError>): RequestResult<ProfilesUpdateResponses, ProfilesUpdateErrors, ThrowOnError> => (options.client ?? client).patch<ProfilesUpdateResponses, ProfilesUpdateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List a profile's connections\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the target profile.\n *\n * Lists the external accounts connected to a profile, most recent first. Returns 404 if the profile doesn't exist in your account.\n */\nexport const connectionsListByProfile = <ThrowOnError extends boolean = true>(options: Options<ConnectionsListByProfileData, ThrowOnError>): RequestResult<ConnectionsListByProfileResponses, ConnectionsListByProfileErrors, ThrowOnError> => (options.client ?? client).get<ConnectionsListByProfileResponses, ConnectionsListByProfileErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles/{id}/connections',\n ...options\n});\n\n/**\n * Delete a connection\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:delete` scoped to the profile that owns the connection.\n *\n * Disconnects a connection. Returns a deletion marker; returns 404 if it does not exist in your account. Disconnect is unconditional — any scheduled posts that target this connection are not blocked; they fail gracefully at publish time with a `connection_removed` error until you reconnect and reschedule.\n */\nexport const connectionsDelete = <ThrowOnError extends boolean = true>(options: Options<ConnectionsDeleteData, ThrowOnError>): RequestResult<ConnectionsDeleteResponses, ConnectionsDeleteErrors, ThrowOnError> => (options.client ?? client).delete<ConnectionsDeleteResponses, ConnectionsDeleteErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}',\n ...options\n});\n\n/**\n * Retrieve a connection\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Retrieves a single connection by id.\n */\nexport const connectionsGet = <ThrowOnError extends boolean = true>(options: Options<ConnectionsGetData, ThrowOnError>): RequestResult<ConnectionsGetResponses, ConnectionsGetErrors, ThrowOnError> => (options.client ?? client).get<ConnectionsGetResponses, ConnectionsGetErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}',\n ...options\n});\n\n/**\n * Select a connection account\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:write` scoped to the profile that owns the connection.\n *\n * Activates a pending connection by choosing which external account (e.g. which Facebook Page) it uses. The account must be one reachable through the connection’s OAuth grant; its canonical name + currency are resolved server-side from discovery, so the stored display values can’t be spoofed by the caller.\n */\nexport const connectionsSelect = <ThrowOnError extends boolean = true>(options: Options<ConnectionsSelectData, ThrowOnError>): RequestResult<ConnectionsSelectResponses, ConnectionsSelectErrors, ThrowOnError> => (options.client ?? client).patch<ConnectionsSelectResponses, ConnectionsSelectErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List a connection’s discoverable accounts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Lists the external accounts reachable through this connection’s OAuth grant — the picker shown after OAuth, while the connection is still pending account selection. Returns 404 if the connection does not exist in your account, and 501 if account discovery is not yet supported for the connection’s platform.\n */\nexport const connectionsListAccounts = <ThrowOnError extends boolean = true>(options: Options<ConnectionsListAccountsData, ThrowOnError>): RequestResult<ConnectionsListAccountsResponses, ConnectionsListAccountsErrors, ThrowOnError> => (options.client ?? client).get<ConnectionsListAccountsResponses, ConnectionsListAccountsErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}/accounts',\n ...options\n});\n\n/**\n * Connect a platform account\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:write` scoped to the target profile.\n *\n * Starts an OAuth connect flow for a platform on this profile. Returns a short-lived session the client uses to authorize; the connection is created once authorization succeeds.\n */\nexport const connectionsConnect = <ThrowOnError extends boolean = true>(options: Options<ConnectionsConnectData, ThrowOnError>): RequestResult<ConnectionsConnectResponses, ConnectionsConnectErrors, ThrowOnError> => (options.client ?? client).post<ConnectionsConnectResponses, ConnectionsConnectErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/profiles/{id}/connect',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Retrieve account analytics\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Reads a connected account’s totals and its daily activity live from the platform: the last 60 days for TikTok, 30 for Instagram and 90 for Facebook Pages. TikTok, Instagram and Facebook Page connections are supported. TikTok finalizes a day 24–48 hours after it ends, and Meta updates Page insights about once a day. Returns 404 if the connection does not exist in your account, 501 if its platform has no analytics yet, 409 if the account must be reconnected, and 502 if the platform’s call fails.\n */\nexport const connectionsGetAnalytics = <ThrowOnError extends boolean = true>(options: Options<ConnectionsGetAnalyticsData, ThrowOnError>): RequestResult<ConnectionsGetAnalyticsResponses, ConnectionsGetAnalyticsErrors, ThrowOnError> => (options.client ?? client).get<ConnectionsGetAnalyticsResponses, ConnectionsGetAnalyticsErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}/analytics',\n ...options\n});\n\n/**\n * List media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the media assets under your account, newest first. Filter by profile, status, kind, your own external_id, or metadata.\n */\nexport const mediaList = <ThrowOnError extends boolean = true>(options?: Options<MediaListData, ThrowOnError>): RequestResult<MediaListResponses, MediaListErrors, ThrowOnError> => (options?.client ?? client).get<MediaListResponses, MediaListErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media',\n ...options\n});\n\n/**\n * Upload media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the target profile.\n *\n * Creates a media asset. Two ways to supply the bytes: (1) omit `source_url` and upload the bytes with the returned multipart `upload` session — chunk the file at `part_size`, sign each part via `POST /media/{id}/multipart/sign`, PUT the bytes, then `POST /media/{id}/multipart/complete` (the direct-upload path; `upload` is non-null and resumable), or (2) supply a public `https` `source_url` and we fetch the bytes server-side, validate, transform, and store them (the import path; `upload` is null). Either way the asset settles through the same probe/transform flow.\n */\nexport const mediaCreate = <ThrowOnError extends boolean = true>(options: Options<MediaCreateData, ThrowOnError>): RequestResult<MediaCreateResponses, MediaCreateErrors, ThrowOnError> => (options.client ?? client).post<MediaCreateResponses, MediaCreateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:delete` scoped to the profile that owns the media asset.\n *\n * Deletes a media asset and its stored renditions.\n */\nexport const mediaDelete = <ThrowOnError extends boolean = true>(options: Options<MediaDeleteData, ThrowOnError>): RequestResult<MediaDeleteResponses, MediaDeleteErrors, ThrowOnError> => (options.client ?? client).delete<MediaDeleteResponses, MediaDeleteErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}',\n ...options\n});\n\n/**\n * Retrieve media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:read` scoped to the profile that owns the media asset.\n *\n * Retrieves a media asset, including its per-platform processing status and renditions.\n */\nexport const mediaGet = <ThrowOnError extends boolean = true>(options: Options<MediaGetData, ThrowOnError>): RequestResult<MediaGetResponses, MediaGetErrors, ThrowOnError> => (options.client ?? client).get<MediaGetResponses, MediaGetErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}',\n ...options\n});\n\n/**\n * Update media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Updates a media asset (alt text, metadata, external_id) or adds `targets` to pre-warm more platforms. Send only the fields to change.\n */\nexport const mediaUpdate = <ThrowOnError extends boolean = true>(options: Options<MediaUpdateData, ThrowOnError>): RequestResult<MediaUpdateResponses, MediaUpdateErrors, ThrowOnError> => (options.client ?? client).patch<MediaUpdateResponses, MediaUpdateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Sign an upload part\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Returns a presigned URL to PUT one part of a multipart upload. Chunk the file at the session’s `part_size` and sign each 1-indexed part; read each part PUT’s `ETag` for `complete`.\n */\nexport const mediaSignPart = <ThrowOnError extends boolean = true>(options: Options<MediaSignPartData, ThrowOnError>): RequestResult<MediaSignPartResponses, MediaSignPartErrors, ThrowOnError> => (options.client ?? client).post<MediaSignPartResponses, MediaSignPartErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}/multipart/sign',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * List uploaded parts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Lists the parts already uploaded for this asset’s multipart upload (ascending). Skip re-uploading these to resume after a dropped connection.\n */\nexport const mediaListParts = <ThrowOnError extends boolean = true>(options: Options<MediaListPartsData, ThrowOnError>): RequestResult<MediaListPartsResponses, MediaListPartsErrors, ThrowOnError> => (options.client ?? client).get<MediaListPartsResponses, MediaListPartsErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}/multipart/parts',\n ...options\n});\n\n/**\n * Complete an upload\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Finishes a multipart upload by assembling the uploaded parts. Send every part as `{ part_number, etag }`. Idempotent: completing an already-finished upload returns the asset.\n */\nexport const mediaComplete = <ThrowOnError extends boolean = true>(options: Options<MediaCompleteData, ThrowOnError>): RequestResult<MediaCompleteResponses, MediaCompleteErrors, ThrowOnError> => (options.client ?? client).post<MediaCompleteResponses, MediaCompleteErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}/multipart/complete',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Abort an upload\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Aborts an in-flight multipart upload and discards its parts. Idempotent: aborting an already-finished or unknown upload still returns the asset.\n */\nexport const mediaAbort = <ThrowOnError extends boolean = true>(options: Options<MediaAbortData, ThrowOnError>): RequestResult<MediaAbortResponses, MediaAbortErrors, ThrowOnError> => (options.client ?? client).post<MediaAbortResponses, MediaAbortErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/media/{id}/multipart/abort',\n ...options\n});\n\n/**\n * List posts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the posts under your account, newest first. Filter by profile or your own external_id.\n */\nexport const postsList = <ThrowOnError extends boolean = true>(options?: Options<PostsListData, ThrowOnError>): RequestResult<PostsListResponses, PostsListErrors, ThrowOnError> => (options?.client ?? client).get<PostsListResponses, PostsListErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts',\n ...options\n});\n\n/**\n * Create a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the target profile.\n *\n * Composes a post + its per-channel variants. `publish` decides the outcome: `now` publishes immediately, `schedule` publishes at `schedule_at`, `draft` just stores it. The response is the post in its current state. A post with a YouTube variant publishes in the background, and the request waits up to 4 minutes for it; if it is still `publishing` after the wait, use the `post.*` webhooks or poll `GET /v1/posts/{id}`.\n */\nexport const postsCreate = <ThrowOnError extends boolean = true>(options: Options<PostsCreateData, ThrowOnError>): RequestResult<PostsCreateResponses, PostsCreateErrors, ThrowOnError> => (options.client ?? client).post<PostsCreateResponses, PostsCreateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:delete` scoped to the profile that owns the post.\n *\n * Deletes a post and its variants. Returns a deletion marker; 404 if it does not exist in your account. Already-published posts are not retracted from the platform.\n */\nexport const postsDelete = <ThrowOnError extends boolean = true>(options: Options<PostsDeleteData, ThrowOnError>): RequestResult<PostsDeleteResponses, PostsDeleteErrors, ThrowOnError> => (options.client ?? client).delete<PostsDeleteResponses, PostsDeleteErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/{id}',\n ...options\n});\n\n/**\n * Retrieve a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the profile that owns the post.\n *\n * Retrieves a single post by id, including its per-channel variants and their derived status.\n */\nexport const postsGet = <ThrowOnError extends boolean = true>(options: Options<PostsGetData, ThrowOnError>): RequestResult<PostsGetResponses, PostsGetErrors, ThrowOnError> => (options.client ?? client).get<PostsGetResponses, PostsGetErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/{id}',\n ...options\n});\n\n/**\n * Update a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the profile that owns the post.\n *\n * Edits a post and/or transitions its publish state (`draft` / `schedule` / `now`). Valid only while the post is draft or scheduled. Send only the fields to change; providing `variants` replaces the whole set. The response is the post in its current state. A post with a YouTube variant publishes in the background, and the request waits up to 4 minutes for it; if it is still `publishing` after the wait, use the `post.*` webhooks or poll `GET /v1/posts/{id}`.\n */\nexport const postsUpdate = <ThrowOnError extends boolean = true>(options: Options<PostsUpdateData, ThrowOnError>): RequestResult<PostsUpdateResponses, PostsUpdateErrors, ThrowOnError> => (options.client ?? client).patch<PostsUpdateResponses, PostsUpdateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Retry a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the profile that owns the post.\n *\n * Re-publishes the post’s failed variants now, through the same path as `publish: \"now\"`. Published variants are never touched, and a failure that may already be live on the platform (e.g. `x_publish_failed`) is never re-sent, so a retry can’t post twice. Failed attempts are never billed. The response is the post in its current state. A post with a YouTube variant publishes in the background, and the request waits up to 4 minutes for it; if it is still `publishing` after the wait, use the `post.*` webhooks or poll `GET /v1/posts/{id}`.\n */\nexport const postsRetry = <ThrowOnError extends boolean = true>(options: Options<PostsRetryData, ThrowOnError>): RequestResult<PostsRetryResponses, PostsRetryErrors, ThrowOnError> => (options.client ?? client).post<PostsRetryResponses, PostsRetryErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/{id}/retry',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Validate a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the target profile.\n *\n * Runs the exact ownership + publish-readiness checks the create path runs under dry_run, with no side effects. Returns a per-issue verdict (`publishable` + `issues[]`) on 200; a reference to a connection/media outside the profile is a typed 422.\n */\nexport const postsValidate = <ThrowOnError extends boolean = true>(options: Options<PostsValidateData, ThrowOnError>): RequestResult<PostsValidateResponses, PostsValidateErrors, ThrowOnError> => (options.client ?? client).post<PostsValidateResponses, PostsValidateErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/validate',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Retrieve post analytics\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the profile that owns the post.\n *\n * Reads each variant’s metrics live from its platform. TikTok, Instagram and Facebook Page variants return metrics; X and LinkedIn variants return `analytics_not_supported`. A variant with nothing to read (not published, connection removed, not public, deleted, or not yet reported by the platform) returns `analytics_no_data`. TikTok updates metrics 24–48 hours after the activity, and Meta can take up to 48 hours to report a new post. Returns 404 if the post does not exist in your account, 409 if an account must be reconnected, and 502 if the platform’s call fails.\n */\nexport const postsGetAnalytics = <ThrowOnError extends boolean = true>(options: Options<PostsGetAnalyticsData, ThrowOnError>): RequestResult<PostsGetAnalyticsResponses, PostsGetAnalyticsErrors, ThrowOnError> => (options.client ?? client).get<PostsGetAnalyticsResponses, PostsGetAnalyticsErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/posts/{id}/analytics',\n ...options\n});\n\n/**\n * Retrieve TikTok creator info\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Retrieves a TikTok account’s publish options live from TikTok: the creator nickname + avatar, the audiences (`privacy_options`) available for photo posts, the Comment/Duet/Stitch availability, and the maximum video length. Returns 404 if the connection does not exist in your account or is not a TikTok connection, 409 if the TikTok account must be reconnected, and 502 if TikTok’s call fails.\n */\nexport const tiktokCreatorInfo = <ThrowOnError extends boolean = true>(options: Options<TiktokCreatorInfoData, ThrowOnError>): RequestResult<TiktokCreatorInfoResponses, TiktokCreatorInfoErrors, ThrowOnError> => (options.client ?? client).get<TiktokCreatorInfoResponses, TiktokCreatorInfoErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }, {\n key: 'frontendToken',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/connections/{id}/tiktok/creator-info',\n ...options\n});\n\n/**\n * List request logs\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the API activity for your account — one entry per action, newest first. Filter by profile, connection, platform, status, source, action, or time range.\n */\nexport const logsList = <ThrowOnError extends boolean = true>(options?: Options<LogsListData, ThrowOnError>): RequestResult<LogsListResponses, LogsListErrors, ThrowOnError> => (options?.client ?? client).get<LogsListResponses, LogsListErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/logs',\n ...options\n});\n\n/**\n * Retrieve a request log\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Retrieves a single request log entry by id.\n */\nexport const logsGet = <ThrowOnError extends boolean = true>(options: Options<LogsGetData, ThrowOnError>): RequestResult<LogsGetResponses, LogsGetErrors, ThrowOnError> => (options.client ?? client).get<LogsGetResponses, LogsGetErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/logs/{id}',\n ...options\n});\n\n/**\n * List webhook endpoints\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the webhook endpoints registered for your account.\n */\nexport const webhooksListEndpoints = <ThrowOnError extends boolean = true>(options?: Options<WebhooksListEndpointsData, ThrowOnError>): RequestResult<WebhooksListEndpointsResponses, WebhooksListEndpointsErrors, ThrowOnError> => (options?.client ?? client).get<WebhooksListEndpointsResponses, WebhooksListEndpointsErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/endpoints',\n ...options\n});\n\n/**\n * Create a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Registers a URL to receive the chosen event types. Delivery, retries, and signing are handled for you.\n */\nexport const webhooksCreateEndpoint = <ThrowOnError extends boolean = true>(options: Options<WebhooksCreateEndpointData, ThrowOnError>): RequestResult<WebhooksCreateEndpointResponses, WebhooksCreateEndpointErrors, ThrowOnError> => (options.client ?? client).post<WebhooksCreateEndpointResponses, WebhooksCreateEndpointErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/endpoints',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Delete a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Deletes a webhook endpoint. Delivery to it stops immediately.\n */\nexport const webhooksDeleteEndpoint = <ThrowOnError extends boolean = true>(options: Options<WebhooksDeleteEndpointData, ThrowOnError>): RequestResult<WebhooksDeleteEndpointResponses, WebhooksDeleteEndpointErrors, ThrowOnError> => (options.client ?? client).delete<WebhooksDeleteEndpointResponses, WebhooksDeleteEndpointErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/endpoints/{id}',\n ...options\n});\n\n/**\n * Retrieve a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Retrieves a single webhook endpoint by id.\n */\nexport const webhooksGetEndpoint = <ThrowOnError extends boolean = true>(options: Options<WebhooksGetEndpointData, ThrowOnError>): RequestResult<WebhooksGetEndpointResponses, WebhooksGetEndpointErrors, ThrowOnError> => (options.client ?? client).get<WebhooksGetEndpointResponses, WebhooksGetEndpointErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/endpoints/{id}',\n ...options\n});\n\n/**\n * Update a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Updates a webhook endpoint. Send only the fields you want to change; provide at least one.\n */\nexport const webhooksUpdateEndpoint = <ThrowOnError extends boolean = true>(options: Options<WebhooksUpdateEndpointData, ThrowOnError>): RequestResult<WebhooksUpdateEndpointResponses, WebhooksUpdateEndpointErrors, ThrowOnError> => (options.client ?? client).patch<WebhooksUpdateEndpointResponses, WebhooksUpdateEndpointErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/endpoints/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Create a webhook portal link\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Mints a one-time App Portal URL where you (or your customer) self-serve webhook delivery logs and signing secrets.\n */\nexport const webhooksCreatePortal = <ThrowOnError extends boolean = true>(options?: Options<WebhooksCreatePortalData, ThrowOnError>): RequestResult<WebhooksCreatePortalResponses, WebhooksCreatePortalErrors, ThrowOnError> => (options?.client ?? client).post<WebhooksCreatePortalResponses, WebhooksCreatePortalErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/portal',\n ...options\n});\n\n/**\n * List webhook event types\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the event types you can subscribe an endpoint to (the catalog).\n */\nexport const webhooksListEventTypes = <ThrowOnError extends boolean = true>(options?: Options<WebhooksListEventTypesData, ThrowOnError>): RequestResult<WebhooksListEventTypesResponses, WebhooksListEventTypesErrors, ThrowOnError> => (options?.client ?? client).get<WebhooksListEventTypesResponses, WebhooksListEventTypesErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/event-types',\n ...options\n});\n\n/**\n * Send a test event\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Emits a `webhook.ping` event to your subscribed endpoints so you can verify delivery end to end.\n */\nexport const webhooksPing = <ThrowOnError extends boolean = true>(options: Options<WebhooksPingData, ThrowOnError>): RequestResult<WebhooksPingResponses, WebhooksPingErrors, ThrowOnError> => (options.client ?? client).post<WebhooksPingResponses, WebhooksPingErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/webhooks/ping',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n\n/**\n * Mint a scoped frontend token\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Mints a short-lived, profile-scoped token from your secret `pr_` key. Call this from your backend; the returned token is safe to hand to a browser, which then calls the Postrun API directly. The secret key never touches the browser.\n */\nexport const tokensMint = <ThrowOnError extends boolean = true>(options: Options<TokensMintData, ThrowOnError>): RequestResult<TokensMintResponses, TokensMintErrors, ThrowOnError> => (options.client ?? client).post<TokensMintResponses, TokensMintErrors, ThrowOnError>({\n security: [{\n key: 'secretKey',\n scheme: 'bearer',\n type: 'http'\n }],\n url: '/tokens',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n});\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/react-query';\n\nimport { client } from '../client.gen';\nimport { connectionsConnect, connectionsDelete, connectionsGet, connectionsGetAnalytics, connectionsListAccounts, connectionsListByProfile, connectionsSelect, logsGet, logsList, mediaAbort, mediaComplete, mediaCreate, mediaDelete, mediaGet, mediaList, mediaListParts, mediaSignPart, mediaUpdate, type Options, postsCreate, postsDelete, postsGet, postsGetAnalytics, postsList, postsRetry, postsUpdate, postsValidate, profilesCreate, profilesDelete, profilesGet, profilesList, profilesUpdate, tiktokCreatorInfo, tokensMint, webhooksCreateEndpoint, webhooksCreatePortal, webhooksDeleteEndpoint, webhooksGetEndpoint, webhooksListEndpoints, webhooksListEventTypes, webhooksPing, webhooksUpdateEndpoint } from '../sdk.gen';\nimport type { ConnectionsConnectData, ConnectionsConnectError, ConnectionsConnectResponse, ConnectionsDeleteData, ConnectionsDeleteError, ConnectionsDeleteResponse, ConnectionsGetAnalyticsData, ConnectionsGetAnalyticsError, ConnectionsGetAnalyticsResponse, ConnectionsGetData, ConnectionsGetError, ConnectionsGetResponse, ConnectionsListAccountsData, ConnectionsListAccountsError, ConnectionsListAccountsResponse, ConnectionsListByProfileData, ConnectionsListByProfileError, ConnectionsListByProfileResponse, ConnectionsSelectData, ConnectionsSelectError, ConnectionsSelectResponse, LogsGetData, LogsGetError, LogsGetResponse, LogsListData, LogsListError, LogsListResponse, MediaAbortData, MediaAbortError, MediaAbortResponse, MediaCompleteData, MediaCompleteError, MediaCompleteResponse, MediaCreateData, MediaCreateError, MediaCreateResponse, MediaDeleteData, MediaDeleteError, MediaDeleteResponse, MediaGetData, MediaGetError, MediaGetResponse, MediaListData, MediaListError, MediaListPartsData, MediaListPartsError, MediaListPartsResponse, MediaListResponse, MediaSignPartData, MediaSignPartError, MediaSignPartResponse, MediaUpdateData, MediaUpdateError, MediaUpdateResponse, PostsCreateData, PostsCreateError, PostsCreateResponse, PostsDeleteData, PostsDeleteError, PostsDeleteResponse, PostsGetAnalyticsData, PostsGetAnalyticsError, PostsGetAnalyticsResponse, PostsGetData, PostsGetError, PostsGetResponse, PostsListData, PostsListError, PostsListResponse, PostsRetryData, PostsRetryError, PostsRetryResponse, PostsUpdateData, PostsUpdateError, PostsUpdateResponse, PostsValidateData, PostsValidateError, PostsValidateResponse, ProfilesCreateData, ProfilesCreateError, ProfilesCreateResponse, ProfilesDeleteData, ProfilesDeleteError, ProfilesDeleteResponse, ProfilesGetData, ProfilesGetError, ProfilesGetResponse, ProfilesListData, ProfilesListError, ProfilesListResponse, ProfilesUpdateData, ProfilesUpdateError, ProfilesUpdateResponse, TiktokCreatorInfoData, TiktokCreatorInfoError, TiktokCreatorInfoResponse, TokensMintData, TokensMintError, TokensMintResponse, WebhooksCreateEndpointData, WebhooksCreateEndpointError, WebhooksCreateEndpointResponse, WebhooksCreatePortalData, WebhooksCreatePortalError, WebhooksCreatePortalResponse, WebhooksDeleteEndpointData, WebhooksDeleteEndpointError, WebhooksDeleteEndpointResponse, WebhooksGetEndpointData, WebhooksGetEndpointError, WebhooksGetEndpointResponse, WebhooksListEndpointsData, WebhooksListEndpointsError, WebhooksListEndpointsResponse, WebhooksListEventTypesData, WebhooksListEventTypesError, WebhooksListEventTypesResponse, WebhooksPingData, WebhooksPingError, WebhooksPingResponse, WebhooksUpdateEndpointData, WebhooksUpdateEndpointError, WebhooksUpdateEndpointResponse } from '../types.gen';\n\nexport type QueryKey<TOptions extends Options> = [\n Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {\n _id: string;\n _infinite?: boolean;\n tags?: ReadonlyArray<string>;\n }\n];\n\nconst createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [\n QueryKey<TOptions>[0]\n] => {\n const params: QueryKey<TOptions>[0] = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl } as QueryKey<TOptions>[0];\n if (infinite) {\n params._infinite = infinite;\n }\n if (tags) {\n params.tags = tags;\n }\n if (options?.body) {\n params.body = options.body;\n }\n if (options?.headers) {\n params.headers = options.headers;\n }\n if (options?.path) {\n params.path = options.path;\n }\n if (options?.query) {\n params.query = options.query;\n }\n return [params];\n};\n\nexport const profilesListQueryKey = (options?: Options<ProfilesListData>) => createQueryKey('profilesList', options);\n\n/**\n * List profiles\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the profiles under your account, newest first.\n */\nexport const profilesListOptions = (options?: Options<ProfilesListData>) => queryOptions<ProfilesListResponse, ProfilesListError, ProfilesListResponse, ReturnType<typeof profilesListQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await profilesList({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: profilesListQueryKey(options)\n});\n\nconst createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {\n const params = { ...queryKey[0] };\n if (page.body) {\n params.body = {\n ...queryKey[0].body as any,\n ...page.body as any\n };\n }\n if (page.headers) {\n params.headers = {\n ...queryKey[0].headers,\n ...page.headers\n };\n }\n if (page.path) {\n params.path = {\n ...queryKey[0].path as any,\n ...page.path as any\n };\n }\n if (page.query) {\n params.query = {\n ...queryKey[0].query as any,\n ...page.query as any\n };\n }\n return params as unknown as typeof page;\n};\n\nexport const profilesListInfiniteQueryKey = (options?: Options<ProfilesListData>): QueryKey<Options<ProfilesListData>> => createQueryKey('profilesList', options, true);\n\n/**\n * List profiles\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the profiles under your account, newest first.\n */\nexport const profilesListInfiniteOptions = (options?: Options<ProfilesListData>) => infiniteQueryOptions<ProfilesListResponse, ProfilesListError, InfiniteData<ProfilesListResponse>, QueryKey<Options<ProfilesListData>>, number | Pick<QueryKey<Options<ProfilesListData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<ProfilesListData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await profilesList({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: profilesListInfiniteQueryKey(options)\n});\n\n/**\n * Create a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:write` with account-wide profile scope (`all`); a profile-scoped token cannot create.\n *\n * Creates a profile — a client/brand workspace under your account, and the unit connections attach to.\n */\nexport const profilesCreateMutation = (options?: Partial<Options<ProfilesCreateData>>): UseMutationOptions<ProfilesCreateResponse, ProfilesCreateError, Options<ProfilesCreateData>> => {\n const mutationOptions: UseMutationOptions<ProfilesCreateResponse, ProfilesCreateError, Options<ProfilesCreateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await profilesCreate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Delete a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:delete` scoped to the target profile.\n *\n * Deletes a profile. The profile must have no connections — delete its connections first (and a connection in turn cannot be deleted while a post still publishes through it).\n */\nexport const profilesDeleteMutation = (options?: Partial<Options<ProfilesDeleteData>>): UseMutationOptions<ProfilesDeleteResponse, ProfilesDeleteError, Options<ProfilesDeleteData>> => {\n const mutationOptions: UseMutationOptions<ProfilesDeleteResponse, ProfilesDeleteError, Options<ProfilesDeleteData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await profilesDelete({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const profilesGetQueryKey = (options: Options<ProfilesGetData>) => createQueryKey('profilesGet', options);\n\n/**\n * Retrieve a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:read` scoped to the target profile.\n *\n * Retrieves a single profile by id.\n */\nexport const profilesGetOptions = (options: Options<ProfilesGetData>) => queryOptions<ProfilesGetResponse, ProfilesGetError, ProfilesGetResponse, ReturnType<typeof profilesGetQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await profilesGet({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: profilesGetQueryKey(options)\n});\n\n/**\n * Update a profile\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `profiles:write` scoped to the target profile.\n *\n * Updates a profile. Send only the fields you want to change; provide at least one.\n */\nexport const profilesUpdateMutation = (options?: Partial<Options<ProfilesUpdateData>>): UseMutationOptions<ProfilesUpdateResponse, ProfilesUpdateError, Options<ProfilesUpdateData>> => {\n const mutationOptions: UseMutationOptions<ProfilesUpdateResponse, ProfilesUpdateError, Options<ProfilesUpdateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await profilesUpdate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const connectionsListByProfileQueryKey = (options: Options<ConnectionsListByProfileData>) => createQueryKey('connectionsListByProfile', options);\n\n/**\n * List a profile's connections\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the target profile.\n *\n * Lists the external accounts connected to a profile, most recent first. Returns 404 if the profile doesn't exist in your account.\n */\nexport const connectionsListByProfileOptions = (options: Options<ConnectionsListByProfileData>) => queryOptions<ConnectionsListByProfileResponse, ConnectionsListByProfileError, ConnectionsListByProfileResponse, ReturnType<typeof connectionsListByProfileQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await connectionsListByProfile({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: connectionsListByProfileQueryKey(options)\n});\n\nexport const connectionsListByProfileInfiniteQueryKey = (options: Options<ConnectionsListByProfileData>): QueryKey<Options<ConnectionsListByProfileData>> => createQueryKey('connectionsListByProfile', options, true);\n\n/**\n * List a profile's connections\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the target profile.\n *\n * Lists the external accounts connected to a profile, most recent first. Returns 404 if the profile doesn't exist in your account.\n */\nexport const connectionsListByProfileInfiniteOptions = (options: Options<ConnectionsListByProfileData>) => infiniteQueryOptions<ConnectionsListByProfileResponse, ConnectionsListByProfileError, InfiniteData<ConnectionsListByProfileResponse>, QueryKey<Options<ConnectionsListByProfileData>>, number | Pick<QueryKey<Options<ConnectionsListByProfileData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<ConnectionsListByProfileData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await connectionsListByProfile({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: connectionsListByProfileInfiniteQueryKey(options)\n});\n\n/**\n * Delete a connection\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:delete` scoped to the profile that owns the connection.\n *\n * Disconnects a connection. Returns a deletion marker; returns 404 if it does not exist in your account. Disconnect is unconditional — any scheduled posts that target this connection are not blocked; they fail gracefully at publish time with a `connection_removed` error until you reconnect and reschedule.\n */\nexport const connectionsDeleteMutation = (options?: Partial<Options<ConnectionsDeleteData>>): UseMutationOptions<ConnectionsDeleteResponse, ConnectionsDeleteError, Options<ConnectionsDeleteData>> => {\n const mutationOptions: UseMutationOptions<ConnectionsDeleteResponse, ConnectionsDeleteError, Options<ConnectionsDeleteData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await connectionsDelete({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const connectionsGetQueryKey = (options: Options<ConnectionsGetData>) => createQueryKey('connectionsGet', options);\n\n/**\n * Retrieve a connection\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Retrieves a single connection by id.\n */\nexport const connectionsGetOptions = (options: Options<ConnectionsGetData>) => queryOptions<ConnectionsGetResponse, ConnectionsGetError, ConnectionsGetResponse, ReturnType<typeof connectionsGetQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await connectionsGet({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: connectionsGetQueryKey(options)\n});\n\n/**\n * Select a connection account\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:write` scoped to the profile that owns the connection.\n *\n * Activates a pending connection by choosing which external account (e.g. which Facebook Page) it uses. The account must be one reachable through the connection’s OAuth grant; its canonical name + currency are resolved server-side from discovery, so the stored display values can’t be spoofed by the caller.\n */\nexport const connectionsSelectMutation = (options?: Partial<Options<ConnectionsSelectData>>): UseMutationOptions<ConnectionsSelectResponse, ConnectionsSelectError, Options<ConnectionsSelectData>> => {\n const mutationOptions: UseMutationOptions<ConnectionsSelectResponse, ConnectionsSelectError, Options<ConnectionsSelectData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await connectionsSelect({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const connectionsListAccountsQueryKey = (options: Options<ConnectionsListAccountsData>) => createQueryKey('connectionsListAccounts', options);\n\n/**\n * List a connection’s discoverable accounts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Lists the external accounts reachable through this connection’s OAuth grant — the picker shown after OAuth, while the connection is still pending account selection. Returns 404 if the connection does not exist in your account, and 501 if account discovery is not yet supported for the connection’s platform.\n */\nexport const connectionsListAccountsOptions = (options: Options<ConnectionsListAccountsData>) => queryOptions<ConnectionsListAccountsResponse, ConnectionsListAccountsError, ConnectionsListAccountsResponse, ReturnType<typeof connectionsListAccountsQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await connectionsListAccounts({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: connectionsListAccountsQueryKey(options)\n});\n\n/**\n * Connect a platform account\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:write` scoped to the target profile.\n *\n * Starts an OAuth connect flow for a platform on this profile. Returns a short-lived session the client uses to authorize; the connection is created once authorization succeeds.\n */\nexport const connectionsConnectMutation = (options?: Partial<Options<ConnectionsConnectData>>): UseMutationOptions<ConnectionsConnectResponse, ConnectionsConnectError, Options<ConnectionsConnectData>> => {\n const mutationOptions: UseMutationOptions<ConnectionsConnectResponse, ConnectionsConnectError, Options<ConnectionsConnectData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await connectionsConnect({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const connectionsGetAnalyticsQueryKey = (options: Options<ConnectionsGetAnalyticsData>) => createQueryKey('connectionsGetAnalytics', options);\n\n/**\n * Retrieve account analytics\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Reads a connected account’s totals and its daily activity live from the platform: the last 60 days for TikTok, 30 for Instagram and 90 for Facebook Pages. TikTok, Instagram and Facebook Page connections are supported. TikTok finalizes a day 24–48 hours after it ends, and Meta updates Page insights about once a day. Returns 404 if the connection does not exist in your account, 501 if its platform has no analytics yet, 409 if the account must be reconnected, and 502 if the platform’s call fails.\n */\nexport const connectionsGetAnalyticsOptions = (options: Options<ConnectionsGetAnalyticsData>) => queryOptions<ConnectionsGetAnalyticsResponse, ConnectionsGetAnalyticsError, ConnectionsGetAnalyticsResponse, ReturnType<typeof connectionsGetAnalyticsQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await connectionsGetAnalytics({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: connectionsGetAnalyticsQueryKey(options)\n});\n\nexport const mediaListQueryKey = (options?: Options<MediaListData>) => createQueryKey('mediaList', options);\n\n/**\n * List media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the media assets under your account, newest first. Filter by profile, status, kind, your own external_id, or metadata.\n */\nexport const mediaListOptions = (options?: Options<MediaListData>) => queryOptions<MediaListResponse, MediaListError, MediaListResponse, ReturnType<typeof mediaListQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await mediaList({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: mediaListQueryKey(options)\n});\n\nexport const mediaListInfiniteQueryKey = (options?: Options<MediaListData>): QueryKey<Options<MediaListData>> => createQueryKey('mediaList', options, true);\n\n/**\n * List media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the media assets under your account, newest first. Filter by profile, status, kind, your own external_id, or metadata.\n */\nexport const mediaListInfiniteOptions = (options?: Options<MediaListData>) => infiniteQueryOptions<MediaListResponse, MediaListError, InfiniteData<MediaListResponse>, QueryKey<Options<MediaListData>>, number | Pick<QueryKey<Options<MediaListData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<MediaListData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await mediaList({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: mediaListInfiniteQueryKey(options)\n});\n\n/**\n * Upload media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the target profile.\n *\n * Creates a media asset. Two ways to supply the bytes: (1) omit `source_url` and upload the bytes with the returned multipart `upload` session — chunk the file at `part_size`, sign each part via `POST /media/{id}/multipart/sign`, PUT the bytes, then `POST /media/{id}/multipart/complete` (the direct-upload path; `upload` is non-null and resumable), or (2) supply a public `https` `source_url` and we fetch the bytes server-side, validate, transform, and store them (the import path; `upload` is null). Either way the asset settles through the same probe/transform flow.\n */\nexport const mediaCreateMutation = (options?: Partial<Options<MediaCreateData>>): UseMutationOptions<MediaCreateResponse, MediaCreateError, Options<MediaCreateData>> => {\n const mutationOptions: UseMutationOptions<MediaCreateResponse, MediaCreateError, Options<MediaCreateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaCreate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Delete media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:delete` scoped to the profile that owns the media asset.\n *\n * Deletes a media asset and its stored renditions.\n */\nexport const mediaDeleteMutation = (options?: Partial<Options<MediaDeleteData>>): UseMutationOptions<MediaDeleteResponse, MediaDeleteError, Options<MediaDeleteData>> => {\n const mutationOptions: UseMutationOptions<MediaDeleteResponse, MediaDeleteError, Options<MediaDeleteData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaDelete({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const mediaGetQueryKey = (options: Options<MediaGetData>) => createQueryKey('mediaGet', options);\n\n/**\n * Retrieve media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:read` scoped to the profile that owns the media asset.\n *\n * Retrieves a media asset, including its per-platform processing status and renditions.\n */\nexport const mediaGetOptions = (options: Options<MediaGetData>) => queryOptions<MediaGetResponse, MediaGetError, MediaGetResponse, ReturnType<typeof mediaGetQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await mediaGet({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: mediaGetQueryKey(options)\n});\n\n/**\n * Update media\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Updates a media asset (alt text, metadata, external_id) or adds `targets` to pre-warm more platforms. Send only the fields to change.\n */\nexport const mediaUpdateMutation = (options?: Partial<Options<MediaUpdateData>>): UseMutationOptions<MediaUpdateResponse, MediaUpdateError, Options<MediaUpdateData>> => {\n const mutationOptions: UseMutationOptions<MediaUpdateResponse, MediaUpdateError, Options<MediaUpdateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaUpdate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Sign an upload part\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Returns a presigned URL to PUT one part of a multipart upload. Chunk the file at the session’s `part_size` and sign each 1-indexed part; read each part PUT’s `ETag` for `complete`.\n */\nexport const mediaSignPartMutation = (options?: Partial<Options<MediaSignPartData>>): UseMutationOptions<MediaSignPartResponse, MediaSignPartError, Options<MediaSignPartData>> => {\n const mutationOptions: UseMutationOptions<MediaSignPartResponse, MediaSignPartError, Options<MediaSignPartData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaSignPart({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const mediaListPartsQueryKey = (options: Options<MediaListPartsData>) => createQueryKey('mediaListParts', options);\n\n/**\n * List uploaded parts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Lists the parts already uploaded for this asset’s multipart upload (ascending). Skip re-uploading these to resume after a dropped connection.\n */\nexport const mediaListPartsOptions = (options: Options<MediaListPartsData>) => queryOptions<MediaListPartsResponse, MediaListPartsError, MediaListPartsResponse, ReturnType<typeof mediaListPartsQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await mediaListParts({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: mediaListPartsQueryKey(options)\n});\n\n/**\n * Complete an upload\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Finishes a multipart upload by assembling the uploaded parts. Send every part as `{ part_number, etag }`. Idempotent: completing an already-finished upload returns the asset.\n */\nexport const mediaCompleteMutation = (options?: Partial<Options<MediaCompleteData>>): UseMutationOptions<MediaCompleteResponse, MediaCompleteError, Options<MediaCompleteData>> => {\n const mutationOptions: UseMutationOptions<MediaCompleteResponse, MediaCompleteError, Options<MediaCompleteData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaComplete({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Abort an upload\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `media:write` scoped to the profile that owns the media asset.\n *\n * Aborts an in-flight multipart upload and discards its parts. Idempotent: aborting an already-finished or unknown upload still returns the asset.\n */\nexport const mediaAbortMutation = (options?: Partial<Options<MediaAbortData>>): UseMutationOptions<MediaAbortResponse, MediaAbortError, Options<MediaAbortData>> => {\n const mutationOptions: UseMutationOptions<MediaAbortResponse, MediaAbortError, Options<MediaAbortData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await mediaAbort({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const postsListQueryKey = (options?: Options<PostsListData>) => createQueryKey('postsList', options);\n\n/**\n * List posts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the posts under your account, newest first. Filter by profile or your own external_id.\n */\nexport const postsListOptions = (options?: Options<PostsListData>) => queryOptions<PostsListResponse, PostsListError, PostsListResponse, ReturnType<typeof postsListQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await postsList({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: postsListQueryKey(options)\n});\n\nexport const postsListInfiniteQueryKey = (options?: Options<PostsListData>): QueryKey<Options<PostsListData>> => createQueryKey('postsList', options, true);\n\n/**\n * List posts\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` (the response is limited to the profiles the token is scoped to).\n *\n * Lists the posts under your account, newest first. Filter by profile or your own external_id.\n */\nexport const postsListInfiniteOptions = (options?: Options<PostsListData>) => infiniteQueryOptions<PostsListResponse, PostsListError, InfiniteData<PostsListResponse>, QueryKey<Options<PostsListData>>, number | Pick<QueryKey<Options<PostsListData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<PostsListData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await postsList({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: postsListInfiniteQueryKey(options)\n});\n\n/**\n * Create a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the target profile.\n *\n * Composes a post + its per-channel variants. `publish` decides the outcome: `now` publishes immediately, `schedule` publishes at `schedule_at`, `draft` just stores it. The response is the post in its current state. A post with a YouTube variant publishes in the background, and the request waits up to 4 minutes for it; if it is still `publishing` after the wait, use the `post.*` webhooks or poll `GET /v1/posts/{id}`.\n */\nexport const postsCreateMutation = (options?: Partial<Options<PostsCreateData>>): UseMutationOptions<PostsCreateResponse, PostsCreateError, Options<PostsCreateData>> => {\n const mutationOptions: UseMutationOptions<PostsCreateResponse, PostsCreateError, Options<PostsCreateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await postsCreate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Delete a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:delete` scoped to the profile that owns the post.\n *\n * Deletes a post and its variants. Returns a deletion marker; 404 if it does not exist in your account. Already-published posts are not retracted from the platform.\n */\nexport const postsDeleteMutation = (options?: Partial<Options<PostsDeleteData>>): UseMutationOptions<PostsDeleteResponse, PostsDeleteError, Options<PostsDeleteData>> => {\n const mutationOptions: UseMutationOptions<PostsDeleteResponse, PostsDeleteError, Options<PostsDeleteData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await postsDelete({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const postsGetQueryKey = (options: Options<PostsGetData>) => createQueryKey('postsGet', options);\n\n/**\n * Retrieve a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the profile that owns the post.\n *\n * Retrieves a single post by id, including its per-channel variants and their derived status.\n */\nexport const postsGetOptions = (options: Options<PostsGetData>) => queryOptions<PostsGetResponse, PostsGetError, PostsGetResponse, ReturnType<typeof postsGetQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await postsGet({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: postsGetQueryKey(options)\n});\n\n/**\n * Update a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the profile that owns the post.\n *\n * Edits a post and/or transitions its publish state (`draft` / `schedule` / `now`). Valid only while the post is draft or scheduled. Send only the fields to change; providing `variants` replaces the whole set. The response is the post in its current state. A post with a YouTube variant publishes in the background, and the request waits up to 4 minutes for it; if it is still `publishing` after the wait, use the `post.*` webhooks or poll `GET /v1/posts/{id}`.\n */\nexport const postsUpdateMutation = (options?: Partial<Options<PostsUpdateData>>): UseMutationOptions<PostsUpdateResponse, PostsUpdateError, Options<PostsUpdateData>> => {\n const mutationOptions: UseMutationOptions<PostsUpdateResponse, PostsUpdateError, Options<PostsUpdateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await postsUpdate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Retry a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:write` scoped to the profile that owns the post.\n *\n * Re-publishes the post’s failed variants now, through the same path as `publish: \"now\"`. Published variants are never touched, and a failure that may already be live on the platform (e.g. `x_publish_failed`) is never re-sent, so a retry can’t post twice. Failed attempts are never billed. The response is the post in its current state. A post with a YouTube variant publishes in the background, and the request waits up to 4 minutes for it; if it is still `publishing` after the wait, use the `post.*` webhooks or poll `GET /v1/posts/{id}`.\n */\nexport const postsRetryMutation = (options?: Partial<Options<PostsRetryData>>): UseMutationOptions<PostsRetryResponse, PostsRetryError, Options<PostsRetryData>> => {\n const mutationOptions: UseMutationOptions<PostsRetryResponse, PostsRetryError, Options<PostsRetryData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await postsRetry({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Validate a post\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the target profile.\n *\n * Runs the exact ownership + publish-readiness checks the create path runs under dry_run, with no side effects. Returns a per-issue verdict (`publishable` + `issues[]`) on 200; a reference to a connection/media outside the profile is a typed 422.\n */\nexport const postsValidateMutation = (options?: Partial<Options<PostsValidateData>>): UseMutationOptions<PostsValidateResponse, PostsValidateError, Options<PostsValidateData>> => {\n const mutationOptions: UseMutationOptions<PostsValidateResponse, PostsValidateError, Options<PostsValidateData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await postsValidate({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const postsGetAnalyticsQueryKey = (options: Options<PostsGetAnalyticsData>) => createQueryKey('postsGetAnalytics', options);\n\n/**\n * Retrieve post analytics\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `posts:read` scoped to the profile that owns the post.\n *\n * Reads each variant’s metrics live from its platform. TikTok, Instagram and Facebook Page variants return metrics; X and LinkedIn variants return `analytics_not_supported`. A variant with nothing to read (not published, connection removed, not public, deleted, or not yet reported by the platform) returns `analytics_no_data`. TikTok updates metrics 24–48 hours after the activity, and Meta can take up to 48 hours to report a new post. Returns 404 if the post does not exist in your account, 409 if an account must be reconnected, and 502 if the platform’s call fails.\n */\nexport const postsGetAnalyticsOptions = (options: Options<PostsGetAnalyticsData>) => queryOptions<PostsGetAnalyticsResponse, PostsGetAnalyticsError, PostsGetAnalyticsResponse, ReturnType<typeof postsGetAnalyticsQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await postsGetAnalytics({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: postsGetAnalyticsQueryKey(options)\n});\n\nexport const tiktokCreatorInfoQueryKey = (options: Options<TiktokCreatorInfoData>) => createQueryKey('tiktokCreatorInfo', options);\n\n/**\n * Retrieve TikTok creator info\n *\n * **Authentication.** Secret `pr_` API key, or a browser-safe frontend token granting `connections:read` scoped to the profile that owns the connection.\n *\n * Retrieves a TikTok account’s publish options live from TikTok: the creator nickname + avatar, the audiences (`privacy_options`) available for photo posts, the Comment/Duet/Stitch availability, and the maximum video length. Returns 404 if the connection does not exist in your account or is not a TikTok connection, 409 if the TikTok account must be reconnected, and 502 if TikTok’s call fails.\n */\nexport const tiktokCreatorInfoOptions = (options: Options<TiktokCreatorInfoData>) => queryOptions<TiktokCreatorInfoResponse, TiktokCreatorInfoError, TiktokCreatorInfoResponse, ReturnType<typeof tiktokCreatorInfoQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await tiktokCreatorInfo({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: tiktokCreatorInfoQueryKey(options)\n});\n\nexport const logsListQueryKey = (options?: Options<LogsListData>) => createQueryKey('logsList', options);\n\n/**\n * List request logs\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the API activity for your account — one entry per action, newest first. Filter by profile, connection, platform, status, source, action, or time range.\n */\nexport const logsListOptions = (options?: Options<LogsListData>) => queryOptions<LogsListResponse, LogsListError, LogsListResponse, ReturnType<typeof logsListQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await logsList({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: logsListQueryKey(options)\n});\n\nexport const logsListInfiniteQueryKey = (options?: Options<LogsListData>): QueryKey<Options<LogsListData>> => createQueryKey('logsList', options, true);\n\n/**\n * List request logs\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the API activity for your account — one entry per action, newest first. Filter by profile, connection, platform, status, source, action, or time range.\n */\nexport const logsListInfiniteOptions = (options?: Options<LogsListData>) => infiniteQueryOptions<LogsListResponse, LogsListError, InfiniteData<LogsListResponse>, QueryKey<Options<LogsListData>>, number | Pick<QueryKey<Options<LogsListData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<LogsListData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await logsList({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: logsListInfiniteQueryKey(options)\n});\n\nexport const logsGetQueryKey = (options: Options<LogsGetData>) => createQueryKey('logsGet', options);\n\n/**\n * Retrieve a request log\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Retrieves a single request log entry by id.\n */\nexport const logsGetOptions = (options: Options<LogsGetData>) => queryOptions<LogsGetResponse, LogsGetError, LogsGetResponse, ReturnType<typeof logsGetQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await logsGet({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: logsGetQueryKey(options)\n});\n\nexport const webhooksListEndpointsQueryKey = (options?: Options<WebhooksListEndpointsData>) => createQueryKey('webhooksListEndpoints', options);\n\n/**\n * List webhook endpoints\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the webhook endpoints registered for your account.\n */\nexport const webhooksListEndpointsOptions = (options?: Options<WebhooksListEndpointsData>) => queryOptions<WebhooksListEndpointsResponse, WebhooksListEndpointsError, WebhooksListEndpointsResponse, ReturnType<typeof webhooksListEndpointsQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await webhooksListEndpoints({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: webhooksListEndpointsQueryKey(options)\n});\n\nexport const webhooksListEndpointsInfiniteQueryKey = (options?: Options<WebhooksListEndpointsData>): QueryKey<Options<WebhooksListEndpointsData>> => createQueryKey('webhooksListEndpoints', options, true);\n\n/**\n * List webhook endpoints\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the webhook endpoints registered for your account.\n */\nexport const webhooksListEndpointsInfiniteOptions = (options?: Options<WebhooksListEndpointsData>) => infiniteQueryOptions<WebhooksListEndpointsResponse, WebhooksListEndpointsError, InfiniteData<WebhooksListEndpointsResponse>, QueryKey<Options<WebhooksListEndpointsData>>, number | Pick<QueryKey<Options<WebhooksListEndpointsData>>[0], 'body' | 'headers' | 'path' | 'query'>>(\n// @ts-ignore\n{\n queryFn: async ({ pageParam, queryKey, signal }) => {\n // @ts-ignore\n const page: Pick<QueryKey<Options<WebhooksListEndpointsData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {\n query: {\n offset: pageParam\n }\n };\n const params = createInfiniteParams(queryKey, page);\n const { data } = await webhooksListEndpoints({\n ...options,\n ...params,\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: webhooksListEndpointsInfiniteQueryKey(options)\n});\n\n/**\n * Create a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Registers a URL to receive the chosen event types. Delivery, retries, and signing are handled for you.\n */\nexport const webhooksCreateEndpointMutation = (options?: Partial<Options<WebhooksCreateEndpointData>>): UseMutationOptions<WebhooksCreateEndpointResponse, WebhooksCreateEndpointError, Options<WebhooksCreateEndpointData>> => {\n const mutationOptions: UseMutationOptions<WebhooksCreateEndpointResponse, WebhooksCreateEndpointError, Options<WebhooksCreateEndpointData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await webhooksCreateEndpoint({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Delete a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Deletes a webhook endpoint. Delivery to it stops immediately.\n */\nexport const webhooksDeleteEndpointMutation = (options?: Partial<Options<WebhooksDeleteEndpointData>>): UseMutationOptions<WebhooksDeleteEndpointResponse, WebhooksDeleteEndpointError, Options<WebhooksDeleteEndpointData>> => {\n const mutationOptions: UseMutationOptions<WebhooksDeleteEndpointResponse, WebhooksDeleteEndpointError, Options<WebhooksDeleteEndpointData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await webhooksDeleteEndpoint({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const webhooksGetEndpointQueryKey = (options: Options<WebhooksGetEndpointData>) => createQueryKey('webhooksGetEndpoint', options);\n\n/**\n * Retrieve a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Retrieves a single webhook endpoint by id.\n */\nexport const webhooksGetEndpointOptions = (options: Options<WebhooksGetEndpointData>) => queryOptions<WebhooksGetEndpointResponse, WebhooksGetEndpointError, WebhooksGetEndpointResponse, ReturnType<typeof webhooksGetEndpointQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await webhooksGetEndpoint({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: webhooksGetEndpointQueryKey(options)\n});\n\n/**\n * Update a webhook endpoint\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Updates a webhook endpoint. Send only the fields you want to change; provide at least one.\n */\nexport const webhooksUpdateEndpointMutation = (options?: Partial<Options<WebhooksUpdateEndpointData>>): UseMutationOptions<WebhooksUpdateEndpointResponse, WebhooksUpdateEndpointError, Options<WebhooksUpdateEndpointData>> => {\n const mutationOptions: UseMutationOptions<WebhooksUpdateEndpointResponse, WebhooksUpdateEndpointError, Options<WebhooksUpdateEndpointData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await webhooksUpdateEndpoint({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Create a webhook portal link\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Mints a one-time App Portal URL where you (or your customer) self-serve webhook delivery logs and signing secrets.\n */\nexport const webhooksCreatePortalMutation = (options?: Partial<Options<WebhooksCreatePortalData>>): UseMutationOptions<WebhooksCreatePortalResponse, WebhooksCreatePortalError, Options<WebhooksCreatePortalData>> => {\n const mutationOptions: UseMutationOptions<WebhooksCreatePortalResponse, WebhooksCreatePortalError, Options<WebhooksCreatePortalData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await webhooksCreatePortal({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\nexport const webhooksListEventTypesQueryKey = (options?: Options<WebhooksListEventTypesData>) => createQueryKey('webhooksListEventTypes', options);\n\n/**\n * List webhook event types\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Lists the event types you can subscribe an endpoint to (the catalog).\n */\nexport const webhooksListEventTypesOptions = (options?: Options<WebhooksListEventTypesData>) => queryOptions<WebhooksListEventTypesResponse, WebhooksListEventTypesError, WebhooksListEventTypesResponse, ReturnType<typeof webhooksListEventTypesQueryKey>>({\n queryFn: async ({ queryKey, signal }) => {\n const { data } = await webhooksListEventTypes({\n ...options,\n ...queryKey[0],\n signal,\n throwOnError: true\n });\n return data;\n },\n queryKey: webhooksListEventTypesQueryKey(options)\n});\n\n/**\n * Send a test event\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Emits a `webhook.ping` event to your subscribed endpoints so you can verify delivery end to end.\n */\nexport const webhooksPingMutation = (options?: Partial<Options<WebhooksPingData>>): UseMutationOptions<WebhooksPingResponse, WebhooksPingError, Options<WebhooksPingData>> => {\n const mutationOptions: UseMutationOptions<WebhooksPingResponse, WebhooksPingError, Options<WebhooksPingData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await webhooksPing({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n\n/**\n * Mint a scoped frontend token\n *\n * **Authentication.** Secret `pr_` API key only — this endpoint cannot be called with a browser token.\n *\n * Mints a short-lived, profile-scoped token from your secret `pr_` key. Call this from your backend; the returned token is safe to hand to a browser, which then calls the Postrun API directly. The secret key never touches the browser.\n */\nexport const tokensMintMutation = (options?: Partial<Options<TokensMintData>>): UseMutationOptions<TokensMintResponse, TokensMintError, Options<TokensMintData>> => {\n const mutationOptions: UseMutationOptions<TokensMintResponse, TokensMintError, Options<TokensMintData>> = {\n mutationFn: async (fnOptions) => {\n const { data } = await tokensMint({\n ...options,\n ...fnOptions,\n throwOnError: true\n });\n return data;\n }\n };\n return mutationOptions;\n};\n"]}
|