{"version":3,"sources":["../src/generated/core/bodySerializer.gen.ts","../src/generated/core/params.gen.ts","../src/generated/core/serverSentEvents.gen.ts","../src/generated/core/pathSerializer.gen.ts","../src/generated/core/utils.gen.ts","../src/generated/core/auth.gen.ts","../src/generated/client/utils.gen.ts","../src/generated/client/client.gen.ts","../src/generated/client.gen.ts","../src/generated/sdk.gen.ts","../src/generated-resources.ts","../src/client.ts"],"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\ntype Slot = 'body' | 'headers' | 'path' | 'query';\n\nexport type Field =\n  | {\n      in: Exclude<Slot, 'body'>;\n      /**\n       * Field name. This is the name we want the user to see and use.\n       */\n      key: string;\n      /**\n       * Field mapped name. This is the name we want to use in the request.\n       * If omitted, we use the same value as `key`.\n       */\n      map?: string;\n    }\n  | {\n      in: Extract<Slot, 'body'>;\n      /**\n       * Key isn't required for bodies.\n       */\n      key?: string;\n      map?: string;\n    }\n  | {\n      /**\n       * Field name. This is the name we want the user to see and use.\n       */\n      key: string;\n      /**\n       * Field mapped name. This is the name we want to use in the request.\n       * If `in` is omitted, `map` aliases `key` to the transport layer.\n       */\n      map: Slot;\n    };\n\nexport interface Fields {\n  allowExtra?: Partial<Record<Slot, boolean>>;\n  args?: ReadonlyArray<Field>;\n}\n\nexport type FieldsConfig = ReadonlyArray<Field | Fields>;\n\nconst extraPrefixesMap: Record<string, Slot> = {\n  $body_: 'body',\n  $headers_: 'headers',\n  $path_: 'path',\n  $query_: 'query',\n};\nconst extraPrefixes = Object.entries(extraPrefixesMap);\n\ntype KeyMap = Map<\n  string,\n  | {\n      in: Slot;\n      map?: string;\n    }\n  | {\n      in?: never;\n      map: Slot;\n    }\n>;\n\nconst buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => {\n  if (!map) {\n    map = new Map();\n  }\n\n  for (const config of fields) {\n    if ('in' in config) {\n      if (config.key) {\n        map.set(config.key, {\n          in: config.in,\n          map: config.map,\n        });\n      }\n    } else if ('key' in config) {\n      map.set(config.key, {\n        map: config.map,\n      });\n    } else if (config.args) {\n      buildKeyMap(config.args, map);\n    }\n  }\n\n  return map;\n};\n\ninterface Params {\n  body: unknown;\n  headers: Record<string, unknown>;\n  path: Record<string, unknown>;\n  query: Record<string, unknown>;\n}\n\nconst stripEmptySlots = (params: Params) => {\n  for (const [slot, value] of Object.entries(params)) {\n    if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) {\n      delete params[slot as Slot];\n    }\n  }\n};\n\nexport const buildClientParams = (args: ReadonlyArray<unknown>, fields: FieldsConfig) => {\n  const params: Params = {\n    body: {},\n    headers: {},\n    path: {},\n    query: {},\n  };\n\n  const map = buildKeyMap(fields);\n\n  let config: FieldsConfig[number] | undefined;\n\n  for (const [index, arg] of args.entries()) {\n    if (fields[index]) {\n      config = fields[index];\n    }\n\n    if (!config) {\n      continue;\n    }\n\n    if ('in' in config) {\n      if (config.key) {\n        const field = map.get(config.key)!;\n        const name = field.map || config.key;\n        if (field.in) {\n          (params[field.in] as Record<string, unknown>)[name] = arg;\n        }\n      } else {\n        params.body = arg;\n      }\n    } else {\n      for (const [key, value] of Object.entries(arg ?? {})) {\n        const field = map.get(key);\n\n        if (field) {\n          if (field.in) {\n            const name = field.map || key;\n            (params[field.in] as Record<string, unknown>)[name] = value;\n          } else {\n            params[field.map] = value;\n          }\n        } else {\n          const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));\n\n          if (extra) {\n            const [prefix, slot] = extra;\n            (params[slot] as Record<string, unknown>)[key.slice(prefix.length)] = value;\n          } else if ('allowExtra' in config && config.allowExtra) {\n            for (const [slot, allowed] of Object.entries(config.allowExtra)) {\n              if (allowed) {\n                (params[slot as Slot] as Record<string, unknown>)[key] = value;\n                break;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n\n  stripEmptySlots(params);\n\n  return params;\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) => {\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}) => {\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) => {\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}) => {\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 = /\\{[^{}]+\\}/g;\n\nexport const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => {\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}) => {\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}) {\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   * 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 = {}) => {\n  const querySerializer = (queryParams: T) => {\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 const setAuthParams = async ({\n  security,\n  ...options\n}: Pick<Required<RequestOptions>, 'security'> &\n  Pick<RequestOptions, 'auth' | 'query'> & {\n    headers: Headers;\n  }) => {\n  for (const auth of 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: Res,\n  request: Req,\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({\n        ...opts,\n        security: opts.security,\n      });\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 { opts, url } = await beforeRequest(options);\n    const requestInit: ReqInit = {\n      redirect: 'follow',\n      ...opts,\n      body: getValidRequestBody(opts),\n    };\n\n    let 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    let response: Response;\n\n    try {\n      response = await _fetch(request);\n    } catch (error) {\n      // Handle fetch exceptions (AbortError, network errors, etc.)\n      let finalError = error;\n\n      for (const fn of interceptors.error.fns) {\n        if (fn) {\n          finalError = (await fn(error, undefined as any, request, opts)) as unknown;\n        }\n      }\n\n      finalError = finalError || ({} as unknown);\n\n      if (opts.throwOnError) {\n        throw finalError;\n      }\n\n      // Return error response\n      return opts.responseStyle === 'data'\n        ? undefined\n        : {\n            error: finalError,\n            request,\n            response: undefined as any,\n          };\n    }\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    const error = jsonError ?? textError;\n    let finalError = error;\n\n    for (const fn of interceptors.error.fns) {\n      if (fn) {\n        finalError = (await fn(error, response, request, opts)) as string;\n      }\n    }\n\n    finalError = finalError || ({} as string);\n\n    if (opts.throwOnError) {\n      throw finalError;\n    }\n\n    // TODO: we probably want to return error and improve types\n    return opts.responseStyle === 'data'\n      ? undefined\n      : {\n          error: finalError,\n          ...result,\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      headers: opts.headers as unknown as Record<string, string>,\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 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 = createClient(createConfig<ClientOptions2>({ baseUrl: 'https://staging-api.revkeen.com/v2' }));\n","// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Client, Options as Options2, TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { AccountingInvoicePaymentRequestsCreateData, AccountingInvoicePaymentRequestsCreateErrors, AccountingInvoicePaymentRequestsCreateResponses, AccountingInvoicePaymentRequestsGetData, AccountingInvoicePaymentRequestsGetErrors, AccountingInvoicePaymentRequestsGetResponses, AnalyticsRevenueMrrSummaryData, AnalyticsRevenueMrrSummaryResponses, AnalyticsRevenueTimeSeriesData, AnalyticsRevenueTimeSeriesResponses, CartApiKeysEnsureData, CartApiKeysEnsureErrors, CartApiKeysEnsureResponses, CartApiKeysRotateData, CartApiKeysRotateErrors, CartApiKeysRotateResponses, CartApiKeysStatusData, CartApiKeysStatusErrors, CartApiKeysStatusResponses, CartSessionsAddLineItemData, CartSessionsAddLineItemErrors, CartSessionsAddLineItemResponses, CartSessionsApplyDiscountCodeData, CartSessionsApplyDiscountCodeErrors, CartSessionsApplyDiscountCodeResponses, CartSessionsConvertData, CartSessionsConvertErrors, CartSessionsConvertResponses, CartSessionsCreateData, CartSessionsCreateErrors, CartSessionsCreateResponses, CartSessionsGetData, CartSessionsGetErrors, CartSessionsGetResponses, CartSessionsRemoveLineItemData, CartSessionsRemoveLineItemErrors, CartSessionsRemoveLineItemResponses, CartSessionsSetContactData, CartSessionsSetContactErrors, CartSessionsSetContactResponses, CartSessionsToggleAddOnData, CartSessionsToggleAddOnErrors, CartSessionsToggleAddOnResponses, CartSessionsUpdateLineItemData, CartSessionsUpdateLineItemErrors, CartSessionsUpdateLineItemResponses, CheckoutSessionsCreateData, CheckoutSessionsCreateErrors, CheckoutSessionsCreateResponses, CheckoutSessionsExpireData, CheckoutSessionsExpireErrors, CheckoutSessionsExpireResponses, CheckoutSessionsGetData, CheckoutSessionsGetErrors, CheckoutSessionsGetResponses, CreditNotesCreateData, CreditNotesCreateErrors, CreditNotesCreateResponses, CreditNotesGetData, CreditNotesGetErrors, CreditNotesGetResponses, CreditNotesListData, CreditNotesListErrors, CreditNotesListLinesData, CreditNotesListLinesErrors, CreditNotesListLinesResponses, CreditNotesListResponses, CreditNotesPreviewData, CreditNotesPreviewErrors, CreditNotesPreviewResponses, CreditNotesVoidData, CreditNotesVoidErrors, CreditNotesVoidResponses, CustomerMetersGetData, CustomerMetersGetErrors, CustomerMetersGetResponses, CustomerMetersListData, CustomerMetersListErrors, CustomerMetersListResponses, CustomerPortalCustomerGetData, CustomerPortalCustomerGetErrors, CustomerPortalCustomerGetResponses, CustomerPortalInvoicesGetData, CustomerPortalInvoicesGetErrors, CustomerPortalInvoicesGetResponses, CustomerPortalInvoicesListData, CustomerPortalInvoicesListErrors, CustomerPortalInvoicesListResponses, CustomerPortalMandatesCancelData, CustomerPortalMandatesCancelErrors, CustomerPortalMandatesCancelResponses, CustomerPortalMandatesListData, CustomerPortalMandatesListErrors, CustomerPortalMandatesListResponses, CustomerPortalMandatesReauthorizeData, CustomerPortalMandatesReauthorizeErrors, CustomerPortalMandatesReauthorizeResponses, CustomerPortalMandatesReauthorizeSendOtpData, CustomerPortalMandatesReauthorizeSendOtpErrors, CustomerPortalMandatesReauthorizeSendOtpResponses, CustomerPortalMandatesReauthorizeVerifyOtpData, CustomerPortalMandatesReauthorizeVerifyOtpErrors, CustomerPortalMandatesReauthorizeVerifyOtpResponses, CustomerPortalSessionsCreateData, CustomerPortalSessionsCreateErrors, CustomerPortalSessionsCreateResponses, CustomerPortalSubscriptionsCancelData, CustomerPortalSubscriptionsCancelErrors, CustomerPortalSubscriptionsCancelResponses, CustomerPortalSubscriptionsGetData, CustomerPortalSubscriptionsGetErrors, CustomerPortalSubscriptionsGetResponses, CustomerPortalSubscriptionsListData, CustomerPortalSubscriptionsListErrors, CustomerPortalSubscriptionsListResponses, CustomersCreateData, CustomersCreateErrors, CustomersCreateResponses, CustomersGetData, CustomersGetErrors, CustomersGetResponses, CustomersListData, CustomersListErrors, CustomersListResponses, CustomersPaymentMethodsListData, CustomersPaymentMethodsListErrors, CustomersPaymentMethodsListResponses, CustomersPaymentRailsGetData, CustomersPaymentRailsGetErrors, CustomersPaymentRailsGetResponses, CustomersPreferredRailsGetData, CustomersPreferredRailsGetErrors, CustomersPreferredRailsGetResponses, CustomersUpdateData, CustomersUpdateErrors, CustomersUpdateResponses, DdMandateRequestsGetData, DdMandateRequestsGetErrors, DdMandateRequestsGetResponses, DdPreviewData, DdPreviewErrors, DdPreviewResponses, DdValidateData, DdValidateErrors, DdValidateResponses, EntitlementsCheckData, EntitlementsCheckErrors, EntitlementsCheckResponses, EntitlementsListData, EntitlementsListErrors, EntitlementsListResponses, EventsGetData, EventsGetErrors, EventsGetResponses, EventsListData, EventsListErrors, EventsListResponses, EventsResendData, EventsResendErrors, EventsResendResponses, InvoicesCreateData, InvoicesCreateResponses, InvoicesFinalizeData, InvoicesFinalizeErrors, InvoicesFinalizeResponses, InvoicesGetData, InvoicesGetResponses, InvoicesListData, InvoicesListResponses, InvoicesMarginEstimateData, InvoicesMarginEstimateErrors, InvoicesMarginEstimateResponses, InvoicesSendData, InvoicesSendErrors, InvoicesSendResponses, InvoicesUpdateData, InvoicesUpdateResponses, InvoicesVoidData, InvoicesVoidErrors, InvoicesVoidResponses, MandatesCancelData, MandatesCancelErrors, MandatesCancelResponses, MandatesCreateData, MandatesCreateErrors, MandatesCreateResponses, MandatesGetData, MandatesGetErrors, MandatesGetResponses, MandatesListData, MandatesListErrors, MandatesListResponses, MandatesReinstateData, MandatesReinstateErrors, MandatesReinstateResponses, MandatesScheduleCollectionData, MandatesScheduleCollectionErrors, MandatesScheduleCollectionResponses, MandatesSuspendData, MandatesSuspendErrors, MandatesSuspendResponses, PaymentIntentsCancelData, PaymentIntentsCancelErrors, PaymentIntentsCancelResponses, PaymentIntentsCaptureData, PaymentIntentsCaptureErrors, PaymentIntentsCaptureResponses, PaymentIntentsConfirmData, PaymentIntentsConfirmErrors, PaymentIntentsConfirmResponses, PaymentIntentsCreateData, PaymentIntentsCreateErrors, PaymentIntentsCreateResponses, PaymentIntentsGetData, PaymentIntentsGetErrors, PaymentIntentsGetResponses, PaymentIntentsListData, PaymentIntentsListErrors, PaymentIntentsListResponses, PaymentLinksActivateData, PaymentLinksActivateErrors, PaymentLinksActivateResponses, PaymentLinksArchiveData, PaymentLinksArchiveErrors, PaymentLinksArchiveResponses, PaymentLinksCreateData, PaymentLinksCreateErrors, PaymentLinksCreateResponses, PaymentLinksDeactivateData, PaymentLinksDeactivateErrors, PaymentLinksDeactivateResponses, PaymentLinksExpireData, PaymentLinksExpireErrors, PaymentLinksExpireResponses, PaymentLinksGetData, PaymentLinksGetErrors, PaymentLinksGetResponses, PaymentLinksListData, PaymentLinksListErrors, PaymentLinksListResponses, PaymentLinksUpdateData, PaymentLinksUpdateErrors, PaymentLinksUpdateResponses, PricesArchiveData, PricesArchiveErrors, PricesArchiveResponses, PricesCreateData, PricesCreateErrors, PricesCreateResponses, PricesGetData, PricesGetErrors, PricesGetResponses, PricesListData, PricesListErrors, PricesListResponses, PricesUpdateData, PricesUpdateErrors, PricesUpdateResponses, ProductsCreateData, ProductsCreateErrors, ProductsCreateResponses, ProductsGetData, ProductsGetErrors, ProductsGetResponses, ProductsListData, ProductsListErrors, ProductsListResponses, ProductsUpdateData, ProductsUpdateErrors, ProductsUpdateResponses, RefundsCreateData, RefundsCreateErrors, RefundsCreateResponses, RefundsGetData, RefundsGetErrors, RefundsGetResponses, RefundsListData, RefundsListErrors, RefundsListResponses, StorefrontOriginsCreateData, StorefrontOriginsCreateErrors, StorefrontOriginsCreateResponses, StorefrontOriginsDeleteData, StorefrontOriginsDeleteErrors, StorefrontOriginsDeleteResponses, StorefrontOriginsListData, StorefrontOriginsListErrors, StorefrontOriginsListResponses, StorefrontProductsGetData, StorefrontProductsGetErrors, StorefrontProductsGetResponses, StorefrontProductsListData, StorefrontProductsListErrors, StorefrontProductsListResponses, StorefrontStatusGetData, StorefrontStatusGetErrors, StorefrontStatusGetResponses, SubscriptionsCancelData, SubscriptionsCancelErrors, SubscriptionsCancelResponses, SubscriptionsCreateData, SubscriptionsCreateErrors, SubscriptionsCreateResponses, SubscriptionsGetData, SubscriptionsGetErrors, SubscriptionsGetResponses, SubscriptionsListData, SubscriptionsListErrors, SubscriptionsListResponses, SubscriptionsUpdateData, SubscriptionsUpdateErrors, SubscriptionsUpdateResponses, TransactionsGetData, TransactionsGetErrors, TransactionsGetResponses, TransactionsListData, TransactionsListErrors, TransactionsListResponses, WebhookDeliveriesGetData, WebhookDeliveriesGetErrors, WebhookDeliveriesGetResponses, WebhookDeliveriesListData, WebhookDeliveriesListErrors, WebhookDeliveriesListResponses, WebhookDeliveriesRetryData, WebhookDeliveriesRetryErrors, WebhookDeliveriesRetryResponses, WebhookEndpointsCreateData, WebhookEndpointsCreateErrors, WebhookEndpointsCreateResponses, WebhookEndpointsDeleteData, WebhookEndpointsDeleteErrors, WebhookEndpointsDeleteResponses, WebhookEndpointsGetData, WebhookEndpointsGetErrors, WebhookEndpointsGetResponses, WebhookEndpointsListData, WebhookEndpointsListErrors, WebhookEndpointsListResponses, WebhookEndpointsRotateSecretData, WebhookEndpointsRotateSecretErrors, WebhookEndpointsRotateSecretResponses, WebhookEndpointsUpdateData, WebhookEndpointsUpdateErrors, WebhookEndpointsUpdateResponses } 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?: Record<string, unknown>;\n};\n\n/**\n * List invoices\n *\n * List invoices with pagination and filtering.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID\n * - `POST /invoices` — Create invoice\n * - `GET /invoices/{id}` — Get invoice\n * - `PATCH /invoices/{id}` — Update invoice\n * - `DELETE /invoices/{id}` — Delete invoice\n * - `POST /invoices/{id}/margin-estimate` — Estimate invoice net by payment rail\n * - `POST /invoices/{id}/refund` — Refund invoice\n * - `POST /invoices/{id}/reject` — Reject invoice\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const invoicesList = <ThrowOnError extends boolean = false>(options?: Options<InvoicesListData, ThrowOnError>) => (options?.client ?? client).get<InvoicesListResponses, unknown, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/invoices',\n    ...options\n});\n\n/**\n * Create invoice\n *\n * Create a new invoice.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID\n * - `GET /invoices` — List invoices\n * - `GET /invoices/{id}` — Get invoice\n * - `PATCH /invoices/{id}` — Update invoice\n * - `DELETE /invoices/{id}` — Delete invoice\n * - `POST /invoices/{id}/margin-estimate` — Estimate invoice net by payment rail\n * - `POST /invoices/{id}/refund` — Refund invoice\n * - `POST /invoices/{id}/reject` — Reject invoice\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const invoicesCreate = <ThrowOnError extends boolean = false>(options: Options<InvoicesCreateData, ThrowOnError>) => (options.client ?? client).post<InvoicesCreateResponses, unknown, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/invoices',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Get invoice\n *\n * Get a single invoice by ID.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID\n * - `GET /invoices` — List invoices\n * - `POST /invoices` — Create invoice\n * - `PATCH /invoices/{id}` — Update invoice\n * - `DELETE /invoices/{id}` — Delete invoice\n * - `POST /invoices/{id}/margin-estimate` — Estimate invoice net by payment rail\n * - `POST /invoices/{id}/refund` — Refund invoice\n * - `POST /invoices/{id}/reject` — Reject invoice\n */\nexport const invoicesGet = <ThrowOnError extends boolean = false>(options: Options<InvoicesGetData, ThrowOnError>) => (options.client ?? client).get<InvoicesGetResponses, unknown, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/invoices/{id}',\n    ...options\n});\n\n/**\n * Update invoice\n *\n * Update an existing invoice.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID\n * - `GET /invoices` — List invoices\n * - `POST /invoices` — Create invoice\n * - `GET /invoices/{id}` — Get invoice\n * - `DELETE /invoices/{id}` — Delete invoice\n * - `POST /invoices/{id}/margin-estimate` — Estimate invoice net by payment rail\n * - `POST /invoices/{id}/refund` — Refund invoice\n * - `POST /invoices/{id}/reject` — Reject invoice\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const invoicesUpdate = <ThrowOnError extends boolean = false>(options: Options<InvoicesUpdateData, ThrowOnError>) => (options.client ?? client).patch<InvoicesUpdateResponses, unknown, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/invoices/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Estimate invoice net by payment rail\n *\n * Estimate per-rail processing fees and net-after-fees for an invoice amount.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID\n * - `GET /invoices` — List invoices\n * - `POST /invoices` — Create invoice\n * - `GET /invoices/{id}` — Get invoice\n * - `PATCH /invoices/{id}` — Update invoice\n * - `DELETE /invoices/{id}` — Delete invoice\n * - `POST /invoices/{id}/refund` — Refund invoice\n * - `POST /invoices/{id}/reject` — Reject invoice\n *\n * **Common errors**\n *\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const invoicesMarginEstimate = <ThrowOnError extends boolean = false>(options: Options<InvoicesMarginEstimateData, ThrowOnError>) => (options.client ?? client).post<InvoicesMarginEstimateResponses, InvoicesMarginEstimateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/invoices/{id}/margin-estimate',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Finalize an invoice\n *\n * Finalizes a draft invoice, locking it for payment. Assigns invoice number and generates public token. After finalization, financial fields become immutable.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID\n * - `GET /invoices` — List invoices\n * - `POST /invoices` — Create invoice\n * - `GET /invoices/{id}` — Get invoice\n * - `PATCH /invoices/{id}` — Update invoice\n * - `DELETE /invoices/{id}` — Delete invoice\n * - `POST /invoices/{id}/margin-estimate` — Estimate invoice net by payment rail\n * - `POST /invoices/{id}/refund` — Refund invoice\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const invoicesFinalize = <ThrowOnError extends boolean = false>(options: Options<InvoicesFinalizeData, ThrowOnError>) => (options.client ?? client).post<InvoicesFinalizeResponses, InvoicesFinalizeErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/invoices/{id}/finalize',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Void an invoice\n *\n * Voids an invoice. Only invoices without recorded payments can be voided. Use refund instead for paid invoices.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID\n * - `GET /invoices` — List invoices\n * - `POST /invoices` — Create invoice\n * - `GET /invoices/{id}` — Get invoice\n * - `PATCH /invoices/{id}` — Update invoice\n * - `DELETE /invoices/{id}` — Delete invoice\n * - `POST /invoices/{id}/margin-estimate` — Estimate invoice net by payment rail\n * - `POST /invoices/{id}/refund` — Refund invoice\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const invoicesVoid = <ThrowOnError extends boolean = false>(options: Options<InvoicesVoidData, ThrowOnError>) => (options.client ?? client).post<InvoicesVoidResponses, InvoicesVoidErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/invoices/{id}/void',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Send an invoice\n *\n * Sends an invoice to the customer via the specified channel (email, SMS, or WhatsApp). Invoice must be approved first.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID\n * - `GET /invoices` — List invoices\n * - `POST /invoices` — Create invoice\n * - `GET /invoices/{id}` — Get invoice\n * - `PATCH /invoices/{id}` — Update invoice\n * - `DELETE /invoices/{id}` — Delete invoice\n * - `POST /invoices/{id}/margin-estimate` — Estimate invoice net by payment rail\n * - `POST /invoices/{id}/refund` — Refund invoice\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const invoicesSend = <ThrowOnError extends boolean = false>(options: Options<InvoicesSendData, ThrowOnError>) => (options.client ?? client).post<InvoicesSendResponses, InvoicesSendErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/invoices/{id}/send',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * List products\n *\n * List products with pagination and optional search.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /products` — Create product\n * - `GET /products/{id}` — Get product by ID\n * - `PATCH /products/{id}` — Update product\n * - `PUT /products/external/{source}/{externalId}` — Upsert product by external ID\n * - `PUT /products/external/batch` — Batch upsert products by external ID\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const productsList = <ThrowOnError extends boolean = false>(options?: Options<ProductsListData, ThrowOnError>) => (options?.client ?? client).get<ProductsListResponses, ProductsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/products',\n    ...options\n});\n\n/**\n * Create product\n *\n * Create a new product. Requires 'products:write' scope.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /products` — List products\n * - `GET /products/{id}` — Get product by ID\n * - `PATCH /products/{id}` — Update product\n * - `PUT /products/external/{source}/{externalId}` — Upsert product by external ID\n * - `PUT /products/external/batch` — Batch upsert products by external ID\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const productsCreate = <ThrowOnError extends boolean = false>(options: Options<ProductsCreateData, ThrowOnError>) => (options.client ?? client).post<ProductsCreateResponses, ProductsCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/products',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Get product by ID\n *\n * Get a product by its ID. Requires 'products:read' scope.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /products` — List products\n * - `POST /products` — Create product\n * - `PATCH /products/{id}` — Update product\n * - `PUT /products/external/{source}/{externalId}` — Upsert product by external ID\n * - `PUT /products/external/batch` — Batch upsert products by external ID\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const productsGet = <ThrowOnError extends boolean = false>(options: Options<ProductsGetData, ThrowOnError>) => (options.client ?? client).get<ProductsGetResponses, ProductsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/products/{id}',\n    ...options\n});\n\n/**\n * Update product\n *\n * Update an existing product. Requires 'products:write' scope.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /products` — List products\n * - `POST /products` — Create product\n * - `GET /products/{id}` — Get product by ID\n * - `PUT /products/external/{source}/{externalId}` — Upsert product by external ID\n * - `PUT /products/external/batch` — Batch upsert products by external ID\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const productsUpdate = <ThrowOnError extends boolean = false>(options: Options<ProductsUpdateData, ThrowOnError>) => (options.client ?? client).patch<ProductsUpdateResponses, ProductsUpdateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/products/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Create a checkout session\n *\n * Create a checkout session for an invoice or product.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /checkout-sessions/{id}` — Retrieve a checkout session\n * - `POST /checkout-sessions/{id}/expire` — Expire a checkout session\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const checkoutSessionsCreate = <ThrowOnError extends boolean = false>(options?: Options<CheckoutSessionsCreateData, ThrowOnError>) => (options?.client ?? client).post<CheckoutSessionsCreateResponses, CheckoutSessionsCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/checkout-sessions',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Retrieve a checkout session\n *\n * Retrieve a checkout session by its ID.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /checkout-sessions` — Create a checkout session\n * - `POST /checkout-sessions/{id}/expire` — Expire a checkout session\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const checkoutSessionsGet = <ThrowOnError extends boolean = false>(options: Options<CheckoutSessionsGetData, ThrowOnError>) => (options.client ?? client).get<CheckoutSessionsGetResponses, CheckoutSessionsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/checkout-sessions/{id}',\n    ...options\n});\n\n/**\n * Expire a checkout session\n *\n * Manually expire an open checkout session. Only sessions with status 'open' or 'pending' and no active payment attempt can be expired.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /checkout-sessions` — Create a checkout session\n * - `GET /checkout-sessions/{id}` — Retrieve a checkout session\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const checkoutSessionsExpire = <ThrowOnError extends boolean = false>(options: Options<CheckoutSessionsExpireData, ThrowOnError>) => (options.client ?? client).post<CheckoutSessionsExpireResponses, CheckoutSessionsExpireErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/checkout-sessions/{id}/expire',\n    ...options\n});\n\n/**\n * Create a cart session\n *\n * Create an empty (or pre-populated) cart session. The returned cart is `open` and mutable until it is converted into a checkout session, or until it is swept to `abandoned` / `expired`.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /cart-sessions/{id}` — Retrieve a cart session\n * - `POST /cart-sessions/{id}/convert` — Convert to a checkout session\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /cart-sessions/{id}` — Retrieve a cart session\n * - `POST /cart-sessions/{id}/line-items` — Add a line item to a cart session\n * - `PATCH /cart-sessions/{id}/line-items/{lineId}` — Update a line item's quantity\n * - `DELETE /cart-sessions/{id}/line-items/{lineId}` — Remove a line item from a cart session\n * - `POST /cart-sessions/{id}/add-ons` — Toggle an add-on on a cart session\n * - `POST /cart-sessions/{id}/discount-code` — Set or clear a cart discount code\n * - `POST /cart-sessions/{id}/contact` — Capture customer email + consent on a cart\n * - `POST /cart-sessions/{id}/convert` — Convert a cart session into a checkout session\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `422 unprocessable_entity` — business-rule failure (for example, refunding more than the original charge).\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const cartSessionsCreate = <ThrowOnError extends boolean = false>(options?: Options<CartSessionsCreateData, ThrowOnError>) => (options?.client ?? client).post<CartSessionsCreateResponses, CartSessionsCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-sessions',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Retrieve a cart session\n *\n * Fetch the current state of a cart session by id. Returns the same shape as the create response.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /cart-sessions` — Create a cart session\n * - `POST /cart-sessions/{id}/line-items` — Add a line item to a cart session\n * - `PATCH /cart-sessions/{id}/line-items/{lineId}` — Update a line item's quantity\n * - `DELETE /cart-sessions/{id}/line-items/{lineId}` — Remove a line item from a cart session\n * - `POST /cart-sessions/{id}/add-ons` — Toggle an add-on on a cart session\n * - `POST /cart-sessions/{id}/discount-code` — Set or clear a cart discount code\n * - `POST /cart-sessions/{id}/contact` — Capture customer email + consent on a cart\n * - `POST /cart-sessions/{id}/convert` — Convert a cart session into a checkout session\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const cartSessionsGet = <ThrowOnError extends boolean = false>(options: Options<CartSessionsGetData, ThrowOnError>) => (options.client ?? client).get<CartSessionsGetResponses, CartSessionsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-sessions/{id}',\n    ...options\n});\n\n/**\n * Add a line item to a cart session\n *\n * Append a line item to an open cart session. Subtotals are recomputed atomically; the updated cart is returned.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /cart-sessions` — Create a cart session\n * - `GET /cart-sessions/{id}` — Retrieve a cart session\n * - `PATCH /cart-sessions/{id}/line-items/{lineId}` — Update a line item's quantity\n * - `DELETE /cart-sessions/{id}/line-items/{lineId}` — Remove a line item from a cart session\n * - `POST /cart-sessions/{id}/add-ons` — Toggle an add-on on a cart session\n * - `POST /cart-sessions/{id}/discount-code` — Set or clear a cart discount code\n * - `POST /cart-sessions/{id}/contact` — Capture customer email + consent on a cart\n * - `POST /cart-sessions/{id}/convert` — Convert a cart session into a checkout session\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const cartSessionsAddLineItem = <ThrowOnError extends boolean = false>(options: Options<CartSessionsAddLineItemData, ThrowOnError>) => (options.client ?? client).post<CartSessionsAddLineItemResponses, CartSessionsAddLineItemErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-sessions/{id}/line-items',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Remove a line item from a cart session\n *\n * Remove a line item from an open cart. Subtotals are recomputed; the updated cart is returned.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /cart-sessions` — Create a cart session\n * - `GET /cart-sessions/{id}` — Retrieve a cart session\n * - `POST /cart-sessions/{id}/line-items` — Add a line item to a cart session\n * - `PATCH /cart-sessions/{id}/line-items/{lineId}` — Update a line item's quantity\n * - `POST /cart-sessions/{id}/add-ons` — Toggle an add-on on a cart session\n * - `POST /cart-sessions/{id}/discount-code` — Set or clear a cart discount code\n * - `POST /cart-sessions/{id}/contact` — Capture customer email + consent on a cart\n * - `POST /cart-sessions/{id}/convert` — Convert a cart session into a checkout session\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const cartSessionsRemoveLineItem = <ThrowOnError extends boolean = false>(options: Options<CartSessionsRemoveLineItemData, ThrowOnError>) => (options.client ?? client).delete<CartSessionsRemoveLineItemResponses, CartSessionsRemoveLineItemErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-sessions/{id}/line-items/{lineId}',\n    ...options\n});\n\n/**\n * Update a line item's quantity\n *\n * Change the quantity of a single line item on an open cart. Other fields on the line item are immutable; recreate the item to change them.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /cart-sessions` — Create a cart session\n * - `GET /cart-sessions/{id}` — Retrieve a cart session\n * - `POST /cart-sessions/{id}/line-items` — Add a line item to a cart session\n * - `DELETE /cart-sessions/{id}/line-items/{lineId}` — Remove a line item from a cart session\n * - `POST /cart-sessions/{id}/add-ons` — Toggle an add-on on a cart session\n * - `POST /cart-sessions/{id}/discount-code` — Set or clear a cart discount code\n * - `POST /cart-sessions/{id}/contact` — Capture customer email + consent on a cart\n * - `POST /cart-sessions/{id}/convert` — Convert a cart session into a checkout session\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const cartSessionsUpdateLineItem = <ThrowOnError extends boolean = false>(options: Options<CartSessionsUpdateLineItemData, ThrowOnError>) => (options.client ?? client).patch<CartSessionsUpdateLineItemResponses, CartSessionsUpdateLineItemErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-sessions/{id}/line-items/{lineId}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Toggle an add-on on a cart session\n *\n * Add or remove an add-on product from `add_ons_selected`. The call is idempotent: sending the same desired state for an add-on already in that state is a no-op and emits no event.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /cart-sessions` — Create a cart session\n * - `GET /cart-sessions/{id}` — Retrieve a cart session\n * - `POST /cart-sessions/{id}/line-items` — Add a line item to a cart session\n * - `PATCH /cart-sessions/{id}/line-items/{lineId}` — Update a line item's quantity\n * - `DELETE /cart-sessions/{id}/line-items/{lineId}` — Remove a line item from a cart session\n * - `POST /cart-sessions/{id}/discount-code` — Set or clear a cart discount code\n * - `POST /cart-sessions/{id}/contact` — Capture customer email + consent on a cart\n * - `POST /cart-sessions/{id}/convert` — Convert a cart session into a checkout session\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const cartSessionsToggleAddOn = <ThrowOnError extends boolean = false>(options: Options<CartSessionsToggleAddOnData, ThrowOnError>) => (options.client ?? client).post<CartSessionsToggleAddOnResponses, CartSessionsToggleAddOnErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-sessions/{id}/add-ons',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Set or clear a cart discount code\n *\n * Set the cart's discount code. Pass `null` to clear. The code is validated against the merchant's active discounts and priced into the cart total immediately; convert then carries the discounted amount.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /cart-sessions` — Create a cart session\n * - `GET /cart-sessions/{id}` — Retrieve a cart session\n * - `POST /cart-sessions/{id}/line-items` — Add a line item to a cart session\n * - `PATCH /cart-sessions/{id}/line-items/{lineId}` — Update a line item's quantity\n * - `DELETE /cart-sessions/{id}/line-items/{lineId}` — Remove a line item from a cart session\n * - `POST /cart-sessions/{id}/add-ons` — Toggle an add-on on a cart session\n * - `POST /cart-sessions/{id}/contact` — Capture customer email + consent on a cart\n * - `POST /cart-sessions/{id}/convert` — Convert a cart session into a checkout session\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const cartSessionsApplyDiscountCode = <ThrowOnError extends boolean = false>(options: Options<CartSessionsApplyDiscountCodeData, ThrowOnError>) => (options.client ?? client).post<CartSessionsApplyDiscountCodeResponses, CartSessionsApplyDiscountCodeErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-sessions/{id}/discount-code',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Capture customer email + consent on a cart\n *\n * Capture the customer's email and marketing/recovery consent on an open cart so an abandoned cart can be recovered (REV-5517). Every field is optional; pass `null` to clear. Setting a field records its consent/capture timestamp. Idempotent — an input that changes nothing is a no-op.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /cart-sessions` — Create a cart session\n * - `GET /cart-sessions/{id}` — Retrieve a cart session\n * - `POST /cart-sessions/{id}/line-items` — Add a line item to a cart session\n * - `PATCH /cart-sessions/{id}/line-items/{lineId}` — Update a line item's quantity\n * - `DELETE /cart-sessions/{id}/line-items/{lineId}` — Remove a line item from a cart session\n * - `POST /cart-sessions/{id}/add-ons` — Toggle an add-on on a cart session\n * - `POST /cart-sessions/{id}/discount-code` — Set or clear a cart discount code\n * - `POST /cart-sessions/{id}/convert` — Convert a cart session into a checkout session\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const cartSessionsSetContact = <ThrowOnError extends boolean = false>(options: Options<CartSessionsSetContactData, ThrowOnError>) => (options.client ?? client).post<CartSessionsSetContactResponses, CartSessionsSetContactErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-sessions/{id}/contact',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Convert a cart session into a checkout session\n *\n * Atomically materialise a pending checkout session from the cart snapshot, reserve tracked availability, flip the cart to `converted`, and emit `commerce.cart.converted` + `commerce.checkout.started` through the outbox.\n *\n * Idempotent on re-call (returns the existing checkout session). Concurrency-safe via a compare-and-swap lock on cart status; product availability is guarded by the database reserve step.\n *\n * Validation that runs inside the lock and rolls back on failure:\n * - `CART_SESSION_EMPTY` — the cart has no line items.\n * - `AVAILABILITY_EXCEEDED` — a tracked/capacity-limited product can no longer satisfy the requested quantity.\n * - `CART_SESSION_NOT_FOUND` — no cart for this id under the calling merchant.\n * - `CART_SESSION_CLOSED` — the cart is already `abandoned` or `expired`.\n *\n * On rollback the cart returns to `open` and the customer can retry after fixing the cause.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /cart-sessions` — Create a cart session\n * - `GET /cart-sessions/{id}` — Retrieve a cart session\n * - `POST /cart-sessions/{id}/line-items` — Add a line item to a cart session\n * - `PATCH /cart-sessions/{id}/line-items/{lineId}` — Update a line item's quantity\n * - `DELETE /cart-sessions/{id}/line-items/{lineId}` — Remove a line item from a cart session\n * - `POST /cart-sessions/{id}/add-ons` — Toggle an add-on on a cart session\n * - `POST /cart-sessions/{id}/discount-code` — Set or clear a cart discount code\n * - `POST /cart-sessions/{id}/contact` — Capture customer email + consent on a cart\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const cartSessionsConvert = <ThrowOnError extends boolean = false>(options: Options<CartSessionsConvertData, ThrowOnError>) => (options.client ?? client).post<CartSessionsConvertResponses, CartSessionsConvertErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-sessions/{id}/convert',\n    ...options\n});\n\n/**\n * Get managed Cart API key status\n *\n * Returns whether the authenticated merchant has managed RevKeen Cart publishable and secret keys. Existing key values are never returned.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /cart-api-keys/ensure` — Ensure managed Cart API keys exist\n * - `POST /cart-api-keys/{kind}/rotate` — Rotate a managed Cart API key\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n */\nexport const cartApiKeysStatus = <ThrowOnError extends boolean = false>(options?: Options<CartApiKeysStatusData, ThrowOnError>) => (options?.client ?? client).get<CartApiKeysStatusResponses, CartApiKeysStatusErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-api-keys/status',\n    ...options\n});\n\n/**\n * Ensure managed Cart API keys exist\n *\n * Creates any missing managed RevKeen Cart publishable and secret keys for the authenticated merchant. Newly created key values are returned once; existing secret values are never re-exposed.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /cart-api-keys/status` — Get managed Cart API key status\n * - `POST /cart-api-keys/{kind}/rotate` — Rotate a managed Cart API key\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const cartApiKeysEnsure = <ThrowOnError extends boolean = false>(options?: Options<CartApiKeysEnsureData, ThrowOnError>) => (options?.client ?? client).post<CartApiKeysEnsureResponses, CartApiKeysEnsureErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-api-keys/ensure',\n    ...options\n});\n\n/**\n * Rotate a managed Cart API key\n *\n * Rotates the managed RevKeen Cart publishable or secret key. The new key value is returned once; previous keys remain valid for the requested grace window.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /cart-api-keys/status` — Get managed Cart API key status\n * - `POST /cart-api-keys/ensure` — Ensure managed Cart API keys exist\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const cartApiKeysRotate = <ThrowOnError extends boolean = false>(options: Options<CartApiKeysRotateData, ThrowOnError>) => (options.client ?? client).post<CartApiKeysRotateResponses, CartApiKeysRotateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/cart-api-keys/{kind}/rotate',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * List storefront products\n *\n * List active, cart-eligible products with browser-safe display data, active prices, and derived availability. Intended for publishable-key storefront and CMS-picker use; never returns product metadata or internal fields.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /storefront/products/{productId}` — Get a storefront product\n * - `GET /storefront/origins` — List storefront origins\n * - `POST /storefront/origins` — Register a storefront origin\n * - `DELETE /storefront/origins/{originId}` — Remove a storefront origin\n * - `GET /storefront/status` — Get storefront integration status\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const storefrontProductsList = <ThrowOnError extends boolean = false>(options?: Options<StorefrontProductsListData, ThrowOnError>) => (options?.client ?? client).get<StorefrontProductsListResponses, StorefrontProductsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/storefront/products',\n    ...options\n});\n\n/**\n * Get a storefront product\n *\n * Fetch one active, cart-eligible product by UUID, product reference, or slug. Same browser-safe projection as the list endpoint.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /storefront/products` — List storefront products\n * - `GET /storefront/origins` — List storefront origins\n * - `POST /storefront/origins` — Register a storefront origin\n * - `DELETE /storefront/origins/{originId}` — Remove a storefront origin\n * - `GET /storefront/status` — Get storefront integration status\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const storefrontProductsGet = <ThrowOnError extends boolean = false>(options: Options<StorefrontProductsGetData, ThrowOnError>) => (options.client ?? client).get<StorefrontProductsGetResponses, StorefrontProductsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/storefront/products/{productId}',\n    ...options\n});\n\n/**\n * List storefront origins\n *\n * List the browser origins registered for publishable-key storefront calls.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /storefront/products` — List storefront products\n * - `GET /storefront/products/{productId}` — Get a storefront product\n * - `POST /storefront/origins` — Register a storefront origin\n * - `DELETE /storefront/origins/{originId}` — Remove a storefront origin\n * - `GET /storefront/status` — Get storefront integration status\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const storefrontOriginsList = <ThrowOnError extends boolean = false>(options?: Options<StorefrontOriginsListData, ThrowOnError>) => (options?.client ?? client).get<StorefrontOriginsListResponses, StorefrontOriginsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/storefront/origins',\n    ...options\n});\n\n/**\n * Register a storefront origin\n *\n * Register an exact web origin (scheme://host[:port]) for publishable-key storefront calls. Wildcards are rejected; http is allowed only for localhost.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /storefront/products` — List storefront products\n * - `GET /storefront/products/{productId}` — Get a storefront product\n * - `GET /storefront/origins` — List storefront origins\n * - `DELETE /storefront/origins/{originId}` — Remove a storefront origin\n * - `GET /storefront/status` — Get storefront integration status\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const storefrontOriginsCreate = <ThrowOnError extends boolean = false>(options?: Options<StorefrontOriginsCreateData, ThrowOnError>) => (options?.client ?? client).post<StorefrontOriginsCreateResponses, StorefrontOriginsCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/storefront/origins',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Remove a storefront origin\n *\n * Remove a registered storefront origin. Browser calls from it fail closed afterwards.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /storefront/products` — List storefront products\n * - `GET /storefront/products/{productId}` — Get a storefront product\n * - `GET /storefront/origins` — List storefront origins\n * - `POST /storefront/origins` — Register a storefront origin\n * - `GET /storefront/status` — Get storefront integration status\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const storefrontOriginsDelete = <ThrowOnError extends boolean = false>(options: Options<StorefrontOriginsDeleteData, ThrowOnError>) => (options.client ?? client).delete<StorefrontOriginsDeleteResponses, StorefrontOriginsDeleteErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/storefront/origins/{originId}',\n    ...options\n});\n\n/**\n * Get storefront integration status\n *\n * Readiness report for the Cart/headless-storefront setup: activation, managed keys, registered origins, product-read readiness, webhook health, and availability tracking. CART_DISABLED / KEYS_MISSING / ORIGIN_MISSING / PRODUCT_READ_UNAVAILABLE are fail-level; WEBHOOK_MISSING / WEBHOOK_UNREACHABLE are warn-level. Never returns key material.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /storefront/products` — List storefront products\n * - `GET /storefront/products/{productId}` — Get a storefront product\n * - `GET /storefront/origins` — List storefront origins\n * - `POST /storefront/origins` — Register a storefront origin\n * - `DELETE /storefront/origins/{originId}` — Remove a storefront origin\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n */\nexport const storefrontStatusGet = <ThrowOnError extends boolean = false>(options?: Options<StorefrontStatusGetData, ThrowOnError>) => (options?.client ?? client).get<StorefrontStatusGetResponses, StorefrontStatusGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/storefront/status',\n    ...options\n});\n\n/**\n * List customers\n *\n * Retrieve a paginated list of customers for the merchant\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customers/{customerId}/invoices` — List customer invoices\n * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions\n * - `GET /customers/{customerId}/orders` — List customer orders\n * - `GET /customers/{customerId}/payments` — List customer payments\n * - `PUT /customers/external/batch` — Batch upsert customers by external ID\n * - `POST /customers` — Create a new customer\n * - `GET /customers/{id}` — Get customer by ID\n * - `PATCH /customers/{id}` — Update customer details\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const customersList = <ThrowOnError extends boolean = false>(options?: Options<CustomersListData, ThrowOnError>) => (options?.client ?? client).get<CustomersListResponses, CustomersListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customers',\n    ...options\n});\n\n/**\n * Create a new customer\n *\n * Create a new customer record in the merchant's account\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customers/{customerId}/invoices` — List customer invoices\n * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions\n * - `GET /customers/{customerId}/orders` — List customer orders\n * - `GET /customers/{customerId}/payments` — List customer payments\n * - `PUT /customers/external/batch` — Batch upsert customers by external ID\n * - `GET /customers` — List customers\n * - `GET /customers/{id}` — Get customer by ID\n * - `PATCH /customers/{id}` — Update customer details\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const customersCreate = <ThrowOnError extends boolean = false>(options?: Options<CustomersCreateData, ThrowOnError>) => (options?.client ?? client).post<CustomersCreateResponses, CustomersCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customers',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Get customer by ID\n *\n * Retrieve detailed information about a specific customer\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customers/{customerId}/invoices` — List customer invoices\n * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions\n * - `GET /customers/{customerId}/orders` — List customer orders\n * - `GET /customers/{customerId}/payments` — List customer payments\n * - `PUT /customers/external/batch` — Batch upsert customers by external ID\n * - `POST /customers` — Create a new customer\n * - `GET /customers` — List customers\n * - `PATCH /customers/{id}` — Update customer details\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const customersGet = <ThrowOnError extends boolean = false>(options: Options<CustomersGetData, ThrowOnError>) => (options.client ?? client).get<CustomersGetResponses, CustomersGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customers/{id}',\n    ...options\n});\n\n/**\n * Update customer details\n *\n * Update an existing customer's information\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customers/{customerId}/invoices` — List customer invoices\n * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions\n * - `GET /customers/{customerId}/orders` — List customer orders\n * - `GET /customers/{customerId}/payments` — List customer payments\n * - `PUT /customers/external/batch` — Batch upsert customers by external ID\n * - `POST /customers` — Create a new customer\n * - `GET /customers` — List customers\n * - `GET /customers/{id}` — Get customer by ID\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const customersUpdate = <ThrowOnError extends boolean = false>(options: Options<CustomersUpdateData, ThrowOnError>) => (options.client ?? client).patch<CustomersUpdateResponses, CustomersUpdateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customers/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Get customer payment rail availability\n *\n * Return per-rail availability for a customer, including mandate state and last successful rail usage.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customers/{customerId}/invoices` — List customer invoices\n * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions\n * - `GET /customers/{customerId}/orders` — List customer orders\n * - `GET /customers/{customerId}/payments` — List customer payments\n * - `PUT /customers/external/batch` — Batch upsert customers by external ID\n * - `POST /customers` — Create a new customer\n * - `GET /customers` — List customers\n * - `GET /customers/{id}` — Get customer by ID\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const customersPaymentRailsGet = <ThrowOnError extends boolean = false>(options: Options<CustomersPaymentRailsGetData, ThrowOnError>) => (options.client ?? client).get<CustomersPaymentRailsGetResponses, CustomersPaymentRailsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customers/{id}/payment-rails',\n    ...options\n});\n\n/**\n * Get preferred payment rails\n *\n * Return smart-pick rail recommendations with customer history, mandate state, and margin-aware reasoning.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customers/{customerId}/invoices` — List customer invoices\n * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions\n * - `GET /customers/{customerId}/orders` — List customer orders\n * - `GET /customers/{customerId}/payments` — List customer payments\n * - `PUT /customers/external/batch` — Batch upsert customers by external ID\n * - `POST /customers` — Create a new customer\n * - `GET /customers` — List customers\n * - `GET /customers/{id}` — Get customer by ID\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const customersPreferredRailsGet = <ThrowOnError extends boolean = false>(options: Options<CustomersPreferredRailsGetData, ThrowOnError>) => (options.client ?? client).get<CustomersPreferredRailsGetResponses, CustomersPreferredRailsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customers/{id}/preferred-rails',\n    ...options\n});\n\n/**\n * Get customer payment methods\n *\n * Retrieve all payment methods for a customer\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customers/{customerId}/invoices` — List customer invoices\n * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions\n * - `GET /customers/{customerId}/orders` — List customer orders\n * - `GET /customers/{customerId}/payments` — List customer payments\n * - `PUT /customers/external/batch` — Batch upsert customers by external ID\n * - `POST /customers` — Create a new customer\n * - `GET /customers` — List customers\n * - `GET /customers/{id}` — Get customer by ID\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const customersPaymentMethodsList = <ThrowOnError extends boolean = false>(options: Options<CustomersPaymentMethodsListData, ThrowOnError>) => (options.client ?? client).get<CustomersPaymentMethodsListResponses, CustomersPaymentMethodsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customers/{id}/payment-methods',\n    ...options\n});\n\n/**\n * List subscriptions\n *\n * Retrieve a paginated list of subscriptions with optional filters\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /subscriptions` — Create a new subscription\n * - `GET /subscriptions/{id}` — Get subscription by ID\n * - `PATCH /subscriptions/{id}` — Update subscription details\n * - `DELETE /subscriptions/{id}` — Delete subscription\n * - `POST /subscriptions/{id}/change-plan` — Change subscription plan\n * - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity\n * - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal\n * - `POST /subscriptions/{id}/pause` — Pause subscription\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const subscriptionsList = <ThrowOnError extends boolean = false>(options?: Options<SubscriptionsListData, ThrowOnError>) => (options?.client ?? client).get<SubscriptionsListResponses, SubscriptionsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/subscriptions',\n    ...options\n});\n\n/**\n * Create a new subscription\n *\n * Create a new subscription for a customer\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /subscriptions` — List subscriptions\n * - `GET /subscriptions/{id}` — Get subscription by ID\n * - `PATCH /subscriptions/{id}` — Update subscription details\n * - `DELETE /subscriptions/{id}` — Delete subscription\n * - `POST /subscriptions/{id}/change-plan` — Change subscription plan\n * - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity\n * - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal\n * - `POST /subscriptions/{id}/pause` — Pause subscription\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const subscriptionsCreate = <ThrowOnError extends boolean = false>(options?: Options<SubscriptionsCreateData, ThrowOnError>) => (options?.client ?? client).post<SubscriptionsCreateResponses, SubscriptionsCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/subscriptions',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Get subscription by ID\n *\n * Retrieve detailed information about a specific subscription\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /subscriptions` — Create a new subscription\n * - `GET /subscriptions` — List subscriptions\n * - `PATCH /subscriptions/{id}` — Update subscription details\n * - `DELETE /subscriptions/{id}` — Delete subscription\n * - `POST /subscriptions/{id}/change-plan` — Change subscription plan\n * - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity\n * - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal\n * - `POST /subscriptions/{id}/pause` — Pause subscription\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const subscriptionsGet = <ThrowOnError extends boolean = false>(options: Options<SubscriptionsGetData, ThrowOnError>) => (options.client ?? client).get<SubscriptionsGetResponses, SubscriptionsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/subscriptions/{id}',\n    ...options\n});\n\n/**\n * Update subscription details\n *\n * Update an existing subscription's properties\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /subscriptions` — Create a new subscription\n * - `GET /subscriptions` — List subscriptions\n * - `GET /subscriptions/{id}` — Get subscription by ID\n * - `DELETE /subscriptions/{id}` — Delete subscription\n * - `POST /subscriptions/{id}/change-plan` — Change subscription plan\n * - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity\n * - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal\n * - `POST /subscriptions/{id}/pause` — Pause subscription\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const subscriptionsUpdate = <ThrowOnError extends boolean = false>(options: Options<SubscriptionsUpdateData, ThrowOnError>) => (options.client ?? client).patch<SubscriptionsUpdateResponses, SubscriptionsUpdateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/subscriptions/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Cancel subscription\n *\n * Cancel a subscription either immediately or at the end of the current billing period.\n *\n * **Modes:**\n * - `immediately`: Status set to \"canceled\", access revoked now\n * - `period_end`: cancelAtPeriodEnd flag set, access continues until period end\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /subscriptions` — Create a new subscription\n * - `GET /subscriptions` — List subscriptions\n * - `GET /subscriptions/{id}` — Get subscription by ID\n * - `PATCH /subscriptions/{id}` — Update subscription details\n * - `DELETE /subscriptions/{id}` — Delete subscription\n * - `POST /subscriptions/{id}/change-plan` — Change subscription plan\n * - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity\n * - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const subscriptionsCancel = <ThrowOnError extends boolean = false>(options: Options<SubscriptionsCancelData, ThrowOnError>) => (options.client ?? client).post<SubscriptionsCancelResponses, SubscriptionsCancelErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/subscriptions/{id}/cancel',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * MRR Summary\n *\n * Get Monthly Recurring Revenue metrics and growth\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /analytics/revenue/time-series` — Revenue Time Series\n * - `GET /analytics/invoices/ar-aging` — A/R Aging Report\n * - `GET /analytics/collections/dso` — Days Sales Outstanding\n * - `GET /analytics/customers/ltv` — Customer LTV\n * - `GET /analytics/customers/{customerId}` — Customer Analytics\n * - `GET /analytics/payment-links/conversion` — Payment Link Conversion\n * - `GET /analytics/checkout/funnel` — Checkout Funnel Analytics\n * - `GET /analytics/checkout/abandonment/summary` — Abandonment Alert Summary\n */\nexport const analyticsRevenueMrrSummary = <ThrowOnError extends boolean = false>(options?: Options<AnalyticsRevenueMrrSummaryData, ThrowOnError>) => (options?.client ?? client).get<AnalyticsRevenueMrrSummaryResponses, unknown, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/analytics/revenue/mrr-summary',\n    ...options\n});\n\n/**\n * Revenue Time Series\n *\n * Get revenue data over time with configurable granularity\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /analytics/revenue/mrr-summary` — MRR Summary\n * - `GET /analytics/invoices/ar-aging` — A/R Aging Report\n * - `GET /analytics/collections/dso` — Days Sales Outstanding\n * - `GET /analytics/customers/ltv` — Customer LTV\n * - `GET /analytics/customers/{customerId}` — Customer Analytics\n * - `GET /analytics/payment-links/conversion` — Payment Link Conversion\n * - `GET /analytics/checkout/funnel` — Checkout Funnel Analytics\n * - `GET /analytics/checkout/abandonment/summary` — Abandonment Alert Summary\n */\nexport const analyticsRevenueTimeSeries = <ThrowOnError extends boolean = false>(options: Options<AnalyticsRevenueTimeSeriesData, ThrowOnError>) => (options.client ?? client).get<AnalyticsRevenueTimeSeriesResponses, unknown, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/analytics/revenue/time-series',\n    ...options\n});\n\n/**\n * List refunds\n *\n * Retrieve a paginated list of refunds with optional filters. Results are ordered by creation date (newest first).\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /refunds` — Create a refund\n * - `GET /refunds/{id}` — Get refund by ID\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const refundsList = <ThrowOnError extends boolean = false>(options?: Options<RefundsListData, ThrowOnError>) => (options?.client ?? client).get<RefundsListResponses, RefundsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/refunds',\n    ...options\n});\n\n/**\n * Create a refund\n *\n * Initiate a refund for a payment. The refund will be processed through the original payment gateway.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /refunds` — List refunds\n * - `GET /refunds/{id}` — Get refund by ID\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const refundsCreate = <ThrowOnError extends boolean = false>(options?: Options<RefundsCreateData, ThrowOnError>) => (options?.client ?? client).post<RefundsCreateResponses, RefundsCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/refunds',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Get refund by ID\n *\n * Retrieve a single refund by its public ID (ref_xxx) or internal UUID.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /refunds` — List refunds\n * - `POST /refunds` — Create a refund\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const refundsGet = <ThrowOnError extends boolean = false>(options: Options<RefundsGetData, ThrowOnError>) => (options.client ?? client).get<RefundsGetResponses, RefundsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/refunds/{id}',\n    ...options\n});\n\n/**\n * List credit notes\n *\n * Retrieve a paginated list of credit notes with optional filters. Results are ordered by creation date (newest first).\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /credit_notes` — Create a credit note\n * - `GET /credit_notes/{id}` — Get credit note by ID\n * - `POST /credit_notes/{id}/void` — Void a credit note\n * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice\n * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction\n * - `GET /credit_notes/{id}/lines` — List line items on a credit note\n * - `POST /credit_notes/preview` — Preview a credit note without creating it\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const creditNotesList = <ThrowOnError extends boolean = false>(options?: Options<CreditNotesListData, ThrowOnError>) => (options?.client ?? client).get<CreditNotesListResponses, CreditNotesListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/credit_notes',\n    ...options\n});\n\n/**\n * Create a credit note\n *\n * Issue a credit note for a paid or partially paid invoice. The credit can be applied via refund to payment method, customer balance, or marked as external.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /credit_notes` — List credit notes\n * - `GET /credit_notes/{id}` — Get credit note by ID\n * - `POST /credit_notes/{id}/void` — Void a credit note\n * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice\n * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction\n * - `GET /credit_notes/{id}/lines` — List line items on a credit note\n * - `POST /credit_notes/preview` — Preview a credit note without creating it\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const creditNotesCreate = <ThrowOnError extends boolean = false>(options?: Options<CreditNotesCreateData, ThrowOnError>) => (options?.client ?? client).post<CreditNotesCreateResponses, CreditNotesCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/credit_notes',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Get credit note by ID\n *\n * Retrieve a single credit note by its UUID.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /credit_notes` — List credit notes\n * - `POST /credit_notes` — Create a credit note\n * - `POST /credit_notes/{id}/void` — Void a credit note\n * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice\n * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction\n * - `GET /credit_notes/{id}/lines` — List line items on a credit note\n * - `POST /credit_notes/preview` — Preview a credit note without creating it\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const creditNotesGet = <ThrowOnError extends boolean = false>(options: Options<CreditNotesGetData, ThrowOnError>) => (options.client ?? client).get<CreditNotesGetResponses, CreditNotesGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/credit_notes/{id}',\n    ...options\n});\n\n/**\n * Void a credit note\n *\n * Void a credit note that has been issued but not yet fully applied. This is an accounting void — it reverses the credit without creating a new financial transaction.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /credit_notes` — List credit notes\n * - `POST /credit_notes` — Create a credit note\n * - `GET /credit_notes/{id}` — Get credit note by ID\n * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice\n * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction\n * - `GET /credit_notes/{id}/lines` — List line items on a credit note\n * - `POST /credit_notes/preview` — Preview a credit note without creating it\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const creditNotesVoid = <ThrowOnError extends boolean = false>(options: Options<CreditNotesVoidData, ThrowOnError>) => (options.client ?? client).post<CreditNotesVoidResponses, CreditNotesVoidErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/credit_notes/{id}/void',\n    ...options\n});\n\n/**\n * List line items on a credit note\n *\n * Returns the line items attached to a credit note. Each line describes a portion of the invoice that the credit applies to — either a whole invoice line or a prorated slice. Use this to reconstruct the credit's effect per invoice line (for example, when displaying the credit breakdown in your own UI).\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /credit_notes` — List credit notes\n * - `POST /credit_notes` — Create a credit note\n * - `GET /credit_notes/{id}` — Get credit note by ID\n * - `POST /credit_notes/{id}/void` — Void a credit note\n * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice\n * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction\n * - `POST /credit_notes/preview` — Preview a credit note without creating it\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const creditNotesListLines = <ThrowOnError extends boolean = false>(options: Options<CreditNotesListLinesData, ThrowOnError>) => (options.client ?? client).get<CreditNotesListLinesResponses, CreditNotesListLinesErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/credit_notes/{id}/lines',\n    ...options\n});\n\n/**\n * Preview a credit note without creating it\n *\n * Compute what a credit note would look like against a specific invoice without persisting anything. Use this to validate amounts and show a \"here's what will happen\" UI before the merchant commits. No side effects — no DB writes, no events emitted, no refunds initiated. Mirrors Stripe's `POST /v1/credit_notes/preview`.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /credit_notes` — List credit notes\n * - `POST /credit_notes` — Create a credit note\n * - `GET /credit_notes/{id}` — Get credit note by ID\n * - `POST /credit_notes/{id}/void` — Void a credit note\n * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice\n * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction\n * - `GET /credit_notes/{id}/lines` — List line items on a credit note\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const creditNotesPreview = <ThrowOnError extends boolean = false>(options: Options<CreditNotesPreviewData, ThrowOnError>) => (options.client ?? client).post<CreditNotesPreviewResponses, CreditNotesPreviewErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/credit_notes/preview',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * List payment links\n *\n * List payment links for the authenticated merchant with pagination and filters\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-links` — Create a new payment link\n * - `GET /payment-links/{id}` — Get payment link by ID\n * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)\n * - `PATCH /payment-links/{id}/status` — Update payment link status\n * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)\n * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)\n * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const paymentLinksList = <ThrowOnError extends boolean = false>(options?: Options<PaymentLinksListData, ThrowOnError>) => (options?.client ?? client).get<PaymentLinksListResponses, PaymentLinksListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-links',\n    ...options\n});\n\n/**\n * Create a new payment link\n *\n * Create a new payment link for invoices, subscriptions, or custom amounts\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /payment-links` — List payment links\n * - `GET /payment-links/{id}` — Get payment link by ID\n * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)\n * - `PATCH /payment-links/{id}/status` — Update payment link status\n * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)\n * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)\n * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const paymentLinksCreate = <ThrowOnError extends boolean = false>(options?: Options<PaymentLinksCreateData, ThrowOnError>) => (options?.client ?? client).post<PaymentLinksCreateResponses, PaymentLinksCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-links',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Get payment link by ID\n *\n * Retrieve a payment link by its UUID or public_id\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-links` — Create a new payment link\n * - `GET /payment-links` — List payment links\n * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)\n * - `PATCH /payment-links/{id}/status` — Update payment link status\n * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)\n * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)\n * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const paymentLinksGet = <ThrowOnError extends boolean = false>(options: Options<PaymentLinksGetData, ThrowOnError>) => (options.client ?? client).get<PaymentLinksGetResponses, PaymentLinksGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-links/{id}',\n    ...options\n});\n\n/**\n * Expire a payment link (deprecated)\n *\n * **Deprecated — use `PATCH /v2/payment-links/{id}/status` with `status: \"expired\"` instead.** This convenience endpoint will be removed in a future API version. Mark a payment link as expired, preventing further use.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-links` — Create a new payment link\n * - `GET /payment-links` — List payment links\n * - `GET /payment-links/{id}` — Get payment link by ID\n * - `PATCH /payment-links/{id}/status` — Update payment link status\n * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)\n * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)\n * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n *\n * @deprecated\n */\nexport const paymentLinksExpire = <ThrowOnError extends boolean = false>(options: Options<PaymentLinksExpireData, ThrowOnError>) => (options.client ?? client).post<PaymentLinksExpireResponses, PaymentLinksExpireErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-links/{id}/expire',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Update payment link status\n *\n * Change the status of a payment link. Active links accept payments, inactive links are temporarily disabled, and archived links are permanently disabled and cannot be reactivated.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-links` — Create a new payment link\n * - `GET /payment-links` — List payment links\n * - `GET /payment-links/{id}` — Get payment link by ID\n * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)\n * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)\n * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)\n * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const paymentLinksUpdate = <ThrowOnError extends boolean = false>(options: Options<PaymentLinksUpdateData, ThrowOnError>) => (options.client ?? client).patch<PaymentLinksUpdateResponses, PaymentLinksUpdateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-links/{id}/status',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Deactivate a payment link (deprecated)\n *\n * **Deprecated — use `PATCH /v2/payment-links/{id}/status` with `status: \"inactive\"` instead.** This convenience endpoint will be removed in a future API version. Temporarily disable a payment link. It can be reactivated later.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-links` — Create a new payment link\n * - `GET /payment-links` — List payment links\n * - `GET /payment-links/{id}` — Get payment link by ID\n * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)\n * - `PATCH /payment-links/{id}/status` — Update payment link status\n * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)\n * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n *\n * @deprecated\n */\nexport const paymentLinksDeactivate = <ThrowOnError extends boolean = false>(options: Options<PaymentLinksDeactivateData, ThrowOnError>) => (options.client ?? client).post<PaymentLinksDeactivateResponses, PaymentLinksDeactivateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-links/{id}/deactivate',\n    ...options\n});\n\n/**\n * Activate a payment link (deprecated)\n *\n * **Deprecated — use `PATCH /v2/payment-links/{id}/status` with `status: \"active\"` instead.** This convenience endpoint will be removed in a future API version. Enable a payment link to accept payments. Cannot be used on archived links.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-links` — Create a new payment link\n * - `GET /payment-links` — List payment links\n * - `GET /payment-links/{id}` — Get payment link by ID\n * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)\n * - `PATCH /payment-links/{id}/status` — Update payment link status\n * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)\n * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n *\n * @deprecated\n */\nexport const paymentLinksActivate = <ThrowOnError extends boolean = false>(options: Options<PaymentLinksActivateData, ThrowOnError>) => (options.client ?? client).post<PaymentLinksActivateResponses, PaymentLinksActivateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-links/{id}/activate',\n    ...options\n});\n\n/**\n * Archive a payment link (deprecated)\n *\n * **Deprecated — use `PATCH /v2/payment-links/{id}/status` with `status: \"archived\"` instead.** This convenience endpoint will be removed in a future API version. Permanently disable a payment link. This action cannot be undone.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-links` — Create a new payment link\n * - `GET /payment-links` — List payment links\n * - `GET /payment-links/{id}` — Get payment link by ID\n * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)\n * - `PATCH /payment-links/{id}/status` — Update payment link status\n * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)\n * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n *\n * @deprecated\n */\nexport const paymentLinksArchive = <ThrowOnError extends boolean = false>(options: Options<PaymentLinksArchiveData, ThrowOnError>) => (options.client ?? client).post<PaymentLinksArchiveResponses, PaymentLinksArchiveErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-links/{id}/archive',\n    ...options\n});\n\n/**\n * List prices\n *\n * List all prices for the authenticated merchant. Supports filtering and cursor-based pagination.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /prices` — Create a price\n * - `GET /prices/{id}` — Retrieve a price\n * - `PATCH /prices/{id}` — Update a price\n * - `DELETE /prices/{id}` — Archive a price\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const pricesList = <ThrowOnError extends boolean = false>(options?: Options<PricesListData, ThrowOnError>) => (options?.client ?? client).get<PricesListResponses, PricesListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/prices',\n    ...options\n});\n\n/**\n * Create a price\n *\n * Creates a new price for a product. Supports fixed, pay-what-you-want, and free pricing models.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /prices` — List prices\n * - `GET /prices/{id}` — Retrieve a price\n * - `PATCH /prices/{id}` — Update a price\n * - `DELETE /prices/{id}` — Archive a price\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const pricesCreate = <ThrowOnError extends boolean = false>(options: Options<PricesCreateData, ThrowOnError>) => (options.client ?? client).post<PricesCreateResponses, PricesCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/prices',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Archive a price\n *\n * Archives a price by setting active to false. The price remains in the system but cannot be used for new purchases.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /prices` — List prices\n * - `POST /prices` — Create a price\n * - `GET /prices/{id}` — Retrieve a price\n * - `PATCH /prices/{id}` — Update a price\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const pricesArchive = <ThrowOnError extends boolean = false>(options: Options<PricesArchiveData, ThrowOnError>) => (options.client ?? client).delete<PricesArchiveResponses, PricesArchiveErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/prices/{id}',\n    ...options\n});\n\n/**\n * Retrieve a price\n *\n * Retrieves a price by its ID.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /prices` — List prices\n * - `POST /prices` — Create a price\n * - `PATCH /prices/{id}` — Update a price\n * - `DELETE /prices/{id}` — Archive a price\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const pricesGet = <ThrowOnError extends boolean = false>(options: Options<PricesGetData, ThrowOnError>) => (options.client ?? client).get<PricesGetResponses, PricesGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/prices/{id}',\n    ...options\n});\n\n/**\n * Update a price\n *\n * Updates a price. Only certain fields can be updated (active, name, nickname, lookup_key, metadata). Core pricing fields are immutable.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /prices` — List prices\n * - `POST /prices` — Create a price\n * - `GET /prices/{id}` — Retrieve a price\n * - `DELETE /prices/{id}` — Archive a price\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const pricesUpdate = <ThrowOnError extends boolean = false>(options: Options<PricesUpdateData, ThrowOnError>) => (options.client ?? client).patch<PricesUpdateResponses, PricesUpdateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/prices/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Create an accounting-led invoice payment request\n *\n * Claims or reuses an ExternalAccountingInvoicePaymentRequest and mints a provider-neutral checkout session. Does not create a RevKeen invoice. Requires Idempotency-Key.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /integrations/accounting/invoice-payment-requests/{id}` — Get an accounting-led invoice payment request\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const accountingInvoicePaymentRequestsCreate = <ThrowOnError extends boolean = false>(options?: Options<AccountingInvoicePaymentRequestsCreateData, ThrowOnError>) => (options?.client ?? client).post<AccountingInvoicePaymentRequestsCreateResponses, AccountingInvoicePaymentRequestsCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/integrations/accounting/invoice-payment-requests',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Get an accounting-led invoice payment request\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /integrations/accounting/invoice-payment-requests` — Create an accounting-led invoice payment request\n *\n * **Common errors**\n *\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const accountingInvoicePaymentRequestsGet = <ThrowOnError extends boolean = false>(options: Options<AccountingInvoicePaymentRequestsGetData, ThrowOnError>) => (options.client ?? client).get<AccountingInvoicePaymentRequestsGetResponses, AccountingInvoicePaymentRequestsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/integrations/accounting/invoice-payment-requests/{id}',\n    ...options\n});\n\n/**\n * List webhook endpoints\n *\n * List all webhook endpoints for the authenticated merchant. Supports filtering by status and pagination.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /webhook-endpoints` — Create webhook endpoint\n * - `GET /webhook-endpoints/{id}` — Get webhook endpoint\n * - `PATCH /webhook-endpoints/{id}` — Update webhook endpoint\n * - `DELETE /webhook-endpoints/{id}` — Delete webhook endpoint\n * - `POST /webhook-endpoints/{id}/rotate-secret` — Rotate signing secret\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const webhookEndpointsList = <ThrowOnError extends boolean = false>(options?: Options<WebhookEndpointsListData, ThrowOnError>) => (options?.client ?? client).get<WebhookEndpointsListResponses, WebhookEndpointsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/webhook-endpoints',\n    ...options\n});\n\n/**\n * Create webhook endpoint\n *\n * Create a webhook endpoint to receive event notifications at the given URL. Returns the endpoint with its signing secret — store the secret securely, it is only shown once.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /webhook-endpoints` — List webhook endpoints\n * - `GET /webhook-endpoints/{id}` — Get webhook endpoint\n * - `PATCH /webhook-endpoints/{id}` — Update webhook endpoint\n * - `DELETE /webhook-endpoints/{id}` — Delete webhook endpoint\n * - `POST /webhook-endpoints/{id}/rotate-secret` — Rotate signing secret\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const webhookEndpointsCreate = <ThrowOnError extends boolean = false>(options?: Options<WebhookEndpointsCreateData, ThrowOnError>) => (options?.client ?? client).post<WebhookEndpointsCreateResponses, WebhookEndpointsCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/webhook-endpoints',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Delete webhook endpoint\n *\n * Permanently delete a webhook endpoint and all its event subscriptions.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /webhook-endpoints` — List webhook endpoints\n * - `POST /webhook-endpoints` — Create webhook endpoint\n * - `GET /webhook-endpoints/{id}` — Get webhook endpoint\n * - `PATCH /webhook-endpoints/{id}` — Update webhook endpoint\n * - `POST /webhook-endpoints/{id}/rotate-secret` — Rotate signing secret\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const webhookEndpointsDelete = <ThrowOnError extends boolean = false>(options: Options<WebhookEndpointsDeleteData, ThrowOnError>) => (options.client ?? client).delete<WebhookEndpointsDeleteResponses, WebhookEndpointsDeleteErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/webhook-endpoints/{id}',\n    ...options\n});\n\n/**\n * Get webhook endpoint\n *\n * Retrieve a single webhook endpoint by ID, including delivery statistics.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /webhook-endpoints` — List webhook endpoints\n * - `POST /webhook-endpoints` — Create webhook endpoint\n * - `PATCH /webhook-endpoints/{id}` — Update webhook endpoint\n * - `DELETE /webhook-endpoints/{id}` — Delete webhook endpoint\n * - `POST /webhook-endpoints/{id}/rotate-secret` — Rotate signing secret\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const webhookEndpointsGet = <ThrowOnError extends boolean = false>(options: Options<WebhookEndpointsGetData, ThrowOnError>) => (options.client ?? client).get<WebhookEndpointsGetResponses, WebhookEndpointsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/webhook-endpoints/{id}',\n    ...options\n});\n\n/**\n * Update webhook endpoint\n *\n * Update a webhook endpoint's URL, subscribed events, description, or enabled status.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /webhook-endpoints` — List webhook endpoints\n * - `POST /webhook-endpoints` — Create webhook endpoint\n * - `GET /webhook-endpoints/{id}` — Get webhook endpoint\n * - `DELETE /webhook-endpoints/{id}` — Delete webhook endpoint\n * - `POST /webhook-endpoints/{id}/rotate-secret` — Rotate signing secret\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const webhookEndpointsUpdate = <ThrowOnError extends boolean = false>(options: Options<WebhookEndpointsUpdateData, ThrowOnError>) => (options.client ?? client).patch<WebhookEndpointsUpdateResponses, WebhookEndpointsUpdateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/webhook-endpoints/{id}',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Rotate signing secret\n *\n * Generate a new signing secret for a webhook endpoint. The old secret is immediately invalidated. Store the new secret securely — it is only returned in this response.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /webhook-endpoints` — List webhook endpoints\n * - `POST /webhook-endpoints` — Create webhook endpoint\n * - `GET /webhook-endpoints/{id}` — Get webhook endpoint\n * - `PATCH /webhook-endpoints/{id}` — Update webhook endpoint\n * - `DELETE /webhook-endpoints/{id}` — Delete webhook endpoint\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const webhookEndpointsRotateSecret = <ThrowOnError extends boolean = false>(options: Options<WebhookEndpointsRotateSecretData, ThrowOnError>) => (options.client ?? client).post<WebhookEndpointsRotateSecretResponses, WebhookEndpointsRotateSecretErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/webhook-endpoints/{id}/rotate-secret',\n    ...options\n});\n\n/**\n * List webhook deliveries\n *\n * List individual webhook delivery attempts across all endpoints for the authenticated merchant. Use filters to scope to a specific endpoint, a specific event, or a specific delivery status. Results are returned in reverse chronological order.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /webhook-deliveries/{id}` — Retrieve a webhook delivery\n * - `POST /webhook-deliveries/{id}/retry` — Retry a webhook delivery\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const webhookDeliveriesList = <ThrowOnError extends boolean = false>(options?: Options<WebhookDeliveriesListData, ThrowOnError>) => (options?.client ?? client).get<WebhookDeliveriesListResponses, WebhookDeliveriesListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/webhook-deliveries',\n    ...options\n});\n\n/**\n * Retrieve a webhook delivery\n *\n * Retrieve the details of a single webhook delivery including its last attempt outcome.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /webhook-deliveries` — List webhook deliveries\n * - `POST /webhook-deliveries/{id}/retry` — Retry a webhook delivery\n *\n * **Common errors**\n *\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const webhookDeliveriesGet = <ThrowOnError extends boolean = false>(options: Options<WebhookDeliveriesGetData, ThrowOnError>) => (options.client ?? client).get<WebhookDeliveriesGetResponses, WebhookDeliveriesGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/webhook-deliveries/{id}',\n    ...options\n});\n\n/**\n * Retry a webhook delivery\n *\n * Queue an immediate retry of this delivery. The delivery is marked `pending` and `next_retry_at` is set to now; the dispatcher picks it up on its next tick. Calling retry on an already-pending delivery just advances its retry time. Dead-lettered deliveries can be retried once; succeeded deliveries cannot.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /webhook-deliveries` — List webhook deliveries\n * - `GET /webhook-deliveries/{id}` — Retrieve a webhook delivery\n *\n * **Common errors**\n *\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const webhookDeliveriesRetry = <ThrowOnError extends boolean = false>(options: Options<WebhookDeliveriesRetryData, ThrowOnError>) => (options.client ?? client).post<WebhookDeliveriesRetryResponses, WebhookDeliveriesRetryErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/webhook-deliveries/{id}/retry',\n    ...options\n});\n\n/**\n * Create a customer-portal session\n *\n * Mint a short-lived bearer token that authenticates a specific customer against /v2/customer-portal*. Returns an opaque `rkcps_...` token that expires in 60 minutes by default. Call this server-side from the merchant's backend, then hand the token to the customer's browser or embedded client. Treat the token like a password — never log it and never expose it to untrusted code.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customer-portal/customer` — Retrieve the authenticated customer\n * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions\n * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription\n * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription\n * - `GET /customer-portal/invoices` — List the authenticated customer's invoices\n * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice\n * - `GET /customer-portal/mandates` — List the authenticated customer's Direct Debit mandates\n * - `POST /customer-portal/mandates/{id}/re-authorize` — Re-authorise a Direct Debit mandate with new bank details\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const customerPortalSessionsCreate = <ThrowOnError extends boolean = false>(options: Options<CustomerPortalSessionsCreateData, ThrowOnError>) => (options.client ?? client).post<CustomerPortalSessionsCreateResponses, CustomerPortalSessionsCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/sessions',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Retrieve the authenticated customer\n *\n * Returns the customer represented by the bearer token. Useful as a warm-up / identity check when an embedded portal page loads.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /customer-portal/sessions` — Create a customer-portal session\n * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions\n * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription\n * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription\n * - `GET /customer-portal/invoices` — List the authenticated customer's invoices\n * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice\n * - `GET /customer-portal/mandates` — List the authenticated customer's Direct Debit mandates\n * - `POST /customer-portal/mandates/{id}/re-authorize` — Re-authorise a Direct Debit mandate with new bank details\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const customerPortalCustomerGet = <ThrowOnError extends boolean = false>(options?: Options<CustomerPortalCustomerGetData, ThrowOnError>) => (options?.client ?? client).get<CustomerPortalCustomerGetResponses, CustomerPortalCustomerGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/customer',\n    ...options\n});\n\n/**\n * List the authenticated customer's subscriptions\n *\n * Returns subscriptions where the customer is the subscriber. Results are reverse-chronological by creation time and paginate via `starting_after` / `ending_before` cursors.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /customer-portal/sessions` — Create a customer-portal session\n * - `GET /customer-portal/customer` — Retrieve the authenticated customer\n * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription\n * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription\n * - `GET /customer-portal/invoices` — List the authenticated customer's invoices\n * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice\n * - `GET /customer-portal/mandates` — List the authenticated customer's Direct Debit mandates\n * - `POST /customer-portal/mandates/{id}/re-authorize` — Re-authorise a Direct Debit mandate with new bank details\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const customerPortalSubscriptionsList = <ThrowOnError extends boolean = false>(options?: Options<CustomerPortalSubscriptionsListData, ThrowOnError>) => (options?.client ?? client).get<CustomerPortalSubscriptionsListResponses, CustomerPortalSubscriptionsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/subscriptions',\n    ...options\n});\n\n/**\n * Retrieve a subscription\n *\n * Returns a subscription owned by the authenticated customer. 404s on cross-customer access even if the subscription exists.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /customer-portal/sessions` — Create a customer-portal session\n * - `GET /customer-portal/customer` — Retrieve the authenticated customer\n * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions\n * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription\n * - `GET /customer-portal/invoices` — List the authenticated customer's invoices\n * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice\n * - `GET /customer-portal/mandates` — List the authenticated customer's Direct Debit mandates\n * - `POST /customer-portal/mandates/{id}/re-authorize` — Re-authorise a Direct Debit mandate with new bank details\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const customerPortalSubscriptionsGet = <ThrowOnError extends boolean = false>(options: Options<CustomerPortalSubscriptionsGetData, ThrowOnError>) => (options.client ?? client).get<CustomerPortalSubscriptionsGetResponses, CustomerPortalSubscriptionsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/subscriptions/{id}',\n    ...options\n});\n\n/**\n * Cancel a subscription\n *\n * Cancel a subscription owned by the authenticated customer. By default the subscription is scheduled to cancel at the end of the current billing period — set `cancel_at_period_end=false` to cancel immediately. Idempotent — cancelling an already-canceled subscription is a no-op that returns the current state.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /customer-portal/sessions` — Create a customer-portal session\n * - `GET /customer-portal/customer` — Retrieve the authenticated customer\n * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions\n * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription\n * - `GET /customer-portal/invoices` — List the authenticated customer's invoices\n * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice\n * - `GET /customer-portal/mandates` — List the authenticated customer's Direct Debit mandates\n * - `POST /customer-portal/mandates/{id}/re-authorize` — Re-authorise a Direct Debit mandate with new bank details\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const customerPortalSubscriptionsCancel = <ThrowOnError extends boolean = false>(options: Options<CustomerPortalSubscriptionsCancelData, ThrowOnError>) => (options.client ?? client).post<CustomerPortalSubscriptionsCancelResponses, CustomerPortalSubscriptionsCancelErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/subscriptions/{id}/cancel',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * List the authenticated customer's invoices\n *\n * Returns invoices owned by the authenticated customer, reverse-chronological by `invoice_date`. Use the same `starting_after`/`ending_before` cursor pattern as subscriptions.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /customer-portal/sessions` — Create a customer-portal session\n * - `GET /customer-portal/customer` — Retrieve the authenticated customer\n * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions\n * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription\n * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription\n * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice\n * - `GET /customer-portal/mandates` — List the authenticated customer's Direct Debit mandates\n * - `POST /customer-portal/mandates/{id}/re-authorize` — Re-authorise a Direct Debit mandate with new bank details\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const customerPortalInvoicesList = <ThrowOnError extends boolean = false>(options?: Options<CustomerPortalInvoicesListData, ThrowOnError>) => (options?.client ?? client).get<CustomerPortalInvoicesListResponses, CustomerPortalInvoicesListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/invoices',\n    ...options\n});\n\n/**\n * Retrieve an invoice\n *\n * Returns an invoice owned by the authenticated customer.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /customer-portal/sessions` — Create a customer-portal session\n * - `GET /customer-portal/customer` — Retrieve the authenticated customer\n * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions\n * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription\n * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription\n * - `GET /customer-portal/invoices` — List the authenticated customer's invoices\n * - `GET /customer-portal/mandates` — List the authenticated customer's Direct Debit mandates\n * - `POST /customer-portal/mandates/{id}/re-authorize` — Re-authorise a Direct Debit mandate with new bank details\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const customerPortalInvoicesGet = <ThrowOnError extends boolean = false>(options: Options<CustomerPortalInvoicesGetData, ThrowOnError>) => (options.client ?? client).get<CustomerPortalInvoicesGetResponses, CustomerPortalInvoicesGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/invoices/{id}',\n    ...options\n});\n\n/**\n * List the authenticated customer's Direct Debit mandates\n *\n * Returns the customer's Direct Debit mandates (status, masked account, next collection date). Requires the merchant to have portal DD self-service enabled.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /customer-portal/sessions` — Create a customer-portal session\n * - `GET /customer-portal/customer` — Retrieve the authenticated customer\n * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions\n * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription\n * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription\n * - `GET /customer-portal/invoices` — List the authenticated customer's invoices\n * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice\n * - `POST /customer-portal/mandates/{id}/re-authorize` — Re-authorise a Direct Debit mandate with new bank details\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const customerPortalMandatesList = <ThrowOnError extends boolean = false>(options?: Options<CustomerPortalMandatesListData, ThrowOnError>) => (options?.client ?? client).get<CustomerPortalMandatesListResponses, CustomerPortalMandatesListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/mandates',\n    ...options\n});\n\n/**\n * Re-authorise a Direct Debit mandate with new bank details\n *\n * Updates the existing provider customer with new bank details and returns the mandate to pending while the fresh Bacs instruction is lodged. Requires portal DD self-service.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /customer-portal/sessions` — Create a customer-portal session\n * - `GET /customer-portal/customer` — Retrieve the authenticated customer\n * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions\n * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription\n * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription\n * - `GET /customer-portal/invoices` — List the authenticated customer's invoices\n * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice\n * - `GET /customer-portal/mandates` — List the authenticated customer's Direct Debit mandates\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n * - `422 unprocessable_entity` — business-rule failure (for example, refunding more than the original charge).\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const customerPortalMandatesReauthorize = <ThrowOnError extends boolean = false>(options: Options<CustomerPortalMandatesReauthorizeData, ThrowOnError>) => (options.client ?? client).post<CustomerPortalMandatesReauthorizeResponses, CustomerPortalMandatesReauthorizeErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/mandates/{id}/re-authorize',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Cancel a Direct Debit mandate\n *\n * Cancels the mandate for future collections only. Requires portal DD self-service. Bank changes affect future only (per approved V13 mockup).\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /customer-portal/sessions` — Create a customer-portal session\n * - `GET /customer-portal/customer` — Retrieve the authenticated customer\n * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions\n * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription\n * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription\n * - `GET /customer-portal/invoices` — List the authenticated customer's invoices\n * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice\n * - `GET /customer-portal/mandates` — List the authenticated customer's Direct Debit mandates\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const customerPortalMandatesCancel = <ThrowOnError extends boolean = false>(options: Options<CustomerPortalMandatesCancelData, ThrowOnError>) => (options.client ?? client).post<CustomerPortalMandatesCancelResponses, CustomerPortalMandatesCancelErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/mandates/{id}/cancel',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Send a step-up OTP for a Direct Debit bank-detail change\n *\n * Emails the customer a one-time code that must be verified (verify-otp) before a change-of-bank can be submitted.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /customer-portal/sessions` — Create a customer-portal session\n * - `GET /customer-portal/customer` — Retrieve the authenticated customer\n * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions\n * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription\n * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription\n * - `GET /customer-portal/invoices` — List the authenticated customer's invoices\n * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice\n * - `GET /customer-portal/mandates` — List the authenticated customer's Direct Debit mandates\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n * - `422 unprocessable_entity` — business-rule failure (for example, refunding more than the original charge).\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const customerPortalMandatesReauthorizeSendOtp = <ThrowOnError extends boolean = false>(options: Options<CustomerPortalMandatesReauthorizeSendOtpData, ThrowOnError>) => (options.client ?? client).post<CustomerPortalMandatesReauthorizeSendOtpResponses, CustomerPortalMandatesReauthorizeSendOtpErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/mandates/{id}/re-authorize/send-otp',\n    ...options\n});\n\n/**\n * Verify a step-up OTP and receive a change-of-bank token\n *\n * Verifies the one-time code and returns a short-lived verification_token bound to this customer, the change-bank action, and this mandate. Pass it to re-authorize.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /customer-portal/sessions` — Create a customer-portal session\n * - `GET /customer-portal/customer` — Retrieve the authenticated customer\n * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions\n * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription\n * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription\n * - `GET /customer-portal/invoices` — List the authenticated customer's invoices\n * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice\n * - `GET /customer-portal/mandates` — List the authenticated customer's Direct Debit mandates\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `422 unprocessable_entity` — business-rule failure (for example, refunding more than the original charge).\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const customerPortalMandatesReauthorizeVerifyOtp = <ThrowOnError extends boolean = false>(options: Options<CustomerPortalMandatesReauthorizeVerifyOtpData, ThrowOnError>) => (options.client ?? client).post<CustomerPortalMandatesReauthorizeVerifyOtpResponses, CustomerPortalMandatesReauthorizeVerifyOtpErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-portal/mandates/{id}/re-authorize/verify-otp',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * List a customer's meter usage\n *\n * Returns per-meter aggregates for a single customer. Requires a `customer_id` query parameter. For each meter the merchant has defined, the response includes the aggregate quantity (applying the meter's native aggregation function), the event count, and the most recent event timestamp.\n *\n * Use this to render a customer's current consumption snapshot in your own UI — for example, a usage dashboard showing \"4,820 / 10,000 requests this period\".\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customer-meters/{customer_id}/{meter_id}` — Retrieve a customer-meter aggregate\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const customerMetersList = <ThrowOnError extends boolean = false>(options: Options<CustomerMetersListData, ThrowOnError>) => (options.client ?? client).get<CustomerMetersListResponses, CustomerMetersListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-meters',\n    ...options\n});\n\n/**\n * Retrieve a customer-meter aggregate\n *\n * Returns a single customer-meter aggregate for the specified customer + meter pair. Returns 404 only if the meter itself does not exist on the merchant — if the meter exists but the customer has zero events, the response returns an aggregate with `total_quantity: 0`, `event_count: 0`, `last_event_at: null`.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customer-meters` — List a customer's meter usage\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const customerMetersGet = <ThrowOnError extends boolean = false>(options: Options<CustomerMetersGetData, ThrowOnError>) => (options.client ?? client).get<CustomerMetersGetResponses, CustomerMetersGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/customer-meters/{customer_id}/{meter_id}',\n    ...options\n});\n\n/**\n * List payment intents\n *\n * Returns a list of payment intents with optional filtering.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-intents` — Create a payment intent\n * - `GET /payment-intents/{id}` — Retrieve a payment intent\n * - `POST /payment-intents/{id}` — Update a payment intent\n * - `POST /payment-intents/{id}/confirm` — Confirm a payment intent\n * - `POST /payment-intents/{id}/capture` — Capture a payment intent\n * - `POST /payment-intents/{id}/cancel` — Cancel a payment intent\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const paymentIntentsList = <ThrowOnError extends boolean = false>(options?: Options<PaymentIntentsListData, ThrowOnError>) => (options?.client ?? client).get<PaymentIntentsListResponses, PaymentIntentsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-intents',\n    ...options\n});\n\n/**\n * Create a payment intent\n *\n * Creates a payment intent to orchestrate payment collection with support for 3DS/SCA authentication.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /payment-intents` — List payment intents\n * - `GET /payment-intents/{id}` — Retrieve a payment intent\n * - `POST /payment-intents/{id}` — Update a payment intent\n * - `POST /payment-intents/{id}/confirm` — Confirm a payment intent\n * - `POST /payment-intents/{id}/capture` — Capture a payment intent\n * - `POST /payment-intents/{id}/cancel` — Cancel a payment intent\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const paymentIntentsCreate = <ThrowOnError extends boolean = false>(options?: Options<PaymentIntentsCreateData, ThrowOnError>) => (options?.client ?? client).post<PaymentIntentsCreateResponses, PaymentIntentsCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-intents',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Retrieve a payment intent\n *\n * Retrieves a payment intent by its ID (pi_xxx).\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-intents` — Create a payment intent\n * - `GET /payment-intents` — List payment intents\n * - `POST /payment-intents/{id}` — Update a payment intent\n * - `POST /payment-intents/{id}/confirm` — Confirm a payment intent\n * - `POST /payment-intents/{id}/capture` — Capture a payment intent\n * - `POST /payment-intents/{id}/cancel` — Cancel a payment intent\n *\n * **Common errors**\n *\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const paymentIntentsGet = <ThrowOnError extends boolean = false>(options: Options<PaymentIntentsGetData, ThrowOnError>) => (options.client ?? client).get<PaymentIntentsGetResponses, PaymentIntentsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-intents/{id}',\n    ...options\n});\n\n/**\n * Confirm a payment intent\n *\n * Confirms the payment intent. May return requires_action if 3DS authentication is needed.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-intents` — Create a payment intent\n * - `GET /payment-intents` — List payment intents\n * - `GET /payment-intents/{id}` — Retrieve a payment intent\n * - `POST /payment-intents/{id}` — Update a payment intent\n * - `POST /payment-intents/{id}/capture` — Capture a payment intent\n * - `POST /payment-intents/{id}/cancel` — Cancel a payment intent\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const paymentIntentsConfirm = <ThrowOnError extends boolean = false>(options: Options<PaymentIntentsConfirmData, ThrowOnError>) => (options.client ?? client).post<PaymentIntentsConfirmResponses, PaymentIntentsConfirmErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-intents/{id}/confirm',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Capture a payment intent\n *\n * Captures a payment intent that was created with capture_method=manual.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-intents` — Create a payment intent\n * - `GET /payment-intents` — List payment intents\n * - `GET /payment-intents/{id}` — Retrieve a payment intent\n * - `POST /payment-intents/{id}` — Update a payment intent\n * - `POST /payment-intents/{id}/confirm` — Confirm a payment intent\n * - `POST /payment-intents/{id}/cancel` — Cancel a payment intent\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const paymentIntentsCapture = <ThrowOnError extends boolean = false>(options: Options<PaymentIntentsCaptureData, ThrowOnError>) => (options.client ?? client).post<PaymentIntentsCaptureResponses, PaymentIntentsCaptureErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-intents/{id}/capture',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Cancel a payment intent\n *\n * Cancels a payment intent. Cannot cancel if already succeeded or canceled.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /payment-intents` — Create a payment intent\n * - `GET /payment-intents` — List payment intents\n * - `GET /payment-intents/{id}` — Retrieve a payment intent\n * - `POST /payment-intents/{id}` — Update a payment intent\n * - `POST /payment-intents/{id}/confirm` — Confirm a payment intent\n * - `POST /payment-intents/{id}/capture` — Capture a payment intent\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const paymentIntentsCancel = <ThrowOnError extends boolean = false>(options: Options<PaymentIntentsCancelData, ThrowOnError>) => (options.client ?? client).post<PaymentIntentsCancelResponses, PaymentIntentsCancelErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/payment-intents/{id}/cancel',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * List events\n *\n * Returns a list of events with optional filters. Events are returned in reverse chronological order.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /events/{id}` — Retrieve an event\n * - `POST /events/{id}/resend` — Resend webhook for an event\n * - `POST /events/test` — Create a test event\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const eventsList = <ThrowOnError extends boolean = false>(options?: Options<EventsListData, ThrowOnError>) => (options?.client ?? client).get<EventsListResponses, EventsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/events',\n    ...options\n});\n\n/**\n * Retrieve an event\n *\n * Retrieves the details of an event by its ID.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /events` — List events\n * - `POST /events/{id}/resend` — Resend webhook for an event\n * - `POST /events/test` — Create a test event\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const eventsGet = <ThrowOnError extends boolean = false>(options: Options<EventsGetData, ThrowOnError>) => (options.client ?? client).get<EventsGetResponses, EventsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/events/{id}',\n    ...options\n});\n\n/**\n * Resend webhook for an event\n *\n * Queues the event to be resent to all configured webhook endpoints.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /events` — List events\n * - `GET /events/{id}` — Retrieve an event\n * - `POST /events/test` — Create a test event\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const eventsResend = <ThrowOnError extends boolean = false>(options: Options<EventsResendData, ThrowOnError>) => (options.client ?? client).post<EventsResendResponses, EventsResendErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/events/{id}/resend',\n    ...options\n});\n\n/**\n * List entitlements\n *\n * Retrieve all entitlements for a customer. Pass `customer_id` as a query parameter. Includes computed access status based on subscription state.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customers/{customerId}/entitlements` — List customer entitlements\n * - `POST /customers/{customerId}/entitlements` — Grant entitlement to customer\n * - `DELETE /customers/{customerId}/entitlements` — Revoke entitlement by benefit key\n * - `GET /customers/{customerId}/entitlements/check` — Check customer entitlement\n * - `DELETE /customers/{customerId}/entitlements/{entitlementId}` — Revoke entitlement by ID\n * - `GET /entitlements/check` — Check entitlement access\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const entitlementsList = <ThrowOnError extends boolean = false>(options: Options<EntitlementsListData, ThrowOnError>) => (options.client ?? client).get<EntitlementsListResponses, EntitlementsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/entitlements',\n    ...options\n});\n\n/**\n * Check entitlement access\n *\n * Check if a customer has access to a specific benefit by key. This is the primary endpoint for feature gating and licensing checks.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /customers/{customerId}/entitlements` — List customer entitlements\n * - `POST /customers/{customerId}/entitlements` — Grant entitlement to customer\n * - `DELETE /customers/{customerId}/entitlements` — Revoke entitlement by benefit key\n * - `GET /customers/{customerId}/entitlements/check` — Check customer entitlement\n * - `DELETE /customers/{customerId}/entitlements/{entitlementId}` — Revoke entitlement by ID\n * - `GET /entitlements` — List entitlements\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const entitlementsCheck = <ThrowOnError extends boolean = false>(options: Options<EntitlementsCheckData, ThrowOnError>) => (options.client ?? client).get<EntitlementsCheckResponses, EntitlementsCheckErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/entitlements/check',\n    ...options\n});\n\n/**\n * List transactions\n *\n * List all transactions for the authenticated merchant. Transactions represent the unified financial truth — every sale, refund, void, capture, dispute, and adjustment.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /transactions/{id}` — Get transaction by ID\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const transactionsList = <ThrowOnError extends boolean = false>(options?: Options<TransactionsListData, ThrowOnError>) => (options?.client ?? client).get<TransactionsListResponses, TransactionsListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/transactions',\n    ...options\n});\n\n/**\n * Get transaction by ID\n *\n * Retrieve a single transaction by its ID.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /transactions` — List transactions\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const transactionsGet = <ThrowOnError extends boolean = false>(options: Options<TransactionsGetData, ThrowOnError>) => (options.client ?? client).get<TransactionsGetResponses, TransactionsGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],\n    url: '/transactions/{id}',\n    ...options\n});\n\n/**\n * Look up a pending signed mandate request\n *\n * Public lookup of a pending signed mandate request by its emailed token. Rate-limited; returns 404 for unknown, consumed, cancelled, or expired tokens.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /dd/validate` — Validate a UK bank account for Direct Debit\n * - `POST /dd/preview` — Preview the Direct Debit collection date chain\n *\n * **Common errors**\n *\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `429 rate_limit_exceeded` — back off using the `Retry-After` header.\n */\nexport const ddMandateRequestsGet = <ThrowOnError extends boolean = false>(options: Options<DdMandateRequestsGetData, ThrowOnError>) => (options.client ?? client).get<DdMandateRequestsGetResponses, DdMandateRequestsGetErrors, ThrowOnError>({ url: '/dd/mandate-requests/{token}', ...options });\n\n/**\n * Validate a UK bank account for Direct Debit\n *\n * Validates UK bank account details (sort code + account number) for Direct Debit eligibility with the bureau.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /dd/mandate-requests/{token}` — Look up a pending signed mandate request\n * - `POST /dd/preview` — Preview the Direct Debit collection date chain\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const ddValidate = <ThrowOnError extends boolean = false>(options?: Options<DdValidateData, ThrowOnError>) => (options?.client ?? client).post<DdValidateResponses, DdValidateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }],\n    url: '/dd/validate',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * Preview the Direct Debit collection date chain\n *\n * Returns the backend-owned working-day date chain (advance notice → submission → collection → settlement) for a Direct Debit collection. Clients never compute these dates.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /dd/mandate-requests/{token}` — Look up a pending signed mandate request\n * - `POST /dd/validate` — Validate a UK bank account for Direct Debit\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const ddPreview = <ThrowOnError extends boolean = false>(options?: Options<DdPreviewData, ThrowOnError>) => (options?.client ?? client).post<DdPreviewResponses, DdPreviewErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }],\n    url: '/dd/preview',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options?.headers\n    }\n});\n\n/**\n * List Direct Debit mandates\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /mandates` — Create a Direct Debit mandate\n * - `GET /mandates/{id}` — Retrieve a Direct Debit mandate\n * - `POST /mandates/{id}/cancel` — Cancel a Direct Debit mandate\n * - `POST /mandates/{id}/suspend` — Suspend a Direct Debit mandate\n * - `POST /mandates/{id}/reinstate` — Reinstate a suspended Direct Debit mandate\n * - `POST /mandates/{id}/collections` — Schedule a one-off Direct Debit collection\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n *\n * **Pagination**\n *\n * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.\n */\nexport const mandatesList = <ThrowOnError extends boolean = false>(options?: Options<MandatesListData, ThrowOnError>) => (options?.client ?? client).get<MandatesListResponses, MandatesListErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }],\n    url: '/mandates',\n    ...options\n});\n\n/**\n * Create a Direct Debit mandate\n *\n * Creates a Direct Debit mandate for a customer. Bank details are validated with the bureau and stored KMS-encrypted; only masked values are returned.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `GET /mandates` — List Direct Debit mandates\n * - `GET /mandates/{id}` — Retrieve a Direct Debit mandate\n * - `POST /mandates/{id}/cancel` — Cancel a Direct Debit mandate\n * - `POST /mandates/{id}/suspend` — Suspend a Direct Debit mandate\n * - `POST /mandates/{id}/reinstate` — Reinstate a suspended Direct Debit mandate\n * - `POST /mandates/{id}/collections` — Schedule a one-off Direct Debit collection\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n * - `410 gone` — the resource has been archived or permanently deleted.\n * - `422 unprocessable_entity` — business-rule failure (for example, refunding more than the original charge).\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const mandatesCreate = <ThrowOnError extends boolean = false>(options: Options<MandatesCreateData, ThrowOnError>) => (options.client ?? client).post<MandatesCreateResponses, MandatesCreateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }],\n    url: '/mandates',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Retrieve a Direct Debit mandate\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /mandates` — Create a Direct Debit mandate\n * - `GET /mandates` — List Direct Debit mandates\n * - `POST /mandates/{id}/cancel` — Cancel a Direct Debit mandate\n * - `POST /mandates/{id}/suspend` — Suspend a Direct Debit mandate\n * - `POST /mandates/{id}/reinstate` — Reinstate a suspended Direct Debit mandate\n * - `POST /mandates/{id}/collections` — Schedule a one-off Direct Debit collection\n *\n * **Common errors**\n *\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n */\nexport const mandatesGet = <ThrowOnError extends boolean = false>(options: Options<MandatesGetData, ThrowOnError>) => (options.client ?? client).get<MandatesGetResponses, MandatesGetErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }],\n    url: '/mandates/{id}',\n    ...options\n});\n\n/**\n * Cancel a Direct Debit mandate\n *\n * Cancels a mandate. If it was lodged with the bureau, the London & Zurich customer is cancelled too.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /mandates` — Create a Direct Debit mandate\n * - `GET /mandates` — List Direct Debit mandates\n * - `GET /mandates/{id}` — Retrieve a Direct Debit mandate\n * - `POST /mandates/{id}/suspend` — Suspend a Direct Debit mandate\n * - `POST /mandates/{id}/reinstate` — Reinstate a suspended Direct Debit mandate\n * - `POST /mandates/{id}/collections` — Schedule a one-off Direct Debit collection\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const mandatesCancel = <ThrowOnError extends boolean = false>(options: Options<MandatesCancelData, ThrowOnError>) => (options.client ?? client).post<MandatesCancelResponses, MandatesCancelErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }],\n    url: '/mandates/{id}/cancel',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Suspend a Direct Debit mandate\n *\n * Suspends an active (or pending-lodgement) mandate.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /mandates` — Create a Direct Debit mandate\n * - `GET /mandates` — List Direct Debit mandates\n * - `GET /mandates/{id}` — Retrieve a Direct Debit mandate\n * - `POST /mandates/{id}/cancel` — Cancel a Direct Debit mandate\n * - `POST /mandates/{id}/reinstate` — Reinstate a suspended Direct Debit mandate\n * - `POST /mandates/{id}/collections` — Schedule a one-off Direct Debit collection\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const mandatesSuspend = <ThrowOnError extends boolean = false>(options: Options<MandatesSuspendData, ThrowOnError>) => (options.client ?? client).post<MandatesSuspendResponses, MandatesSuspendErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }],\n    url: '/mandates/{id}/suspend',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Reinstate a suspended Direct Debit mandate\n *\n * Reinstates a suspended mandate. This is NOT a status flip — it re-lodges the mandate to Bacs (a new AUDDIS instruction) using the securely stored bank details, then moves the mandate to pending_lodgement (REV-3123).\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /mandates` — Create a Direct Debit mandate\n * - `GET /mandates` — List Direct Debit mandates\n * - `GET /mandates/{id}` — Retrieve a Direct Debit mandate\n * - `POST /mandates/{id}/cancel` — Cancel a Direct Debit mandate\n * - `POST /mandates/{id}/suspend` — Suspend a Direct Debit mandate\n * - `POST /mandates/{id}/collections` — Schedule a one-off Direct Debit collection\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n * - `422 unprocessable_entity` — business-rule failure (for example, refunding more than the original charge).\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const mandatesReinstate = <ThrowOnError extends boolean = false>(options: Options<MandatesReinstateData, ThrowOnError>) => (options.client ?? client).post<MandatesReinstateResponses, MandatesReinstateErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }],\n    url: '/mandates/{id}/reinstate',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n\n/**\n * Schedule a one-off Direct Debit collection\n *\n * Schedules a one-off Bacs collection against an active mandate for an invoice or payment link. L&Z confirms the permitted collection date, the payer receives the configured regulatory advance notice first, and nothing is marked paid until the bureau confirms collection. Idempotent per source: retrying with the same sourceId returns or reconciles the same provider schedule instead of collecting twice.\n *\n * ---\n *\n * **Related endpoints**\n *\n * - `POST /mandates` — Create a Direct Debit mandate\n * - `GET /mandates` — List Direct Debit mandates\n * - `GET /mandates/{id}` — Retrieve a Direct Debit mandate\n * - `POST /mandates/{id}/cancel` — Cancel a Direct Debit mandate\n * - `POST /mandates/{id}/suspend` — Suspend a Direct Debit mandate\n * - `POST /mandates/{id}/reinstate` — Reinstate a suspended Direct Debit mandate\n *\n * **Common errors**\n *\n * - `400 invalid_request` — malformed payload or failed validation.\n * - `401 unauthenticated` — missing, malformed, or revoked API key.\n * - `403 permission_denied` — key lacks the required scope, or the resource belongs to a different merchant.\n * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.\n * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.\n * - `422 unprocessable_entity` — business-rule failure (for example, refunding more than the original charge).\n *\n * **Idempotency**\n *\n * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).\n */\nexport const mandatesScheduleCollection = <ThrowOnError extends boolean = false>(options: Options<MandatesScheduleCollectionData, ThrowOnError>) => (options.client ?? client).post<MandatesScheduleCollectionResponses, MandatesScheduleCollectionErrors, ThrowOnError>({\n    security: [{ name: 'x-api-key', type: 'apiKey' }],\n    url: '/mandates/{id}/collections',\n    ...options,\n    headers: {\n        'Content-Type': 'application/json',\n        ...options.headers\n    }\n});\n","/**\n * AUTO-GENERATED FILE. DO NOT EDIT MANUALLY.\n *\n * Generated by: pnpm --dir packages/sdk generate:wrapper\n * Source of truth: packages/openapi/sdk-openapi.json\n */\n\nimport * as operations from \"./generated/sdk.gen.js\";\nimport type { AccountingInvoicePaymentRequestsCreateData, AccountingInvoicePaymentRequestsCreateResponse, AccountingInvoicePaymentRequestsGetData, AccountingInvoicePaymentRequestsGetResponse, AnalyticsRevenueMrrSummaryData, AnalyticsRevenueMrrSummaryResponse, AnalyticsRevenueTimeSeriesData, AnalyticsRevenueTimeSeriesResponse, CartApiKeysEnsureData, CartApiKeysEnsureResponse, CartApiKeysRotateData, CartApiKeysRotateResponse, CartApiKeysStatusData, CartApiKeysStatusResponse, CartSessionsAddLineItemData, CartSessionsAddLineItemResponse, CartSessionsApplyDiscountCodeData, CartSessionsApplyDiscountCodeResponse, CartSessionsConvertData, CartSessionsConvertResponse, CartSessionsCreateData, CartSessionsCreateResponse, CartSessionsGetData, CartSessionsGetResponse, CartSessionsRemoveLineItemData, CartSessionsRemoveLineItemResponse, CartSessionsSetContactData, CartSessionsSetContactResponse, CartSessionsToggleAddOnData, CartSessionsToggleAddOnResponse, CartSessionsUpdateLineItemData, CartSessionsUpdateLineItemResponse, CheckoutSessionsCreateData, CheckoutSessionsCreateResponse, CheckoutSessionsExpireData, CheckoutSessionsExpireResponse, CheckoutSessionsGetData, CheckoutSessionsGetResponse, CreditNotesCreateData, CreditNotesCreateResponse, CreditNotesGetData, CreditNotesGetResponse, CreditNotesListData, CreditNotesListLinesData, CreditNotesListLinesResponse, CreditNotesListResponse, CreditNotesPreviewData, CreditNotesPreviewResponse, CreditNotesVoidData, CreditNotesVoidResponse, CustomerMetersGetData, CustomerMetersGetResponse, CustomerMetersListData, CustomerMetersListResponse, CustomerPortalCustomerGetData, CustomerPortalCustomerGetResponse, CustomerPortalInvoicesGetData, CustomerPortalInvoicesGetResponse, CustomerPortalInvoicesListData, CustomerPortalInvoicesListResponse, CustomerPortalMandatesCancelData, CustomerPortalMandatesCancelResponse, CustomerPortalMandatesListData, CustomerPortalMandatesListResponse, CustomerPortalMandatesReauthorizeData, CustomerPortalMandatesReauthorizeResponse, CustomerPortalMandatesReauthorizeSendOtpData, CustomerPortalMandatesReauthorizeSendOtpResponse, CustomerPortalMandatesReauthorizeVerifyOtpData, CustomerPortalMandatesReauthorizeVerifyOtpResponse, CustomerPortalSessionsCreateData, CustomerPortalSessionsCreateResponse, CustomerPortalSubscriptionsCancelData, CustomerPortalSubscriptionsCancelResponse, CustomerPortalSubscriptionsGetData, CustomerPortalSubscriptionsGetResponse, CustomerPortalSubscriptionsListData, CustomerPortalSubscriptionsListResponse, CustomersCreateData, CustomersCreateResponse, CustomersGetData, CustomersGetResponse, CustomersListData, CustomersListResponse, CustomersPaymentMethodsListData, CustomersPaymentMethodsListResponse, CustomersPaymentRailsGetData, CustomersPaymentRailsGetResponse, CustomersPreferredRailsGetData, CustomersPreferredRailsGetResponse, CustomersUpdateData, CustomersUpdateResponse, DdMandateRequestsGetData, DdMandateRequestsGetResponse, DdPreviewData, DdPreviewResponse, DdValidateData, DdValidateResponse, EntitlementsCheckData, EntitlementsCheckResponse, EntitlementsListData, EntitlementsListResponse, EventsGetData, EventsGetResponse, EventsListData, EventsListResponse, EventsResendData, EventsResendResponse, InvoicesCreateData, InvoicesCreateResponse, InvoicesFinalizeData, InvoicesFinalizeResponse, InvoicesGetData, InvoicesGetResponse, InvoicesListData, InvoicesListResponse, InvoicesMarginEstimateData, InvoicesMarginEstimateResponse, InvoicesSendData, InvoicesSendResponse, InvoicesUpdateData, InvoicesUpdateResponse, InvoicesVoidData, InvoicesVoidResponse, MandatesCancelData, MandatesCancelResponse, MandatesCreateData, MandatesCreateResponse, MandatesGetData, MandatesGetResponse, MandatesListData, MandatesListResponse, MandatesReinstateData, MandatesReinstateResponse, MandatesScheduleCollectionData, MandatesScheduleCollectionResponse, MandatesSuspendData, MandatesSuspendResponse, PaymentIntentsCancelData, PaymentIntentsCancelResponse, PaymentIntentsCaptureData, PaymentIntentsCaptureResponse, PaymentIntentsConfirmData, PaymentIntentsConfirmResponse, PaymentIntentsCreateData, PaymentIntentsCreateResponse, PaymentIntentsGetData, PaymentIntentsGetResponse, PaymentIntentsListData, PaymentIntentsListResponse, PaymentLinksActivateData, PaymentLinksActivateResponse, PaymentLinksArchiveData, PaymentLinksArchiveResponse, PaymentLinksCreateData, PaymentLinksCreateResponse, PaymentLinksDeactivateData, PaymentLinksDeactivateResponse, PaymentLinksExpireData, PaymentLinksExpireResponse, PaymentLinksGetData, PaymentLinksGetResponse, PaymentLinksListData, PaymentLinksListResponse, PaymentLinksUpdateData, PaymentLinksUpdateResponse, PricesArchiveData, PricesArchiveResponse, PricesCreateData, PricesCreateResponse, PricesGetData, PricesGetResponse, PricesListData, PricesListResponse, PricesUpdateData, PricesUpdateResponse, ProductsCreateData, ProductsCreateResponse, ProductsGetData, ProductsGetResponse, ProductsListData, ProductsListResponse, ProductsUpdateData, ProductsUpdateResponse, RefundsCreateData, RefundsCreateResponse, RefundsGetData, RefundsGetResponse, RefundsListData, RefundsListResponse, StorefrontOriginsCreateData, StorefrontOriginsCreateResponse, StorefrontOriginsDeleteData, StorefrontOriginsDeleteResponse, StorefrontOriginsListData, StorefrontOriginsListResponse, StorefrontProductsGetData, StorefrontProductsGetResponse, StorefrontProductsListData, StorefrontProductsListResponse, StorefrontStatusGetData, StorefrontStatusGetResponse, SubscriptionsCancelData, SubscriptionsCancelResponse, SubscriptionsCreateData, SubscriptionsCreateResponse, SubscriptionsGetData, SubscriptionsGetResponse, SubscriptionsListData, SubscriptionsListResponse, SubscriptionsUpdateData, SubscriptionsUpdateResponse, TransactionsGetData, TransactionsGetResponse, TransactionsListData, TransactionsListResponse, WebhookDeliveriesGetData, WebhookDeliveriesGetResponse, WebhookDeliveriesListData, WebhookDeliveriesListResponse, WebhookDeliveriesRetryData, WebhookDeliveriesRetryResponse, WebhookEndpointsCreateData, WebhookEndpointsCreateResponse, WebhookEndpointsDeleteData, WebhookEndpointsDeleteResponse, WebhookEndpointsGetData, WebhookEndpointsGetResponse, WebhookEndpointsListData, WebhookEndpointsListResponse, WebhookEndpointsRotateSecretData, WebhookEndpointsRotateSecretResponse, WebhookEndpointsUpdateData, WebhookEndpointsUpdateResponse } from \"./generated/types.gen.js\";\n\nexport interface GeneratedResourceRuntime {\n  requestData<T>(\n    fn: (options: unknown) => Promise<{ data?: T; error?: unknown }>,\n    options?: Record<string, unknown>\n  ): Promise<T>;\n}\n\nexport interface AccountingResource {\n  invoicePaymentRequestsCreate: (body?: NonNullable<AccountingInvoicePaymentRequestsCreateData[\"body\"]>) => Promise<AccountingInvoicePaymentRequestsCreateResponse>;\n  invoicePaymentRequestsGet: (id: NonNullable<AccountingInvoicePaymentRequestsGetData[\"path\"]>[\"id\"]) => Promise<AccountingInvoicePaymentRequestsGetResponse>;\n}\n\nexport interface AnalyticsResource {\n  revenueMrrSummary: (query?: NonNullable<AnalyticsRevenueMrrSummaryData[\"query\"]>) => Promise<AnalyticsRevenueMrrSummaryResponse>;\n  revenueTimeSeries: (query?: NonNullable<AnalyticsRevenueTimeSeriesData[\"query\"]>) => Promise<AnalyticsRevenueTimeSeriesResponse>;\n}\n\nexport interface CartResource {\n  apiKeysEnsure: () => Promise<CartApiKeysEnsureResponse>;\n  apiKeysRotate: (id: NonNullable<CartApiKeysRotateData[\"path\"]>[\"kind\"], body?: NonNullable<CartApiKeysRotateData[\"body\"]>) => Promise<CartApiKeysRotateResponse>;\n  apiKeysStatus: () => Promise<CartApiKeysStatusResponse>;\n  sessionsAddLineItem: (id: NonNullable<CartSessionsAddLineItemData[\"path\"]>[\"id\"], body?: NonNullable<CartSessionsAddLineItemData[\"body\"]>) => Promise<CartSessionsAddLineItemResponse>;\n  sessionsApplyDiscountCode: (id: NonNullable<CartSessionsApplyDiscountCodeData[\"path\"]>[\"id\"], body?: NonNullable<CartSessionsApplyDiscountCodeData[\"body\"]>) => Promise<CartSessionsApplyDiscountCodeResponse>;\n  sessionsConvert: (id: NonNullable<CartSessionsConvertData[\"path\"]>[\"id\"]) => Promise<CartSessionsConvertResponse>;\n  sessionsCreate: (body?: NonNullable<CartSessionsCreateData[\"body\"]>) => Promise<CartSessionsCreateResponse>;\n  sessionsGet: (id: NonNullable<CartSessionsGetData[\"path\"]>[\"id\"]) => Promise<CartSessionsGetResponse>;\n  sessionsRemoveLineItem: (path: NonNullable<CartSessionsRemoveLineItemData[\"path\"]>) => Promise<CartSessionsRemoveLineItemResponse>;\n  sessionsSetContact: (id: NonNullable<CartSessionsSetContactData[\"path\"]>[\"id\"], body?: NonNullable<CartSessionsSetContactData[\"body\"]>) => Promise<CartSessionsSetContactResponse>;\n  sessionsToggleAddOn: (id: NonNullable<CartSessionsToggleAddOnData[\"path\"]>[\"id\"], body?: NonNullable<CartSessionsToggleAddOnData[\"body\"]>) => Promise<CartSessionsToggleAddOnResponse>;\n  sessionsUpdateLineItem: (params: { path: NonNullable<CartSessionsUpdateLineItemData[\"path\"]>; body?: NonNullable<CartSessionsUpdateLineItemData[\"body\"]> }) => Promise<CartSessionsUpdateLineItemResponse>;\n}\n\nexport interface CheckoutSessionsResource {\n  create: (body?: NonNullable<CheckoutSessionsCreateData[\"body\"]>) => Promise<CheckoutSessionsCreateResponse>;\n  expire: (id: NonNullable<CheckoutSessionsExpireData[\"path\"]>[\"id\"]) => Promise<CheckoutSessionsExpireResponse>;\n  get: (id: NonNullable<CheckoutSessionsGetData[\"path\"]>[\"id\"]) => Promise<CheckoutSessionsGetResponse>;\n}\n\nexport interface CreditNotesResource {\n  create: (body?: NonNullable<CreditNotesCreateData[\"body\"]>) => Promise<CreditNotesCreateResponse>;\n  get: (id: NonNullable<CreditNotesGetData[\"path\"]>[\"id\"]) => Promise<CreditNotesGetResponse>;\n  list: (query?: NonNullable<CreditNotesListData[\"query\"]>) => Promise<CreditNotesListResponse>;\n  listLines: (id: NonNullable<CreditNotesListLinesData[\"path\"]>[\"id\"], query?: NonNullable<CreditNotesListLinesData[\"query\"]>) => Promise<CreditNotesListLinesResponse>;\n  preview: (body: NonNullable<CreditNotesPreviewData[\"body\"]>) => Promise<CreditNotesPreviewResponse>;\n  void: (id: NonNullable<CreditNotesVoidData[\"path\"]>[\"id\"]) => Promise<CreditNotesVoidResponse>;\n}\n\nexport interface CustomerResource {\n  metersGet: (path: NonNullable<CustomerMetersGetData[\"path\"]>) => Promise<CustomerMetersGetResponse>;\n  metersList: (query?: NonNullable<CustomerMetersListData[\"query\"]>) => Promise<CustomerMetersListResponse>;\n  portalCustomerGet: () => Promise<CustomerPortalCustomerGetResponse>;\n  portalInvoicesGet: (id: NonNullable<CustomerPortalInvoicesGetData[\"path\"]>[\"id\"]) => Promise<CustomerPortalInvoicesGetResponse>;\n  portalInvoicesList: (query?: NonNullable<CustomerPortalInvoicesListData[\"query\"]>) => Promise<CustomerPortalInvoicesListResponse>;\n  portalMandatesCancel: (id: NonNullable<CustomerPortalMandatesCancelData[\"path\"]>[\"id\"], body?: NonNullable<CustomerPortalMandatesCancelData[\"body\"]>) => Promise<CustomerPortalMandatesCancelResponse>;\n  portalMandatesList: () => Promise<CustomerPortalMandatesListResponse>;\n  portalMandatesReauthorize: (id: NonNullable<CustomerPortalMandatesReauthorizeData[\"path\"]>[\"id\"], body: NonNullable<CustomerPortalMandatesReauthorizeData[\"body\"]>) => Promise<CustomerPortalMandatesReauthorizeResponse>;\n  portalMandatesReauthorizeSendOtp: (id: NonNullable<CustomerPortalMandatesReauthorizeSendOtpData[\"path\"]>[\"id\"]) => Promise<CustomerPortalMandatesReauthorizeSendOtpResponse>;\n  portalMandatesReauthorizeVerifyOtp: (id: NonNullable<CustomerPortalMandatesReauthorizeVerifyOtpData[\"path\"]>[\"id\"], body: NonNullable<CustomerPortalMandatesReauthorizeVerifyOtpData[\"body\"]>) => Promise<CustomerPortalMandatesReauthorizeVerifyOtpResponse>;\n  portalSessionsCreate: (body: NonNullable<CustomerPortalSessionsCreateData[\"body\"]>) => Promise<CustomerPortalSessionsCreateResponse>;\n  portalSubscriptionsCancel: (id: NonNullable<CustomerPortalSubscriptionsCancelData[\"path\"]>[\"id\"], body?: NonNullable<CustomerPortalSubscriptionsCancelData[\"body\"]>) => Promise<CustomerPortalSubscriptionsCancelResponse>;\n  portalSubscriptionsGet: (id: NonNullable<CustomerPortalSubscriptionsGetData[\"path\"]>[\"id\"]) => Promise<CustomerPortalSubscriptionsGetResponse>;\n  portalSubscriptionsList: (query?: NonNullable<CustomerPortalSubscriptionsListData[\"query\"]>) => Promise<CustomerPortalSubscriptionsListResponse>;\n}\n\nexport interface CustomersResource {\n  create: (body?: NonNullable<CustomersCreateData[\"body\"]>) => Promise<CustomersCreateResponse>;\n  get: (id: NonNullable<CustomersGetData[\"path\"]>[\"id\"]) => Promise<CustomersGetResponse>;\n  list: (query?: NonNullable<CustomersListData[\"query\"]>) => Promise<CustomersListResponse>;\n  paymentMethodsList: (id: NonNullable<CustomersPaymentMethodsListData[\"path\"]>[\"id\"]) => Promise<CustomersPaymentMethodsListResponse>;\n  paymentRailsGet: (id: NonNullable<CustomersPaymentRailsGetData[\"path\"]>[\"id\"], query?: NonNullable<CustomersPaymentRailsGetData[\"query\"]>) => Promise<CustomersPaymentRailsGetResponse>;\n  preferredRailsGet: (id: NonNullable<CustomersPreferredRailsGetData[\"path\"]>[\"id\"], query?: NonNullable<CustomersPreferredRailsGetData[\"query\"]>) => Promise<CustomersPreferredRailsGetResponse>;\n  update: (id: NonNullable<CustomersUpdateData[\"path\"]>[\"id\"], body?: NonNullable<CustomersUpdateData[\"body\"]>) => Promise<CustomersUpdateResponse>;\n}\n\nexport interface DdResource {\n  mandateRequestsGet: (id: NonNullable<DdMandateRequestsGetData[\"path\"]>[\"token\"]) => Promise<DdMandateRequestsGetResponse>;\n  preview: (body?: NonNullable<DdPreviewData[\"body\"]>) => Promise<DdPreviewResponse>;\n  validate: (body?: NonNullable<DdValidateData[\"body\"]>) => Promise<DdValidateResponse>;\n}\n\nexport interface EntitlementsResource {\n  check: (query?: NonNullable<EntitlementsCheckData[\"query\"]>) => Promise<EntitlementsCheckResponse>;\n  list: (query?: NonNullable<EntitlementsListData[\"query\"]>) => Promise<EntitlementsListResponse>;\n}\n\nexport interface EventsResource {\n  get: (id: NonNullable<EventsGetData[\"path\"]>[\"id\"]) => Promise<EventsGetResponse>;\n  list: (query?: NonNullable<EventsListData[\"query\"]>) => Promise<EventsListResponse>;\n  resend: (id: NonNullable<EventsResendData[\"path\"]>[\"id\"]) => Promise<EventsResendResponse>;\n}\n\nexport interface InvoicesResource {\n  create: (body: NonNullable<InvoicesCreateData[\"body\"]>) => Promise<InvoicesCreateResponse>;\n  finalize: (id: NonNullable<InvoicesFinalizeData[\"path\"]>[\"id\"], body?: NonNullable<InvoicesFinalizeData[\"body\"]>) => Promise<InvoicesFinalizeResponse>;\n  get: (id: NonNullable<InvoicesGetData[\"path\"]>[\"id\"]) => Promise<InvoicesGetResponse>;\n  list: (query?: NonNullable<InvoicesListData[\"query\"]>) => Promise<InvoicesListResponse>;\n  marginEstimate: (id: NonNullable<InvoicesMarginEstimateData[\"path\"]>[\"id\"], body: NonNullable<InvoicesMarginEstimateData[\"body\"]>) => Promise<InvoicesMarginEstimateResponse>;\n  send: (id: NonNullable<InvoicesSendData[\"path\"]>[\"id\"], body?: NonNullable<InvoicesSendData[\"body\"]>) => Promise<InvoicesSendResponse>;\n  update: (id: NonNullable<InvoicesUpdateData[\"path\"]>[\"id\"], body: NonNullable<InvoicesUpdateData[\"body\"]>) => Promise<InvoicesUpdateResponse>;\n  void: (id: NonNullable<InvoicesVoidData[\"path\"]>[\"id\"], body?: NonNullable<InvoicesVoidData[\"body\"]>) => Promise<InvoicesVoidResponse>;\n}\n\nexport interface MandatesResource {\n  cancel: (id: NonNullable<MandatesCancelData[\"path\"]>[\"id\"], body?: NonNullable<MandatesCancelData[\"body\"]>) => Promise<MandatesCancelResponse>;\n  create: (body?: NonNullable<MandatesCreateData[\"body\"]>) => Promise<MandatesCreateResponse>;\n  get: (id: NonNullable<MandatesGetData[\"path\"]>[\"id\"]) => Promise<MandatesGetResponse>;\n  list: (query?: NonNullable<MandatesListData[\"query\"]>) => Promise<MandatesListResponse>;\n  reinstate: (id: NonNullable<MandatesReinstateData[\"path\"]>[\"id\"], body?: NonNullable<MandatesReinstateData[\"body\"]>) => Promise<MandatesReinstateResponse>;\n  scheduleCollection: (id: NonNullable<MandatesScheduleCollectionData[\"path\"]>[\"id\"], body?: NonNullable<MandatesScheduleCollectionData[\"body\"]>) => Promise<MandatesScheduleCollectionResponse>;\n  suspend: (id: NonNullable<MandatesSuspendData[\"path\"]>[\"id\"], body?: NonNullable<MandatesSuspendData[\"body\"]>) => Promise<MandatesSuspendResponse>;\n}\n\nexport interface PaymentIntentsResource {\n  cancel: (id: NonNullable<PaymentIntentsCancelData[\"path\"]>[\"id\"], body?: NonNullable<PaymentIntentsCancelData[\"body\"]>) => Promise<PaymentIntentsCancelResponse>;\n  capture: (id: NonNullable<PaymentIntentsCaptureData[\"path\"]>[\"id\"], body?: NonNullable<PaymentIntentsCaptureData[\"body\"]>) => Promise<PaymentIntentsCaptureResponse>;\n  confirm: (id: NonNullable<PaymentIntentsConfirmData[\"path\"]>[\"id\"], body?: NonNullable<PaymentIntentsConfirmData[\"body\"]>) => Promise<PaymentIntentsConfirmResponse>;\n  create: (body?: NonNullable<PaymentIntentsCreateData[\"body\"]>) => Promise<PaymentIntentsCreateResponse>;\n  get: (id: NonNullable<PaymentIntentsGetData[\"path\"]>[\"id\"]) => Promise<PaymentIntentsGetResponse>;\n  list: (query?: NonNullable<PaymentIntentsListData[\"query\"]>) => Promise<PaymentIntentsListResponse>;\n}\n\nexport interface PaymentLinksResource {\n  activate: (id: NonNullable<PaymentLinksActivateData[\"path\"]>[\"id\"]) => Promise<PaymentLinksActivateResponse>;\n  archive: (id: NonNullable<PaymentLinksArchiveData[\"path\"]>[\"id\"]) => Promise<PaymentLinksArchiveResponse>;\n  create: (body?: NonNullable<PaymentLinksCreateData[\"body\"]>) => Promise<PaymentLinksCreateResponse>;\n  deactivate: (id: NonNullable<PaymentLinksDeactivateData[\"path\"]>[\"id\"]) => Promise<PaymentLinksDeactivateResponse>;\n  expire: (id: NonNullable<PaymentLinksExpireData[\"path\"]>[\"id\"], body?: NonNullable<PaymentLinksExpireData[\"body\"]>) => Promise<PaymentLinksExpireResponse>;\n  get: (id: NonNullable<PaymentLinksGetData[\"path\"]>[\"id\"]) => Promise<PaymentLinksGetResponse>;\n  list: (query?: NonNullable<PaymentLinksListData[\"query\"]>) => Promise<PaymentLinksListResponse>;\n  update: (id: NonNullable<PaymentLinksUpdateData[\"path\"]>[\"id\"], body?: NonNullable<PaymentLinksUpdateData[\"body\"]>) => Promise<PaymentLinksUpdateResponse>;\n}\n\nexport interface PricesResource {\n  archive: (id: NonNullable<PricesArchiveData[\"path\"]>[\"id\"]) => Promise<PricesArchiveResponse>;\n  create: (body: NonNullable<PricesCreateData[\"body\"]>) => Promise<PricesCreateResponse>;\n  get: (id: NonNullable<PricesGetData[\"path\"]>[\"id\"]) => Promise<PricesGetResponse>;\n  list: (query?: NonNullable<PricesListData[\"query\"]>) => Promise<PricesListResponse>;\n  update: (id: NonNullable<PricesUpdateData[\"path\"]>[\"id\"], body: NonNullable<PricesUpdateData[\"body\"]>) => Promise<PricesUpdateResponse>;\n}\n\nexport interface ProductsResource {\n  create: (body: NonNullable<ProductsCreateData[\"body\"]>) => Promise<ProductsCreateResponse>;\n  get: (id: NonNullable<ProductsGetData[\"path\"]>[\"id\"]) => Promise<ProductsGetResponse>;\n  list: (query?: NonNullable<ProductsListData[\"query\"]>) => Promise<ProductsListResponse>;\n  update: (id: NonNullable<ProductsUpdateData[\"path\"]>[\"id\"], body: NonNullable<ProductsUpdateData[\"body\"]>) => Promise<ProductsUpdateResponse>;\n}\n\nexport interface RefundsResource {\n  create: (body?: NonNullable<RefundsCreateData[\"body\"]>) => Promise<RefundsCreateResponse>;\n  get: (id: NonNullable<RefundsGetData[\"path\"]>[\"id\"]) => Promise<RefundsGetResponse>;\n  list: (query?: NonNullable<RefundsListData[\"query\"]>) => Promise<RefundsListResponse>;\n}\n\nexport interface StorefrontResource {\n  originsCreate: (body?: NonNullable<StorefrontOriginsCreateData[\"body\"]>) => Promise<StorefrontOriginsCreateResponse>;\n  originsDelete: (id: NonNullable<StorefrontOriginsDeleteData[\"path\"]>[\"originId\"]) => Promise<StorefrontOriginsDeleteResponse>;\n  originsList: () => Promise<StorefrontOriginsListResponse>;\n  productsGet: (id: NonNullable<StorefrontProductsGetData[\"path\"]>[\"productId\"]) => Promise<StorefrontProductsGetResponse>;\n  productsList: (query?: NonNullable<StorefrontProductsListData[\"query\"]>) => Promise<StorefrontProductsListResponse>;\n  statusGet: () => Promise<StorefrontStatusGetResponse>;\n}\n\nexport interface SubscriptionsResource {\n  cancel: (id: NonNullable<SubscriptionsCancelData[\"path\"]>[\"id\"], body?: NonNullable<SubscriptionsCancelData[\"body\"]>) => Promise<SubscriptionsCancelResponse>;\n  create: (body?: NonNullable<SubscriptionsCreateData[\"body\"]>) => Promise<SubscriptionsCreateResponse>;\n  get: (id: NonNullable<SubscriptionsGetData[\"path\"]>[\"id\"]) => Promise<SubscriptionsGetResponse>;\n  list: (query?: NonNullable<SubscriptionsListData[\"query\"]>) => Promise<SubscriptionsListResponse>;\n  update: (id: NonNullable<SubscriptionsUpdateData[\"path\"]>[\"id\"], body?: NonNullable<SubscriptionsUpdateData[\"body\"]>) => Promise<SubscriptionsUpdateResponse>;\n}\n\nexport interface TransactionsResource {\n  get: (id: NonNullable<TransactionsGetData[\"path\"]>[\"id\"]) => Promise<TransactionsGetResponse>;\n  list: (query?: NonNullable<TransactionsListData[\"query\"]>) => Promise<TransactionsListResponse>;\n}\n\nexport interface WebhookResource {\n  deliveriesGet: (id: NonNullable<WebhookDeliveriesGetData[\"path\"]>[\"id\"]) => Promise<WebhookDeliveriesGetResponse>;\n  deliveriesList: (query?: NonNullable<WebhookDeliveriesListData[\"query\"]>) => Promise<WebhookDeliveriesListResponse>;\n  deliveriesRetry: (id: NonNullable<WebhookDeliveriesRetryData[\"path\"]>[\"id\"]) => Promise<WebhookDeliveriesRetryResponse>;\n}\n\nexport interface WebhookEndpointsResource {\n  create: (body?: NonNullable<WebhookEndpointsCreateData[\"body\"]>) => Promise<WebhookEndpointsCreateResponse>;\n  delete: (id: NonNullable<WebhookEndpointsDeleteData[\"path\"]>[\"id\"]) => Promise<WebhookEndpointsDeleteResponse>;\n  get: (id: NonNullable<WebhookEndpointsGetData[\"path\"]>[\"id\"]) => Promise<WebhookEndpointsGetResponse>;\n  list: (query?: NonNullable<WebhookEndpointsListData[\"query\"]>) => Promise<WebhookEndpointsListResponse>;\n  rotateSecret: (id: NonNullable<WebhookEndpointsRotateSecretData[\"path\"]>[\"id\"]) => Promise<WebhookEndpointsRotateSecretResponse>;\n  update: (id: NonNullable<WebhookEndpointsUpdateData[\"path\"]>[\"id\"], body?: NonNullable<WebhookEndpointsUpdateData[\"body\"]>) => Promise<WebhookEndpointsUpdateResponse>;\n}\n\nexport interface GeneratedResources {\n  accounting: AccountingResource;\n  analytics: AnalyticsResource;\n  cart: CartResource;\n  checkoutSessions: CheckoutSessionsResource;\n  creditNotes: CreditNotesResource;\n  customer: CustomerResource;\n  customers: CustomersResource;\n  dd: DdResource;\n  entitlements: EntitlementsResource;\n  events: EventsResource;\n  invoices: InvoicesResource;\n  mandates: MandatesResource;\n  paymentIntents: PaymentIntentsResource;\n  paymentLinks: PaymentLinksResource;\n  prices: PricesResource;\n  products: ProductsResource;\n  refunds: RefundsResource;\n  storefront: StorefrontResource;\n  subscriptions: SubscriptionsResource;\n  transactions: TransactionsResource;\n  webhook: WebhookResource;\n  webhookEndpoints: WebhookEndpointsResource;\n}\n\nexport function buildGeneratedResources(\n  runtime: GeneratedResourceRuntime\n): GeneratedResources {\n  return {\n    accounting: {\n    invoicePaymentRequestsCreate: async (body) => runtime.requestData<AccountingInvoicePaymentRequestsCreateResponse>(operations.accountingInvoicePaymentRequestsCreate as (options: unknown) => Promise<{ data?: AccountingInvoicePaymentRequestsCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    invoicePaymentRequestsGet: async (id) => runtime.requestData<AccountingInvoicePaymentRequestsGetResponse>(operations.accountingInvoicePaymentRequestsGet as (options: unknown) => Promise<{ data?: AccountingInvoicePaymentRequestsGetResponse; error?: unknown }>, { path: { id: id } }),\n    },\n    analytics: {\n    revenueMrrSummary: async (query) => runtime.requestData<AnalyticsRevenueMrrSummaryResponse>(operations.analyticsRevenueMrrSummary as (options: unknown) => Promise<{ data?: AnalyticsRevenueMrrSummaryResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    revenueTimeSeries: async (query) => runtime.requestData<AnalyticsRevenueTimeSeriesResponse>(operations.analyticsRevenueTimeSeries as (options: unknown) => Promise<{ data?: AnalyticsRevenueTimeSeriesResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    },\n    cart: {\n    apiKeysEnsure: async () => runtime.requestData<CartApiKeysEnsureResponse>(operations.cartApiKeysEnsure as (options: unknown) => Promise<{ data?: CartApiKeysEnsureResponse; error?: unknown }>, undefined),\n    apiKeysRotate: async (id, body) => runtime.requestData<CartApiKeysRotateResponse>(operations.cartApiKeysRotate as (options: unknown) => Promise<{ data?: CartApiKeysRotateResponse; error?: unknown }>, body === undefined ? { path: { kind: id } } : { path: { kind: id }, body }),\n    apiKeysStatus: async () => runtime.requestData<CartApiKeysStatusResponse>(operations.cartApiKeysStatus as (options: unknown) => Promise<{ data?: CartApiKeysStatusResponse; error?: unknown }>, undefined),\n    sessionsAddLineItem: async (id, body) => runtime.requestData<CartSessionsAddLineItemResponse>(operations.cartSessionsAddLineItem as (options: unknown) => Promise<{ data?: CartSessionsAddLineItemResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    sessionsApplyDiscountCode: async (id, body) => runtime.requestData<CartSessionsApplyDiscountCodeResponse>(operations.cartSessionsApplyDiscountCode as (options: unknown) => Promise<{ data?: CartSessionsApplyDiscountCodeResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    sessionsConvert: async (id) => runtime.requestData<CartSessionsConvertResponse>(operations.cartSessionsConvert as (options: unknown) => Promise<{ data?: CartSessionsConvertResponse; error?: unknown }>, { path: { id: id } }),\n    sessionsCreate: async (body) => runtime.requestData<CartSessionsCreateResponse>(operations.cartSessionsCreate as (options: unknown) => Promise<{ data?: CartSessionsCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    sessionsGet: async (id) => runtime.requestData<CartSessionsGetResponse>(operations.cartSessionsGet as (options: unknown) => Promise<{ data?: CartSessionsGetResponse; error?: unknown }>, { path: { id: id } }),\n    sessionsRemoveLineItem: async (path) => runtime.requestData<CartSessionsRemoveLineItemResponse>(operations.cartSessionsRemoveLineItem as (options: unknown) => Promise<{ data?: CartSessionsRemoveLineItemResponse; error?: unknown }>, { path }),\n    sessionsSetContact: async (id, body) => runtime.requestData<CartSessionsSetContactResponse>(operations.cartSessionsSetContact as (options: unknown) => Promise<{ data?: CartSessionsSetContactResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    sessionsToggleAddOn: async (id, body) => runtime.requestData<CartSessionsToggleAddOnResponse>(operations.cartSessionsToggleAddOn as (options: unknown) => Promise<{ data?: CartSessionsToggleAddOnResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    sessionsUpdateLineItem: async (params) => runtime.requestData<CartSessionsUpdateLineItemResponse>(operations.cartSessionsUpdateLineItem as (options: unknown) => Promise<{ data?: CartSessionsUpdateLineItemResponse; error?: unknown }>, { path: params.path, ...(params.body === undefined ? {} : { body: params.body }) }),\n    },\n    checkoutSessions: {\n    create: async (body) => runtime.requestData<CheckoutSessionsCreateResponse>(operations.checkoutSessionsCreate as (options: unknown) => Promise<{ data?: CheckoutSessionsCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    expire: async (id) => runtime.requestData<CheckoutSessionsExpireResponse>(operations.checkoutSessionsExpire as (options: unknown) => Promise<{ data?: CheckoutSessionsExpireResponse; error?: unknown }>, { path: { id: id } }),\n    get: async (id) => runtime.requestData<CheckoutSessionsGetResponse>(operations.checkoutSessionsGet as (options: unknown) => Promise<{ data?: CheckoutSessionsGetResponse; error?: unknown }>, { path: { id: id } }),\n    },\n    creditNotes: {\n    create: async (body) => runtime.requestData<CreditNotesCreateResponse>(operations.creditNotesCreate as (options: unknown) => Promise<{ data?: CreditNotesCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    get: async (id) => runtime.requestData<CreditNotesGetResponse>(operations.creditNotesGet as (options: unknown) => Promise<{ data?: CreditNotesGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<CreditNotesListResponse>(operations.creditNotesList as (options: unknown) => Promise<{ data?: CreditNotesListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    listLines: async (id, query) => runtime.requestData<CreditNotesListLinesResponse>(operations.creditNotesListLines as (options: unknown) => Promise<{ data?: CreditNotesListLinesResponse; error?: unknown }>, query === undefined ? { path: { id: id } } : { path: { id: id }, query }),\n    preview: async (body) => runtime.requestData<CreditNotesPreviewResponse>(operations.creditNotesPreview as (options: unknown) => Promise<{ data?: CreditNotesPreviewResponse; error?: unknown }>, { body }),\n    void: async (id) => runtime.requestData<CreditNotesVoidResponse>(operations.creditNotesVoid as (options: unknown) => Promise<{ data?: CreditNotesVoidResponse; error?: unknown }>, { path: { id: id } }),\n    },\n    customer: {\n    metersGet: async (path) => runtime.requestData<CustomerMetersGetResponse>(operations.customerMetersGet as (options: unknown) => Promise<{ data?: CustomerMetersGetResponse; error?: unknown }>, { path }),\n    metersList: async (query) => runtime.requestData<CustomerMetersListResponse>(operations.customerMetersList as (options: unknown) => Promise<{ data?: CustomerMetersListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    portalCustomerGet: async () => runtime.requestData<CustomerPortalCustomerGetResponse>(operations.customerPortalCustomerGet as (options: unknown) => Promise<{ data?: CustomerPortalCustomerGetResponse; error?: unknown }>, undefined),\n    portalInvoicesGet: async (id) => runtime.requestData<CustomerPortalInvoicesGetResponse>(operations.customerPortalInvoicesGet as (options: unknown) => Promise<{ data?: CustomerPortalInvoicesGetResponse; error?: unknown }>, { path: { id: id } }),\n    portalInvoicesList: async (query) => runtime.requestData<CustomerPortalInvoicesListResponse>(operations.customerPortalInvoicesList as (options: unknown) => Promise<{ data?: CustomerPortalInvoicesListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    portalMandatesCancel: async (id, body) => runtime.requestData<CustomerPortalMandatesCancelResponse>(operations.customerPortalMandatesCancel as (options: unknown) => Promise<{ data?: CustomerPortalMandatesCancelResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    portalMandatesList: async () => runtime.requestData<CustomerPortalMandatesListResponse>(operations.customerPortalMandatesList as (options: unknown) => Promise<{ data?: CustomerPortalMandatesListResponse; error?: unknown }>, undefined),\n    portalMandatesReauthorize: async (id, body) => runtime.requestData<CustomerPortalMandatesReauthorizeResponse>(operations.customerPortalMandatesReauthorize as (options: unknown) => Promise<{ data?: CustomerPortalMandatesReauthorizeResponse; error?: unknown }>, { path: { id: id }, body }),\n    portalMandatesReauthorizeSendOtp: async (id) => runtime.requestData<CustomerPortalMandatesReauthorizeSendOtpResponse>(operations.customerPortalMandatesReauthorizeSendOtp as (options: unknown) => Promise<{ data?: CustomerPortalMandatesReauthorizeSendOtpResponse; error?: unknown }>, { path: { id: id } }),\n    portalMandatesReauthorizeVerifyOtp: async (id, body) => runtime.requestData<CustomerPortalMandatesReauthorizeVerifyOtpResponse>(operations.customerPortalMandatesReauthorizeVerifyOtp as (options: unknown) => Promise<{ data?: CustomerPortalMandatesReauthorizeVerifyOtpResponse; error?: unknown }>, { path: { id: id }, body }),\n    portalSessionsCreate: async (body) => runtime.requestData<CustomerPortalSessionsCreateResponse>(operations.customerPortalSessionsCreate as (options: unknown) => Promise<{ data?: CustomerPortalSessionsCreateResponse; error?: unknown }>, { body }),\n    portalSubscriptionsCancel: async (id, body) => runtime.requestData<CustomerPortalSubscriptionsCancelResponse>(operations.customerPortalSubscriptionsCancel as (options: unknown) => Promise<{ data?: CustomerPortalSubscriptionsCancelResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    portalSubscriptionsGet: async (id) => runtime.requestData<CustomerPortalSubscriptionsGetResponse>(operations.customerPortalSubscriptionsGet as (options: unknown) => Promise<{ data?: CustomerPortalSubscriptionsGetResponse; error?: unknown }>, { path: { id: id } }),\n    portalSubscriptionsList: async (query) => runtime.requestData<CustomerPortalSubscriptionsListResponse>(operations.customerPortalSubscriptionsList as (options: unknown) => Promise<{ data?: CustomerPortalSubscriptionsListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    },\n    customers: {\n    create: async (body) => runtime.requestData<CustomersCreateResponse>(operations.customersCreate as (options: unknown) => Promise<{ data?: CustomersCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    get: async (id) => runtime.requestData<CustomersGetResponse>(operations.customersGet as (options: unknown) => Promise<{ data?: CustomersGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<CustomersListResponse>(operations.customersList as (options: unknown) => Promise<{ data?: CustomersListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    paymentMethodsList: async (id) => runtime.requestData<CustomersPaymentMethodsListResponse>(operations.customersPaymentMethodsList as (options: unknown) => Promise<{ data?: CustomersPaymentMethodsListResponse; error?: unknown }>, { path: { id: id } }),\n    paymentRailsGet: async (id, query) => runtime.requestData<CustomersPaymentRailsGetResponse>(operations.customersPaymentRailsGet as (options: unknown) => Promise<{ data?: CustomersPaymentRailsGetResponse; error?: unknown }>, query === undefined ? { path: { id: id } } : { path: { id: id }, query }),\n    preferredRailsGet: async (id, query) => runtime.requestData<CustomersPreferredRailsGetResponse>(operations.customersPreferredRailsGet as (options: unknown) => Promise<{ data?: CustomersPreferredRailsGetResponse; error?: unknown }>, query === undefined ? { path: { id: id } } : { path: { id: id }, query }),\n    update: async (id, body) => runtime.requestData<CustomersUpdateResponse>(operations.customersUpdate as (options: unknown) => Promise<{ data?: CustomersUpdateResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    },\n    dd: {\n    mandateRequestsGet: async (id) => runtime.requestData<DdMandateRequestsGetResponse>(operations.ddMandateRequestsGet as (options: unknown) => Promise<{ data?: DdMandateRequestsGetResponse; error?: unknown }>, { path: { token: id } }),\n    preview: async (body) => runtime.requestData<DdPreviewResponse>(operations.ddPreview as (options: unknown) => Promise<{ data?: DdPreviewResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    validate: async (body) => runtime.requestData<DdValidateResponse>(operations.ddValidate as (options: unknown) => Promise<{ data?: DdValidateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    },\n    entitlements: {\n    check: async (query) => runtime.requestData<EntitlementsCheckResponse>(operations.entitlementsCheck as (options: unknown) => Promise<{ data?: EntitlementsCheckResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    list: async (query) => runtime.requestData<EntitlementsListResponse>(operations.entitlementsList as (options: unknown) => Promise<{ data?: EntitlementsListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    },\n    events: {\n    get: async (id) => runtime.requestData<EventsGetResponse>(operations.eventsGet as (options: unknown) => Promise<{ data?: EventsGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<EventsListResponse>(operations.eventsList as (options: unknown) => Promise<{ data?: EventsListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    resend: async (id) => runtime.requestData<EventsResendResponse>(operations.eventsResend as (options: unknown) => Promise<{ data?: EventsResendResponse; error?: unknown }>, { path: { id: id } }),\n    },\n    invoices: {\n    create: async (body) => runtime.requestData<InvoicesCreateResponse>(operations.invoicesCreate as (options: unknown) => Promise<{ data?: InvoicesCreateResponse; error?: unknown }>, { body }),\n    finalize: async (id, body) => runtime.requestData<InvoicesFinalizeResponse>(operations.invoicesFinalize as (options: unknown) => Promise<{ data?: InvoicesFinalizeResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    get: async (id) => runtime.requestData<InvoicesGetResponse>(operations.invoicesGet as (options: unknown) => Promise<{ data?: InvoicesGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<InvoicesListResponse>(operations.invoicesList as (options: unknown) => Promise<{ data?: InvoicesListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    marginEstimate: async (id, body) => runtime.requestData<InvoicesMarginEstimateResponse>(operations.invoicesMarginEstimate as (options: unknown) => Promise<{ data?: InvoicesMarginEstimateResponse; error?: unknown }>, { path: { id: id }, body }),\n    send: async (id, body) => runtime.requestData<InvoicesSendResponse>(operations.invoicesSend as (options: unknown) => Promise<{ data?: InvoicesSendResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    update: async (id, body) => runtime.requestData<InvoicesUpdateResponse>(operations.invoicesUpdate as (options: unknown) => Promise<{ data?: InvoicesUpdateResponse; error?: unknown }>, { path: { id: id }, body }),\n    void: async (id, body) => runtime.requestData<InvoicesVoidResponse>(operations.invoicesVoid as (options: unknown) => Promise<{ data?: InvoicesVoidResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    },\n    mandates: {\n    cancel: async (id, body) => runtime.requestData<MandatesCancelResponse>(operations.mandatesCancel as (options: unknown) => Promise<{ data?: MandatesCancelResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    create: async (body) => runtime.requestData<MandatesCreateResponse>(operations.mandatesCreate as (options: unknown) => Promise<{ data?: MandatesCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    get: async (id) => runtime.requestData<MandatesGetResponse>(operations.mandatesGet as (options: unknown) => Promise<{ data?: MandatesGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<MandatesListResponse>(operations.mandatesList as (options: unknown) => Promise<{ data?: MandatesListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    reinstate: async (id, body) => runtime.requestData<MandatesReinstateResponse>(operations.mandatesReinstate as (options: unknown) => Promise<{ data?: MandatesReinstateResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    scheduleCollection: async (id, body) => runtime.requestData<MandatesScheduleCollectionResponse>(operations.mandatesScheduleCollection as (options: unknown) => Promise<{ data?: MandatesScheduleCollectionResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    suspend: async (id, body) => runtime.requestData<MandatesSuspendResponse>(operations.mandatesSuspend as (options: unknown) => Promise<{ data?: MandatesSuspendResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    },\n    paymentIntents: {\n    cancel: async (id, body) => runtime.requestData<PaymentIntentsCancelResponse>(operations.paymentIntentsCancel as (options: unknown) => Promise<{ data?: PaymentIntentsCancelResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    capture: async (id, body) => runtime.requestData<PaymentIntentsCaptureResponse>(operations.paymentIntentsCapture as (options: unknown) => Promise<{ data?: PaymentIntentsCaptureResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    confirm: async (id, body) => runtime.requestData<PaymentIntentsConfirmResponse>(operations.paymentIntentsConfirm as (options: unknown) => Promise<{ data?: PaymentIntentsConfirmResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    create: async (body) => runtime.requestData<PaymentIntentsCreateResponse>(operations.paymentIntentsCreate as (options: unknown) => Promise<{ data?: PaymentIntentsCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    get: async (id) => runtime.requestData<PaymentIntentsGetResponse>(operations.paymentIntentsGet as (options: unknown) => Promise<{ data?: PaymentIntentsGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<PaymentIntentsListResponse>(operations.paymentIntentsList as (options: unknown) => Promise<{ data?: PaymentIntentsListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    },\n    paymentLinks: {\n    activate: async (id) => runtime.requestData<PaymentLinksActivateResponse>(operations.paymentLinksActivate as (options: unknown) => Promise<{ data?: PaymentLinksActivateResponse; error?: unknown }>, { path: { id: id } }),\n    archive: async (id) => runtime.requestData<PaymentLinksArchiveResponse>(operations.paymentLinksArchive as (options: unknown) => Promise<{ data?: PaymentLinksArchiveResponse; error?: unknown }>, { path: { id: id } }),\n    create: async (body) => runtime.requestData<PaymentLinksCreateResponse>(operations.paymentLinksCreate as (options: unknown) => Promise<{ data?: PaymentLinksCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    deactivate: async (id) => runtime.requestData<PaymentLinksDeactivateResponse>(operations.paymentLinksDeactivate as (options: unknown) => Promise<{ data?: PaymentLinksDeactivateResponse; error?: unknown }>, { path: { id: id } }),\n    expire: async (id, body) => runtime.requestData<PaymentLinksExpireResponse>(operations.paymentLinksExpire as (options: unknown) => Promise<{ data?: PaymentLinksExpireResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    get: async (id) => runtime.requestData<PaymentLinksGetResponse>(operations.paymentLinksGet as (options: unknown) => Promise<{ data?: PaymentLinksGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<PaymentLinksListResponse>(operations.paymentLinksList as (options: unknown) => Promise<{ data?: PaymentLinksListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    update: async (id, body) => runtime.requestData<PaymentLinksUpdateResponse>(operations.paymentLinksUpdate as (options: unknown) => Promise<{ data?: PaymentLinksUpdateResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    },\n    prices: {\n    archive: async (id) => runtime.requestData<PricesArchiveResponse>(operations.pricesArchive as (options: unknown) => Promise<{ data?: PricesArchiveResponse; error?: unknown }>, { path: { id: id } }),\n    create: async (body) => runtime.requestData<PricesCreateResponse>(operations.pricesCreate as (options: unknown) => Promise<{ data?: PricesCreateResponse; error?: unknown }>, { body }),\n    get: async (id) => runtime.requestData<PricesGetResponse>(operations.pricesGet as (options: unknown) => Promise<{ data?: PricesGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<PricesListResponse>(operations.pricesList as (options: unknown) => Promise<{ data?: PricesListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    update: async (id, body) => runtime.requestData<PricesUpdateResponse>(operations.pricesUpdate as (options: unknown) => Promise<{ data?: PricesUpdateResponse; error?: unknown }>, { path: { id: id }, body }),\n    },\n    products: {\n    create: async (body) => runtime.requestData<ProductsCreateResponse>(operations.productsCreate as (options: unknown) => Promise<{ data?: ProductsCreateResponse; error?: unknown }>, { body }),\n    get: async (id) => runtime.requestData<ProductsGetResponse>(operations.productsGet as (options: unknown) => Promise<{ data?: ProductsGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<ProductsListResponse>(operations.productsList as (options: unknown) => Promise<{ data?: ProductsListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    update: async (id, body) => runtime.requestData<ProductsUpdateResponse>(operations.productsUpdate as (options: unknown) => Promise<{ data?: ProductsUpdateResponse; error?: unknown }>, { path: { id: id }, body }),\n    },\n    refunds: {\n    create: async (body) => runtime.requestData<RefundsCreateResponse>(operations.refundsCreate as (options: unknown) => Promise<{ data?: RefundsCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    get: async (id) => runtime.requestData<RefundsGetResponse>(operations.refundsGet as (options: unknown) => Promise<{ data?: RefundsGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<RefundsListResponse>(operations.refundsList as (options: unknown) => Promise<{ data?: RefundsListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    },\n    storefront: {\n    originsCreate: async (body) => runtime.requestData<StorefrontOriginsCreateResponse>(operations.storefrontOriginsCreate as (options: unknown) => Promise<{ data?: StorefrontOriginsCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    originsDelete: async (id) => runtime.requestData<StorefrontOriginsDeleteResponse>(operations.storefrontOriginsDelete as (options: unknown) => Promise<{ data?: StorefrontOriginsDeleteResponse; error?: unknown }>, { path: { originId: id } }),\n    originsList: async () => runtime.requestData<StorefrontOriginsListResponse>(operations.storefrontOriginsList as (options: unknown) => Promise<{ data?: StorefrontOriginsListResponse; error?: unknown }>, undefined),\n    productsGet: async (id) => runtime.requestData<StorefrontProductsGetResponse>(operations.storefrontProductsGet as (options: unknown) => Promise<{ data?: StorefrontProductsGetResponse; error?: unknown }>, { path: { productId: id } }),\n    productsList: async (query) => runtime.requestData<StorefrontProductsListResponse>(operations.storefrontProductsList as (options: unknown) => Promise<{ data?: StorefrontProductsListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    statusGet: async () => runtime.requestData<StorefrontStatusGetResponse>(operations.storefrontStatusGet as (options: unknown) => Promise<{ data?: StorefrontStatusGetResponse; error?: unknown }>, undefined),\n    },\n    subscriptions: {\n    cancel: async (id, body) => runtime.requestData<SubscriptionsCancelResponse>(operations.subscriptionsCancel as (options: unknown) => Promise<{ data?: SubscriptionsCancelResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    create: async (body) => runtime.requestData<SubscriptionsCreateResponse>(operations.subscriptionsCreate as (options: unknown) => Promise<{ data?: SubscriptionsCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    get: async (id) => runtime.requestData<SubscriptionsGetResponse>(operations.subscriptionsGet as (options: unknown) => Promise<{ data?: SubscriptionsGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<SubscriptionsListResponse>(operations.subscriptionsList as (options: unknown) => Promise<{ data?: SubscriptionsListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    update: async (id, body) => runtime.requestData<SubscriptionsUpdateResponse>(operations.subscriptionsUpdate as (options: unknown) => Promise<{ data?: SubscriptionsUpdateResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    },\n    transactions: {\n    get: async (id) => runtime.requestData<TransactionsGetResponse>(operations.transactionsGet as (options: unknown) => Promise<{ data?: TransactionsGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<TransactionsListResponse>(operations.transactionsList as (options: unknown) => Promise<{ data?: TransactionsListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    },\n    webhook: {\n    deliveriesGet: async (id) => runtime.requestData<WebhookDeliveriesGetResponse>(operations.webhookDeliveriesGet as (options: unknown) => Promise<{ data?: WebhookDeliveriesGetResponse; error?: unknown }>, { path: { id: id } }),\n    deliveriesList: async (query) => runtime.requestData<WebhookDeliveriesListResponse>(operations.webhookDeliveriesList as (options: unknown) => Promise<{ data?: WebhookDeliveriesListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    deliveriesRetry: async (id) => runtime.requestData<WebhookDeliveriesRetryResponse>(operations.webhookDeliveriesRetry as (options: unknown) => Promise<{ data?: WebhookDeliveriesRetryResponse; error?: unknown }>, { path: { id: id } }),\n    },\n    webhookEndpoints: {\n    create: async (body) => runtime.requestData<WebhookEndpointsCreateResponse>(operations.webhookEndpointsCreate as (options: unknown) => Promise<{ data?: WebhookEndpointsCreateResponse; error?: unknown }>, body === undefined ? undefined : { body }),\n    delete: async (id) => runtime.requestData<WebhookEndpointsDeleteResponse>(operations.webhookEndpointsDelete as (options: unknown) => Promise<{ data?: WebhookEndpointsDeleteResponse; error?: unknown }>, { path: { id: id } }),\n    get: async (id) => runtime.requestData<WebhookEndpointsGetResponse>(operations.webhookEndpointsGet as (options: unknown) => Promise<{ data?: WebhookEndpointsGetResponse; error?: unknown }>, { path: { id: id } }),\n    list: async (query) => runtime.requestData<WebhookEndpointsListResponse>(operations.webhookEndpointsList as (options: unknown) => Promise<{ data?: WebhookEndpointsListResponse; error?: unknown }>, query === undefined ? undefined : { query }),\n    rotateSecret: async (id) => runtime.requestData<WebhookEndpointsRotateSecretResponse>(operations.webhookEndpointsRotateSecret as (options: unknown) => Promise<{ data?: WebhookEndpointsRotateSecretResponse; error?: unknown }>, { path: { id: id } }),\n    update: async (id, body) => runtime.requestData<WebhookEndpointsUpdateResponse>(operations.webhookEndpointsUpdate as (options: unknown) => Promise<{ data?: WebhookEndpointsUpdateResponse; error?: unknown }>, body === undefined ? { path: { id: id } } : { path: { id: id }, body }),\n    },\n  };\n}\n","import { createClient } from \"./generated/client/index.js\";\nimport type { Client as GeneratedClient } from \"./generated/client/index.js\";\nimport { buildGeneratedResources } from \"./generated-resources.js\";\nimport type { GeneratedResourceRuntime, GeneratedResources } from \"./generated-resources.js\";\nimport { RevKeenAPIError, RevKeenError, RevKeenTimeoutError } from \"./core/errors.js\";\nimport { OAuthTokenManager } from \"./core/oauth.js\";\nimport type { OAuthConfig } from \"./core/oauth.js\";\nimport type {\n  BatchIngestResult,\n  DryRunResult,\n  UsageIngestRequest,\n} from \"./generated/types.gen.js\";\n\nexport interface RevKeenClientOptions {\n  apiKey?: string;\n  oauth?: OAuthConfig;\n  baseUrl?: string;\n  timeout?: number;\n  headers?: Record<string, string>;\n  fetch?: typeof fetch;\n}\n\nexport interface UsageResource {\n  ingest: (body: UsageIngestRequest) => Promise<BatchIngestResult>;\n  dryRun: (body: UsageIngestRequest) => Promise<DryRunResult>;\n}\n\nconst API_SECURITY = [\n  { name: \"x-api-key\", type: \"apiKey\" as const },\n  { scheme: \"bearer\" as const, type: \"http\" as const },\n];\n\nfunction createTimeoutFetch(fetchImpl: typeof fetch, timeoutMs: number): typeof fetch {\n  return async (input, init = {}) => {\n    const timeoutController = new AbortController();\n    const signal = init.signal\n      ? AbortSignal.any([init.signal, timeoutController.signal])\n      : timeoutController.signal;\n    const timeoutId = setTimeout(() => timeoutController.abort(), timeoutMs);\n\n    try {\n      return await fetchImpl(input, {\n        ...init,\n        signal,\n      });\n    } finally {\n      clearTimeout(timeoutId);\n    }\n  };\n}\n\nfunction getApiErrorMessage(error: unknown, fallback: string): string {\n  if (typeof error === \"string\" && error.length > 0) {\n    return error;\n  }\n\n  if (\n    error &&\n    typeof error === \"object\" &&\n    \"error\" in error &&\n    typeof (error as { error?: unknown }).error === \"string\"\n  ) {\n    return (error as { error: string }).error;\n  }\n\n  if (\n    error &&\n    typeof error === \"object\" &&\n    \"message\" in error &&\n    typeof (error as { message?: unknown }).message === \"string\"\n  ) {\n    return (error as { message: string }).message;\n  }\n\n  return fallback;\n}\n\nexport class RevKeenClient implements GeneratedResourceRuntime {\n  private readonly generatedClient: GeneratedClient;\n  readonly usage: UsageResource;\n\n  constructor(options: RevKeenClientOptions) {\n    if (!options.apiKey && !options.oauth) {\n      throw new RevKeenError(\n        \"RevKeenClient requires either 'apiKey' or 'oauth' configuration. \" +\n          \"See https://docs.revkeen.com/api/authentication\"\n      );\n    }\n\n    if (options.apiKey && options.oauth) {\n      throw new RevKeenError(\n        \"Provide either 'apiKey' or 'oauth', not both. \" +\n          \"Use 'apiKey' for server-to-server with Unkey keys, or 'oauth' for OAuth 2.1 client credentials.\"\n      );\n    }\n\n    const timeoutMs = options.timeout ?? 30_000;\n    const tokenManager = options.oauth ? new OAuthTokenManager(options.oauth) : null;\n    const fetchImpl = createTimeoutFetch(options.fetch ?? globalThis.fetch, timeoutMs);\n\n    this.generatedClient = createClient({\n      auth: async (auth) => {\n        if (auth.type === \"apiKey\") {\n          return options.apiKey;\n        }\n\n        if (auth.scheme === \"bearer\" && tokenManager) {\n          return tokenManager.getToken();\n        }\n\n        return undefined;\n      },\n      baseUrl: options.baseUrl || \"https://api.revkeen.com/v2\",\n      fetch: fetchImpl,\n      headers: options.headers,\n    });\n\n    this.generatedClient.interceptors.error.use(async (error, response, request) => {\n      if (error instanceof RevKeenError) {\n        return error;\n      }\n\n      if (response) {\n        return new RevKeenAPIError(\n          response.status,\n          getApiErrorMessage(error, response.statusText),\n          error\n        );\n      }\n\n      if (error instanceof Error && error.name === \"AbortError\") {\n        return new RevKeenTimeoutError(\n          `Request timed out${request ? ` for ${request.method} ${request.url}` : \"\"}`\n        );\n      }\n\n      if (error instanceof Error) {\n        return new RevKeenError(`Network error: ${error.message}`);\n      }\n\n      return new RevKeenError(\"Unknown SDK error\");\n    });\n\n    Object.assign(this, buildGeneratedResources(this));\n\n    this.usage = {\n      ingest: (body) => this.postUsage<BatchIngestResult>(\"/usage-events\", body),\n      dryRun: (body) => this.postUsage<DryRunResult>(\"/usage-events/dry-run\", body),\n    };\n  }\n\n  async requestData<T>(\n    fn: (options: unknown) => Promise<{ data?: T; error?: unknown }>,\n    options?: Record<string, unknown>\n  ): Promise<T> {\n    const result = await fn({\n      client: this.generatedClient,\n      throwOnError: true,\n      ...(options ?? {}),\n    });\n\n    if (result.data === undefined) {\n      throw new RevKeenError(\"SDK request completed without response data\");\n    }\n\n    return result.data;\n  }\n\n  private async postUsage<T>(url: string, body: UsageIngestRequest): Promise<T> {\n    const result = await this.generatedClient.post<T, unknown, true>({\n      security: API_SECURITY,\n      throwOnError: true,\n      url,\n      body,\n    }) as unknown as { data: T };\n\n    return result.data;\n  }\n}\n\nexport interface RevKeenClient extends GeneratedResources {}\n\nexport { RevKeenClient as RevKeen };\n"],"mappings":";;;;;;;;;;;;;;;;;AA2DO,IAAM,qBAAqB;AAAA,EAChC,gBAAgB,CAAC,SACf,KAAK,UAAU,MAAM,CAAC,MAAM,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